From: Peter Xu <peterx@redhat.com>
To: CLEMENT MATHIEU--DRIF <clement.mathieu--drif@eviden.com>
Cc: "qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
"pbonzini@redhat.com" <pbonzini@redhat.com>,
"david@redhat.com" <david@redhat.com>,
"philmd@linaro.org" <philmd@linaro.org>,
"mst@redhat.com" <mst@redhat.com>,
"marcel.apfelbaum@gmail.com" <marcel.apfelbaum@gmail.com>,
Ethan MILON <ethan.milon@eviden.com>
Subject: Re: [PATCH 0/2] Memory and PCI definitions for emulated ATS
Date: Fri, 20 Jun 2025 10:35:44 -0400 [thread overview]
Message-ID: <aFVxwG_O2QkryM6P@x1.local> (raw)
In-Reply-To: <20250620055620.133027-1-clement.mathieu--drif@eviden.com>
On Fri, Jun 20, 2025 at 05:56:49AM +0000, CLEMENT MATHIEU--DRIF wrote:
> This short series adds the 'address type' bit (concept from PCIe) to the
> memory attributes and extends the IOMMUAccessFlags enum. This
> will be required to implement ATS support for the virtual IOMMUs.
>
> Address type: Field present in the PCIe R/W requests, it allows devices to
> tell the IOMMU if the address provided in the request is physical or not.
> In other words, it allows the devices to use a physical address obtained
> via ATS and to prevent the IOMMU from trying to remap it on the fly.
Two pure questions on the flags, could be relevant to spec:
>
> Additional IOMMU access flags:
> - Execute Requested
Does this mean that we can start to put code into DMA regions so that
device can run some day (even if the device may have a core that is totally
different arch v.s. the host's CPUs)?
> - Privileged Mode Requested
> - Global
> - Untranslated Only (cannot be used with 'Address type = translated')
I can understand this with patch 1, but not yet with patch 2.
Patch 1 makes sense to me, IIUC it means the addresses to be used in a pcie
request will be translated addresses which should bypass IOMMU DMAR.
OTOH, patch 2 added it into iotlb access permissions, which I'm not sure
what does it mean. Perhaps those addresses can only be translated by ATS
pre-translation requests, so that DMA on top of them (in IOVA address
space) will directly fail?
Side note, it might still be more reasonable to put these changes into the
ATS series as the first user of flags.
Thanks,
>
> Clement Mathieu--Drif (2):
> pci: Add a memory attribute for pre-translated DMA operations
> memory: Add permissions in IOMMUAccessFlags
>
> include/exec/memattrs.h | 3 +++
> include/hw/pci/pci.h | 9 +++++++++
> include/system/memory.h | 23 +++++++++++++++++++++--
> 3 files changed, 33 insertions(+), 2 deletions(-)
>
> --
> 2.49.0
>
--
Peter Xu
next prev parent reply other threads:[~2025-06-20 14:36 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-20 5:56 [PATCH 0/2] Memory and PCI definitions for emulated ATS CLEMENT MATHIEU--DRIF
2025-06-20 5:56 ` [PATCH 1/2] pci: Add a memory attribute for pre-translated DMA operations CLEMENT MATHIEU--DRIF
2025-06-20 5:56 ` [PATCH 2/2] memory: Add permissions in IOMMUAccessFlags CLEMENT MATHIEU--DRIF
2025-06-20 14:35 ` Peter Xu [this message]
2025-06-23 5:43 ` [PATCH 0/2] Memory and PCI definitions for emulated ATS CLEMENT MATHIEU--DRIF
2025-06-23 13:15 ` Peter Xu
2025-06-24 5:02 ` CLEMENT MATHIEU--DRIF
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=aFVxwG_O2QkryM6P@x1.local \
--to=peterx@redhat.com \
--cc=clement.mathieu--drif@eviden.com \
--cc=david@redhat.com \
--cc=ethan.milon@eviden.com \
--cc=marcel.apfelbaum@gmail.com \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=philmd@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.