All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 00/24] hw/arm/virt: Introduce Tegra241 CMDQV support for accelerated SMMUv3
@ 2026-02-06 14:47 Shameer Kolothum
  2026-02-06 14:48 ` [PATCH v2 01/24] backends/iommufd: Update iommufd_backend_get_device_info Shameer Kolothum
                   ` (23 more replies)
  0 siblings, 24 replies; 82+ messages in thread
From: Shameer Kolothum @ 2026-02-06 14:47 UTC (permalink / raw)
  To: qemu-arm, qemu-devel
  Cc: eric.auger, peter.maydell, clg, alex, nicolinc, nathanc, mochs,
	jan, jgg, jonathan.cameron, zhangfei.gao, zhenzhong.duan, kjaju,
	skolothumtho

Hi,

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

 - Rebased on top of latest master with SMMUv3 accel support.
 - RFC tag dropped as the SMMUv3 accel series is now applied.
 - Addressed feedback on RFC and collected tags. Thanks!
 - Introduces an ops interface to factor CMDQV specific
   behavior out of the base implementation(patch #5)
 - Split read/write implementation to multiple patches(10-12)
 - Only map the VINTF page0 MMIO region to guest(patch #15)
 - Add per-device identifier property to SMMUv3 dev so that
   both Tegra DSDT and SMMUv3 IORT uses the same identifier
   (patch #22)
 - TODO: There was a suggestion to factor out common code for vEVNTQ
   read side function. I have left it as is for now.

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

I have sanity tested this on an NVIDIA GRACE platform and will
continue with additional tests.

Feedback and testing are very welcome.

Thanks,
Shameer

---
Background(from RFCv1):

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

Summary of QEMU changes:

 - Integrated into the existing SMMUv3 accel path via a
   "tegra241-cmdqv" property.
 - Support for allocating vIOMMU objects of type
   IOMMU_VIOMMU_TYPE_TEGRA241_CMDQV.
 - Mapping and emulation of the CMDQV MMIO register layout.
 - VCMDQ/VINTF read/write handling and queue allocation using IOMMUFD
   APIs.
 - Reset and initialisation hooks, including checks for at least one
   cold-plugged device.
 - CMDQV hardware reads guest queue memory using host physical addresses
   provided through IOMMUFD, which requires that the VCMDQ buffer be
   physically contiguous not only in guest PA space but also in host
   PA space. When Tegra241 CMDQV is enabled, QEMU must therefore only
   expose a CMDQV size that the host can reliably back with contiguous
   physical memory. Because of this constraint, it is suggested to use
   huge pages to back the guest RAM.
 - ACPI DSDT node generation for CMDQV devices on the virt machine.
---

Nicolin Chen (14):
  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 and vIOMMU allocation
  hw/arm/tegra241-cmdqv: mmap VINTF Page0 for CMDQV
  hw/arm/tegra241-cmdqv: Emulate global CMDQV registers
  hw/arm/tegra241-cmdqv: Emulate global and VINTF VCMDQ register reads
  hw/arm/tegra241-cmdqv: Emulate global and VINTF VCMDQ register writes
  hw/arm/tegra241-cmdqv: Allocate HW VCMDQs on base register programming
  hw/arm/tegra241-cmdqv: map VINTF page0 MMIO region
  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 (10):
  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
  system/physmem: Add address_space_is_ram() helper
  hw/arm/tegra241-cmdqv: Use VINTF page0 for mapped VCMDQ registers
  hw/arm/tegra241-cmdqv: Add vEVENTQ allocation and free
  hw/arm/tegra241-cmdqv: Read and propagate Tegra241 CMDQV errors
  virt-acpi-build: Rename AcpiIortSMMUv3Dev to AcpiSMMUv3Dev
  hw/arm/smmuv3: Add per-device identifier poroperty
  hw/arm/smmuv3: Add tegra241-cmdqv property for SMMUv3 device

 backends/iommufd.c       |  65 ++++
 backends/trace-events    |   4 +-
 hw/arm/Kconfig           |   5 +
 hw/arm/meson.build       |   3 +-
 hw/arm/smmuv3-accel.c    |  73 +++-
 hw/arm/smmuv3-accel.h    |  24 ++
 hw/arm/smmuv3.c          |  15 +
 hw/arm/tegra241-cmdqv.c  | 778 +++++++++++++++++++++++++++++++++++++++
 hw/arm/tegra241-cmdqv.h  | 340 +++++++++++++++++
 hw/arm/trace-events      |   5 +
 hw/arm/virt-acpi-build.c | 121 ++++--
 hw/arm/virt.c            |   3 +
 hw/vfio/iommufd.c        |   4 +-
 include/hw/arm/smmuv3.h  |   3 +
 include/system/iommufd.h |  17 +
 include/system/memory.h  |  10 +
 system/physmem.c         |  11 +
 17 files changed, 1447 insertions(+), 34 deletions(-)
 create mode 100644 hw/arm/tegra241-cmdqv.c
 create mode 100644 hw/arm/tegra241-cmdqv.h

-- 
2.43.0



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

end of thread, other threads:[~2026-02-16  8:48 UTC | newest]

Thread overview: 82+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-06 14:47 [PATCH v2 00/24] hw/arm/virt: Introduce Tegra241 CMDQV support for accelerated SMMUv3 Shameer Kolothum
2026-02-06 14:48 ` [PATCH v2 01/24] backends/iommufd: Update iommufd_backend_get_device_info Shameer Kolothum
2026-02-12  8:03   ` Eric Auger
2026-02-06 14:48 ` [PATCH v2 02/24] backends/iommufd: Update iommufd_backend_alloc_viommu to allow user ptr Shameer Kolothum
2026-02-12  8:09   ` Eric Auger
2026-02-06 14:48 ` [PATCH v2 03/24] backends/iommufd: Introduce iommufd_backend_alloc_hw_queue Shameer Kolothum
2026-02-11  9:20   ` Cédric Le Goater
2026-02-06 14:48 ` [PATCH v2 04/24] backends/iommufd: Introduce iommufd_backend_viommu_mmap Shameer Kolothum
2026-02-13 10:19   ` Eric Auger
2026-02-13 10:54     ` Shameer Kolothum Thodi
2026-02-06 14:48 ` [PATCH v2 05/24] hw/arm/smmuv3-accel: Introduce CMDQV ops interface Shameer Kolothum
2026-02-09 19:42   ` Nicolin Chen
2026-02-10  8:46     ` Shameer Kolothum Thodi
2026-02-10 17:20       ` Nicolin Chen
2026-02-12 14:46         ` Eric Auger
2026-02-12 14:41       ` Eric Auger
2026-02-12 14:50         ` Shameer Kolothum Thodi
2026-02-12 14:57           ` Eric Auger
2026-02-12 15:05             ` Shameer Kolothum Thodi
2026-02-12 15:29               ` Eric Auger
2026-02-12 15:37                 ` Shameer Kolothum Thodi
2026-02-12 15:35               ` Eric Auger
2026-02-12 15:47                 ` Shameer Kolothum Thodi
2026-02-12 17:05                   ` Eric Auger
2026-02-12 17:23                     ` Nicolin Chen via
2026-02-12 17:23                       ` Nicolin Chen via qemu development
2026-02-12 17:52                       ` Shameer Kolothum Thodi
2026-02-09 22:22   ` Nicolin Chen
2026-02-12 14:44   ` Eric Auger
2026-02-12 14:55   ` Eric Auger
2026-02-06 14:48 ` [PATCH v2 06/24] hw/arm/tegra241-cmdqv: Add Tegra241 CMDQV ops backend stub Shameer Kolothum
2026-02-12 14:27   ` Eric Auger
2026-02-06 14:48 ` [PATCH v2 07/24] hw/arm/smmuv3-accel: Wire CMDQV ops into accel lifecycle Shameer Kolothum
2026-02-12 17:37   ` Eric Auger
2026-02-12 17:55     ` Shameer Kolothum Thodi
2026-02-06 14:48 ` [PATCH v2 08/24] hw/arm/tegra241-cmdqv: Implement CMDQV init and vIOMMU allocation Shameer Kolothum
2026-02-12 15:11   ` Eric Auger
2026-02-06 14:48 ` [PATCH v2 09/24] hw/arm/tegra241-cmdqv: mmap VINTF Page0 for CMDQV Shameer Kolothum
2026-02-13 10:39   ` Eric Auger
2026-02-13 13:57     ` Shameer Kolothum Thodi
2026-02-06 14:48 ` [PATCH v2 10/24] hw/arm/tegra241-cmdqv: Emulate global CMDQV registers Shameer Kolothum
2026-02-09 23:19   ` Nicolin Chen
2026-02-10  8:51     ` Shameer Kolothum Thodi
2026-02-10 17:06       ` Nicolin Chen
2026-02-06 14:48 ` [PATCH v2 11/24] hw/arm/tegra241-cmdqv: Emulate global and VINTF VCMDQ register reads Shameer Kolothum
2026-02-06 14:48 ` [PATCH v2 12/24] hw/arm/tegra241-cmdqv: Emulate global and VINTF VCMDQ register writes Shameer Kolothum
2026-02-06 14:48 ` [PATCH v2 13/24] system/physmem: Add address_space_is_ram() helper Shameer Kolothum
2026-02-13 10:23   ` Eric Auger
2026-02-06 14:48 ` [PATCH v2 14/24] hw/arm/tegra241-cmdqv: Allocate HW VCMDQs on base register programming Shameer Kolothum
2026-02-09 23:46   ` Nicolin Chen
2026-02-10  8:55     ` Shameer Kolothum Thodi
2026-02-06 14:48 ` [PATCH v2 15/24] hw/arm/tegra241-cmdqv: map VINTF page0 MMIO region Shameer Kolothum
2026-02-09 23:50   ` Nicolin Chen
2026-02-10  9:15     ` Shameer Kolothum Thodi
2026-02-13 23:06   ` Nicolin Chen
2026-02-16  8:41     ` Shameer Kolothum Thodi
2026-02-06 14:48 ` [PATCH v2 16/24] hw/arm/tegra241-cmdqv: Use VINTF page0 for mapped VCMDQ registers Shameer Kolothum
2026-02-13 10:33   ` Eric Auger
2026-02-13 11:29     ` Shameer Kolothum Thodi
2026-02-06 14:48 ` [PATCH v2 17/24] hw/arm/tegra241-cmdqv: Add vEVENTQ allocation and free Shameer Kolothum
2026-02-09 23:51   ` Nicolin Chen
2026-02-06 14:48 ` [PATCH v2 18/24] hw/arm/tegra241-cmdqv: Read and propagate Tegra241 CMDQV errors Shameer Kolothum
2026-02-13 23:29   ` Nicolin Chen
2026-02-16  8:47     ` Shameer Kolothum Thodi
2026-02-06 14:48 ` [PATCH v2 19/24] hw/arm/tegra241-cmdqv: Add reset handler Shameer Kolothum
2026-02-06 14:48 ` [PATCH v2 20/24] hw/arm/tegra241-cmdqv: Limit queue size based on backend page size Shameer Kolothum
2026-02-06 14:48 ` [PATCH v2 21/24] virt-acpi-build: Rename AcpiIortSMMUv3Dev to AcpiSMMUv3Dev Shameer Kolothum
2026-02-12 18:03   ` Eric Auger
2026-02-06 14:48 ` [PATCH v2 22/24] hw/arm/smmuv3: Add per-device identifier poroperty Shameer Kolothum
2026-02-10  0:06   ` Nicolin Chen
2026-02-12 17:54   ` Eric Auger
2026-02-12 18:29   ` Eric Auger
2026-02-12 18:53     ` Shameer Kolothum Thodi
2026-02-12 18:57       ` Eric Auger
2026-02-12 18:49   ` Eric Auger
2026-02-12 18:54     ` Shameer Kolothum Thodi
2026-02-06 14:48 ` [PATCH v2 23/24] hw/arm/virt-acpi: Advertise Tegra241 CMDQV nodes in DSDT Shameer Kolothum
2026-02-12 19:10   ` Eric Auger
2026-02-06 14:48 ` [PATCH v2 24/24] hw/arm/smmuv3: Add tegra241-cmdqv property for SMMUv3 device Shameer Kolothum
2026-02-13 11:55   ` Pavel Hrdina
2026-02-13 13:39     ` Shameer Kolothum Thodi
2026-02-13 15:44       ` Pavel Hrdina

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.