x86/microcode/amd: Use correct per CPU ucode_cpu_info
authorThomas Gleixner <tglx@linutronix.de>
Tue, 10 Oct 2023 15:08:41 +0000 (17:08 +0200)
committerBorislav Petkov (AMD) <bp@alien8.de>
Tue, 24 Oct 2023 13:05:54 +0000 (15:05 +0200)
commitecfd41089348fa4cc767dc588367e9fdf8cb6b9d
treea630a6718bebbc51b712f9e07d73f12d131c1c16
parentb48b26f992a3828b4ae274669f99ce68451d4904
x86/microcode/amd: Use correct per CPU ucode_cpu_info

find_blobs_in_containers() is invoked on every CPU but overwrites
unconditionally ucode_cpu_info of CPU0.

Fix this by using the proper CPU data and move the assignment into the
call site apply_ucode_from_containers() so that the function can be
reused.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Link: https://lore.kernel.org/r/20231010150702.433454320@linutronix.de
arch/x86/kernel/cpu/microcode/amd.c