[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFC v4 08/13] hw/vfio/common: Add EXEC_FLAG to VFIO DM
From: |
Peter Maydell |
Subject: |
Re: [Qemu-devel] [RFC v4 08/13] hw/vfio/common: Add EXEC_FLAG to VFIO DMA mappings |
Date: |
Mon, 7 Jul 2014 13:40:12 +0100 |
On 7 July 2014 13:27, Eric Auger <address@hidden> wrote:
> From: Alvise Rigo <address@hidden>
>
> The flag is mandatory for the ARM SMMU so we always add it if the MMIO
> handles it.
>
> Signed-off-by: Alvise Rigo <address@hidden>
> ---
> hw/vfio/common.c | 9 +++++++++
> include/hw/vfio/vfio-common.h | 1 +
> linux-headers/linux/vfio.h | 2 ++
> 3 files changed, 12 insertions(+)
> diff --git a/linux-headers/linux/vfio.h b/linux-headers/linux/vfio.h
> index 26c218e..b13f7d3 100644
> --- a/linux-headers/linux/vfio.h
> +++ b/linux-headers/linux/vfio.h
> @@ -30,6 +30,7 @@
> */
> #define VFIO_DMA_CC_IOMMU 4
>
> +#define VFIO_IOMMU_PROT_EXEC 5
> /*
> * The IOCTL interface is designed for extensibility by embedding the
> * structure length (argsz) and flags into structures passed between
> @@ -398,6 +399,7 @@ struct vfio_iommu_type1_dma_map {
> __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_EXEC (1 << 2) /* executable from device */
> __u64 vaddr; /* Process virtual address */
> __u64 iova; /* IO virtual address */
> __u64 size; /* Size of mapping (bytes) */
You shouldn't change linux-headers/ files except by syncing them from
a kernel tree using scripts/update-linux-headers.sh. Those changes
should always be in a separate commit that includes the kernel tree
and commit hash synced against in its commit message. For an RFC
patchseries where the equivalent kernel changes haven't been
accepted upstream yet it's ok to sync against a local tree (and
clearly note in the commit message that it's not for committing
to upstream qemu), but the changes should still be in their own patch.
thanks
-- PMM
- [Qemu-devel] [RFC v4 00/13] KVM platform device passthrough, Eric Auger, 2014/07/07
- [Qemu-devel] [RFC v4 01/13] vfio: move hw/misc/vfio.c to hw/vfio/pci.c Move vfio.h into include/hw/vfio, Eric Auger, 2014/07/07
- [Qemu-devel] [RFC v4 02/13] hw/vfio/pci: Rename VFIODevice into VFIOPCIDevice, Eric Auger, 2014/07/07
- [Qemu-devel] [RFC v4 03/13] hw/vfio/pci: Remove unneeded include files, Eric Auger, 2014/07/07
- [Qemu-devel] [RFC v4 04/13] hw/vfio/pci: introduce VFIODevice, Eric Auger, 2014/07/07
- [Qemu-devel] [RFC v4 05/13] hw/vfio/pci: Introduce VFIORegion, Eric Auger, 2014/07/07
- [Qemu-devel] [RFC v4 07/13] hw/vfio: create common module, Eric Auger, 2014/07/07
- [Qemu-devel] [RFC v4 06/13] hw/vfio/pci: split vfio_get_device, Eric Auger, 2014/07/07
- [Qemu-devel] [RFC v4 08/13] hw/vfio/common: Add EXEC_FLAG to VFIO DMA mappings, Eric Auger, 2014/07/07
- [Qemu-devel] [RFC v4 09/13] hw/vfio/platform: add vfio-platform support, Eric Auger, 2014/07/07
- [Qemu-devel] [RFC v4 11/13] hw/vfio/platform: Add irqfd support, Eric Auger, 2014/07/07
- [Qemu-devel] [RFC v4 10/13] hw/intc/arm_gic_kvm: enable irqfd and set routing table, Eric Auger, 2014/07/07
- [Qemu-devel] [RFC v4 12/13] hw/vfio/platform: add default dt generation for vfio device, Eric Auger, 2014/07/07
- [Qemu-devel] [RFC v4 13/13] hw/vfio: add an example calxeda_xgmac, Eric Auger, 2014/07/07