summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-11-05 10:58:07 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2009-11-05 10:58:07 -0800
commit9a6fc8d0f8c3ee3d42417e8315fc8c8fae1d3213 (patch)
treeb4bd15742d56e488592203e1d0a0d07a0684410d /arch
parentd4116f820496ae3af5225d09450edc7791df0045 (diff)
parent82d6469916c6fcfa345636a49004c9d1753905d1 (diff)
downloadlinux-3.10-9a6fc8d0f8c3ee3d42417e8315fc8c8fae1d3213.tar.gz
linux-3.10-9a6fc8d0f8c3ee3d42417e8315fc8c8fae1d3213.tar.bz2
linux-3.10-9a6fc8d0f8c3ee3d42417e8315fc8c8fae1d3213.zip
Merge branch 'bugfix' of git://git.kernel.org/pub/scm/linux/kernel/git/jeremy/xen
* 'bugfix' of git://git.kernel.org/pub/scm/linux/kernel/git/jeremy/xen: xen: mask extended topology info in cpuid xen/hvc: make sure console output is always emitted, with explicit polling
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/xen/enlighten.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c
index 23a4d80fb39..dfbf70e6586 100644
--- a/arch/x86/xen/enlighten.c
+++ b/arch/x86/xen/enlighten.c
@@ -178,6 +178,7 @@ static __read_mostly unsigned int cpuid_leaf1_ecx_mask = ~0;
static void xen_cpuid(unsigned int *ax, unsigned int *bx,
unsigned int *cx, unsigned int *dx)
{
+ unsigned maskebx = ~0;
unsigned maskecx = ~0;
unsigned maskedx = ~0;
@@ -185,9 +186,16 @@ static void xen_cpuid(unsigned int *ax, unsigned int *bx,
* Mask out inconvenient features, to try and disable as many
* unsupported kernel subsystems as possible.
*/
- if (*ax == 1) {
+ switch (*ax) {
+ case 1:
maskecx = cpuid_leaf1_ecx_mask;
maskedx = cpuid_leaf1_edx_mask;
+ break;
+
+ case 0xb:
+ /* Suppress extended topology stuff */
+ maskebx = 0;
+ break;
}
asm(XEN_EMULATE_PREFIX "cpuid"
@@ -197,6 +205,7 @@ static void xen_cpuid(unsigned int *ax, unsigned int *bx,
"=d" (*dx)
: "0" (*ax), "2" (*cx));
+ *bx &= maskebx;
*cx &= maskecx;
*dx &= maskedx;
}