From: Eric Auger <eric.auger@linaro.org>
To: eric.auger@st.com, christoffer.dall@linaro.org,
qemu-devel@nongnu.org, kim.phillips@freescale.com,
alex.williamson@redhat.com, agraf@suse.de,
peter.maydell@linaro.org
Cc: b.reynal@virtualopensystems.com, patches@linaro.org,
eric.auger@linaro.org, a.rigo@virtualopensystems.com,
afaerber@suse.de, Bharat.Bhushan@freescale.com,
pbonzini@redhat.com, a.motakis@virtualopensystems.com,
kvmarm@lists.cs.columbia.edu
Subject: [Qemu-devel] [PATCH v9 1/7] linux-headers: update VFIO header for VFIO platform/AMBA drivers
Date: Thu, 15 Jan 2015 13:18:11 +0000 [thread overview]
Message-ID: <1421327897-1698-2-git-send-email-eric.auger@linaro.org> (raw)
In-Reply-To: <1421327897-1698-1-git-send-email-eric.auger@linaro.org>
Update according to vfio.h header found in
http://git.linaro.org/people/eric.auger/linux.git
branch irqfd_v6_integrated_official_release
Signed-off-by: Eric Auger <eric.auger@linaro.org>
---
v8 -> v9:
- rewording of the commit message
---
| 32 +++++++++++++++++++-------------
1 file changed, 19 insertions(+), 13 deletions(-)
--git a/linux-headers/linux/vfio.h b/linux-headers/linux/vfio.h
index 0f21aa6..58f549c 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,8 @@ 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 */
+#define VFIO_DEVICE_FLAGS_AMBA (1 << 3) /* vfio-amba device */
__u32 num_regions; /* Max region index + 1 */
__u32 num_irqs; /* Max IRQ index + 1 */
};
@@ -398,12 +399,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
next prev parent reply other threads:[~2015-01-15 13:18 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-15 13:18 [Qemu-devel] [PATCH v9 0/7] KVM platform device passthrough Eric Auger
2015-01-15 13:18 ` Eric Auger [this message]
2015-01-15 13:18 ` [Qemu-devel] [PATCH v9 2/7] hw/vfio/platform: vfio-platform skeleton Eric Auger
2015-01-15 13:18 ` [Qemu-devel] [PATCH v9 3/7] hw/vfio/platform: add irq assignment Eric Auger
2015-01-15 13:18 ` [Qemu-devel] [PATCH v9 4/7] hw/vfio/platform: add capability to start IRQ propagation Eric Auger
2015-01-15 13:18 ` [Qemu-devel] [PATCH v9 5/7] hw/vfio: calxeda xgmac device Eric Auger
2015-01-15 13:18 ` [Qemu-devel] [PATCH v9 6/7] hw/arm/sysbus-fdt: enable vfio-calxeda-xgmac dynamic instantiation Eric Auger
2015-01-15 13:18 ` [Qemu-devel] [PATCH v9 7/7] hw/vfio/platform: add irqfd support Eric Auger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1421327897-1698-2-git-send-email-eric.auger@linaro.org \
--to=eric.auger@linaro.org \
--cc=Bharat.Bhushan@freescale.com \
--cc=a.motakis@virtualopensystems.com \
--cc=a.rigo@virtualopensystems.com \
--cc=afaerber@suse.de \
--cc=agraf@suse.de \
--cc=alex.williamson@redhat.com \
--cc=b.reynal@virtualopensystems.com \
--cc=christoffer.dall@linaro.org \
--cc=eric.auger@st.com \
--cc=kim.phillips@freescale.com \
--cc=kvmarm@lists.cs.columbia.edu \
--cc=patches@linaro.org \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).