Skip to content

Commit c8170b5

Browse files
jallen-amdgregkh
authored andcommitted
x86/CPU/AMD: Only apply Zenbleed fix for Zen2 during late microcode load
commit ee4d4e8 upstream. Commit f69759b ("x86/CPU/AMD: Move Zenbleed check to the Zen2 init function") causes a bit in the DE_CFG MSR to get set erroneously after a microcode late load. The microcode late load path calls into amd_check_microcode() and subsequently zen2_zenbleed_check(). Since the above commit removes the cpu_has_amd_erratum() call from zen2_zenbleed_check(), this will cause all non-Zen2 CPUs to go through the function and set the bit in the DE_CFG MSR. Call into the Zenbleed fix path on Zen2 CPUs only. [ bp: Massage commit message, use cpu_feature_enabled(). ] Fixes: f69759b ("x86/CPU/AMD: Move Zenbleed check to the Zen2 init function") Signed-off-by: John Allen <[email protected]> Signed-off-by: Borislav Petkov (AMD) <[email protected]> Acked-by: Borislav Petkov (AMD) <[email protected]> Cc: <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 6663f0c commit c8170b5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

arch/x86/kernel/cpu/amd.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1374,7 +1374,8 @@ void amd_check_microcode(void)
13741374
if (boot_cpu_data.x86_vendor != X86_VENDOR_AMD)
13751375
return;
13761376

1377-
on_each_cpu(zenbleed_check_cpu, NULL, 1);
1377+
if (cpu_feature_enabled(X86_FEATURE_ZEN2))
1378+
on_each_cpu(zenbleed_check_cpu, NULL, 1);
13781379
}
13791380

13801381
/*

0 commit comments

Comments
 (0)