Skip to content

Commit d900329

Browse files
author
H. Peter Anvin
committed
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>
1 parent 0f44fbd commit d900329

File tree

3 files changed

+3
-1
lines changed

3 files changed

+3
-1
lines changed

arch/x86/kernel/cpu/common.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -545,7 +545,7 @@ void __cpuinit cpu_detect(struct cpuinfo_x86 *c)
545545
}
546546
}
547547

548-
static void __cpuinit get_cpu_cap(struct cpuinfo_x86 *c)
548+
void __cpuinit get_cpu_cap(struct cpuinfo_x86 *c)
549549
{
550550
u32 tfms, xlvl;
551551
u32 ebx;

arch/x86/kernel/cpu/cpu.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,5 +33,6 @@ extern const struct cpu_dev *const __x86_cpu_dev_start[],
3333
*const __x86_cpu_dev_end[];
3434

3535
extern void cpu_detect_cache_sizes(struct cpuinfo_x86 *c);
36+
extern void get_cpu_cap(struct cpuinfo_x86 *c);
3637

3738
#endif

arch/x86/kernel/cpu/intel.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ static void __cpuinit early_init_intel(struct cpuinfo_x86 *c)
3939
misc_enable &= ~MSR_IA32_MISC_ENABLE_LIMIT_CPUID;
4040
wrmsrl(MSR_IA32_MISC_ENABLE, misc_enable);
4141
c->cpuid_level = cpuid_eax(0);
42+
get_cpu_cap(c);
4243
}
4344
}
4445

0 commit comments

Comments
 (0)