From: Breno Leitao <leitao@debian.org>
To: Will Deacon <will@kernel.org>,
Robin Murphy <robin.murphy@arm.com>,
"Joerg Roedel (AMD)" <joro@8bytes.org>,
catalin.marinas@arm.com, mark.rutland@arm.com
Cc: puranjay@kernel.org, linux-arm-kernel@lists.infradead.org,
iommu@lists.linux.dev, linux-kernel@vger.kernel.org,
rmikey@meta.com, Breno Leitao <leitao@debian.org>,
kernel-team@meta.com
Subject: [PATCH 2/2] iommu/arm-smmu-v3: defer attach in kdump so inherited entries survive probe
Date: Fri, 11 Sep 2026 07:54:45 -0700 [thread overview]
Message-ID: <20260911-smmu_fix_aws-v1-2-75870bf9655b@debian.org> (raw)
In-Reply-To: <20260911-smmu_fix_aws-v1-0-75870bf9655b@debian.org>
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@debian.org>
---
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
next prev parent reply other threads:[~2026-09-11 14:55 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-11 14:54 [PATCH 0/2] iommu/arm-smmu-v3: SMMU hitting kdump mid-air Breno Leitao
2026-09-11 14:54 ` [PATCH 1/2] iommu/arm-smmu-v3: inherit the previous kernel's stream table in kdump Breno Leitao
2026-09-11 14:54 ` Breno Leitao [this message]
2026-09-11 14:57 ` [PATCH 0/2] iommu/arm-smmu-v3: SMMU hitting kdump mid-air Breno Leitao
2026-09-11 22:31 ` Nicolin Chen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260911-smmu_fix_aws-v1-2-75870bf9655b@debian.org \
--to=leitao@debian.org \
--cc=catalin.marinas@arm.com \
--cc=iommu@lists.linux.dev \
--cc=joro@8bytes.org \
--cc=kernel-team@meta.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=puranjay@kernel.org \
--cc=rmikey@meta.com \
--cc=robin.murphy@arm.com \
--cc=will@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox