]> xenbits.xensource.com Git - xen.git/commitdiff
libxc/x86/PV: don't hand through CPUID leaf 0x80000008 as is
authorJan Beulich <jbeulich@suse.com>
Thu, 28 Jun 2018 09:28:12 +0000 (11:28 +0200)
committerJan Beulich <jbeulich@suse.com>
Thu, 28 Jun 2018 09:28:12 +0000 (11:28 +0200)
Just like for HVM the feature set should be used for EBX output, while
EAX should be restricted to the low 16 bits and ECX/EDX should be zero.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
master commit: 849cc9ac56eff8a8d575ed9f484aad72f383862c
master date: 2018-05-29 10:51:02 +0100

tools/libxc/xc_cpuid_x86.c

index 4afafce1a1ad18e9ed611693e720a83d6ac9d2fc..284b7dd972edb7784ac55c27018ae6eaee2bfb81 100644 (file)
@@ -662,6 +662,12 @@ static void xc_cpuid_pv_policy(xc_interface *xch,
         break;
     }
 
+    case 0x80000008:
+        regs[0] &= 0x0000ffffu;
+        regs[1] = info->featureset[featureword_of(X86_FEATURE_CLZERO)];
+        regs[2] = regs[3] = 0;
+        break;
+
     case 0x00000005: /* MONITOR/MWAIT */
     case 0x0000000a: /* Architectural Performance Monitor Features */
     case 0x0000000b: /* Extended Topology Enumeration */