[PATCH v2 3/3] iommu: Allow drivers to say if they use report_iommu_fault()
Chaoyi Chen
chaoyi.chen at rock-chips.com
Mon Nov 17 17:30:29 PST 2025
Hello Jason,
On 11/7/2025 4:34 AM, Jason Gunthorpe wrote:
> report_iommu_fault() is an older API that has been superseded by
> iommu_report_device_fault() which is capable to support PRI.
>
> Only two external drivers consume this, drivers/remoteproc and
> drivers/gpu/drm/msm. Ideally they would move over to the new APIs, but for
> now protect against accidentally mix and matching the wrong components.
>
> The iommu drivers support either the old iommu_set_fault_handler() via the
> driver calling report_iommu_fault(), or they are newer server focused
> drivers that call iommu_report_device_fault().
>
> Include a flag in the iommu_ops if the driver calls report_iommu_fault()
> and block iommu_set_fault_handler() for domain's of iommu drivers that
> can't support it.
>
> Reviewed-by: Lu Baolu <baolu.lu at linux.intel.com>
> Signed-off-by: Jason Gunthorpe <jgg at nvidia.com>
> Reviewed-by: Vasant Hegde <vasant.hegde at amd.com>
> Reviewed-by: Kevin Tian <kevin.tian at intel.com>
Sorry for the noise. Sometimes non-IOMMU drivers, such as DRM devices, also want to handle IOMMU fault events, so they might use iommu_set_fault_handler() before. What API should they use as an alternative now? Thank you.
--
Best,
Chaoyi
More information about the Linux-rockchip
mailing list