summaryrefslogtreecommitdiff
path: root/include/uapi
diff options
context:
space:
mode:
authorGautam Dawar <gautam.dawar@xilinx.com>2022-03-30 23:33:49 +0530
committerMichael S. Tsirkin <mst@redhat.com>2022-05-31 12:44:29 -0400
commit91233ad711866f4e375742d84ef3ed6aab9daa96 (patch)
treeec745c48fc32434571ad37553b3843c6e07c1372 /include/uapi
parent1cb108994c6830cc6a6e066ad7d9a22ef59fa167 (diff)
vhost: support ASID in IOTLB API
This patches allows userspace to send ASID based IOTLB message to vhost. This idea is to use the reserved u32 field in the existing V2 IOTLB message. Vhost device should advertise this capability via VHOST_BACKEND_F_IOTLB_ASID backend feature. Signed-off-by: Jason Wang <jasowang@redhat.com> Signed-off-by: Gautam Dawar <gdawar@xilinx.com> Message-Id: <20220330180436.24644-10-gdawar@xilinx.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'include/uapi')
-rw-r--r--include/uapi/linux/vhost_types.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/include/uapi/linux/vhost_types.h b/include/uapi/linux/vhost_types.h
index 76ee7016c501..634cee485abb 100644
--- a/include/uapi/linux/vhost_types.h
+++ b/include/uapi/linux/vhost_types.h
@@ -87,7 +87,7 @@ struct vhost_msg {
struct vhost_msg_v2 {
__u32 type;
- __u32 reserved;
+ __u32 asid;
union {
struct vhost_iotlb_msg iotlb;
__u8 padding[64];
@@ -157,5 +157,9 @@ struct vhost_vdpa_iova_range {
#define VHOST_BACKEND_F_IOTLB_MSG_V2 0x1
/* IOTLB can accept batching hints */
#define VHOST_BACKEND_F_IOTLB_BATCH 0x2
+/* IOTLB can accept address space identifier through V2 type of IOTLB
+ * message
+ */
+#define VHOST_BACKEND_F_IOTLB_ASID 0x3
#endif