diff options
author | Eugenio Pérez <eperezma@redhat.com> | 2022-12-15 12:31:41 +0100 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2022-12-21 06:35:28 -0500 |
commit | cd831ed5c4add8ed6ee980c3645b241cbef5130f (patch) | |
tree | b189bf7ae7a4d56efba5d0b1b4eb1530617a06cb /net | |
parent | 273e0003f0005cc17292dedae01e5edb0064b69c (diff) |
vdpa: add asid parameter to vhost_vdpa_dma_map/unmap
So the caller can choose which ASID is destined.
No need to update the batch functions as they will always be called from
memory listener updates at the moment. Memory listener updates will
always update ASID 0, as it's the passthrough ASID.
All vhost devices's ASID are 0 at this moment.
Signed-off-by: Eugenio Pérez <eperezma@redhat.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Message-Id: <20221215113144.322011-10-eperezma@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.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/net/vhost-vdpa.c b/net/vhost-vdpa.c index e829ef1f43..a592ee07ec 100644 --- a/net/vhost-vdpa.c +++ b/net/vhost-vdpa.c @@ -259,7 +259,7 @@ static void vhost_vdpa_cvq_unmap_buf(struct vhost_vdpa *v, void *addr) return; } - r = vhost_vdpa_dma_unmap(v, map->iova, map->size + 1); + r = vhost_vdpa_dma_unmap(v, v->address_space_id, map->iova, map->size + 1); if (unlikely(r != 0)) { error_report("Device cannot unmap: %s(%d)", g_strerror(r), r); } @@ -299,8 +299,8 @@ static int vhost_vdpa_cvq_map_buf(struct vhost_vdpa *v, void *buf, size_t size, return r; } - r = vhost_vdpa_dma_map(v, map.iova, vhost_vdpa_net_cvq_cmd_page_len(), buf, - !write); + r = vhost_vdpa_dma_map(v, v->address_space_id, map.iova, + vhost_vdpa_net_cvq_cmd_page_len(), buf, !write); if (unlikely(r < 0)) { goto dma_map_err; } |