Bug 707508 - virt-what doesn't detect ia64 Xen guest
Summary: virt-what doesn't detect ia64 Xen guest
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: virt-what
Version: 5.7
Hardware: ia64
OS: Unspecified
high
high
Target Milestone: rc
: ---
Assignee: Richard W.M. Jones
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks: rhel57rtt
TreeView+ depends on / blocked
 
Reported: 2011-05-25 09:28 UTC by Alexander Todorov
Modified: 2011-07-21 07:48 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-07-21 07:48:13 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
ia64-host log (2.49 KB, text/plain)
2011-06-08 09:16 UTC, Pengzhen Cao
no flags Details
ia64-hvm-guest log (2.35 KB, text/plain)
2011-06-08 09:16 UTC, Pengzhen Cao
no flags Details
ia64-pv-guest (5.76 KB, text/plain)
2011-06-08 09:46 UTC, Pengzhen Cao
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2011:1015 0 normal SHIPPED_LIVE new package: virt-what 2011-07-20 15:44:34 UTC

Description Alexander Todorov 2011-05-25 09:28:44 UTC
Description of problem:

On ia64 full virt Xen guest:

# virt-what 
# echo $?
0
# 


The side result of this is that system is detected as physical system in entitlement webUI. 

Version-Release number of selected component (if applicable):
virt-what-1.9-1.3.el5

How reproducible:
Always

Comment 3 Richard W.M. Jones 2011-05-26 12:14:48 UTC
Paolo, the problem is that Xen IA64 HVM guest does
not see the CPUID leaf, ie:

# virt-what-cpuid-helper

prints nothing (we would expect XenVMMXenVMM in an
ordinary Xen HVM guest).

Any ideas?

Comment 4 Richard W.M. Jones 2011-05-26 12:32:07 UTC
There are some Xen-specific devices.  We might
base detection on the presence of these, but I'd
prefer to have pbonzini's opinion on the subject.

# find /sys/ -name '*xen*'
/sys/module/xen_vnif
/sys/module/xen_vbd
/sys/module/xen_platform_pci
/sys/bus/xen
/sys/bus/pci/drivers/xen-platform-pci
/sys/devices/xen

Comment 5 Paolo Bonzini 2011-05-26 13:55:21 UTC
Testing those devices is always effective, but it only detects guests which have PV-on-HVM drivers loaded.  You can do that before the CPUID test, but it is not 100% effective (on either x86 or ia64).

Comment 6 Richard W.M. Jones 2011-05-26 15:09:09 UTC
Patches posted upstream:
https://www.redhat.com/archives/virt-tools-list/2011-May/msg00068.html

Comment 7 Richard W.M. Jones 2011-05-26 15:10:27 UTC
(In reply to comment #6)
> Patches posted upstream:
> https://www.redhat.com/archives/virt-tools-list/2011-May/msg00068.html

I forgot to mention ...  In the specific corner case
where we fall back to the timing attack method, we can't
really tell what sort of virtualization is present, just
that virtualization is there.  So we print:

  # virt-what
  virt

This may or may not require a change to subscription-manager.
Can someone point me to the relevant piece of code?

Comment 10 Richard W.M. Jones 2011-05-27 11:31:04 UTC
I've pushed this upstream.  The patches as posted
contained a very small mistake, so there is an additional
commit required to correct that.  The full set of patches
required to fix this is below.

Included in virt-what 1.11:
http://git.annexia.org/?p=virt-what.git;a=commitdiff;h=3ea952163f0c28cd88f8473bb015df892c4247bf
http://git.annexia.org/?p=virt-what.git;a=commitdiff;h=2d9d8b9e404d831f7aecbea729d87d0db62cec23

Pushed after virt-what 1.11:
http://git.annexia.org/?p=virt-what.git;a=commitdiff;h=d87e9cbae34b22c89e6094263ae44567f5b5bd90

Comment 11 Richard W.M. Jones 2011-06-01 09:38:31 UTC
Ping PMs ...

Comment 13 Pengzhen Cao 2011-06-08 09:15:30 UTC
Host hardware: HP BL860c  IA64 host,
Host kernel: 2.6.18-238.12.1.el5xen
Host xen: xen-3.0.3-120.el5

Verification steps:
1. Created one ia64 rhel5 hvm guest
2. install virt-what-1.10-1.el5.ia64.rpm in guest before the fix, run virt-what and return nothing
3.  then update virt-what to latest virt-what-1.11-2.el5.ia64.rpm, run 
virt-what again, and this time it return correct info "xen  xen-hvm"
4.  In host, install virt-what and run virt-what, it return correct info "xen xen-dom0".

Bug verified.
Please check attached logs

Comment 14 Pengzhen Cao 2011-06-08 09:16:15 UTC
Created attachment 503650 [details]
ia64-host log

Comment 15 Pengzhen Cao 2011-06-08 09:16:44 UTC
Created attachment 503651 [details]
ia64-hvm-guest log

Comment 16 Pengzhen Cao 2011-06-08 09:45:53 UTC
also tried with ia64 pv guest, both virt-what-1.10-1 old build and virt-what-1.11-2 new build works file. Both give correct result "xen xen-domU“

Comment 17 Pengzhen Cao 2011-06-08 09:46:41 UTC
Created attachment 503655 [details]
ia64-pv-guest

Comment 18 Richard W.M. Jones 2011-06-08 10:43:30 UTC
(In reply to comment #15)
> Created attachment 503651 [details]
> ia64-hvm-guest log

This is correct, because the guest has PV-on-HVM drivers
installed (notice /proc/sys/bus/xen directory in the guest).

If you didn't have PV-on-HVM drivers installed, then you
would see a slightly different output:

virt

The test results are still verified.

Comment 19 errata-xmlrpc 2011-07-21 07:48:13 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHEA-2011-1015.html


Note You need to log in before you can comment on or make changes to this bug.