Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 168266
b: refs/heads/master
c: 82d6469
h: refs/heads/master
v: v3
  • Loading branch information
Jeremy Fitzhardinge committed Nov 3, 2009
1 parent 494ccef commit 3835b39
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7825cf10e31c64ece3cac66fb01a742f1094da51
refs/heads/master: 82d6469916c6fcfa345636a49004c9d1753905d1
11 changes: 10 additions & 1 deletion trunk/arch/x86/xen/enlighten.c
Original file line number Diff line number Diff line change
Expand Up @@ -178,16 +178,24 @@ 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;

/*
* 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"
Expand All @@ -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;
}
Expand Down

0 comments on commit 3835b39

Please sign in to comment.