OpenCloudOS-Kernel/arch/x86/kernel/apic
Thomas Gleixner 6a1cb5f5c6 x86/apic: Add static key to Control IPI shorthands
The IPI shorthand functionality delivers IPI/NMI broadcasts to all CPUs in
the system. This can have similar side effects as the MCE broadcasting when
CPUs are waiting in the BIOS or are offlined.

The kernel tracks already the state of offlined CPUs whether they have been
brought up at least once so that the CR4 MCE bit is set to make sure that
MCE broadcasts can't brick the machine.

Utilize that information and compare it to the cpu_present_mask. If all
present CPUs have been brought up at least once then the broadcast side
effect is mitigated by disabling regular interrupt/IPI delivery in the APIC
itself and by the cpu offline check at the begin of the NMI handler.

Use a static key to switch between broadcasting via shorthands or sending
the IPI/NMI one by one.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lkml.kernel.org/r/20190722105220.386410643@linutronix.de
2019-07-25 16:12:00 +02:00
..
Makefile x86/PCI: Remove unused HyperTransport interrupt support 2017-11-23 20:18:18 +01:00
apic.c x86/hotplug: Silence APIC and NMI when CPU is dead 2019-07-25 16:11:59 +02:00
apic_common.c x86/apic: Fix signedness bug in APIC ID validity checks 2018-04-10 16:46:39 +02:00
apic_flat_64.c x86/apic: Remove dest argument from __default_send_IPI_shortcut() 2019-07-25 16:11:59 +02:00
apic_noop.c x86/apic: Cleanup the include maze 2019-07-25 16:11:57 +02:00
apic_numachip.c x86/apic: Consolidate the apic local headers 2019-07-25 16:11:58 +02:00
bigsmp_32.c x86/apic: Consolidate the apic local headers 2019-07-25 16:11:58 +02:00
hw_nmi.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
io_apic.c x86/ioapic: Implement irq_get_irqchip_state() callback 2019-07-03 10:12:30 +02:00
ipi.c x86/apic: Add static key to Control IPI shorthands 2019-07-25 16:12:00 +02:00
local.h x86/apic: Add static key to Control IPI shorthands 2019-07-25 16:12:00 +02:00
msi.c x86/hpet: Move clockevents into channels 2019-06-28 00:57:24 +02:00
probe_32.c x86/apic: Move no_ipi_broadcast() out of 32bit 2019-07-25 16:12:00 +02:00
probe_64.c x86/apic: Remove dest argument from __default_send_IPI_shortcut() 2019-07-25 16:11:59 +02:00
vector.c Merge branch 'x86-apic-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2019-07-08 11:22:57 -07:00
x2apic_cluster.c x86/apic: Consolidate the apic local headers 2019-07-25 16:11:58 +02:00
x2apic_phys.c x86/apic: Consolidate the apic local headers 2019-07-25 16:11:58 +02:00
x2apic_uv_x.c x86/apic/uv: Make x2apic_extra_bits static 2019-07-25 16:11:58 +02:00