Skip to content

hw/arm/smmuv3-accel: Support AUTO properties

Nathan Chen qemu-arm qemu-devel 5 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v5 Latest8 patches 2 repliesIn review
  2. v48 patches 26 repliesSuperseded
  3. v38 patches 10 repliesSuperseded
Earlier versions · 2
VersionPostedPatchesRepliesStatus
v28 patches23 repliesSuperseded
v1 RFC8 patches40 repliesSuperseded

Changes in v5 from the cover letter

- Revise OAS validation error message
- Revise SsidSizeMode enum ordering comment
- Revise commit titles and descriptions to mention incompatible change and change to 'property type' instead of 'property'.
- Collected R-by, T-by, A-by tags from v4, thanks Eric, Shameer, and Markus!

Patches in v5 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/8hw/arm/smmuv3-accel: Check ATS compatibility between host and guesthw/arm/smmuv3-accel.c+6 -00 replies
2/8hw/arm/smmuv3-accel: Change "ats" property type to OnOffAutohw/arm/smmuv3-accel.c hw/arm/smmuv3.c hw/arm/virt-acpi-build.c +1 more+21 -60 replies
3/8hw/arm/smmuv3-accel: Change "ril" property type to OnOffAutohw/arm/smmuv3-accel.c hw/arm/smmuv3.c include/hw/arm/smmuv3.h+13 -60 replies
4/8qdev: Add a SsidSizeMode property typehw/core/qdev-properties-system.c include/hw/core/qdev-properties-system.h qapi/misc-arm.json +1 more+34 -00 replies
5/8hw/arm/smmuv3-accel: Change "ssidsize" property type to SsidSizeModehw/arm/smmuv3-accel.c hw/arm/smmuv3.c include/hw/arm/smmuv3-common.h +1 more+33 -130 replies
6/8qdev: Add an OasMode property typehw/core/qdev-properties-system.c include/hw/core/qdev-properties-system.h qapi/misc-arm.json+44 -00 replies
7/8hw/arm/smmuv3-accel: Change "oas" property type to OasModehw/arm/smmuv3-accel.c hw/arm/smmuv3.c include/hw/arm/smmuv3-common.h +1 more+11 -120 replies
8/8qemu-options.hx: Document arm-smmuv3 device's accel propertiesqemu-options.hx+31 -10 replies

Reviews trailers per patch

All 8 patches have a Reviewed-by or Acked-by.

PatchEric AugerShameer KolothumMarkus Armbruster
1/8R-b T-b R-b T-b
2/8T-b R-b R-b T-b A-b
3/8T-b R-b R-b T-b A-b
4/8R-b T-b T-b A-b
5/8T-b R-b R-b T-b A-b
6/8R-b T-b T-b A-b
7/8T-b R-b R-b T-b A-b
8/8R-b T-b R-b T-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v5 thread

Cover letter [PATCH for-11.0 v5 0/8] hw/arm/smmuv3-accel: Support AUTO properties

Hi,

This is a follow-up to the previous series [0] that introduces support for specifying 'auto' for arm-smmuv3 accelerated mode's ATS, RIL, SSIDSIZE, and OAS feature properties.

In QEMU 11.0 we introduced new options for vSMMU [1], but feedback 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.

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.

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

Please take a look and let me know your feedback.

Thanks,
Nathan

Changes from v4:
- Revise OAS validation error message
- Revise SsidSizeMode enum ordering comment
- Revise commit titles and descriptions to mention incompatible change and change to 'property type' instead of 'property'.
- Collected R-by, T-by, A-by tags from v4, thanks Eric, Shameer, and Markus!

Changes from v3:
- Revise auto support error message
- Restore original comment for ATS in smmuv3_accel_idr_override()
- Update the description in object_class_property_set_description() to mention auto mode not supported.
- Move auto mode check before check for accel=on
- Remove SMMU_OAS_44BIT/_48BIT and SMMU_SSID_MAX_BITS defines
- Consolidate documentation notes about properties only being available for accel=on and not supporting auto mode.
- Include R-by and T-by tags from v3, thanks Eric and Shameer!

Changes from v2:
- Enforce 'auto' value not being supported for HW-accel SMMUv3 props
- Revise docs to mention auto is not supported and these properties are only applicable when accel=on.
- Only override non-defaults in smmuv3_accel_idr_override()
- Remove check for SSIDSIZE AUTO in smmuv3_accel_idr_override() as smmu_validate_property() checks for AUTO beforehand
- Consolidate comments for ssidsize_mode_to_value()
- Include Fixes tags in commit descriptions
- Include R-by tags from v2

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/all/[email protected]/
[1] https://lore.kernel.org/all/[email protected]/

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

 hw/arm/smmuv3-accel.c                    | 41 ++++++++++++---
 hw/arm/smmuv3.c                          | 64 +++++++++++++++---------
 hw/arm/virt-acpi-build.c                 |  2 +-
 hw/core/qdev-properties-system.c         | 27 ++++++++++
 include/hw/arm/smmuv3-common.h           |  3 --
 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                          | 32 +++++++++++-
 10 files changed, 193 insertions(+), 38 deletions(-)
Signature · 1 line
2.43.0