[PATCH v2 0/8] hw/arm/smmuv3-accel: Support AUTO properties

Nathan Chen posted 8 patches 3 weeks, 4 days ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20260312210328.2016191-1-nathanc@nvidia.com
Maintainers: 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>, Eduardo Habkost <eduardo@habkost.net>, Eric Blake <eblake@redhat.com>, Markus Armbruster <armbru@redhat.com>
There is a newer version of this series
hw/arm/smmuv3-accel.c                    | 42 ++++++++++++++++++----
hw/arm/smmuv3.c                          | 38 ++++++++++----------
hw/arm/virt-acpi-build.c                 |  2 +-
hw/core/qdev-properties-system.c         | 27 +++++++++++++++
include/hw/arm/smmuv3.h                  | 11 +++---
include/hw/core/qdev-properties-system.h |  6 ++++
qapi/misc-arm.json                       | 44 ++++++++++++++++++++++++
qapi/pragma.json                         |  1 +
qemu-options.hx                          | 29 +++++++++++++++-
9 files changed, 169 insertions(+), 31 deletions(-)
[PATCH v2 0/8] hw/arm/smmuv3-accel: Support AUTO properties
Posted by Nathan Chen 3 weeks, 4 days ago
Hi,

This is a follow-up to the previous RFC series [0] that introduces
support for specifying 'auto' for arm-smmuv3 accelerated mode's ATS,
RIL, SSIDSIZE, and OAS feature properties. Based on feedback from the
previous mailing list discussion, this refresh only converts the
properties to the auto form, keeping the default values from
Shameer's HW-accel SMMUv3 series [1]. A future series will
introduce support for resolving the 'auto' values based on host
SMMUv3 IDR values, as well as setting per-device ATS capability.

When set to 'auto', RIL and OAS will use the defaults set from
smmuv3_init_id_regs() while ATS and SSIDSIZE will remain at the
initialized 0 value; i.e. RIL enabled, 44-bit OAS, ATS support
disabled, 0-bit SSIDSIZE.

A complete branch can be found here:
https://github.com/NathanChenNVIDIA/qemu/tree/smmuv3-accel-auto-v2

Please take a look and let me know your feedback.

Thanks,
Nathan

Changes from RFCv1:
- Remove changes that resolve the 'auto' values based on host SMMUv3
- Restore defaults values for RIL, OAS, SSIDSIZE, and ATS
- Update OasMode to accept all OAS sizes instead of only auto, 44, and
  48
- Include comment in SsidSizeMode schema clarifying enum value
  ordering
- Replace ats-enabled prop with a helper that accepts the dynamic
  casted TYPE_ARM_SMMUV3 object
- Separate out guest vs. host ATS check in
  smmuv3_accel_check_hw_compatible() to a different commit
- Document accel, RIL, OAS, SSIDSIZE, and ATS properties in
  qemu-options.hx

Testing:
Basic sanity testing was performed on an NVIDIA Grace platform with GPU
device assignment and running CUDA test apps on the guest. Additional
testing and feedback are welcome.

[0] https://lore.kernel.org/qemu-devel/20260309192119.870186-1-nathanc@nvidia.com/
[1] https://lore.kernel.org/all/20260126104342.253965-1-skolothumtho@nvidia.com/

Nathan Chen (8):
  hw/arm/smmuv3-accel: Check ATS compatibility between host and guest
  hw/arm/smmuv3-accel: Change ATS property to OnOffAuto
  hw/arm/smmuv3-accel: Change RIL property to OnOffAuto
  qdev: Add a SsidSizeMode property
  hw/arm/smmuv3-accel: Change SSIDSIZE property to SsidSizeMode
  qdev: Add an OasMode property
  hw/arm/smmuv3-accel: Change OAS property to OasMode
  qemu-options.hx: Document arm-smmuv3 device's accel properties

 hw/arm/smmuv3-accel.c                    | 42 ++++++++++++++++++----
 hw/arm/smmuv3.c                          | 38 ++++++++++----------
 hw/arm/virt-acpi-build.c                 |  2 +-
 hw/core/qdev-properties-system.c         | 27 +++++++++++++++
 include/hw/arm/smmuv3.h                  | 11 +++---
 include/hw/core/qdev-properties-system.h |  6 ++++
 qapi/misc-arm.json                       | 44 ++++++++++++++++++++++++
 qapi/pragma.json                         |  1 +
 qemu-options.hx                          | 29 +++++++++++++++-
 9 files changed, 169 insertions(+), 31 deletions(-)

-- 
2.43.0
Re: [PATCH v2 0/8] hw/arm/smmuv3-accel: Support AUTO properties
Posted by Eric Auger 3 weeks, 1 day ago
Hi Nathan,

On 3/12/26 10:03 PM, Nathan Chen wrote:
> Hi,

If we want this to be taken in qemu 11.0 you need to clearly indicate
that in the series title:
using a subject prefix like "PATCH for-11.0"

Then you need to clearly justify what those patches are fixes for stuff
introduced in qemu 11.0, something like:

In qemu 11 we introduced new options for vSMMU but feedbacks received
when starting the integration of layered products shows the need for
auto/host retrieved values. To avoid breaking JSON/QMP compat, we want
to fix the option types so that they can later support the auto mode. At
the moment the auto mode is not supported though.

Thanks

Eric


