freebsd-src/sys/x86
John Baldwin 2d49248921 x86 msi: Enable/disable IDT vectors for MSI groups all at once
Unlike MSI-X, when a device uses multiple MSI interrupts, the entire
group of interrupts are enabled/disabled at once in the relevant PCI
config register.  Currently, the interrupt code enables the IDT vector
for each MSI interrupt when a handler is first registered.  If the PCI
device triggers an MSI interrupt which doesn't yet have a handler,
this can trigger a panic when the Xrsvd ISR executes rather than
treating it as a stray device interrupt.

To fix, enable all the IDT vectors for an MSI group when the first
interrupt handler is configured, and don't disable the IDT vectors
until the last interrupt handler for the group is torn down.

When migrating an MSI group between CPUs, enable/disable the entire
group of IDT vectors if at least one interrupt handler is configured
for the group.

Reported by:	jhay
Reviewed by:	kib
Differential Revision:	https://reviews.freebsd.org/D42232
2023-10-20 14:52:38 -07:00
..
acpica sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
bios sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
conf sys: Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:54:58 -06:00
cpufreq sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
include x86: Rename {stop,start}_emulating to fpu_{enable,disable} 2023-10-11 14:32:06 -07:00
iommu sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
isa x86: make EARLY_AP_STARTUP mandatory 2023-10-09 16:08:22 -04:00
linux linux(4): Remove sys/cdefs.h inclusion under x86/linux due to 685dc743 2023-08-18 15:58:32 +03:00
pci sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
x86 x86 msi: Enable/disable IDT vectors for MSI groups all at once 2023-10-20 14:52:38 -07:00
xen sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00