All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v4 00/31] hw/arm/virt: Introduce Tegra241 CMDQV support for accelerated SMMUv3
@ 2026-04-15 10:55 Shameer Kolothum
  2026-04-15 10:55 ` [PATCH v4 01/31] backends/iommufd: Update iommufd_backend_get_device_info Shameer Kolothum
                   ` (30 more replies)
  0 siblings, 31 replies; 102+ messages in thread
From: Shameer Kolothum @ 2026-04-15 10:55 UTC (permalink / raw)
  To: qemu-arm, qemu-devel
  Cc: eric.auger, peter.maydell, clg, alex, nicolinc, nathanc, mochs,
	jan, jgg, jonathan.cameron, zhenzhong.duan, kjaju, phrdina,
	skolothumtho

Hi,

Changes from v3:
 https://lore.kernel.org/qemu-devel/20260226105056.897-1-skolothumtho@nvidia.com/

 - Addressed v3 feedback and picked up Reviewed-by tags.
 - Folded veventq alloc/free into alloc_viommu/free_viommu, removing
   the separate ops callback (patch 13).
 - Reworked register and macro names based on feedback.
 - Improved documentation around VCMDQ aperture usage, which was a
   source of confusion in v3. See patches 15, 16, 17, 19 and 20.
   Patch 20 in particular explains the cached register vs hardware-backed
   MMIO model for VCMDQ apertures. Hope this is clearer and correct now!.
 - Added patch 21 to skip IOMMU mappings for RAM device regions,
   eliminating spurious "IOMMU_IOAS_MAP failed: Bad address" warnings
   for the VINTF page0 guest mapping.
 - Updated SMMUv3 identifier property to accommodate the ITS node id
   (patch 27).
 - Removed qtest bios-tables blob patches; node id changes are now
   handled in patch 27.
 - Based on top of Nathan's "Resolve AUTO properties" series [0].
 - Added patch 30 to enforce viommu association stability when CMDQV
   is active.

Please find the complete branch here:
https://github.com/shamiali2008/qemu-master/tree/master-vcmdq-v4-ext

Sanity tested on NVIDIA Grace. Further testing in progress.

Feedback and testing are very welcome.

Thanks,
Shameer
[0] https://lore.kernel.org/qemu-devel/20260401010231.4166776-1-nathanc@nvidia.com

---
Background(from RFCv1):
https://lore.kernel.org/qemu-devel/20251210133737.78257-1-skolothumtho@nvidia.com/

Thanks to Nicolin for the initial patches and testing on which this
is based.

Tegra241 CMDQV extends SMMUv3 by allocating per-VM "virtual interfaces"
(VINTFs), each hosting up to 128 VCMDQs.

Each VINTF exposes two 64KB MMIO pages:
 - Page0 – guest owned control and status registers (directly mapped
           into the VM)
 - Page1 – queue configuration registers (trapped/emulated by QEMU)

Unlike the standard SMMU CMDQ, a guest owned Tegra241 VCMDQ does not
support the full command set. Only a subset, primarily invalidation
related commands, is accepted by the CMDQV hardware. For this reason,
a distinct CMDQV device must be exposed to the guest, and the guest OS
must include a Tegra241 CMDQV aware driver to take advantage of the
hardware acceleration.

VCMDQ support is integrated via the IOMMU_HW_QUEUE_ALLOC mechanism,
allowing QEMU to attach guest configured VCMDQ buffers to the
underlying CMDQV hardware through IOMMUFD. The Linux kernel already
supports the full CMDQV virtualisation model via IOMMUFD[0].
---

Nicolin Chen (15):
  backends/iommufd: Update iommufd_backend_get_device_info
  backends/iommufd: Update iommufd_backend_alloc_viommu to allow user
    ptr
  backends/iommufd: Introduce iommufd_backend_alloc_hw_queue
  backends/iommufd: Introduce iommufd_backend_viommu_mmap
  hw/arm/tegra241-cmdqv: Implement CMDQV init
  hw/arm/tegra241-cmdqv: Implement CMDQV vIOMMU alloc/free
  hw/arm/tegra241-cmdqv: Emulate CMDQ-V Config region
  hw/arm/tegra241-cmdqv: Emulate VCMDQ register reads
  hw/arm/tegra241-cmdqv: Emulate VCMDQ register writes
  hw/arm/tegra241-cmdqv: mmap VINTF Page0 for CMDQV
  hw/arm/tegra241-cmdqv: Allocate HW VCMDQs on base register programming
  hw/arm/tegra241-cmdqv: Map VINTF page0 into guest MMIO space
  hw/arm/tegra241-cmdqv: Add reset handler
  hw/arm/tegra241-cmdqv: Limit queue size based on backend page size
  hw/arm/virt-acpi: Advertise Tegra241 CMDQV nodes in DSDT

Shameer Kolothum (16):
  system/iommufd: Remove unused viommu pointer from IOMMUFDVeventq
  hw/arm/smmuv3-accel: Introduce CMDQV ops interface
  hw/arm/tegra241-cmdqv: Add Tegra241 CMDQV ops backend stub
  hw/arm/smmuv3-accel: Wire CMDQV ops into accel lifecycle
  hw/arm/virt: Use stored SMMUv3 device list for IORT build
  hw/arm/tegra241-cmdqv: Probe host Tegra241 CMDQV support
  hw/arm/virt: Link SMMUv3 CMDQV resources to platform bus
  system/physmem: Add address_space_is_ram() helper
  hw/arm/tegra241-cmdqv: Use mmap'd VINTF page0 as VCMDQ backing
  memory: Allow RAM device regions to skip IOMMU mapping
  hw/arm/smmuv3-accel: Introduce common helper for veventq read
  hw/arm/tegra241-cmdqv: Read and propagate Tegra241 CMDQV errors
  hw/arm/smmuv3: Add per-device identifier property
  hw/arm/smmuv3-accel: Introduce helper to query CMDQV type
  hw/arm/smmuv3-accel: Enforce viommu association when CMDQV is active
  hw/arm/smmuv3: Add cmdqv property for SMMUv3 device

 hw/arm/smmuv3-accel.h         |  29 ++
 hw/arm/tegra241-cmdqv.h       | 367 +++++++++++++++
 include/hw/arm/smmuv3.h       |   3 +
 include/hw/arm/virt.h         |   1 +
 include/system/iommufd.h      |  17 +-
 include/system/memory.h       |  12 +
 backends/iommufd.c            |  64 +++
 hw/arm/smmuv3-accel-stubs.c   |  16 +
 hw/arm/smmuv3-accel.c         | 187 ++++++--
 hw/arm/smmuv3.c               |  15 +
 hw/arm/tegra241-cmdqv-stubs.c |  16 +
 hw/arm/tegra241-cmdqv.c       | 817 ++++++++++++++++++++++++++++++++++
 hw/arm/virt-acpi-build.c      | 127 ++++--
 hw/arm/virt.c                 |  37 ++
 hw/vfio/iommufd.c             |   4 +-
 hw/vfio/listener.c            |   5 +
 system/physmem.c              |  11 +
 backends/trace-events         |   4 +-
 hw/arm/Kconfig                |   5 +
 hw/arm/meson.build            |   2 +
 hw/arm/trace-events           |   7 +
 21 files changed, 1666 insertions(+), 80 deletions(-)
 create mode 100644 hw/arm/tegra241-cmdqv.h
 create mode 100644 hw/arm/tegra241-cmdqv-stubs.c
 create mode 100644 hw/arm/tegra241-cmdqv.c

-- 
2.43.0



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

end of thread, other threads:[~2026-05-08 14:51 UTC | newest]

