On Wed, Feb 11, 2026 at 08:34:13AM +0000, Shameer Kolothum wrote:
> For cold-plugged devices using SMMUv3 acceleration, the vIOMMU is created
> before the guest boots. In this case, the vEVENTQ is allocated when the
> guest writes to SMMU_CR0 and sets EVENTQEN = 1.
[...]
> @@ -1605,6 +1605,10 @@ static MemTxResult smmu_writel(SMMUv3State *s, hwaddr 
> offset,
>          s->cr0ack = data & ~SMMU_CR0_RESERVED;
>          /* in case the command queue has been enabled */
>          smmuv3_cmdq_consume(s, &local_err);
> +        /* Allocate vEVENTQ if EventQ is enabled and a vIOMMU is available */

Nit: though it is just following smmuv3_cmdq_consume(), it'd be
likely clearer to verify the EVENTQEN in the callers.

> +        if (local_err == NULL) {

Does eventq need to rely on !local_err from cmdq?

> +            smmuv3_accel_alloc_veventq(s, &local_err);
> +        }

Should probably validate s->accel before calling it?

Nicolin

Reply via email to