]> git.proxmox.com Git - mirror_qemu.git/commit
vdpa: move iova_range to vhost_vdpa_shared
authorEugenio Pérez <eperezma@redhat.com>
Thu, 21 Dec 2023 17:43:12 +0000 (18:43 +0100)
committerMichael S. Tsirkin <mst@redhat.com>
Tue, 26 Dec 2023 09:51:07 +0000 (04:51 -0500)
commitae25ff41b72366248aa89bdc8be58aa86f67e4c3
treee40bb2b6f847ce174fef7fbe7ea44429a0820975
parent5edb02e8004c2f1d5026a02cd9378046973f47af
vdpa: move iova_range to vhost_vdpa_shared

Next patches will register the vhost_vdpa memory listener while the VM
is migrating at the destination, so we can map the memory to the device
before stopping the VM at the source.  The main goal is to reduce the
downtime.

However, the destination QEMU is unaware of which vhost_vdpa device will
register its memory_listener.  If the source guest has CVQ enabled, it
will be the CVQ device.  Otherwise, it  will be the first one.

Move the iova range to VhostVDPAShared so all vhost_vdpa can use it,
rather than always in the first or last vhost_vdpa.

Signed-off-by: Eugenio Pérez <eperezma@redhat.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Message-Id: <20231221174322.3130442-4-eperezma@redhat.com>
Tested-by: Lei Yang <leiyang@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
hw/virtio/vdpa-dev.c
hw/virtio/vhost-vdpa.c
include/hw/virtio/vhost-vdpa.h
net/vhost-vdpa.c