Thread overview: 102+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-15 10:55 [PATCH v4 00/31] hw/arm/virt: Introduce Tegra241 CMDQV support for accelerated SMMUv3 Shameer Kolothum
2026-04-15 10:55 ` [PATCH v4 01/31] backends/iommufd: Update iommufd_backend_get_device_info Shameer Kolothum
2026-04-15 10:55 ` [PATCH v4 02/31] backends/iommufd: Update iommufd_backend_alloc_viommu to allow user ptr Shameer Kolothum
2026-04-15 10:55 ` [PATCH v4 03/31] backends/iommufd: Introduce iommufd_backend_alloc_hw_queue Shameer Kolothum
2026-04-15 10:55 ` [PATCH v4 04/31] backends/iommufd: Introduce iommufd_backend_viommu_mmap Shameer Kolothum
2026-04-15 10:55 ` [PATCH v4 05/31] system/iommufd: Remove unused viommu pointer from IOMMUFDVeventq Shameer Kolothum
2026-05-04 15:00   ` Eric Auger
2026-05-04 18:16   ` Nicolin Chen
2026-04-15 10:55 ` [PATCH v4 06/31] hw/arm/smmuv3-accel: Introduce CMDQV ops interface Shameer Kolothum
2026-05-04 15:19   ` Eric Auger
2026-05-04 18:28   ` Nicolin Chen
2026-04-15 10:55 ` [PATCH v4 07/31] hw/arm/tegra241-cmdqv: Add Tegra241 CMDQV ops backend stub Shameer Kolothum
2026-05-04 15:19   ` Eric Auger
2026-05-04 18:23   ` Nicolin Chen
2026-04-15 10:55 ` [PATCH v4 08/31] hw/arm/smmuv3-accel: Wire CMDQV ops into accel lifecycle Shameer Kolothum
2026-05-04 15:33   ` Eric Auger
2026-05-05  7:47     ` Shameer Kolothum Thodi
2026-05-04 18:38   ` Nicolin Chen
2026-04-15 10:55 ` [PATCH v4 09/31] hw/arm/virt: Use stored SMMUv3 device list for IORT build Shameer Kolothum
2026-05-04 18:46   ` Nicolin Chen
2026-04-15 10:55 ` [PATCH v4 10/31] hw/arm/tegra241-cmdqv: Probe host Tegra241 CMDQV support Shameer Kolothum
2026-05-04 18:49   ` Nicolin Chen
2026-04-15 10:55 ` [PATCH v4 11/31] hw/arm/tegra241-cmdqv: Implement CMDQV init Shameer Kolothum
2026-04-15 10:55 ` [PATCH v4 12/31] hw/arm/virt: Link SMMUv3 CMDQV resources to platform bus Shameer Kolothum
2026-05-04 18:57   ` Nicolin Chen
2026-04-15 10:55 ` [PATCH v4 13/31] hw/arm/tegra241-cmdqv: Implement CMDQV vIOMMU alloc/free Shameer Kolothum
2026-05-04 16:01   ` Eric Auger
2026-05-04 19:54   ` Nicolin Chen
2026-04-15 10:55 ` [PATCH v4 14/31] hw/arm/tegra241-cmdqv: Emulate CMDQ-V Config region Shameer Kolothum
2026-05-05  0:09   ` Nicolin Chen
2026-05-05  7:26   ` Eric Auger
2026-05-05 10:28     ` Shameer Kolothum Thodi
2026-04-15 10:55 ` [PATCH v4 15/31] hw/arm/tegra241-cmdqv: Emulate VCMDQ register reads Shameer Kolothum
2026-05-05 10:12   ` Eric Auger
2026-05-05 13:27     ` Shameer Kolothum Thodi
2026-05-06 11:14       ` Eric Auger
2026-04-15 10:55 ` [PATCH v4 16/31] hw/arm/tegra241-cmdqv: Emulate VCMDQ register writes Shameer Kolothum
2026-05-05 10:42   ` Eric Auger
2026-05-05 13:49     ` Shameer Kolothum Thodi
2026-04-15 10:55 ` [PATCH v4 17/31] hw/arm/tegra241-cmdqv: mmap VINTF Page0 for CMDQV Shameer Kolothum
2026-04-15 10:55 ` [PATCH v4 18/31] system/physmem: Add address_space_is_ram() helper Shameer Kolothum
2026-05-05  0:24   ` Nicolin Chen
2026-04-15 10:55 ` [PATCH v4 19/31] hw/arm/tegra241-cmdqv: Allocate HW VCMDQs on base register programming Shameer Kolothum
2026-05-05  0:40   ` Nicolin Chen
2026-05-05  9:59     ` Shameer Kolothum Thodi
2026-05-05 19:38       ` Nicolin Chen
2026-05-06  8:18         ` Shameer Kolothum Thodi
2026-05-06 18:18           ` Nicolin Chen
2026-05-05 13:25   ` Eric Auger
2026-05-05 14:26     ` Shameer Kolothum Thodi
2026-05-06 17:49       ` Nicolin Chen
2026-05-08 14:50       ` Eric Auger
2026-05-06 16:51   ` Eric Auger
2026-05-06 18:21     ` Nicolin Chen via
2026-05-06 18:21       ` Nicolin Chen via qemu development
2026-04-15 10:55 ` [PATCH v4 20/31] hw/arm/tegra241-cmdqv: Use mmap'd VINTF page0 as VCMDQ backing Shameer Kolothum
2026-05-05  0:50   ` Nicolin Chen
2026-05-05 15:13     ` Shameer Kolothum Thodi
2026-05-05 19:52       ` Nicolin Chen
2026-05-06 13:16         ` Shameer Kolothum Thodi
2026-05-06 18:34           ` Nicolin Chen
2026-05-06 20:13             ` Shameer Kolothum Thodi
2026-05-06 20:55               ` Nicolin Chen
2026-05-06 12:27   ` Eric Auger
2026-04-15 10:55 ` [PATCH v4 21/31] memory: Allow RAM device regions to skip IOMMU mapping Shameer Kolothum
2026-05-06 12:39   ` Eric Auger
2026-04-15 10:55 ` [PATCH v4 22/31] hw/arm/tegra241-cmdqv: Map VINTF page0 into guest MMIO space Shameer Kolothum
2026-05-06 12:44   ` Eric Auger
2026-05-06 14:24     ` Shameer Kolothum Thodi
2026-05-07 16:24       ` Eric Auger
2026-05-08  9:03         ` Shameer Kolothum Thodi
2026-05-08 14:35           ` Eric Auger
2026-05-08 14:37             ` Shameer Kolothum Thodi
2026-04-15 10:55 ` [PATCH v4 23/31] hw/arm/smmuv3-accel: Introduce common helper for veventq read Shameer Kolothum
2026-05-05  1:07   ` Nicolin Chen
2026-05-06 12:49   ` Eric Auger
2026-04-15 10:55 ` [PATCH v4 24/31] hw/arm/tegra241-cmdqv: Read and propagate Tegra241 CMDQV errors Shameer Kolothum
2026-05-05  1:13   ` Nicolin Chen
2026-05-07 16:40   ` Eric Auger
2026-05-08 10:52     ` Shameer Kolothum Thodi
2026-04-15 10:55 ` [PATCH v4 25/31] hw/arm/tegra241-cmdqv: Add reset handler Shameer Kolothum
2026-05-07 16:51   ` Eric Auger
2026-05-08 11:19     ` Shameer Kolothum Thodi
2026-05-08 14:39       ` Eric Auger
2026-05-07 17:03   ` Eric Auger
2026-04-15 10:55 ` [PATCH v4 26/31] hw/arm/tegra241-cmdqv: Limit queue size based on backend page size Shameer Kolothum
2026-05-05  1:26   ` Nicolin Chen
2026-05-07 17:23   ` Eric Auger
2026-05-08 13:38     ` Shameer Kolothum Thodi
2026-05-08 14:41       ` Eric Auger
2026-04-15 10:55 ` [PATCH v4 27/31] hw/arm/smmuv3: Add per-device identifier property Shameer Kolothum
2026-05-05  1:30   ` Nicolin Chen
2026-04-15 10:55 ` [PATCH v4 28/31] hw/arm/smmuv3-accel: Introduce helper to query CMDQV type Shameer Kolothum
2026-05-05  1:32   ` Nicolin Chen
2026-04-15 10:55 ` [PATCH v4 29/31] hw/arm/virt-acpi: Advertise Tegra241 CMDQV nodes in DSDT Shameer Kolothum
2026-05-07 17:32   ` Eric Auger
2026-04-15 10:55 ` [PATCH v4 30/31] hw/arm/smmuv3-accel: Enforce viommu association when CMDQV is active Shameer Kolothum
2026-05-05  1:35   ` Nicolin Chen
2026-05-07 17:36   ` Eric Auger
2026-05-08 14:36     ` Shameer Kolothum Thodi
2026-04-15 10:55 ` [PATCH v4 31/31] hw/arm/smmuv3: Add cmdqv property for SMMUv3 device Shameer Kolothum
2026-05-07 17:28   ` Eric Auger

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.