Re: [PATCH v12 11/12] iommu/arm-smmu-v3: Skip RMR bypass for kdump adoption

From: Nicolin Chen

Date: Mon Nov 16 2026 - 14:25:38 EST


On Mon, Nov 16, 2026 at 12:26:20PM +0000, John Garry wrote:
> On 11/2/26 05:19, Nicolin Chen wrote:
> > @@ -5810,6 +5810,14 @@ static void arm_smmu_rmr_install_bypass_ste(struct arm_smmu_device *smmu)
> > struct list_head rmr_list;
> > struct iommu_resv_region *e;
> > + /*
> > + * Kdump
>
> mega nit: "kdump" could better better, as it is a keyword

OK.

> > adoption keeps the crashed kernel's table live. Rewriting the
> > + * adopted STE here could expose an in-flight fetch to a transient V=0
> > + * entry, or change Cfg=translate to Cfg=bypass. Must skip here.
> > + */
> > + if (smmu->options & ARM_SMMU_OPT_KDUMP_ADOPT)
> > + return;
> > +
> > INIT_LIST_HEAD(&rmr_list);
> > iort_get_rmr_sids(dev_fwnode(smmu->dev), &rmr_list);
>
> Did you consider if we should sanitise the adopted ste against what
> iort_get_rmr_sids() returns? I suppose that would add even more complexity.

It's not necessary: both crashed and kdump kernels installed them
from the same IORT. If STE is translated, they are mapped as 1:1.
It's certainly not worth the complexity.

Nicolin