On Wed, Dec 10, 2025 at 01:37:37PM +0000, Shameer Kolothum wrote:
> Introduce a “tegra241-cmdqv” property to enable Tegra241 CMDQV
> support. This is only enabled for accelerated SMMUv3 devices.
> 
> Signed-off-by: Shameer Kolothum <[email protected]>
> ---
>  hw/arm/smmuv3.c | 13 +++++++++++++
>  1 file changed, 13 insertions(+)
> 
> diff --git a/hw/arm/smmuv3.c b/hw/arm/smmuv3.c
> index ec8687d39a..58c35c2af3 100644
> --- a/hw/arm/smmuv3.c
> +++ b/hw/arm/smmuv3.c
> @@ -1953,6 +1953,12 @@ static bool smmu_validate_property(SMMUv3State *s, 
> Error **errp)
>          error_setg(errp, "accel=on support not compiled in");
>          return false;
>      }
> +#endif
> +#ifndef CONFIG_TEGRA241_CMDQ
> +    if (s->tegra241_cmdqv) {
> +        error_setg(errp, "tegra241_cmdqv=on support not compiled in");
> +        return false;
> +    }
>  #endif

Instead of adding this..

> @@ -2109,6 +2119,7 @@ static const Property smmuv3_properties[] = {
>      DEFINE_PROP_BOOL("ats", SMMUv3State, ats, false),
>      DEFINE_PROP_UINT8("oas", SMMUv3State, oas, 44),
>      DEFINE_PROP_BOOL("pasid", SMMUv3State, pasid, false),
> +    DEFINE_PROP_BOOL("tegra241-cmdqv", SMMUv3State, tegra241_cmdqv, false),

Could this be

+#if CONFIG_TEGRA241_CMDQ
+    DEFINE_PROP_BOOL("tegra241-cmdqv", SMMUv3State, tegra241_cmdqv, false),
+endif

?

> @@ -2144,6 +2155,8 @@ static void smmuv3_class_init(ObjectClass *klass, const 
> void *data)
>          "are 44 or 48 bits. Defaults to 44 bits");
>      object_class_property_set_description(klass, "pasid",
>          "Enable/disable PASID support (for accel=on)");
> +    object_class_property_set_description(klass, "tegra241-cmdqv",
> +        "Enable/disable Tegra241 CMDQ-Virtualisation support (for 
> accel=on)");

And here too.

The current approach looks okay to me though. So either way:

Reviewed-by: Nicolin Chen <[email protected]>

Reply via email to