aboutsummaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorEugenio Pérez <eperezma@redhat.com>2023-12-21 18:43:20 +0100
committerMichael S. Tsirkin <mst@redhat.com>2023-12-26 04:51:07 -0500
commit6f03d9ef8acdcdcfaf7ba42654f36ae3c1f1ddbc (patch)
treebb53ba519b7b689fc4fc74dac27ff10b517f6d6d /net
parent3c6d12a3b19527c68b6462eaeaa72bbb2db2b02c (diff)
downloadqemu-6f03d9ef8acdcdcfaf7ba42654f36ae3c1f1ddbc.zip
qemu-6f03d9ef8acdcdcfaf7ba42654f36ae3c1f1ddbc.tar.gz
qemu-6f03d9ef8acdcdcfaf7ba42654f36ae3c1f1ddbc.tar.bz2
vdpa: use VhostVDPAShared in vdpa_dma_map and unmap
The callers only have the shared information by the end of this series. Start converting this functions. Signed-off-by: Eugenio Pérez <eperezma@redhat.com> Acked-by: Jason Wang <jasowang@redhat.com> Message-Id: <20231221174322.3130442-12-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>
Diffstat (limited to 'net')
-rw-r--r--net/vhost-vdpa.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/net/vhost-vdpa.c b/net/vhost-vdpa.c
index 10cf002..3726ee5 100644
--- a/net/vhost-vdpa.c
+++ b/net/vhost-vdpa.c
@@ -471,7 +471,8 @@ static void vhost_vdpa_cvq_unmap_buf(struct vhost_vdpa *v, void *addr)
return;
}
- r = vhost_vdpa_dma_unmap(v, v->address_space_id, map->iova, map->size + 1);
+ r = vhost_vdpa_dma_unmap(v->shared, v->address_space_id, map->iova,
+ map->size + 1);
if (unlikely(r != 0)) {
error_report("Device cannot unmap: %s(%d)", g_strerror(r), r);
}
@@ -495,7 +496,7 @@ static int vhost_vdpa_cvq_map_buf(struct vhost_vdpa *v, void *buf, size_t size,
return r;
}
- r = vhost_vdpa_dma_map(v, v->address_space_id, map.iova,
+ r = vhost_vdpa_dma_map(v->shared, v->address_space_id, map.iova,
vhost_vdpa_net_cvq_cmd_page_len(), buf, !write);
if (unlikely(r < 0)) {
goto dma_map_err;