Revision b79a2ef0d4dc6b8a4093334db29f7c221c1ac8bd authored by Cédric Le Goater on 25 January 2024, 13:27:36 UTC, committed by Michael Tokarev on 29 January 2024, 20:08:46 UTC
When doing device assignment of a physical device, MSI-X can be enabled with no vectors enabled and this sets the IRQ index to VFIO_PCI_MSIX_IRQ_INDEX. However, when MSI-X is disabled, the IRQ index is left untouched if no vectors are in use. Then, when INTx is enabled, the IRQ index value is considered incompatible (set to MSI-X) and VFIO_DEVICE_SET_IRQS fails. QEMU complains with : qemu-system-x86_64: vfio 0000:08:00.0: Failed to set up TRIGGER eventfd signaling for interrupt INTX-0: VFIO_DEVICE_SET_IRQS failure: Invalid argument To avoid that, unconditionaly clear the IRQ index when MSI-X is disabled. Buglink: https://issues.redhat.com/browse/RHEL-21293 Fixes: 5ebffa4e87e7 ("vfio/pci: use an invalid fd to enable MSI-X") Cc: Jing Liu <jing2.liu@intel.com> Cc: Alex Williamson <alex.williamson@redhat.com> Reviewed-by: Alex Williamson <alex.williamson@redhat.com> Signed-off-by: Cédric Le Goater <clg@redhat.com> (cherry picked from commit d2b668fca5652760b435ce812a743bba03d2f316) Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
1 parent 106aa13
File | Mode | Size |
---|---|---|
channel-buffer.c | -rw-r--r-- | 7.1 KB |
channel-command.c | -rw-r--r-- | 11.2 KB |
channel-file.c | -rw-r--r-- | 7.0 KB |
channel-null.c | -rw-r--r-- | 5.9 KB |
channel-socket.c | -rw-r--r-- | 27.0 KB |
channel-tls.c | -rw-r--r-- | 14.5 KB |
channel-util.c | -rw-r--r-- | 2.0 KB |
channel-watch.c | -rw-r--r-- | 8.6 KB |
channel-websock.c | -rw-r--r-- | 42.3 KB |
channel.c | -rw-r--r-- | 21.2 KB |
dns-resolver.c | -rw-r--r-- | 8.0 KB |
meson.build | -rw-r--r-- | 301 bytes |
net-listener.c | -rw-r--r-- | 9.0 KB |
task.c | -rw-r--r-- | 5.7 KB |
trace-events | -rw-r--r-- | 5.4 KB |
trace.h | -rw-r--r-- | 28 bytes |
Computing file changes ...