aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2009-07-17 23:47:44 -0400
committerRusty Russell <rusty@rustcorp.com.au>2009-07-17 08:17:45 -0400
commit7a5049205f7265620c48781814155f2763e70abb (patch)
tree7b3cf5ec83687e74028bbfa100dac4e6d449155a /arch/x86
parent27de22d03d6808a82bbe9bd7e3cc75d60132ba9e (diff)
lguest: restrict CPUID to avoid perf counter wrmsr
Avoid the following: [ 0.012093] WARNING: at arch/x86/kernel/apic/apic.c:249 native_apic_write_dummy+0x2f/0x40() Rather than chase each new cpuid-detected feature, just lie about the highest valid CPUID so this code is never run. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'arch/x86')
-rw-r--r--arch/x86/lguest/boot.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/x86/lguest/boot.c b/arch/x86/lguest/boot.c
index 0188fd37b6c0..f2bf1f73d468 100644
--- a/arch/x86/lguest/boot.c
+++ b/arch/x86/lguest/boot.c
@@ -379,6 +379,11 @@ static void lguest_cpuid(unsigned int *ax, unsigned int *bx,
379 379
380 native_cpuid(ax, bx, cx, dx); 380 native_cpuid(ax, bx, cx, dx);
381 switch (function) { 381 switch (function) {
382 case 0: /* ID and highest CPUID. Futureproof a little by sticking to
383 * older ones. */
384 if (*ax > 5)
385 *ax = 5;
386 break;
382 case 1: /* Basic feature request. */ 387 case 1: /* Basic feature request. */
383 /* We only allow kernel to see SSE3, CMPXCHG16B and SSSE3 */ 388 /* We only allow kernel to see SSE3, CMPXCHG16B and SSSE3 */
384 *cx &= 0x00002201; 389 *cx &= 0x00002201;