On Wed, May 20, 2020 at 11:54:41PM +0530, Kirti Wankhede wrote: > +hwaddr memory_region_iommu_get_address_limit(IOMMUMemoryRegion *iommu_mr) > +{ > + IOMMUMemoryRegionClass *imrc = IOMMU_MEMORY_REGION_GET_CLASS(iommu_mr); > + > + if (imrc->get_address_limit) { > + return imrc->get_address_limit(iommu_mr); > + } > + > + return 0;
LGTM, besides.. Would it be better to return (hwaddr)-1 as default here? Because if an IOMMU type didn't provide this information, IMHO we'd better cover the whole possible address range. Thanks, > +} -- Peter Xu