summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorEugenio Pérez2022-07-20 08:59:45 +0200
committerJason Wang2022-07-20 10:58:08 +0200
commitc156d5bf2b142dcc06808ccee06882144f230aec (patch)
tree26b26f6d15704d4eca3d7ff49387ecc3d6513242 /include
parentvdpa: Extract get features part from vhost_vdpa_get_max_queue_pairs (diff)
downloadqemu-c156d5bf2b142dcc06808ccee06882144f230aec.tar.gz
qemu-c156d5bf2b142dcc06808ccee06882144f230aec.tar.xz
qemu-c156d5bf2b142dcc06808ccee06882144f230aec.zip
vdpa: Add device migration blocker
Since the vhost-vdpa device is exposing _F_LOG, adding a migration blocker if it uses CVQ. However, qemu is able to migrate simple devices with no CVQ as long as they use SVQ. To allow it, add a placeholder error to vhost_vdpa, and only add to vhost_dev when used. vhost_dev machinery place the migration blocker if needed. Signed-off-by: Eugenio Pérez <eperezma@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Jason Wang <jasowang@redhat.com>
Diffstat (limited to 'include')
-rw-r--r--include/hw/virtio/vhost-vdpa.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/hw/virtio/vhost-vdpa.h b/include/hw/virtio/vhost-vdpa.h
index 1111d85643..d10a89303e 100644
--- a/include/hw/virtio/vhost-vdpa.h
+++ b/include/hw/virtio/vhost-vdpa.h
@@ -35,6 +35,7 @@ typedef struct vhost_vdpa {
bool shadow_vqs_enabled;
/* IOVA mapping used by the Shadow Virtqueue */
VhostIOVATree *iova_tree;
+ Error *migration_blocker;
GPtrArray *shadow_vqs;
const VhostShadowVirtqueueOps *shadow_vq_ops;
void *shadow_vq_ops_opaque;