Bug 671510 - virt-what fails to detect Citrix (upstream) Xen HVM with Viridian extensions
virt-what fails to detect Citrix (upstream) Xen HVM with Viridian extensions
Status: NEW
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: virt-what (Show other bugs)
7.0
Unspecified Unspecified
unspecified Severity unspecified
: rc
: 7.0
Assigned To: Richard W.M. Jones
Virtualization Bugs
:
Depends On: 672211
Blocks: 1301891 1288337
  Show dependency treegraph
 
Reported: 2011-01-21 13:04 EST by Richard W.M. Jones
Modified: 2017-02-16 07:33 EST (History)
13 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Modified code to differentiate between XenServer and Hyper-V (1.50 KB, text/plain)
2012-04-25 11:02 EDT, Valentine Sinitsyn
no flags Details

  None (edit)
Description Richard W.M. Jones 2011-01-21 13:04:40 EST
Description of problem:

(This was reported in a private email by Ian Campbell)

<<
For HVM (32 or 64 bit) virt-what returns:
# virt-what                                                                     
hyperv
xen

I disabled the Xen Viridian extensions and it returns:
# virt-what                                                                     
xen
xen-hvm

Your cpuid helper should check every 0x100 from 0x40000000
and then it will find multiple signatures on Xen when
viridian compat is enabled.
>>

Ian goes on to point to this piece of code from xendetect:

        static inline uint32_t xen_cpuid_base(void)
        {
                uint32_t base, eax, ebx, ecx, edx;
                char signature[13];

                for (base = 0x40000000; base < 0x40010000; base += 0x100) {
                        cpuid(base, &eax, &ebx, &ecx, &edx);
                        *(uint32_t *)(signature + 0) = ebx;
                        *(uint32_t *)(signature + 4) = ecx;
                        *(uint32_t *)(signature + 8) = edx;
                        signature[12] = 0;

                        if (!strcmp("XenVMMXenVMM", signature) && ((eax - base)
>= 2))
                                return base;
                }                                                               

                return 0;
        }                                                                       


Version-Release number of selected component (if applicable):

virt-what 1.7

How reproducible:

Always.

Steps to Reproduce:
1. Using upstream Xen, HVM with Viridian extensions turned on.
2. Run virt-what in the guest.
  
Actual results:

hyperv
xen

Expected results:

Something like:

xen
xen-hvm
xen-hyperv_compat

Additional info:
Comment 4 Richard W.M. Jones 2011-06-10 06:12:02 EDT
Need to find a Citrix Xen box.
Comment 5 Richard W.M. Jones 2011-08-11 07:40:18 EDT
Push this up to 6.3.  It's not a customer bug.
Comment 6 Richard W.M. Jones 2012-03-05 08:12:45 EST
Push to 6.4, for the same reason as comment 5.
Comment 7 Valentine Sinitsyn 2012-04-25 11:01:17 EDT
(In reply to comment #2)
> Fixed upstream:
> http://git.annexia.org/?p=virt-what.git;a=commitdiff;h=300c5168ca007ed5fbd49189efbe66ae0dbd9ad1

The patch is not that simple; on our XenServer boxes, after running the code above, %eax (max_entries) will contain garbage and sanity check would fail.

I've modified the code a bit for our purposes; hope it would be useful for others as well.
Comment 8 Valentine Sinitsyn 2012-04-25 11:02:56 EDT
Created attachment 580182 [details]
Modified code to differentiate between XenServer and Hyper-V
Comment 10 RHEL Product and Program Management 2012-07-10 04:08:23 EDT
This request was not resolved in time for the current release.
Red Hat invites you to ask your support representative to
propose this request, if still desired, for consideration in
the next release of Red Hat Enterprise Linux.
Comment 11 RHEL Product and Program Management 2012-07-10 22:02:20 EDT
This request was erroneously removed from consideration in Red Hat Enterprise Linux 6.4, which is currently under development.  This request will be evaluated for inclusion in Red Hat Enterprise Linux 6.4.
Comment 12 RHEL Product and Program Management 2012-09-07 01:28:56 EDT
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated
in the current release, Red Hat is unable to address this
request at this time.

Red Hat invites you to ask your support representative to
propose this request, if appropriate, in the next release of
Red Hat Enterprise Linux.
Comment 14 Richard W.M. Jones 2013-12-10 10:46:56 EST
Moving to RHEL 7.1 as we need to get a developer to
install a Citrix Xen box and test.
Comment 19 Richard W.M. Jones 2016-06-20 07:52:14 EDT
This package is on the ACL for RHEL 7.3 (yay!).  Unfortunately
we don't have a clear fix for this upstream.  So I will defer
this to RHEL 7.4 unless we have a clear plan to fix this upstream
and test the fix.
Comment 20 Richard W.M. Jones 2017-02-16 07:33:28 EST
Moving to RHEL 7.5 for the same reasons as comment 19.

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