summary refs log tree commit diff stats
path: root/hw/vfio/pci.h
diff options
context:
space:
mode:
authorSteve Sistare <steven.sistare@oracle.com>2025-07-02 14:58:38 -0700
committerCédric Le Goater <clg@redhat.com>2025-07-03 13:42:28 +0200
commit30edcb4d4e7a265c2912ca6978b150c7c75b654f (patch)
treecaacd9704779bf5500090ac091ddbf76666990bd /hw/vfio/pci.h
parent3f2a36d0ef6339ce78e107959da81f76283582f7 (diff)
downloadfocaccia-qemu-30edcb4d4e7a265c2912ca6978b150c7c75b654f.tar.gz
focaccia-qemu-30edcb4d4e7a265c2912ca6978b150c7c75b654f.zip
vfio-pci: preserve MSI
Save the MSI message area as part of vfio-pci vmstate, and preserve the
interrupt and notifier eventfd's.  migrate_incoming loads the MSI data,
then the vfio-pci post_load handler finds the eventfds in CPR state,
rebuilds vector data structures, and attaches the interrupts to the new
KVM instance.

Signed-off-by: Steve Sistare <steven.sistare@oracle.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Link: https://lore.kernel.org/qemu-devel/1751493538-202042-2-git-send-email-steven.sistare@oracle.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
Diffstat (limited to 'hw/vfio/pci.h')
-rw-r--r--hw/vfio/pci.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/hw/vfio/pci.h b/hw/vfio/pci.h
index 5ba7330b27..495fae737d 100644
--- a/hw/vfio/pci.h
+++ b/hw/vfio/pci.h
@@ -218,6 +218,8 @@ void vfio_pci_add_kvm_msi_virq(VFIOPCIDevice *vdev, VFIOMSIVector *vector,
 void vfio_pci_prepare_kvm_msi_virq_batch(VFIOPCIDevice *vdev);
 void vfio_pci_commit_kvm_msi_virq_batch(VFIOPCIDevice *vdev);
 bool vfio_pci_intx_enable(VFIOPCIDevice *vdev, Error **errp);
+void vfio_pci_msix_set_notifiers(VFIOPCIDevice *vdev);
+void vfio_pci_msi_set_handler(VFIOPCIDevice *vdev, int nr);
 
 uint32_t vfio_pci_read_config(PCIDevice *pdev, uint32_t addr, int len);
 void vfio_pci_write_config(PCIDevice *pdev,