freebsd-skq/sys/amd64
John Baldwin 1925586e03 Honor the disabled setting for MSI-X interrupts for passthrough devices.
Add a new ioctl to disable all MSI-X interrupts for a PCI passthrough
device and invoke it if a write to the MSI-X capability registers
disables MSI-X.  This avoids leaving MSI-X interrupts enabled on the
host if a guest device driver has disabled them (e.g. as part of
detaching a guest device driver).

This was found by Chelsio QA when testing that a Linux guest could
switch from MSI-X to MSI interrupts when using the cxgb4vf driver.

While here, explicitly fail requests to enable MSI on a passthrough
device if MSI-X is enabled and vice versa.

Reported by:	Sony Arpita Das @ Chelsio
Reviewed by:	grehan, markj
MFC after:	2 weeks
Sponsored by:	Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D27212
2020-11-24 23:18:52 +00:00
..
acpica amd64: clean up empty lines in .c and .h files 2020-09-01 21:16:54 +00:00
amd64 vm_phys: Try to clean up NUMA KPIs 2020-11-19 03:59:21 +00:00
cloudabi32 Get rid of sa->narg. It serves no purpose; use sa->callp->sy_narg instead. 2020-09-27 18:47:06 +00:00
cloudabi64 Get rid of sa->narg. It serves no purpose; use sa->callp->sy_narg instead. 2020-09-27 18:47:06 +00:00
conf Port rtsx(4) driver for Realtek SD card reader from OpenBSD. 2020-11-24 21:28:44 +00:00
ia32 Improve FPU Tag Word reconstruction on i386 to indicate register states. 2020-10-21 00:15:12 +00:00
include Honor the disabled setting for MSI-X interrupts for passthrough devices. 2020-11-24 23:18:52 +00:00
linux Linuxolator: Replace use of eventhandlers by sysent hooks. 2020-11-23 18:18:16 +00:00
linux32 Linuxolator: Replace use of eventhandlers by sysent hooks. 2020-11-23 18:18:16 +00:00
pci pci_cfgreg.c: Use io port config access for early boot time. 2019-04-09 18:07:17 +00:00
sgx amd64: clean up empty lines in .c and .h files 2020-09-01 21:16:54 +00:00
vmm Honor the disabled setting for MSI-X interrupts for passthrough devices. 2020-11-24 23:18:52 +00:00
Makefile