From: Nathan Chen <nathanc@nvidia.com>
To: qemu-arm@nongnu.org, qemu-devel@nongnu.org
Cc: "Eric Auger" <eric.auger@redhat.com>,
"Peter Maydell" <peter.maydell@linaro.org>,
"Michael S . Tsirkin" <mst@redhat.com>,
"Igor Mammedov" <imammedo@redhat.com>,
"Ani Sinha" <anisinha@redhat.com>,
"Shannon Zhao" <shannon.zhaosl@gmail.com>,
"Paolo Bonzini" <pbonzini@redhat.com>,
"Daniel P . Berrangé" <berrange@redhat.com>,
"Eric Blake" <eblake@redhat.com>,
"Markus Armbruster" <armbru@redhat.com>,
"Shameer Kolothum" <skolothumtho@nvidia.com>,
"Matt Ochs" <mochs@nvidia.com>,
"Nicolin Chen" <nicolinc@nvidia.com>,
"Nathan Chen" <nathanc@nvidia.com>
Subject: [PATCH v5 1/8] hw/arm/smmuv3-accel: Check ATS compatibility between host and guest
Date: Mon, 23 Mar 2026 11:24:47 -0700 [thread overview]
Message-ID: <20260323182454.1416110-2-nathanc@nvidia.com> (raw)
In-Reply-To: <20260323182454.1416110-1-nathanc@nvidia.com>
From: Nathan Chen <nathanc@nvidia.com>
Compare the host SMMUv3 ATS support bit with the guest SMMUv3 ATS support
bit in IDR0 and fail the compatibility check if ATS support is opted as
enabled on the guest SMMUv3 when it is not supported on host SMMUv3.
Fixes: f7f5013a55a3 ("hw/arm/smmuv3-accel: Add support for ATS")
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Tested-by: Eric Auger <eric.auger@redhat.com>
Reviewed-by: Shameer Kolothum <skolothumtho@nvidia.com>
Tested-by: Shameer Kolothum <skolothumtho@nvidia.com>
Signed-off-by: Nathan Chen <nathanc@nvidia.com>
---
hw/arm/smmuv3-accel.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/hw/arm/smmuv3-accel.c b/hw/arm/smmuv3-accel.c
index 17306cd04b..2bb142c47f 100644
--- a/hw/arm/smmuv3-accel.c
+++ b/hw/arm/smmuv3-accel.c
@@ -101,6 +101,12 @@ smmuv3_accel_check_hw_compatible(SMMUv3State *s,
smmuv3_oas_bits(FIELD_EX32(s->idr[5], IDR5, OAS)));
return false;
}
+ /* Check ATS value opted is compatible with Host SMMUv3 */
+ if (FIELD_EX32(info->idr[0], IDR0, ATS) <
+ FIELD_EX32(s->idr[0], IDR0, ATS)) {
+ error_setg(errp, "Host SMMUv3 doesn't support Address Translation Services");
+ return false;
+ }
/* QEMU SMMUv3 supports GRAN4K/GRAN16K/GRAN64K translation granules */
if (FIELD_EX32(info->idr[5], IDR5, GRAN4K) !=
--
2.43.0
next prev parent reply other threads:[~2026-03-23 18:26 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-23 18:24 [PATCH for-11.0 v5 0/8] hw/arm/smmuv3-accel: Support AUTO properties Nathan Chen
2026-03-23 18:24 ` Nathan Chen [this message]
2026-03-23 18:24 ` [PATCH v5 2/8] hw/arm/smmuv3-accel: Change "ats" property type to OnOffAuto Nathan Chen
2026-03-23 18:24 ` [PATCH v5 3/8] hw/arm/smmuv3-accel: Change "ril" " Nathan Chen
2026-03-23 18:24 ` [PATCH v5 4/8] qdev: Add a SsidSizeMode property type Nathan Chen
2026-03-23 18:24 ` [PATCH v5 5/8] hw/arm/smmuv3-accel: Change "ssidsize" property type to SsidSizeMode Nathan Chen
2026-03-23 18:24 ` [PATCH v5 6/8] qdev: Add an OasMode property type Nathan Chen
2026-03-23 18:24 ` [PATCH v5 7/8] hw/arm/smmuv3-accel: Change "oas" property type to OasMode Nathan Chen
2026-03-23 18:24 ` [PATCH v5 8/8] qemu-options.hx: Document arm-smmuv3 device's accel properties Nathan Chen
2026-03-24 13:30 ` [PATCH for-11.0 v5 0/8] hw/arm/smmuv3-accel: Support AUTO properties Peter Maydell
2026-03-24 16:46 ` Nathan Chen
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=20260323182454.1416110-2-nathanc@nvidia.com \
--to=nathanc@nvidia.com \
--cc=anisinha@redhat.com \
--cc=armbru@redhat.com \
--cc=berrange@redhat.com \
--cc=eblake@redhat.com \
--cc=eric.auger@redhat.com \
--cc=imammedo@redhat.com \
--cc=mochs@nvidia.com \
--cc=mst@redhat.com \
--cc=nicolinc@nvidia.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=shannon.zhaosl@gmail.com \
--cc=skolothumtho@nvidia.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