x86/microcode: Add per CPU result state
authorThomas Gleixner <tglx@linutronix.de>
Tue, 17 Oct 2023 21:24:05 +0000 (23:24 +0200)
committerBorislav Petkov (AMD) <bp@alien8.de>
Tue, 24 Oct 2023 13:05:54 +0000 (15:05 +0200)
commit4b753955e9151ad2f722137a7bcbafda756186b3
treed35d84c3170b02d52dfea5cf40b48157ded5974a
parent0772b9aa1a8f7322dce8588c231cff8b57298a53
x86/microcode: Add per CPU result state

The microcode rendezvous is purely acting on global state, which does
not allow to analyze fails in a coherent way.

Introduce per CPU state where the results are written into, which allows to
analyze the return codes of the individual CPUs.

Initialize the state when walking the cpu_present_mask in the online
check to avoid another for_each_cpu() loop.

Enhance the result print out with that.

The structure is intentionally named ucode_ctrl as it will gain control
fields in subsequent changes.

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