[PATCH 1/4] iommu: Add a broken_unmanaged_domain flag in iommu_ops
Tian, Kevin
kevin.tian at intel.com
Sat Jan 28 23:54:17 PST 2023
> From: Nicolin Chen <nicolinc at nvidia.com>
> Sent: Saturday, January 28, 2023 4:04 AM
>
> Both IOMMU_DOMAIN_UNMANAGED and IOMMU_DOMAIN_DMA require
> the support
> of __IOMMU_DOMAIN_PAGING capability, i.e. iommu_map/unmap.
> However,
> some older iommu drivers do not fully support that, and these drivers
> also do not advertise support for dma-iommu.c via IOMMU_DOMAIN_DMA,
> or use arm_iommu_create_mapping(), so largely their implementations
> of IOMMU_DOMAIN_UNMANAGED are untested. This means that a user like
> vfio/iommufd does not likely work with them.
>
> Several of them have obvious problems:
> * fsl_pamu_domain.c
> Without map/unmap ops in the default_domain_ops, it isn't an
> unmanaged domain at all.
> * mtk_iommu_v1.c
> With a fixed 4M "pagetable", it can only map exactly 4G of
> memory, but doesn't set the aperture.
> * tegra-gart.c
> Its notion of attach/detach and groups has to be a complete lie to
> get around all the other API expectations.
>
> Some others might work but have never been tested with vfio/iommufd:
> * msm_iommu.c
> * omap-iommu.c
> * tegra-smmu.c
>
Do we have a link where all drivers tested with vfio/iommufd have been
listed?
In a quick glance at least exynos-iommu.c and apple-dart.c both support
UNMANAGED with map/unmap ops. They are not mentioned in above
list but I doubt they are tested for vfio/iommufd.
More information about the Linux-mediatek
mailing list