x86/microcode: Clarify the late load logic
authorThomas Gleixner <tglx@linutronix.de>
Mon, 2 Oct 2023 11:59:57 +0000 (13:59 +0200)
committerBorislav Petkov (AMD) <bp@alien8.de>
Tue, 24 Oct 2023 13:05:54 +0000 (15:05 +0200)
commit6f059e634dcd0d725854514c94c114bbdd83950d
tree374b08591fbea923836b94acc282e3b0acaacbc6
parent634ac23ad609b3ddd9e0e478bd5afbf49d3a2556
x86/microcode: Clarify the late load logic

reload_store() is way too complicated. Split the inner workings out and
make the following enhancements:

 - Taint the kernel only when the microcode was actually updated. If. e.g.
   the rendezvous fails, then nothing happened and there is no reason for
   tainting.

 - Return useful error codes

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Reviewed-by: Nikolay Borisov <nik.borisov@suse.com>
Link: https://lore.kernel.org/r/20231002115903.145048840@linutronix.de
arch/x86/kernel/cpu/microcode/core.c