[PATCH 0/4] iommu: Reject drivers with broken_unmanaged_domain

Tian, Kevin kevin.tian at intel.com
Sat Jan 28 23:46:55 PST 2023


> From: Nicolin Chen <nicolinc at nvidia.com>
> Sent: Saturday, January 28, 2023 4:04 AM
> 
> Hi all,
> 
> 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.
> 
> Thus, mark all these drivers as having "broken" UNAMANGED domains and
> add a new device_iommu_unmanaged_supported() API for vfio/iommufd
> and
> dma-iommu to refuse to work with these drivers.
> 

Why not making an explicit way to mark which drivers are tested to
support vfio/iommufd? Not sure whether pure code review is reliable
to filter out 'broken' vs. 'non-broken'...



More information about the linux-arm-kernel mailing list