summary refs log tree commit diff stats
path: root/hw/vfio/pci.c
diff options
context:
space:
mode:
authorSteve Sistare <steven.sistare@oracle.com>2025-06-10 10:26:43 -0700
committerCédric Le Goater <clg@redhat.com>2025-06-11 14:01:58 +0200
commit24c156dcd94299f64994170ce84efac9ae001f41 (patch)
tree29a8ecbd477db7370ef7b4e73ee5ac1a5b6254fa /hw/vfio/pci.c
parent8df3fa3d6753332a64eca53780517972075966e1 (diff)
downloadfocaccia-qemu-24c156dcd94299f64994170ce84efac9ae001f41.tar.gz
focaccia-qemu-24c156dcd94299f64994170ce84efac9ae001f41.zip
pci: skip reset during cpr
Do not reset a vfio-pci device during CPR.

Signed-off-by: Steve Sistare <steven.sistare@oracle.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Link: https://lore.kernel.org/qemu-devel/1749576403-25355-1-git-send-email-steven.sistare@oracle.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
Diffstat (limited to 'hw/vfio/pci.c')
-rw-r--r--hw/vfio/pci.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c
index 89f9246416..b97261c61b 100644
--- a/hw/vfio/pci.c
+++ b/hw/vfio/pci.c
@@ -3411,6 +3411,13 @@ static void vfio_instance_init(Object *obj)
     /* QEMU_PCI_CAP_EXPRESS initialization does not depend on QEMU command
      * line, therefore, no need to wait to realize like other devices */
     pci_dev->cap_present |= QEMU_PCI_CAP_EXPRESS;
+
+    /*
+     * A device that is resuming for cpr is already configured, so do not
+     * reset it during qemu_system_reset prior to cpr load, else interrupts
+     * may be lost.
+     */
+    pci_dev->cap_present |= QEMU_PCI_SKIP_RESET_ON_CPR;
 }
 
 static void vfio_pci_base_dev_class_init(ObjectClass *klass, const void *data)