aboutsummaryrefslogtreecommitdiff
path: root/hw/pci/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/pci/pci.c
parent8df3fa3d6753332a64eca53780517972075966e1 (diff)
downloadqemu-24c156dcd94299f64994170ce84efac9ae001f41.zip
qemu-24c156dcd94299f64994170ce84efac9ae001f41.tar.gz
qemu-24c156dcd94299f64994170ce84efac9ae001f41.tar.bz2
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/pci/pci.c')
-rw-r--r--hw/pci/pci.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/hw/pci/pci.c b/hw/pci/pci.c
index 9b4bf48..c70b5ce 100644
--- a/hw/pci/pci.c
+++ b/hw/pci/pci.c
@@ -32,6 +32,7 @@
#include "hw/pci/pci_host.h"
#include "hw/qdev-properties.h"
#include "hw/qdev-properties-system.h"
+#include "migration/cpr.h"
#include "migration/qemu-file-types.h"
#include "migration/vmstate.h"
#include "net/net.h"
@@ -537,6 +538,10 @@ static void pci_reset_regions(PCIDevice *dev)
static void pci_do_device_reset(PCIDevice *dev)
{
+ if ((dev->cap_present & QEMU_PCI_SKIP_RESET_ON_CPR) && cpr_is_incoming()) {
+ return;
+ }
+
pci_device_deassert_intx(dev);
assert(dev->irq_state == 0);