mirror of
https://github.com/mii443/qemu.git
synced 2025-08-22 15:15:46 +00:00
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>
This commit is contained in:
committed by
Michael S. Tsirkin
parent
3c6d12a3b1
commit
6f03d9ef8a
@ -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;
|
||||
|
Reference in New Issue
Block a user