x86/microcode: Protect against instrumentation
authorThomas Gleixner <tglx@linutronix.de>
Mon, 2 Oct 2023 12:00:06 +0000 (14:00 +0200)
committerBorislav Petkov (AMD) <bp@alien8.de>
Tue, 24 Oct 2023 13:05:55 +0000 (15:05 +0200)
commit1582c0f4a21303792f523fe2839dd8433ee630c0
tree043a6e00402bb3032f96fd93fb6c408a45f96e60
parent7eb314a22800457396f541c655697dabd71e44a7
x86/microcode: Protect against instrumentation

The wait for control loop in which the siblings are waiting for the
microcode update on the primary thread must be protected against
instrumentation as instrumentation can end up in #INT3, #DB or #PF,
which then returns with IRET. That IRET reenables NMI which is the
opposite of what the NMI rendezvous is trying to achieve.

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