On Mon, Jul 14, 2025 at 04:59:33PM +0100, Shameer Kolothum wrote:
> For accelerated SMMUv3, we need nested parent domain creation. Add the
> callback support so that VFIO can create a nested parent.
> 
> Since 'accel=on' for SMMUv3 requires the guest SMMUv3 to be configured
> in Stage 1 mode, ensure that the 'stage' property is explicitly set to
> Stage 1.
> 
> Signed-off-by: Shameer Kolothum <shameerali.kolothum.th...@huawei.com>

Reviewed-by: Nicolin Chen <nicol...@nvidia.com>

> @@ -81,8 +82,22 @@ static AddressSpace *smmuv3_accel_find_add_as(PCIBus *bus, 
> void *opaque,
>      }
>  }
>  
> +static uint64_t smmuv3_accel_get_viommu_cap(void *opaque)
> +{
> +    /*
> +     * Accelerated smmuv3 support only allowes Guest S1

s/allowes/allows

> +     * configuration. Hence report VIOMMU_CAP_STAGE1
> +     * so that VFIO can create nested parent domain.

Aligning with the kernel uAPI docs:

s/nested/a nesting

> +     * The real nested support should be reported from host

"The real HW nested stage-1 translation must be supported by the .."

> +     * SMMUv3 and if it doesn't, the nested parent allocation

s/nested/nesting

> +     * will fail anyway.
> +     */

And I think the lines are wrapped a bit too early. Should QEMU allow
up-to-80 characters?

Thanks
Nicolin

Reply via email to