qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v4 0/7] hw/arm/virt: Add support for user creatable SMMUv3 device
@ 2025-06-13 14:44 Shameer Kolothum via
  2025-06-13 14:44 ` [PATCH v4 1/7] hw/arm/smmu-common: Check SMMU has PCIe Root Complex association Shameer Kolothum via
                   ` (6 more replies)
  0 siblings, 7 replies; 41+ messages in thread
From: Shameer Kolothum via @ 2025-06-13 14:44 UTC (permalink / raw)
  To: qemu-arm, qemu-devel
  Cc: eric.auger, peter.maydell, jgg, nicolinc, ddutile, berrange,
	imammedo, nathanc, mochs, smostafa, linuxarm, wangzhou1,
	jiangkunkun, jonathan.cameron, zhangfei.gao

Hi All,

Changes from v3:
https://lore.kernel.org/qemu-devel/20250602154110.48392-1-shameerali.kolothum.thodi@huawei.com/

Addressed feedback on v3. Thanks to all.
Major changes:
1. Based on Igor's suggestion, moved the associated primary-bus is of type
   TYPE_PCI_HOST_BRIDGE check to smmu-common.
2. Addressed IORT related comments from Eric
3. Picked up T-by tag from Nathan. Thanks for giving it a spin.
4. Added a documents entry for arm-smmuv3.

Cover letter:

This patch series introduces support for a user-creatable SMMUv3 device
(-device arm-smmuv3) in QEMU.

The implementation is based on feedback received from the RFCv2[0]:
"hw/arm/virt: Add support for user-creatable accelerated SMMUv3"

Currently, QEMU's SMMUv3 emulation (iommu=smmuv3) is tied to the machine
and does not support instantiating multiple SMMUv3 devices—each associated
with a separate PCIe root complex. In contrast, real-world ARM systems
often include multiple SMMUv3 instances, each bound to a different PCIe
root complex.

This series allows to specify multiple SMMUv3 instances as below,

 -device arm-smmuv3,primary-bus=pcie.0,id=smmuv3.0
  ...
 -device arm-smmuv3,primary-bus=pcie.1,,id=smmuv3.1

The multiple SMMUv3 instance support lays the groundwork for supporting
accelerated SMMUv3, as proposed in the aforementioned RFCv2[0]. The
proposed accelerated support will be an optional property like below,
-device arm-smmuv3,primary-bus=pcie.1,accel=on,..

Please note, the accelerated SMMUv3 support is not part of this series
and will be sent out as a separate series later on top of this one.

This series also,

-Supports either the legacy iommu=smmuv3 option or the new
  "-device arm-smmuv3" model.
  -Adds device tree bindings for the new SMMUv3 device on the arm/virt
   machine only, and only for the default pcie.0 root complex.
   (Note: pxb-pcie root complexes are currently not supported with the
    device tree due to known limitations[1].)

Example usage:
  -device arm-smmuv3,primary-bus=pcie.0,id=smmuv3.0
  -device virtio-net-pci,bus=pcie.0
  -device pxb-pcie,id=pcie.1,bus_nr=2
  -device arm-smmuv3,primary-bus=pcie.1,id=smmuv3.1
  -device pcie-root-port,id=pcie.port1,bus=pcie.1
  -device virtio-net-pci,bus=pcie.port1

Please take a look and let me know your feedback.

Thanks,
Shameer
[0]:https://lore.kernel.org/qemu-devel/20250311141045.66620-1-shameerali.kolothum.thodi@huawei.com/
[1]:https://lore.kernel.org/qemu-devel/20230421165037.2506-1-Jonathan.Cameron@huawei.com/

Nicolin Chen (1):
  hw/arm/virt: Add an SMMU_IO_LEN macro

