linux/arch/x86/kernel/apic
Thomas Gleixner 9cab5fb776 x86/apic: Provide apic_force_nmi_on_cpu()
When SMT siblings are soft-offlined and parked in one of the play_dead()
variants they still react on NMI, which is problematic on affected Intel
CPUs. The default play_dead() variant uses MWAIT on modern CPUs, which is
not guaranteed to be safe when updated concurrently.

Right now late loading is prevented when not all SMT siblings are online,
but as they still react on NMI, it is possible to bring them out of their
park position into a trivial rendezvous handler.

Provide a function which allows to do that. I does sanity checks whether
the target is in the cpus_booted_once_mask and whether the APIC driver
supports it.

Mark X2APIC and XAPIC as capable, but exclude 32bit and the UV and NUMACHIP
variants as that needs feedback from the relevant experts.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Link: https://lore.kernel.org/r/20231002115903.603100036@linutronix.de
2023-10-24 15:05:55 +02:00
..
apic_common.c x86/apic: Sanitize APIC ID range validation 2023-08-09 11:58:32 -07:00
apic_flat_64.c x86/apic: Provide apic_force_nmi_on_cpu() 2023-10-24 15:05:55 +02:00
apic_noop.c x86/apic: Remove pointless arguments from [native_]eoi_write() 2023-08-09 11:58:33 -07:00
apic_numachip.c x86/apic: Remove pointless arguments from [native_]eoi_write() 2023-08-09 11:58:33 -07:00
apic.c x86/apic: Wrap IPI calls into helper functions 2023-08-09 12:00:55 -07:00
bigsmp_32.c x86/apic: Provide common init infrastructure 2023-08-09 11:58:34 -07:00
hw_nmi.c * Rework apic callbacks, getting rid of unnecessary ones and 2023-08-30 10:44:46 -07:00
init.c x86/apic: Provide static call infrastructure for APIC callbacks 2023-08-09 12:00:55 -07:00
io_apic.c x86/apic: Nuke ack_APIC_irq() 2023-08-09 11:58:34 -07:00
ipi.c x86/apic: Provide apic_force_nmi_on_cpu() 2023-10-24 15:05:55 +02:00
local.h x86/apic: Sanitize APIC ID range validation 2023-08-09 11:58:32 -07:00
Makefile x86/apic: Provide common init infrastructure 2023-08-09 11:58:34 -07:00
msi.c x86/apic: Rename disable_apic 2023-08-09 11:58:16 -07:00
probe_32.c x86/apic: Provide common init infrastructure 2023-08-09 11:58:34 -07:00
probe_64.c x86/apic: Provide common init infrastructure 2023-08-09 11:58:34 -07:00
vector.c x86/apic: Wrap IPI calls into helper functions 2023-08-09 12:00:55 -07:00
x2apic_cluster.c x86/apic: Provide apic_force_nmi_on_cpu() 2023-10-24 15:05:55 +02:00
x2apic_phys.c x86/apic: Provide apic_force_nmi_on_cpu() 2023-10-24 15:05:55 +02:00
x2apic_uv_x.c x86/platform/uv: Use alternate source for socket to node data 2023-09-11 10:06:22 -07:00