[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210423095147.27922-2-vivek.gautam@arm.com>
Date: Fri, 23 Apr 2021 15:21:37 +0530
From: Vivek Gautam <vivek.gautam@....com>
To: linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
iommu@...ts.linux-foundation.org,
virtualization@...ts.linux-foundation.org
Cc: joro@...tes.org, will.deacon@....com, mst@...hat.com,
robin.murphy@....com, jean-philippe@...aro.org,
eric.auger@...hat.com, kevin.tian@...el.com,
jacob.jun.pan@...ux.intel.com, yi.l.liu@...el.com,
Lorenzo.Pieralisi@....com, shameerali.kolothum.thodi@...wei.com,
Vivek Gautam <vivek.gautam@....com>,
Alex Williamson <alex.williamson@...hat.com>,
Lorenzo Pieralisi <lorenzo.pieralisi@....com>
Subject: [PATCH RFC v1 01/11] uapi/virtio-iommu: Add page request grp-id and flags information
Add fault information for group-id and necessary flags for page
request faults that can be handled by page fault handler in
virtio-iommu driver.
Signed-off-by: Vivek Gautam <vivek.gautam@....com>
Cc: Joerg Roedel <joro@...tes.org>
Cc: Will Deacon <will.deacon@....com>
Cc: Robin Murphy <robin.murphy@....com>
Cc: Jean-Philippe Brucker <jean-philippe@...aro.org>
Cc: Eric Auger <eric.auger@...hat.com>
Cc: Alex Williamson <alex.williamson@...hat.com>
Cc: Kevin Tian <kevin.tian@...el.com>
Cc: Jacob Pan <jacob.jun.pan@...ux.intel.com>
Cc: Liu Yi L <yi.l.liu@...el.com>
Cc: Lorenzo Pieralisi <lorenzo.pieralisi@....com>
Cc: Shameerali Kolothum Thodi <shameerali.kolothum.thodi@...wei.com>
---
include/uapi/linux/virtio_iommu.h | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/include/uapi/linux/virtio_iommu.h b/include/uapi/linux/virtio_iommu.h
index f8bf927a0689..accc3318ce46 100644
--- a/include/uapi/linux/virtio_iommu.h
+++ b/include/uapi/linux/virtio_iommu.h
@@ -307,14 +307,27 @@ struct virtio_iommu_req_invalidate {
#define VIRTIO_IOMMU_FAULT_F_DMA_UNRECOV 1
#define VIRTIO_IOMMU_FAULT_F_PAGE_REQ 2
+#define VIRTIO_IOMMU_FAULT_PRQ_F_PASID_VALID (1 << 0)
+#define VIRTIO_IOMMU_FAULT_PRQ_F_LAST_PAGE (1 << 1)
+#define VIRTIO_IOMMU_FAULT_PRQ_F_PRIV_DATA (1 << 2)
+#define VIRTIO_IOMMU_FAULT_PRQ_F_NEEDS_PASID (1 << 3)
+
+#define VIRTIO_IOMMU_FAULT_UNREC_F_PASID_VALID (1 << 0)
+#define VIRTIO_IOMMU_FAULT_UNREC_F_ADDR_VALID (1 << 1)
+#define VIRTIO_IOMMU_FAULT_UNREC_F_FETCH_ADDR_VALID (1 << 2)
+
struct virtio_iommu_fault {
__u8 reason;
__u8 reserved[3];
__le16 flt_type;
__u8 reserved2[2];
+ /* flags is actually permission flags */
__le32 flags;
+ /* flags for PASID and Page request handling info */
+ __le32 pr_evt_flags;
__le32 endpoint;
__le32 pasid;
+ __le32 grpid;
__u8 reserved3[4];
__le64 address;
__u8 reserved4[8];
--
2.17.1
Powered by blists - more mailing lists