]> xenbits.xensource.com Git - people/iwj/xen.git/commitdiff
libxc/x86/PV: don't hand through CPUID leaf 0x80000008 as is
authorJan Beulich <JBeulich@suse.com>
Tue, 22 May 2018 11:40:02 +0000 (05:40 -0600)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Tue, 29 May 2018 09:51:02 +0000 (10:51 +0100)
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>
tools/libxc/xc_cpuid_x86.c

index 9fa2f7c360fe365748a325b7674131b488be914a..21537f06f163ccc98687a06c624c009c45d9caf8 100644 (file)
@@ -575,6 +575,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 0x0000000b: /* Extended Topology Enumeration */
     case 0x8000000a: /* SVM revision and features */