> This is a follow-up to the previous RFC series [0] that introduces
> support for specifying 'auto' for arm-smmuv3 accelerated mode's ATS,
> RIL, SSIDSIZE, and OAS feature properties. Based on feedback from the
> previous mailing list discussion, this refresh only converts the
> properties to the auto form, keeping the default values from
> Shameer's HW-accel SMMUv3 series [1]. A future series will
> introduce support for resolving the 'auto' values based on host
> SMMUv3 IDR values, as well as setting per-device ATS capability.
>
> When set to 'auto', RIL and OAS will use the defaults set from
> smmuv3_init_id_regs() while ATS and SSIDSIZE will remain at the
> initialized 0 value; i.e. RIL enabled, 44-bit OAS, ATS support
> disabled, 0-bit SSIDSIZE.
>
> A complete branch can be found here:
> https://github.com/NathanChenNVIDIA/qemu/tree/smmuv3-accel-auto-v2
>
> Please take a look and let me know your feedback.
>
> Thanks,
> Nathan
>
> Changes from RFCv1:
> - Remove changes that resolve the 'auto' values based on host SMMUv3
> - Restore defaults values for RIL, OAS, SSIDSIZE, and ATS
> - Update OasMode to accept all OAS sizes instead of only auto, 44, and
>   48
> - Include comment in SsidSizeMode schema clarifying enum value
>   ordering
> - Replace ats-enabled prop with a helper that accepts the dynamic
>   casted TYPE_ARM_SMMUV3 object
> - Separate out guest vs. host ATS check in
>   smmuv3_accel_check_hw_compatible() to a different commit
> - Document accel, RIL, OAS, SSIDSIZE, and ATS properties in
>   qemu-options.hx
>
> Testing:
> Basic sanity testing was performed on an NVIDIA Grace platform with GPU
> device assignment and running CUDA test apps on the guest. Additional
> testing and feedback are welcome.
>
> [0] https://lore.kernel.org/qemu-devel/20260309192119.870186-1-nathanc@nvidia.com/
> [1] https://lore.kernel.org/all/20260126104342.253965-1-skolothumtho@nvidia.com/
>
> Nathan Chen (8):
>   hw/arm/smmuv3-accel: Check ATS compatibility between host and guest
>   hw/arm/smmuv3-accel: Change ATS property to OnOffAuto
>   hw/arm/smmuv3-accel: Change RIL property to OnOffAuto
>   qdev: Add a SsidSizeMode property
>   hw/arm/smmuv3-accel: Change SSIDSIZE property to SsidSizeMode
>   qdev: Add an OasMode property
>   hw/arm/smmuv3-accel: Change OAS property to OasMode
>   qemu-options.hx: Document arm-smmuv3 device's accel properties
>
>  hw/arm/smmuv3-accel.c                    | 42 ++++++++++++++++++----
>  hw/arm/smmuv3.c                          | 38 ++++++++++----------
>  hw/arm/virt-acpi-build.c                 |  2 +-
>  hw/core/qdev-properties-system.c         | 27 +++++++++++++++
>  include/hw/arm/smmuv3.h                  | 11 +++---
>  include/hw/core/qdev-properties-system.h |  6 ++++
>  qapi/misc-arm.json                       | 44 ++++++++++++++++++++++++
>  qapi/pragma.json                         |  1 +
>  qemu-options.hx                          | 29 +++++++++++++++-
>  9 files changed, 169 insertions(+), 31 deletions(-)
>
Re: [PATCH v2 0/8] hw/arm/smmuv3-accel: Support AUTO properties
Posted by Peter Maydell 3 weeks, 1 day ago
On Mon, 16 Mar 2026 at 08:08, Eric Auger <eric.auger@redhat.com> wrote:
>
> Hi Nathan,
>
> On 3/12/26 10:03 PM, Nathan Chen wrote:
> > Hi,
>
> If we want this to be taken in qemu 11.0 you need to clearly indicate
> that in the series title:
> using a subject prefix like "PATCH for-11.0"
>
> Then you need to clearly justify what those patches are fixes for stuff
> introduced in qemu 11.0, something like:
>
> In qemu 11 we introduced new options for vSMMU but feedbacks received
> when starting the integration of layered products shows the need for
> auto/host retrieved values. To avoid breaking JSON/QMP compat, we want
> to fix the option types so that they can later support the auto mode. At
> the moment the auto mode is not supported though.

Yes. At the moment this is on my "look at it for 11.1" pile.
If you want it in 11.0 then it must very clearly state the
justfication (i.e. why it is not new feature work) and be
as small as possible to achieve its aim.

-- PMM
Re: [PATCH v2 0/8] hw/arm/smmuv3-accel: Support AUTO properties
Posted by Nathan Chen 2 weeks, 6 days ago
Hi,

On 3/16/2026 3:05 AM, Peter Maydell wrote:
> On Mon, 16 Mar 2026 at 08:08, Eric Auger<eric.auger@redhat.com> wrote:
>> Hi Nathan,
>>
>> On 3/12/26 10:03 PM, Nathan Chen wrote:
>>> Hi,
>> If we want this to be taken in qemu 11.0 you need to clearly indicate
>> that in the series title:
>> using a subject prefix like "PATCH for-11.0"
>>
>> Then you need to clearly justify what those patches are fixes for stuff
>> introduced in qemu 11.0, something like:
>>
>> In qemu 11 we introduced new options for vSMMU but feedbacks received
>> when starting the integration of layered products shows the need for
>> auto/host retrieved values. To avoid breaking JSON/QMP compat, we want
>> to fix the option types so that they can later support the auto mode. At
>> the moment the auto mode is not supported though.
> Yes. At the moment this is on my "look at it for 11.1" pile.
> If you want it in 11.0 then it must very clearly state the
> justfication (i.e. why it is not new feature work) and be
> as small as possible to achieve its aim.

I see, I will send out another revision today with the correct prefix 
and justification for belonging in 11.0. I will keep these guidelines in 
mind for the future.

Thanks,
Nathan