Shameer Kolothum (6):
  hw/arm/smmu-common: Check SMMU has PCIe Root Complex association
  hw/arm/virt-acpi-build: Re-arrange SMMUv3 IORT build
  hw/arm/virt-acpi-build: Update IORT for multiple smmuv3 devices
  hw/arm/virt: Factor out common SMMUV3 dt bindings code
  hw/arm/virt: Allow user-creatable SMMUv3 dev instantiation
  qemu-options.hx: Document the arm-smmuv3 device

 hw/arm/smmu-common.c     |   4 +-
 hw/arm/smmuv3.c          |   2 +
 hw/arm/virt-acpi-build.c | 166 +++++++++++++++++++++++++++++++--------
 hw/arm/virt.c            | 108 ++++++++++++++++++-------
 hw/core/sysbus-fdt.c     |   3 +
 include/hw/arm/virt.h    |   1 +
 qemu-options.hx          |   6 ++
 7 files changed, 228 insertions(+), 62 deletions(-)

-- 
2.47.0



^ permalink raw reply	[flat|nested] 41+ messages in thread

end of thread, other threads:[~2025-06-20 11:51 UTC | newest]

Thread overview: 41+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-13 14:44 [PATCH v4 0/7] hw/arm/virt: Add support for user creatable SMMUv3 device Shameer Kolothum via
2025-06-13 14:44 ` [PATCH v4 1/7] hw/arm/smmu-common: Check SMMU has PCIe Root Complex association Shameer Kolothum via
2025-06-16  5:04   ` Nicolin Chen
2025-06-16 10:20   ` Jonathan Cameron via
2025-06-16 11:20     ` Shameerali Kolothum Thodi via
2025-06-17  7:49     ` Eric Auger
2025-06-17 16:52       ` Jonathan Cameron via
2025-06-17 19:11         ` Donald Dutile
2025-06-18  8:35         ` Shameerali Kolothum Thodi via
2025-06-18 10:38           ` Jonathan Cameron via
2025-06-18 16:59           ` Eric Auger
2025-06-19  7:24             ` Shameerali Kolothum Thodi via
2025-06-19  7:41               ` Eric Auger
2025-06-19  8:05                 ` Shameerali Kolothum Thodi via
2025-06-19  9:30                   ` Jonathan Cameron via
2025-06-19  9:38                     ` Jonathan Cameron via
2025-06-20 11:50                       ` Jonathan Cameron via
2025-06-13 14:44 ` [PATCH v4 2/7] hw/arm/virt-acpi-build: Re-arrange SMMUv3 IORT build Shameer Kolothum via
2025-06-16  5:20   ` Nicolin Chen
2025-06-16 10:32   ` Jonathan Cameron via
2025-06-17  9:09   ` Eric Auger
2025-06-13 14:44 ` [PATCH v4 3/7] hw/arm/virt-acpi-build: Update IORT for multiple smmuv3 devices Shameer Kolothum via
2025-06-16  5:25   ` Nicolin Chen
2025-06-16 10:55   ` Jonathan Cameron via
2025-06-16 11:22     ` Shameerali Kolothum Thodi via
2025-06-17  9:21   ` Eric Auger
2025-06-13 14:44 ` [PATCH v4 4/7] hw/arm/virt: Factor out common SMMUV3 dt bindings code Shameer Kolothum via
2025-06-16 10:57   ` Jonathan Cameron via
2025-06-13 14:44 ` [PATCH v4 5/7] hw/arm/virt: Add an SMMU_IO_LEN macro Shameer Kolothum via
2025-06-16 11:02   ` Jonathan Cameron via
2025-06-16 11:26     ` Shameerali Kolothum Thodi via
2025-06-13 14:44 ` [PATCH v4 6/7] hw/arm/virt: Allow user-creatable SMMUv3 dev instantiation Shameer Kolothum via
2025-06-16  5:31   ` Nicolin Chen
2025-06-16 12:31     ` Shameerali Kolothum Thodi via
2025-06-16 11:05   ` Jonathan Cameron via
2025-06-17  9:25   ` Eric Auger
2025-06-13 14:44 ` [PATCH v4 7/7] qemu-options.hx: Document the arm-smmuv3 device Shameer Kolothum via
2025-06-16  5:33   ` Nicolin Chen
2025-06-16 11:12   ` Jonathan Cameron via
2025-06-16 11:24     ` Shameerali Kolothum Thodi via
2025-06-16 17:28     ` Donald Dutile

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).