[PATCH v2 07/15] iommu/uapi: Add iommu_gpasid_unbind_data

From: Liu Yi L
Date: Thu Jun 11 2020 - 08:10:19 EST


Existing iommu_gpasid_bind_data is used for binding guest page tables
to a specified PASID. While for unwind it, a unbind_data structure is
needed.

Cc: Kevin Tian <kevin.tian@xxxxxxxxx>
CC: Jacob Pan <jacob.jun.pan@xxxxxxxxxxxxxxx>
Cc: Alex Williamson <alex.williamson@xxxxxxxxxx>
Cc: Eric Auger <eric.auger@xxxxxxxxxx>
Cc: Jean-Philippe Brucker <jean-philippe@xxxxxxxxxx>
Cc: Joerg Roedel <joro@xxxxxxxxxx>
Cc: Lu Baolu <baolu.lu@xxxxxxxxxxxxxxx>
Signed-off-by: Liu Yi L <yi.l.liu@xxxxxxxxx>
Signed-off-by: Jacob Pan <jacob.jun.pan@xxxxxxxxxxxxxxx>
---
include/uapi/linux/iommu.h | 13 +++++++++++++
1 file changed, 13 insertions(+)

diff --git a/include/uapi/linux/iommu.h b/include/uapi/linux/iommu.h
index 02eac73..46a7c57 100644
--- a/include/uapi/linux/iommu.h
+++ b/include/uapi/linux/iommu.h
@@ -332,6 +332,19 @@ struct iommu_gpasid_bind_data {
};
};

+/**
+ * struct iommu_gpasid_unbind_data - Information about device and guest PASID
+ * unbinding
+ * @argsz: User filled size of this data
+ * @flags: Additional information on guest unbind request
+ * @pasid: Process address space ID used for the guest mm in host IOMMU
+ */
+struct iommu_gpasid_unbind_data {
+ __u32 argsz;
+ __u64 flags;
+ __u64 pasid;
+};
+
struct iommu_nesting_info {
__u32 size;
__u32 format;
--
2.7.4