[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210423095147.27922-11-vivek.gautam@arm.com>
Date: Fri, 23 Apr 2021 15:21:46 +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>
Subject: [PATCH RFC v1 10/11] uapi/virtio-iommu: Add a new request type to send page response
Once the page faults are handled, the response has to be sent to
virtio-iommu backend, from where it can be sent to the host to
prepare the response to a generated io page fault by the device.
Add a new virt-queue request type to handle this.
Signed-off-by: Vivek Gautam <vivek.gautam@....com>
---
include/uapi/linux/virtio_iommu.h | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/include/uapi/linux/virtio_iommu.h b/include/uapi/linux/virtio_iommu.h
index c12d9b6a7243..1b174b98663a 100644
--- a/include/uapi/linux/virtio_iommu.h
+++ b/include/uapi/linux/virtio_iommu.h
@@ -48,6 +48,7 @@ struct virtio_iommu_config {
#define VIRTIO_IOMMU_T_PROBE 0x05
#define VIRTIO_IOMMU_T_ATTACH_TABLE 0x06
#define VIRTIO_IOMMU_T_INVALIDATE 0x07
+#define VIRTIO_IOMMU_T_PAGE_RESP 0x08
/* Status types */
#define VIRTIO_IOMMU_S_OK 0x00
@@ -70,6 +71,23 @@ struct virtio_iommu_req_tail {
__u8 reserved[3];
};
+struct virtio_iommu_req_page_resp {
+ struct virtio_iommu_req_head head;
+ __le32 domain;
+ __le32 endpoint;
+#define VIRTIO_IOMMU_PAGE_RESP_PASID_VALID (1 << 0)
+ __le32 flags;
+ __le32 pasid;
+ __le32 grpid;
+#define VIRTIO_IOMMU_PAGE_RESP_SUCCESS (0x0)
+#define VIRTIO_IOMMU_PAGE_RESP_INVALID (0x1)
+#define VIRTIO_IOMMU_PAGE_RESP_FAILURE (0x2)
+ __le16 resp_code;
+ __u8 pasid_valid;
+ __u8 reserved[9];
+ struct virtio_iommu_req_tail tail;
+};
+
struct virtio_iommu_req_attach {
struct virtio_iommu_req_head head;
__le32 domain;
--
2.17.1
Powered by blists - more mailing lists