diff mbox series

[1/3] NOMERGE: virtio-iommu: Add definitions for VIRTIO_IOMMU_F_BYPASS_CONFIG

Message ID 20210930185050.262759-2-jean-philippe@linaro.org
State New
Headers show
Series virtio-iommu: Support VIRTIO_IOMMU_F_BYPASS_CONFIG | expand

Commit Message

Jean-Philippe Brucker Sept. 30, 2021, 6:50 p.m. UTC
Pull VIRTIO_IOMMU_F_BYPASS_CONFIG changes from Linux (not upstream yet).

Signed-off-by: Jean-Philippe Brucker <jean-philippe@linaro.org>

---
 include/standard-headers/linux/virtio_iommu.h | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

-- 
2.33.0
diff mbox series

Patch

diff --git a/include/standard-headers/linux/virtio_iommu.h b/include/standard-headers/linux/virtio_iommu.h
index b9443b83a1..d14808e3fb 100644
--- a/include/standard-headers/linux/virtio_iommu.h
+++ b/include/standard-headers/linux/virtio_iommu.h
@@ -13,9 +13,10 @@ 
 #define VIRTIO_IOMMU_F_INPUT_RANGE		0
 #define VIRTIO_IOMMU_F_DOMAIN_RANGE		1
 #define VIRTIO_IOMMU_F_MAP_UNMAP		2
-#define VIRTIO_IOMMU_F_BYPASS			3
+#define VIRTIO_IOMMU_F_BYPASS			3 /* Deprecated */
 #define VIRTIO_IOMMU_F_PROBE			4
 #define VIRTIO_IOMMU_F_MMIO			5
+#define VIRTIO_IOMMU_F_BYPASS_CONFIG		6
 
 struct virtio_iommu_range_64 {
 	uint64_t					start;
@@ -36,6 +37,8 @@  struct virtio_iommu_config {
 	struct virtio_iommu_range_32		domain_range;
 	/* Probe buffer size */
 	uint32_t					probe_size;
+	uint8_t					bypass;
+	uint8_t					reserved[7];
 };
 
 /* Request types */
@@ -66,11 +69,14 @@  struct virtio_iommu_req_tail {
 	uint8_t					reserved[3];
 };
 
+#define VIRTIO_IOMMU_ATTACH_F_BYPASS		(1 << 0)
+
 struct virtio_iommu_req_attach {
 	struct virtio_iommu_req_head		head;
 	uint32_t					domain;
 	uint32_t					endpoint;
-	uint8_t					reserved[8];
+	uint32_t					flags;
+	uint8_t					reserved[4];
 	struct virtio_iommu_req_tail		tail;
 };