From: Alex Williamson <alex.williamson@redhat.com>
To: Antonios Motakis <a.motakis@virtualopensystems.com>
Cc: kvmarm@lists.cs.columbia.edu, iommu@lists.linux-foundation.org,
will.deacon@arm.com, tech@virtualopensystems.com,
christoffer.dall@linaro.org, eric.auger@linaro.org,
kim.phillips@freescale.com, marc.zyngier@arm.com,
"open list:VFIO DRIVER" <kvm@vger.kernel.org>,
"open list:ABI/API" <linux-api@vger.kernel.org>,
open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2/5] vfio: introduce the VFIO_DMA_MAP_FLAG_NOEXEC flag
Date: Mon, 20 Oct 2014 15:29:43 -0600 [thread overview]
Message-ID: <1413840583.4202.111.camel@ul30vt.home> (raw)
In-Reply-To: <1413205748-6300-3-git-send-email-a.motakis@virtualopensystems.com>
On Mon, 2014-10-13 at 15:09 +0200, Antonios Motakis wrote:
> We introduce the VFIO_DMA_MAP_FLAG_NOEXEC flag to the VFIO dma map call,
> and expose its availability via the capability VFIO_DMA_NOEXEC_IOMMU.
> This way the user can control whether the XN flag will be set on the
> requested mappings. The IOMMU_NOEXEC flag needs to be available for all
> the IOMMUs of the container used.
>
> Signed-off-by: Antonios Motakis <a.motakis@virtualopensystems.com>
> ---
> include/uapi/linux/vfio.h | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/include/uapi/linux/vfio.h b/include/uapi/linux/vfio.h
> index 6612974..111b5e8 100644
> --- a/include/uapi/linux/vfio.h
> +++ b/include/uapi/linux/vfio.h
> @@ -29,6 +29,7 @@
> * capability is subject to change as groups are added or removed.
> */
> #define VFIO_DMA_CC_IOMMU 4
> +#define VFIO_DMA_NOEXEC_IOMMU 5
>
> /* Check if EEH is supported */
> #define VFIO_EEH 5
^^
5 is still already used. Feel free to convert to enum so we stop making
this mistake.
> @@ -401,6 +402,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_NOEXEC (1 << 2) /* not executable from device */
> __u64 vaddr; /* Process virtual address */
> __u64 iova; /* IO virtual address */
> __u64 size; /* Size of mapping (bytes) */
next prev parent reply other threads:[~2014-10-20 21:29 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1413205748-6300-1-git-send-email-a.motakis@virtualopensystems.com>
2014-10-13 13:09 ` [PATCH 1/5] vfio/iommu_type1: support for platform bus devices on ARM Antonios Motakis
2014-10-13 13:09 ` [PATCH 2/5] vfio: introduce the VFIO_DMA_MAP_FLAG_NOEXEC flag Antonios Motakis
2014-10-20 21:29 ` Alex Williamson [this message]
2014-10-21 12:17 ` Antonios Motakis
2014-10-20 21:37 ` Andy Lutomirski
2014-10-21 12:23 ` Antonios Motakis
2014-10-13 13:09 ` [PATCH 3/5] vfio: type1: replace domain wide protection flags with supported capabilities Antonios Motakis
[not found] ` <5447742A.8070705@linaro.org>
2014-10-22 13:57 ` Antonios Motakis
2014-10-13 13:09 ` [PATCH 4/5] vfio: type1: replace vfio_domains_have_iommu_cache with generic function Antonios Motakis
2014-10-13 13:09 ` [PATCH 5/5] vfio/iommu_type1: implement the VFIO_DMA_MAP_FLAG_NOEXEC flag Antonios Motakis
2014-10-20 21:13 ` Alex Williamson
2014-10-21 12:40 ` Antonios Motakis
2014-10-21 14:37 ` Alex Williamson
2014-10-21 14:41 ` Antonios Motakis
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=1413840583.4202.111.camel@ul30vt.home \
--to=alex.williamson@redhat.com \
--cc=a.motakis@virtualopensystems.com \
--cc=christoffer.dall@linaro.org \
--cc=eric.auger@linaro.org \
--cc=iommu@lists.linux-foundation.org \
--cc=kim.phillips@freescale.com \
--cc=kvm@vger.kernel.org \
--cc=kvmarm@lists.cs.columbia.edu \
--cc=linux-api@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marc.zyngier@arm.com \
--cc=tech@virtualopensystems.com \
--cc=will.deacon@arm.com \
/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
all inboxes | Powered by JetHome®