diff options
author | Xie Yongji <xieyongji@bytedance.com> | 2021-08-31 13:36:29 +0300 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2021-09-06 14:20:57 +0300 |
commit | c10fb9454adc80c062151c6a436047e1fa59e99f (patch) | |
tree | 51d2427cd476634ee2936ce563e7582ad0ae488b /drivers/vdpa | |
parent | 59dfe4f1e810b5820443c84f9863b04b033143e8 (diff) | |
download | linux-c10fb9454adc80c062151c6a436047e1fa59e99f.tar.xz |
vdpa: Add an opaque pointer for vdpa_config_ops.dma_map()
Add an opaque pointer for DMA mapping.
Suggested-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: Xie Yongji <xieyongji@bytedance.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Link: https://lore.kernel.org/r/20210831103634.33-9-xieyongji@bytedance.com
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'drivers/vdpa')
-rw-r--r-- | drivers/vdpa/vdpa_sim/vdpa_sim.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/vdpa/vdpa_sim/vdpa_sim.c b/drivers/vdpa/vdpa_sim/vdpa_sim.c index f292bb05d6c9..a70fd2a08ff1 100644 --- a/drivers/vdpa/vdpa_sim/vdpa_sim.c +++ b/drivers/vdpa/vdpa_sim/vdpa_sim.c @@ -555,14 +555,14 @@ err: } static int vdpasim_dma_map(struct vdpa_device *vdpa, u64 iova, u64 size, - u64 pa, u32 perm) + u64 pa, u32 perm, void *opaque) { struct vdpasim *vdpasim = vdpa_to_sim(vdpa); int ret; spin_lock(&vdpasim->iommu_lock); - ret = vhost_iotlb_add_range(vdpasim->iommu, iova, iova + size - 1, pa, - perm); + ret = vhost_iotlb_add_range_ctx(vdpasim->iommu, iova, iova + size - 1, + pa, perm, opaque); spin_unlock(&vdpasim->iommu_lock); return ret; |