From: Peter Maydell <peter.maydell@linaro.org>
To: qemu-arm@nongnu.org, qemu-devel@nongnu.org
Cc: Eric Auger <eric.auger@redhat.com>, Mostafa Saleh <smostafa@google.com>
Subject: [PATCH 0/3] hw/arm/smmuv3: Advertise SMMUv3.1-XNX
Date: Thu, 14 Sep 2023 15:57:02 +0100 [thread overview]
Message-ID: <20230914145705.1648377-1-peter.maydell@linaro.org> (raw)
The SMMUv3.1-XNX feature is mandatory for an SMMUv3.1 if S2P is
supported, so we should theoretically have implemented it as part of
the recent S2P work. Fortunately, for us the implementation is a
no-op.
This feature is about interpretation of the stage 2 page table
descriptor XN bits, which control execute permissions.
For QEMU, the permission bits passed to an IOMMU (via MemTxAttrs and
IOMMUAccessFlags) only indicate read and write; we do not distinguish
data reads from instruction reads outside the CPU proper. In the
SMMU architecture's terms, our interconnect between the client device
and the SMMU doesn't have the ability to convey the INST attribute,
and we therefore use the default value of "data" for this attribute.
We also do not support the bits in the Stream Table Entry that can
override the on-the-bus transaction attribute permissions (we do not
set SMMU_IDR1.ATTR_PERMS_OVR=1).
These two things together mean that for our implementation, it never
has to deal with transactions with the INST attribute, and so it can
correctly ignore the XN bits entirely. So we already implement
FEAT_XNX's "XN field is now 2 bits, not 1" behaviour to the extent
that we need to.
Patches 1 and 2 in this series do a little bit of tidy up
on the ID register bit code. Patch 3 is the one-liner to
advertise SMMUv3.1-XNX in the ID register.
thanks
-- PMM
Peter Maydell (3):
hw/arm/smmuv3: Update ID register bit field definitions
hw/arm/smmuv3: Sort ID register setting into field order
hw/arm/smmuv3: Advertise SMMUv3.1-XNX feature
hw/arm/smmuv3-internal.h | 38 ++++++++++++++++++++++++++++++++++++++
hw/arm/smmuv3.c | 5 +++--
2 files changed, 41 insertions(+), 2 deletions(-)
--
2.34.1
next reply other threads:[~2023-09-14 14:58 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-14 14:57 Peter Maydell [this message]
2023-09-14 14:57 ` [PATCH 1/3] hw/arm/smmuv3: Update ID register bit field definitions Peter Maydell
2023-09-26 15:22 ` Eric Auger
2023-09-14 14:57 ` [PATCH 2/3] hw/arm/smmuv3: Sort ID register setting into field order Peter Maydell
2023-09-26 15:29 ` Eric Auger
2023-09-14 14:57 ` [PATCH 3/3] hw/arm/smmuv3: Advertise SMMUv3.1-XNX feature Peter Maydell
2023-09-22 10:34 ` Mostafa Saleh
2023-09-22 10:54 ` Peter Maydell
2023-09-22 13:39 ` Mostafa Saleh
2023-09-26 15:39 ` Eric Auger
2023-09-14 15:53 ` [PATCH 0/3] hw/arm/smmuv3: Advertise SMMUv3.1-XNX Richard Henderson
2023-09-22 10:41 ` Mostafa Saleh
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=20230914145705.1648377-1-peter.maydell@linaro.org \
--to=peter.maydell@linaro.org \
--cc=eric.auger@redhat.com \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=smostafa@google.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;
as well as URLs for NNTP newsgroup(s).