]> www.infradead.org Git - users/hch/misc.git/commit
x86/CPU/AMD: Only apply Zenbleed fix for Zen2 during late microcode load
authorJohn Allen <john.allen@amd.com>
Mon, 23 Sep 2024 16:44:04 +0000 (16:44 +0000)
committerBorislav Petkov (AMD) <bp@alien8.de>
Fri, 11 Oct 2024 19:26:45 +0000 (21:26 +0200)
commitee4d4e8d2c3bec6ee652599ab31991055a72c322
tree26efc219ae9cb1b66515f6c4c57273b5ad870583
parente4d2102018542e3ae5e297bc6e229303abff8a0f
x86/CPU/AMD: Only apply Zenbleed fix for Zen2 during late microcode load

Commit

  f69759be251d ("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: f69759be251d ("x86/CPU/AMD: Move Zenbleed check to the Zen2 init function")
Signed-off-by: John Allen <john.allen@amd.com>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Acked-by: Borislav Petkov (AMD) <bp@alien8.de>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20240923164404.27227-1-john.allen@amd.com
arch/x86/kernel/cpu/amd.c