freebsd-nq/lib/libvmmapi
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
..
Makefile
Makefile.depend Update Makefile.depend files 2019-12-11 17:37:53 +00:00
vmmapi_freebsd.c
vmmapi.c Honor the disabled setting for MSI-X interrupts for passthrough devices. 2020-11-24 23:18:52 +00:00
vmmapi.h Honor the disabled setting for MSI-X interrupts for passthrough devices. 2020-11-24 23:18:52 +00:00