Commit d900329e20f4476db6461752accebcf7935a8055

Authored by H. Peter Anvin
1 parent 0f44fbd297

x86, cpu: After uncapping CPUID, re-run CPU feature detection

After uncapping the CPUID level, we need to also re-run the CPU
feature detection code.

This resolves kernel bugzilla 16322.

Reported-by: boris64 <bugzilla.kernel.org@boris64.net>
Cc: <stable@kernel.org> v2.6.29..2.6.35
LKML-Reference: <tip-@git.kernel.org>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>

Showing 3 changed files with 3 additions and 1 deletions Side-by-side Diff

arch/x86/kernel/cpu/common.c
... ... @@ -545,7 +545,7 @@
545 545 }
546 546 }
547 547  
548   -static void __cpuinit get_cpu_cap(struct cpuinfo_x86 *c)
  548 +void __cpuinit get_cpu_cap(struct cpuinfo_x86 *c)
549 549 {
550 550 u32 tfms, xlvl;
551 551 u32 ebx;
arch/x86/kernel/cpu/cpu.h
... ... @@ -33,6 +33,7 @@
33 33 *const __x86_cpu_dev_end[];
34 34  
35 35 extern void cpu_detect_cache_sizes(struct cpuinfo_x86 *c);
  36 +extern void get_cpu_cap(struct cpuinfo_x86 *c);
36 37  
37 38 #endif
arch/x86/kernel/cpu/intel.c
... ... @@ -39,6 +39,7 @@
39 39 misc_enable &= ~MSR_IA32_MISC_ENABLE_LIMIT_CPUID;
40 40 wrmsrl(MSR_IA32_MISC_ENABLE, misc_enable);
41 41 c->cpuid_level = cpuid_eax(0);
  42 + get_cpu_cap(c);
42 43 }
43 44 }
44 45