@samitouri / QOSamiQemu / commits / fced8da695

hw/arm/smmuv3: Add cmdqv property for SMMUv3 device

Introduce a "cmdqv" property to enable Tegra241 CMDQV support. This is only enabled for accelerated SMMUv3 devices. Reviewed-by: Nicolin Chen <nicolinc@nvidia.com> Reviewed-by: Eric Auger <eric.auger@redhat.com> Tested-by: Nicolin Chen <nicolinc@nvidia.com> Signed-off-by: Shameer Kolothum <skolothumtho@nvidia.com> Tested-by: Eric Auger <eric.auger@redhat.com> Message-id: 20260609112552.378999-32-skolothumtho@nvidia.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>

Shameer Kolothum committed Jun 9, 2026 at 12:25 UTC fced8da695f9f40842aa87d0dfde365c8ef65a36
2 files changed +16
hw/arm/smmuv3.c
+8
@@ -1994,6 +1994,10 @@ static bool smmu_validate_property(SMMUv3State *s, Error **errp)
1994 "bits if accel=on");
1995 return false;
1996 }
1997 + if (s->cmdqv == ON_OFF_AUTO_ON) {
1998 + error_setg(errp, "cmdqv can only be enabled if accel=on");
1999 + return false;
2000 + }
2001 return true;
2002 }
2003
@@ -2144,6 +2148,7 @@ static const Property smmuv3_properties[] = {
2148 DEFINE_PROP_OAS_MODE("oas", SMMUv3State, oas, OAS_MODE_AUTO),
2149 DEFINE_PROP_SSIDSIZE_MODE("ssidsize", SMMUv3State, ssidsize,
2150 SSID_SIZE_MODE_AUTO),
2151 + DEFINE_PROP_ON_OFF_AUTO("cmdqv", SMMUv3State, cmdqv, ON_OFF_AUTO_AUTO),
2152 };
2153
2154 static void smmuv3_instance_init(Object *obj)
@@ -2194,6 +2199,9 @@ static void smmuv3_class_init(ObjectClass *klass, const void *data)
2199 "than 0 is required to enable PASID support."
2200 "Please ensure the value does not exceed the maximum "
2201 "SubstreamID size supported by the host platform.");
2202 + object_class_property_set_description(klass, "cmdqv",
2203 + "Enable/disable CMDQV support (for accel=on). "
2204 + "Valid values are on, off, and auto. Defaults to auto.");
2205 }
2206
2207 static int smmuv3_notify_flag_changed(IOMMUMemoryRegion *iommu,
qemu-options.hx
+8
@@ -1329,6 +1329,14 @@ SRST
1329
1330 - With accel=off, auto is resolved to 0.
1331
1332 + ``cmdqv=on|off|auto`` (default: auto)
1333 + Enable hardware Command Queue Virtualization (CMDQV) for the
1334 + SMMUv3 command queue. Currently only the NVIDIA Tegra241 CMDQV
1335 + implementation is supported.
1336 +
1337 + - With accel=on, auto means the value is automatically derived from the host SMMU.
1338 + - With accel=off, auto is resolved to 'off'.
1339 +
1340 ``-device amd-iommu[,option=...]``
1341 Enables emulation of an AMD-Vi I/O Memory Management Unit (IOMMU).
1342 Only available with ``-machine q35``, it supports the following options: