qemu-devel
[Top][All Lists]
Advanced

[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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]