]> xenbits.xensource.com Git - xen.git/commitdiff
xen/libxc: set CPUID topology leaf as unsupported for PV guests
authorDavid Vrabel <david.vrabel@citrix.com>
Sat, 16 Jul 2011 08:34:57 +0000 (09:34 +0100)
committerDavid Vrabel <david.vrabel@citrix.com>
Sat, 16 Jul 2011 08:34:57 +0000 (09:34 +0100)
The result of a CPUID Extended Topology Enumeration leaf for PV guests
is invalid as the level in ECX is ignored.  This can cause some guests
to loop endlessly when trying to enumerate the topology.

Since the physical topology isn't useful to PV guests set the topology
leaf as unsupported.

Guests affected include Linux kernels prior 2.6.32 where a workaround
was applied ("xen: mask extended topology info in cpu",
82d6469916c6fcfa345636a49004c9d1753905d1).

Signed-off-by: David Vrabel <david.vrabel@citrix.com>
xen-unstable changeset:   23700:867bb675b57b
xen-unstable date:        Sat Jul 16 09:05:45 2011 +0100

tools/libxc/xc_cpuid_x86.c
xen/arch/x86/traps.c

index c4ab764cd80577e0f9a786d831cce778a205ac68..09c1bf06132fa0a0041904aa68447f1bd7e51444 100644 (file)
@@ -349,6 +349,7 @@ static void xc_cpuid_pv_policy(
     case 0xd: /* XSAVE */
     case 5: /* MONITOR/MWAIT */
     case 0xa: /* Architectural Performance Monitor Features */
+    case 0x0000000b: /* Extended Topology Enumeration */
     case 0x8000000a: /* SVM revision and features */
     case 0x8000001b: /* Instruction Based Sampling */
     case 0x8000001c: /* Light Weight Profiling */
index f57b673a6bee1d7462c9614826ffac88efb378ad..85fc0c214e0b5201b046bd658a27bffd937f9525 100644 (file)
@@ -829,6 +829,7 @@ static void pv_cpuid(struct cpu_user_regs *regs)
     case 0xd: /* XSAVE */
     case 5: /* MONITOR/MWAIT */
     case 0xa: /* Architectural Performance Monitor Features */
+    case 0x0000000b: /* Extended Topology Enumeration */
     case 0x8000000a: /* SVM revision and features */
     case 0x8000001b: /* Instruction Based Sampling */
     case 0x8000001c: /* Light Weight Profiling */