[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v10 1/7] linux-headers: update VFIO header for VFIO
From: |
Eric Auger |
Subject: |
[Qemu-devel] [PATCH v10 1/7] linux-headers: update VFIO header for VFIO platform drivers |
Date: |
Fri, 13 Feb 2015 03:47:06 +0000 |
Update according to vfio.h header found in
http://git.linaro.org/people/eric.auger/linux.git
branch irqfd_integ_v9
Signed-off-by: Eric Auger <address@hidden>
---
v9 -> v10:
- AMBA removed
v8 -> v9:
- rewording of the commit message
---
linux-headers/linux/vfio.h | 31 ++++++++++++++++++-------------
1 file changed, 18 insertions(+), 13 deletions(-)
diff --git a/linux-headers/linux/vfio.h b/linux-headers/linux/vfio.h
index 0f21aa6..2ef4485 100644
--- a/linux-headers/linux/vfio.h
+++ b/linux-headers/linux/vfio.h
@@ -19,22 +19,21 @@
/* Kernel & User level defines for VFIO IOCTLs. */
-/* Extensions */
-
-#define VFIO_TYPE1_IOMMU 1
-#define VFIO_SPAPR_TCE_IOMMU 2
-#define VFIO_TYPE1v2_IOMMU 3
/*
- * IOMMU enforces DMA cache coherence (ex. PCIe NoSnoop stripping). This
- * capability is subject to change as groups are added or removed.
+ * Capabilities exposed by the VFIO IOMMU driver. Some capabilities are subject
+ * to change as groups are added or removed.
*/
-#define VFIO_DMA_CC_IOMMU 4
-
-/* Check if EEH is supported */
-#define VFIO_EEH 5
+enum vfio_iommu_cap {
+ VFIO_TYPE1_IOMMU = 1,
+ VFIO_SPAPR_TCE_IOMMU = 2,
+ VFIO_TYPE1v2_IOMMU = 3,
+ VFIO_DMA_CC_IOMMU = 4, /* IOMMU enforces DMA cache coherence
+ (ex. PCIe NoSnoop stripping) */
+ VFIO_EEH = 5, /* Check if EEH is supported */
+ VFIO_TYPE1_NESTING_IOMMU = 6, /* Two-stage IOMMU, implies v2 */
+ VFIO_DMA_NOEXEC_IOMMU = 7,
+};
-/* Two-stage IOMMU */
-#define VFIO_TYPE1_NESTING_IOMMU 6 /* Implies v2 */
/*
* The IOCTL interface is designed for extensibility by embedding the
@@ -160,6 +159,7 @@ struct vfio_device_info {
__u32 flags;
#define VFIO_DEVICE_FLAGS_RESET (1 << 0) /* Device supports
reset */
#define VFIO_DEVICE_FLAGS_PCI (1 << 1) /* vfio-pci device */
+#define VFIO_DEVICE_FLAGS_PLATFORM (1 << 2) /* vfio-platform device */
__u32 num_regions; /* Max region index + 1 */
__u32 num_irqs; /* Max IRQ index + 1 */
};
@@ -398,12 +398,17 @@ struct vfio_iommu_type1_info {
*
* Map process virtual addresses to IO virtual addresses using the
* provided struct vfio_dma_map. Caller sets argsz. READ &/ WRITE required.
+ *
+ * To use the VFIO_DMA_MAP_FLAG_NOEXEC flag, the container must support the
+ * VFIO_DMA_NOEXEC_IOMMU capability. If mappings are created using this flag,
+ * any groups subsequently added to the container must support this capability.
*/
struct vfio_iommu_type1_dma_map {
__u32 argsz;
__u32 flags;
#define VFIO_DMA_MAP_FLAG_READ (1 << 0) /* readable from device
*/
#define VFIO_DMA_MAP_FLAG_WRITE (1 << 1) /* writable from device */
+#define VFIO_DMA_MAP_FLAG_NOEXEC (1 << 2) /* not executable from device */
__u64 vaddr; /* Process virtual address */
__u64 iova; /* IO virtual address */
__u64 size; /* Size of mapping (bytes) */
--
1.8.3.2
- [Qemu-devel] [PATCH v10 0/7] KVM platform device passthrough, Eric Auger, 2015/02/12
- [Qemu-devel] [PATCH v10 1/7] linux-headers: update VFIO header for VFIO platform drivers,
Eric Auger <=
- [Qemu-devel] [PATCH v10 2/7] hw/vfio/platform: vfio-platform skeleton, Eric Auger, 2015/02/12
- [Qemu-devel] [PATCH v10 3/7] hw/vfio/platform: add irq assignment, Eric Auger, 2015/02/12
- [Qemu-devel] [PATCH v10 5/7] hw/vfio: calxeda xgmac device, Eric Auger, 2015/02/12
- [Qemu-devel] [PATCH v10 4/7] hw/vfio/platform: add capability to start IRQ propagation, Eric Auger, 2015/02/12
- [Qemu-devel] [PATCH v10 7/7] hw/vfio/platform: add irqfd support, Eric Auger, 2015/02/12
- [Qemu-devel] [PATCH v10 6/7] hw/arm/sysbus-fdt: enable vfio-calxeda-xgmac dynamic instantiation, Eric Auger, 2015/02/12