Skip to content

Commit a74bb5f

Browse files
Mixaillbp3tk0v
authored andcommitted
x86/CPU/AMD: Disable INVLPGB on Zen2
AMD Cyan Skillfish (Family 17h, Model 47h, Stepping 0h) has an issue that causes system oopses and panics when performing TLB flush using INVLPGB. However, the problem is that that machine has misconfigured CPUID and should not report the INVLPGB bit in the first place. So zap the kernel's representation of the flag so that nothing gets confused. [ bp: Massage. ] Fixes: 767ae43 ("x86/mm: Add INVLPGB feature and Kconfig entry") Signed-off-by: Mikhail Paulyshka <[email protected]> Signed-off-by: Borislav Petkov (AMD) <[email protected]> Cc: <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 5b937a1 commit a74bb5f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

arch/x86/kernel/cpu/amd.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -937,6 +937,9 @@ static void init_amd_zen2(struct cpuinfo_x86 *c)
937937
msr_clear_bit(MSR_AMD64_CPUID_FN_7, 18);
938938
pr_emerg("RDSEED is not reliable on this platform; disabling.\n");
939939
}
940+
941+
/* Correct misconfigured CPUID on some clients. */
942+
clear_cpu_cap(c, X86_FEATURE_INVLPGB);
940943
}
941944

942945
static void init_amd_zen3(struct cpuinfo_x86 *c)

0 commit comments

Comments
 (0)