aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Vrabel <david.vrabel@citrix.com>2011-07-16 09:33:07 +0100
committerDavid Vrabel <david.vrabel@citrix.com>2011-07-16 09:33:07 +0100
commitb877dbb2dfcc4886294cf37092559666201c8c3b (patch)
treea68dd8a6ce30bc8631ab22810e1d7c68eb151b73
parent10228eb08a279a26805210ec86a136efeefe32d0 (diff)
downloadxen-b877dbb2dfcc4886294cf37092559666201c8c3b.tar.gz
xen-b877dbb2dfcc4886294cf37092559666201c8c3b.tar.bz2
xen-b877dbb2dfcc4886294cf37092559666201c8c3b.zip
xen/libxc: set CPUID topology leaf as unsupported for PV guests
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
-rw-r--r--tools/libxc/xc_cpuid_x86.c1
-rw-r--r--xen/arch/x86/traps.c1
2 files changed, 2 insertions, 0 deletions
diff --git a/tools/libxc/xc_cpuid_x86.c b/tools/libxc/xc_cpuid_x86.c
index 88b41db7b3..6aadce90e7 100644
--- a/tools/libxc/xc_cpuid_x86.c
+++ b/tools/libxc/xc_cpuid_x86.c
@@ -465,6 +465,7 @@ static void xc_cpuid_pv_policy(
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 */
diff --git a/xen/arch/x86/traps.c b/xen/arch/x86/traps.c
index be4c56deb7..504bb08015 100644
--- a/xen/arch/x86/traps.c
+++ b/xen/arch/x86/traps.c
@@ -828,6 +828,7 @@ static void pv_cpuid(struct cpu_user_regs *regs)
/* fall through */
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 */