[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
- [PATCH QEMU v23 07/18] vfio: Add migration state change notifier, (continued)
- [PATCH QEMU v23 07/18] vfio: Add migration state change notifier, Kirti Wankhede, 2020/05/20
- [PATCH QEMU v23 08/18] vfio: Register SaveVMHandlers for VFIO device, Kirti Wankhede, 2020/05/20
- [PATCH QEMU v23 09/18] vfio: Add save state functions to SaveVMHandlers, Kirti Wankhede, 2020/05/20
- [PATCH QEMU v23 10/18] vfio: Add load state functions to SaveVMHandlers, Kirti Wankhede, 2020/05/20
- [PATCH QEMU v23 11/18] iommu: add callback to get address limit IOMMU supports, Kirti Wankhede, 2020/05/20
- Re: [PATCH QEMU v23 11/18] iommu: add callback to get address limit IOMMU supports,
Peter Xu <=
- [PATCH QEMU v23 12/18] memory: Set DIRTY_MEMORY_MIGRATION when IOMMU is enabled, Kirti Wankhede, 2020/05/20
- [PATCH QEMU v23 13/18] vfio: Get migration capability flags for container, Kirti Wankhede, 2020/05/20
- [PATCH QEMU v23 14/18] vfio: Add function to start and stop dirty pages tracking, Kirti Wankhede, 2020/05/20
- [PATCH QEMU v23 15/18] vfio: Add vfio_listener_log_sync to mark dirty pages, Kirti Wankhede, 2020/05/20
- [PATCH QEMU v23 16/18] vfio: Add ioctl to get dirty pages bitmap during dma unmap., Kirti Wankhede, 2020/05/20
- [PATCH QEMU v23 17/18] vfio: Make vfio-pci device migration capable, Kirti Wankhede, 2020/05/20