summaryrefslogtreecommitdiffstats
path: root/hw/vfio/pci.h
diff options
context:
space:
mode:
authorJens Freimann2019-10-29 12:49:05 +0100
committerMichael S. Tsirkin2019-10-29 23:55:26 +0100
commitf045a0104c8ce38da7f42141a6b3ebf3d74b474b (patch)
tree4ab7232bb32ba160d78d3ffcd82736efc80a7fa5 /hw/vfio/pci.h
parentnet/virtio: add failover support (diff)
downloadqemu-f045a0104c8ce38da7f42141a6b3ebf3d74b474b.tar.gz
qemu-f045a0104c8ce38da7f42141a6b3ebf3d74b474b.tar.xz
qemu-f045a0104c8ce38da7f42141a6b3ebf3d74b474b.zip
vfio: unplug failover primary device before migration
As usual block all vfio-pci devices from being migrated, but make an exception for failover primary devices. This is achieved by setting unmigratable to 0 but also add a migration blocker for all vfio-pci devices except failover primary devices. These will be unplugged before migration happens by the migration handler of the corresponding virtio-net standby device. Signed-off-by: Jens Freimann <jfreimann@redhat.com> Acked-by: Alex Williamson <alex.williamson@redhat.com> Message-Id: <20191029114905.6856-12-jfreimann@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'hw/vfio/pci.h')
-rw-r--r--hw/vfio/pci.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/hw/vfio/pci.h b/hw/vfio/pci.h
index 834a90d646..b329d50338 100644
--- a/hw/vfio/pci.h
+++ b/hw/vfio/pci.h
@@ -168,6 +168,7 @@ typedef struct VFIOPCIDevice {
bool no_vfio_ioeventfd;
bool enable_ramfb;
VFIODisplay *dpy;
+ Error *migration_blocker;
} VFIOPCIDevice;
uint32_t vfio_pci_read_config(PCIDevice *pdev, uint32_t addr, int len);