]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
MFC 368003:
authorJohn Baldwin <jhb@FreeBSD.org>
Mon, 14 Dec 2020 20:40:21 +0000 (20:40 +0000)
committerJohn Baldwin <jhb@FreeBSD.org>
Mon, 14 Dec 2020 20:40:21 +0000 (20:40 +0000)
commitb17a444a2988346c239df4b3c66a550b5b7e2118
tree89851a0206c0ef0fa092f9b1fe522a10a16efe11
parent9a3a6b30ae6005b17dbbb0879c9adede5c1cc896
MFC 368003:
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.
lib/libvmmapi/vmmapi.c
lib/libvmmapi/vmmapi.h
sys/amd64/include/vmm_dev.h
sys/amd64/vmm/io/ppt.c
sys/amd64/vmm/io/ppt.h
sys/amd64/vmm/vmm_dev.c
usr.sbin/bhyve/pci_passthru.c