All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Auger <eric.auger@linaro.org>
To: eric.auger@st.com, eric.auger@linaro.org,
	christoffer.dall@linaro.org, qemu-devel@nongnu.org,
	alex.williamson@redhat.com, peter.maydell@linaro.org,
	agraf@suse.de, b.reynal@virtualopensystems.com,
	feng.wu@intel.com
Cc: kim.phillips@freescale.com, patches@linaro.org,
	a.rigo@virtualopensystems.com, afaerber@suse.de,
	Bharat.Bhushan@freescale.com, a.motakis@virtualopensystems.com,
	pbonzini@redhat.com, kvmarm@lists.cs.columbia.edu
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	[thread overview]
Message-ID: <1423799232-10816-2-git-send-email-eric.auger@linaro.org> (raw)
In-Reply-To: <1423799232-10816-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_integ_v9

Signed-off-by: Eric Auger <eric.auger@linaro.org>

---

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

  reply	other threads:[~2015-02-13  3:47 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-13  3:47 [Qemu-devel] [PATCH v10 0/7] KVM platform device passthrough Eric Auger
2015-02-13  3:47 ` Eric Auger [this message]
2015-02-13  3:47 ` [Qemu-devel] [PATCH v10 2/7] hw/vfio/platform: vfio-platform skeleton Eric Auger
2015-02-17 10:56   ` Alex Bennée
2015-02-17 10:56     ` Alex Bennée
2015-03-13  9:28     ` [Qemu-devel] " Eric Auger
2015-03-13  9:28       ` Eric Auger
2015-02-13  3:47 ` [Qemu-devel] [PATCH v10 3/7] hw/vfio/platform: add irq assignment Eric Auger
2015-02-17 11:24   ` Alex Bennée
2015-02-17 11:24     ` Alex Bennée
2015-03-19 10:18     ` [Qemu-devel] " Eric Auger
2015-03-19 10:18       ` Eric Auger
2015-02-13  3:47 ` [Qemu-devel] [PATCH v10 4/7] hw/vfio/platform: add capability to start IRQ propagation Eric Auger
2015-02-13  3:47 ` [Qemu-devel] [PATCH v10 5/7] hw/vfio: calxeda xgmac device Eric Auger
2015-02-17 11:29   ` Alex Bennée
2015-02-17 11:29     ` Alex Bennée
2015-02-13  3:47 ` [Qemu-devel] [PATCH v10 6/7] hw/arm/sysbus-fdt: enable vfio-calxeda-xgmac dynamic instantiation Eric Auger
2015-02-17 11:36   ` Alex Bennée
2015-02-17 11:36     ` Alex Bennée
2015-03-13  9:33     ` [Qemu-devel] " Eric Auger
2015-03-13  9:33       ` Eric Auger
2015-02-13  3:47 ` [Qemu-devel] [PATCH v10 7/7] hw/vfio/platform: add irqfd support Eric Auger
2015-02-17 11:41   ` Alex Bennée
2015-02-17 11:41     ` Alex Bennée

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=1423799232-10816-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=feng.wu@intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.