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 <[email protected]>
Cc: Joerg Roedel <[email protected]>
Cc: Will Deacon <[email protected]>
Cc: Robin Murphy <[email protected]>
Cc: Jean-Philippe Brucker <[email protected]>
Cc: Eric Auger <[email protected]>
Cc: Alex Williamson <[email protected]>
Cc: Kevin Tian <[email protected]>
Cc: Jacob Pan <[email protected]>
Cc: Liu Yi L <[email protected]>
Cc: Lorenzo Pieralisi <[email protected]>
Cc: Shameerali Kolothum Thodi <[email protected]>
---
 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

_______________________________________________
iommu mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/iommu

Reply via email to