On Mon, Jul 14, 2025 at 04:59:30PM +0100, Shameer Kolothum wrote: > Allows to retrieve the PCIIOMMUOps based on the SMMU type. This will be > useful when we add support for accelerated SMMUV3 in subsequent patches > as that requires a different set of callbacks for iommu ops. > > No special handling is required for now and returns the default ops > in base SMMU Class. > > No functional changes intended. > > Signed-off-by: Shameer Kolothum <shameerali.kolothum.th...@huawei.com>
Reviewed-by: Nicolin Chen <nicol...@nvidia.com> > +static const PCIIOMMUOps *smmu_iommu_ops_by_type(SMMUState *s) > +{ > + SMMUBaseClass *sbc; > + > + sbc = ARM_SMMU_CLASS(object_class_by_name(TYPE_ARM_SMMU)); > + assert(sbc->iommu_ops); I have an impression that QEMU uses the glib version more, so it could be g_assert(). But I do see a lots of assert() also in the existing code. So, just a note here, not a strong suggestion.