Thread (12 messages) 12 messages, 3 authors, 2025-11-20

Re: [PATCH 3/3] iommu: Allow drivers to say if they use report_iommu_fault()

From: Baolu Lu <baolu.lu@linux.intel.com>
Date: 2025-10-23 05:10:52
Also in: linux-arm-msm, linux-iommu, linux-mediatek, linux-patches, linux-rdma, linux-rockchip, linux-sunxi

On 10/23/25 01:12, 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 domain_ops if it calls report_iommu_fault() and
block iommu_set_fault_handler() on iommu's that can't support it.

Signed-off-by: Jason Gunthorpe<jgg@nvidia.com>
---
  drivers/iommu/arm/arm-smmu/arm-smmu.c   | 1 +
  drivers/iommu/arm/arm-smmu/qcom_iommu.c | 1 +
  drivers/iommu/iommu.c                   | 6 +++++-
  drivers/iommu/ipmmu-vmsa.c              | 1 +
  drivers/iommu/mtk_iommu.c               | 1 +
  drivers/iommu/mtk_iommu_v1.c            | 1 +
  drivers/iommu/omap-iommu.c              | 1 +
  drivers/iommu/rockchip-iommu.c          | 1 +
  drivers/iommu/sun50i-iommu.c            | 1 +
  include/linux/iommu.h                   | 3 +++
  10 files changed, 16 insertions(+), 1 deletion(-)
Reviewed-by: Lu Baolu <baolu.lu@linux.intel.com>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help