iommu/iova: Separate out rcache init
Currently the rcache structures are allocated for all IOVA domains, even if they do not use "fast" alloc+free interface. This is wasteful of memory. In addition, fails in init_iova_rcaches() are not handled safely, which is less than ideal. Make "fast" users call a separate rcache init explicitly, which includes error checking. Signed-off-by:John Garry <john.garry@huawei.com> Reviewed-by:
Robin Murphy <robin.murphy@arm.com> Acked-by:
Michael S. Tsirkin <mst@redhat.com> Link: https://lore.kernel.org/r/1643882360-241739-1-git-send-email-john.garry@huawei.com Signed-off-by:
Joerg Roedel <jroedel@suse.de>
Showing
- drivers/iommu/dma-iommu.c 4 additions, 0 deletionsdrivers/iommu/dma-iommu.c
- drivers/iommu/iova.c 59 additions, 14 deletionsdrivers/iommu/iova.c
- drivers/vdpa/vdpa_user/iova_domain.c 11 additions, 0 deletionsdrivers/vdpa/vdpa_user/iova_domain.c
- include/linux/iova.h 3 additions, 12 deletionsinclude/linux/iova.h
Please register or sign in to comment