vdpa: do not save failed dma maps in SVQ iova tree
authorEugenio Pérez <eperezma@redhat.com>
Tue, 23 Aug 2022 18:20:03 +0000 (20:20 +0200)
committerJason Wang <jasowang@redhat.com>
Fri, 2 Sep 2022 02:22:39 +0000 (10:22 +0800)
commit7dab70bec397e3522211e7bcc36d879bad8154c5
tree22672500a07115ca406a37f4970640a9207fa134
parent10dab9f2635b9bab23a2b29974b526e62bb61268
vdpa: do not save failed dma maps in SVQ iova tree

If a map fails for whatever reason, it must not be saved in the tree.
Otherwise, qemu will try to unmap it in cleanup, leaving to more errors.

Fixes: 34e3c94eda ("vdpa: Add custom IOTLB translations to SVQ")
Reported-by: Lei Yang <leiyang@redhat.com>
Signed-off-by: Eugenio Pérez <eperezma@redhat.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
hw/virtio/vhost-vdpa.c