[PATCH 2/2] iommu/arm-smmu-v3: defer attach in kdump so inherited entries survive probe
From: Breno Leitao
Date: Fri Sep 11 2026 - 11:10:43 EST
An inherited stream table keeps the crashed kernel's devices translating
only until the core probes them. iommu_setup_default_domain() then attaches
a default domain, replacing the inherited entry with one that maps nothing,
and the fault returns as F_TRANSLATION:
[ 37.824064] pci 0003:2d:00.0: Adding to iommu group 62
[ 38.035698] arm-smmu-v3 arm-smmu-v3.0.auto: event: F_TRANSLATION client: 0003:2d:00.0 iova: 0xfffe2965
The core already avoids this. iommu_dma_init() enables deferred attach in a
capture kernel, but only honours it for drivers implementing
.is_attach_deferred, which so far means amd and intel.
Implement it for SMMU, so we keep the inherited table until the next
DMA.
Signed-off-by: Breno Leitao <leitao@xxxxxxxxxx>
---
drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c b/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c
index 51a809400d56a..9c8b344c75ab8 100644
--- a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c
+++ b/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c
@@ -4400,6 +4400,11 @@ static int arm_smmu_def_domain_type(struct device *dev)
return 0;
}
+static bool arm_smmu_is_attach_deferred(struct device *dev)
+{
+ return is_kdump_kernel();
+}
+
static const struct iommu_ops arm_smmu_ops = {
.identity_domain = &arm_smmu_identity_domain,
.blocked_domain = &arm_smmu_blocked_domain,
@@ -4415,6 +4420,7 @@ static const struct iommu_ops arm_smmu_ops = {
.get_resv_regions = arm_smmu_get_resv_regions,
.page_response = arm_smmu_page_response,
.def_domain_type = arm_smmu_def_domain_type,
+ .is_attach_deferred = arm_smmu_is_attach_deferred,
.get_viommu_size = arm_smmu_get_viommu_size,
.viommu_init = arm_vsmmu_init,
.user_pasid_table = 1,
--
2.53.0-Meta