diff options
author | Xie Yongji <xieyongji@bytedance.com> | 2021-08-31 12:36:28 +0200 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2021-09-06 13:20:57 +0200 |
commit | 59dfe4f1e810b5820443c84f9863b04b033143e8 (patch) | |
tree | a2f1434febd99d6e5346cd44d419dc4353b19abb /include | |
parent | vhost-vdpa: Handle the failure of vdpa_reset() (diff) | |
download | linux-59dfe4f1e810b5820443c84f9863b04b033143e8.tar.xz linux-59dfe4f1e810b5820443c84f9863b04b033143e8.zip |
vhost-iotlb: Add an opaque pointer for vhost IOTLB
Add an opaque pointer for vhost IOTLB. And introduce
vhost_iotlb_add_range_ctx() to accept it.
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-8-xieyongji@bytedance.com
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/vhost_iotlb.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/vhost_iotlb.h b/include/linux/vhost_iotlb.h index 6b09b786a762..2d0e2f52f938 100644 --- a/include/linux/vhost_iotlb.h +++ b/include/linux/vhost_iotlb.h @@ -17,6 +17,7 @@ struct vhost_iotlb_map { u32 perm; u32 flags_padding; u64 __subtree_last; + void *opaque; }; #define VHOST_IOTLB_FLAG_RETIRE 0x1 @@ -29,6 +30,8 @@ struct vhost_iotlb { unsigned int flags; }; +int vhost_iotlb_add_range_ctx(struct vhost_iotlb *iotlb, u64 start, u64 last, + u64 addr, unsigned int perm, void *opaque); int vhost_iotlb_add_range(struct vhost_iotlb *iotlb, u64 start, u64 last, u64 addr, unsigned int perm); void vhost_iotlb_del_range(struct vhost_iotlb *iotlb, u64 start, u64 last); |