x86, cacheinfo: Turn off L3 cache index disable feature in virtualized environments
Changes
1 files changed · +4 −0
| File | Status | Add | Del | Content |
|---|---|---|---|---|
| arch/x86/kernel/cpu/intel_cacheinfo.c | modified | +4 | −0 | View file |
arch/x86/kernel/cpu/intel_cacheinfo.c
View filediff --git a/arch/x86/kernel/cpu/intel_cacheinfo.c b/arch/x86/kernel/cpu/intel_cacheinfo.c
index b3eeb66..95962a9 100644
--- a/arch/x86/kernel/cpu/intel_cacheinfo.c
+++ b/arch/x86/kernel/cpu/intel_cacheinfo.c
@@ -340,6 +340,10 @@ amd_check_l3_disable(int index, struct _cpuid4_info_regs *this_leaf)
(boot_cpu_data.x86_mask < 0x1)))
return;
+ /* not in virtualized environments */
+ if (num_k8_northbridges == 0)
+ return;
+
this_leaf->can_disable = true;
this_leaf->l3_indices = amd_calc_l3_indices();
}