]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
x86/microcode/AMD: Pay attention to the stepping dynamically
authorBorislav Petkov (AMD) <bp@alien8.de>
Mon, 21 Oct 2024 08:27:52 +0000 (10:27 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 7 Mar 2025 15:45:55 +0000 (16:45 +0100)
commite7b2ccfed0d05093bfa828f055725fb2232ec8a9
treedcc8e88757a371fff5762c8f31b1425a8b102b42
parent0433b8e9f4a22032881a2c11486718e99962887c
x86/microcode/AMD: Pay attention to the stepping dynamically

commit d1744a4c975b1acbe8b498356d28afbc46c88428 upstream

Commit in Fixes changed how a microcode patch is loaded on Zen and newer but
the patch matching needs to happen with different rigidity, depending on what
is being done:

1) When the patch is added to the patches cache, the stepping must be ignored
   because the driver still supports different steppings per system

2) When the patch is matched for loading, then the stepping must be taken into
   account because each CPU needs the patch matching its exact stepping

Take care of that by making the matching smarter.

Fixes: 94838d230a6c ("x86/microcode/AMD: Use the family,model,stepping encoded in the patch ID")
Reported-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Tested-by: Jens Axboe <axboe@kernel.dk>
Link: https://lore.kernel.org/r/91194406-3fdf-4e38-9838-d334af538f74@kernel.dk
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/x86/kernel/cpu/microcode/amd.c