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>
This commit is contained in:
Shameer Kolothum
2026-06-09 12:25:52 +01:00
committed by Peter Maydell
parent 295ca0e14c
commit fced8da695
2 changed files with 16 additions and 0 deletions

View File

@@ -1994,6 +1994,10 @@ static bool smmu_validate_property(SMMUv3State *s, Error **errp)
"bits if accel=on");
return false;
}
if (s->cmdqv == ON_OFF_AUTO_ON) {
error_setg(errp, "cmdqv can only be enabled if accel=on");
return false;
}
return true;
}
@@ -2144,6 +2148,7 @@ static const Property smmuv3_properties[] = {
DEFINE_PROP_OAS_MODE("oas", SMMUv3State, oas, OAS_MODE_AUTO),
DEFINE_PROP_SSIDSIZE_MODE("ssidsize", SMMUv3State, ssidsize,
SSID_SIZE_MODE_AUTO),
DEFINE_PROP_ON_OFF_AUTO("cmdqv", SMMUv3State, cmdqv, ON_OFF_AUTO_AUTO),
};
static void smmuv3_instance_init(Object *obj)
@@ -2194,6 +2199,9 @@ static void smmuv3_class_init(ObjectClass *klass, const void *data)
"than 0 is required to enable PASID support."
"Please ensure the value does not exceed the maximum "
"SubstreamID size supported by the host platform.");
object_class_property_set_description(klass, "cmdqv",
"Enable/disable CMDQV support (for accel=on). "
"Valid values are on, off, and auto. Defaults to auto.");
}
static int smmuv3_notify_flag_changed(IOMMUMemoryRegion *iommu,

View File

@@ -1329,6 +1329,14 @@ SRST
- With accel=off, auto is resolved to 0.
``cmdqv=on|off|auto`` (default: auto)
Enable hardware Command Queue Virtualization (CMDQV) for the
SMMUv3 command queue. Currently only the NVIDIA Tegra241 CMDQV
implementation is supported.
- With accel=on, auto means the value is automatically derived from the host SMMU.
- With accel=off, auto is resolved to 'off'.
``-device amd-iommu[,option=...]``
Enables emulation of an AMD-Vi I/O Memory Management Unit (IOMMU).
Only available with ``-machine q35``, it supports the following options: