mirror_ubuntu-kernels/arch/x86/kernel/cpu/microcode
Thomas Gleixner 8f849ff63b x86/microcode: Handle "offline" CPUs correctly
Offline CPUs need to be parked in a safe loop when microcode update is
in progress on the primary CPU. Currently, offline CPUs are parked in
mwait_play_dead(), and for Intel CPUs, its not a safe instruction,
because the MWAIT instruction can be patched in the new microcode update
that can cause instability.

  - Add a new microcode state 'UCODE_OFFLINE' to report status on per-CPU
  basis.
  - Force NMI on the offline CPUs.

Wake up offline CPUs while the update is in progress and then return
them back to mwait_play_dead() after microcode update is complete.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Link: https://lore.kernel.org/r/20231002115903.660850472@linutronix.de
2023-10-24 15:05:55 +02:00
..
amd.c x86/microcode: Handle "nosmt" correctly 2023-10-24 15:05:54 +02:00
core.c x86/microcode: Handle "offline" CPUs correctly 2023-10-24 15:05:55 +02:00
intel.c x86/microcode: Rendezvous and load in NMI 2023-10-24 15:05:55 +02:00
internal.h x86/microcode: Handle "offline" CPUs correctly 2023-10-24 15:05:55 +02:00
Makefile x86/microcode: Hide the config knob 2023-08-13 10:26:39 +02:00