qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH QEMU v23 11/18] iommu: add callback to get address limit IOMM


From: Peter Xu
Subject: Re: [PATCH QEMU v23 11/18] iommu: add callback to get address limit IOMMU supports
Date: Thu, 21 May 2020 12:13:37 -0400

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]