summaryrefslogtreecommitdiff
path: root/include/linux/vhost_iotlb.h
diff options
context:
space:
mode:
authorXie Yongji <xieyongji@bytedance.com>2021-08-31 18:36:28 +0800
committerMichael S. Tsirkin <mst@redhat.com>2021-09-06 07:20:57 -0400
commit59dfe4f1e810b5820443c84f9863b04b033143e8 (patch)
treea2f1434febd99d6e5346cd44d419dc4353b19abb /include/linux/vhost_iotlb.h
parent7f05630dc65d62df5d55ad3e1038ffbe5e2ce9c3 (diff)
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/linux/vhost_iotlb.h')
-rw-r--r--include/linux/vhost_iotlb.h3
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);