qemu/hw/vfio
Jing Liu eaadba6f9b vfio/pci: enable MSI-X in interrupt restoring on dynamic allocation
During migration restoring, vfio_enable_vectors() is called to restore
enabling MSI-X interrupts for assigned devices. It sets the range from
0 to nr_vectors to kernel to enable MSI-X and the vectors unmasked in
guest. During the MSI-X enabling, all the vectors within the range are
allocated according to the VFIO_DEVICE_SET_IRQS ioctl.

When dynamic MSI-X allocation is supported, we only want the guest
unmasked vectors being allocated and enabled. Use vector 0 with an
invalid fd to get MSI-X enabled, after that, all the vectors can be
allocated in need.

Signed-off-by: Jing Liu <jing2.liu@intel.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Reviewed-by: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Cédric Le Goater <clg@redhat.com>
2023-10-05 22:04:51 +02:00
..
amd-xgbe.c
ap.c s390x/ap: Wire up the device request notifier interface 2023-07-10 09:52:52 +02:00
calxeda-xgmac.c
ccw.c hw/vfio/ccw: Replace DO_UPCAST(VFIOCCWDevice) by VFIO_CCW() 2023-02-27 09:15:38 +01:00
common.c vfio/common: Separate vfio-pci ranges 2023-09-11 08:34:06 +02:00
display.c vfio/display: Fix missing update to set backing fields 2023-10-05 22:04:51 +02:00
igd.c *: Add missing includes of qemu/error-report.h 2023-03-22 15:06:57 +00:00
Kconfig
meson.build
migration.c vfio/migration: Block VFIO migration with background snapshot 2023-09-11 08:34:06 +02:00
pci-quirks.c spapr: Remove support for NVIDIA V100 GPU with NVLink2 2023-09-18 07:25:28 -03:00
pci.c vfio/pci: enable MSI-X in interrupt restoring on dynamic allocation 2023-10-05 22:04:51 +02:00
pci.h vfio/pci: detect the support of dynamic MSI-X allocation 2023-10-05 22:04:51 +02:00
platform.c
spapr.c Replace qemu_real_host_page variables with inlined functions 2022-04-06 10:50:38 +02:00
trace-events vfio/pci: detect the support of dynamic MSI-X allocation 2023-10-05 22:04:51 +02:00
trace.h