On Fri, Nov 20, 2020 at 07:50:58PM +0100, Eugenio P?rez
wrote:> @@ -1028,6 +1061,7 @@ static int vhost_sw_live_migration_start(struct
vhost_dev *dev)
>
> for (idx = 0; idx < dev->nvqs; ++idx) {
> struct vhost_virtqueue *vq = &dev->vqs[idx];
> + unsigned num = virtio_queue_get_num(dev->vdev, idx);
> struct vhost_vring_addr addr = {
> .index = idx,
> };
> @@ -1044,6 +1078,12 @@ static int vhost_sw_live_migration_start(struct
vhost_dev *dev)
> r = dev->vhost_ops->vhost_set_vring_addr(dev, &addr);
> assert(r == 0);
>
> + r = vhost_backend_update_device_iotlb(dev, addr.used_user_addr,
> + addr.used_user_addr,
> + sizeof(vring_used_elem_t) *
num,
> + IOMMU_RW);
I don't remember seeing iotlb setup for the rest of the vring or guest
memory. Maybe this should go into a single patch so it's easy to review
the iova space layout.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL:
<http://lists.linuxfoundation.org/pipermail/virtualization/attachments/20201208/1d27328f/attachment.sig>