On Mon, 29 Sep 2025 14:36:37 +0100 Shameer Kolothum <[email protected]> wrote:
> Currently QEMU SMMUv3 has RIL support by default. But if accelerated mode > is enabled, RIL has to be compatible with host SMMUv3 support. > > Add a property so that the user can specify this. > > Signed-off-by: Shameer Kolothum <[email protected]> One trivial comment inline. Reviewed-by: Jonathan Cameron <[email protected]> > --- > hw/arm/smmuv3-accel.c | 16 ++++++++++++++-- > hw/arm/smmuv3-accel.h | 4 ++++ > hw/arm/smmuv3.c | 13 +++++++++++++ > include/hw/arm/smmuv3.h | 1 + > 4 files changed, 32 insertions(+), 2 deletions(-) > > diff --git a/hw/arm/smmuv3-accel.c b/hw/arm/smmuv3-accel.c > index 8396053a6c..e8607b253e 100644 > --- a/hw/arm/smmuv3-accel.c > +++ b/hw/arm/smmuv3-accel.c > diff --git a/hw/arm/smmuv3.c b/hw/arm/smmuv3.c > index a0f704fc35..0f3a61646a 100644 > --- a/hw/arm/smmuv3.c > +++ b/hw/arm/smmuv3.c > @@ -300,6 +300,8 @@ static void smmuv3_init_regs(SMMUv3State *s) > s->idr[5] = FIELD_DP32(s->idr[5], IDR5, GRAN16K, 1); > s->idr[5] = FIELD_DP32(s->idr[5], IDR5, GRAN64K, 1); > > + smmuv3_accel_idr_override(s); > + > s->cmdq.base = deposit64(s->cmdq.base, 0, 5, SMMU_CMDQS); > s->cmdq.prod = 0; > s->cmdq.cons = 0; > @@ -1925,6 +1927,13 @@ static bool smmu_validate_property(SMMUv3State *s, > Error **errp) > return false; > } > #endif > + if (s->accel) { > + return true; > + } Feels to me that an early exit here is going to be slightly odd if other propoerties are added later as they'll have to be added at a specific point in the function. Perhaps. if (!s->accel) { if (!s->ril) { .... } } return true; is going to be easier to extend. > + if (!s->ril) { > + error_setg(errp, "ril can only be disabled if accel=on"); > + return false; > + } > return true; > }
