Re: [PATCH v13 07/12] iommu/arm-smmu-v3: Add ARM_SMMU_OPT_KDUMP_ADOPT for kdump kernel

From: Nicolin Chen

Date: Thu Nov 19 2026 - 11:49:56 EST


On Thu, Nov 19, 2026 at 10:55:59AM +0000, John Garry wrote:
> On 11/17/26 19:21, Nicolin Chen wrote:
> > + if (fmt == STRTAB_BASE_CFG_FMT_2LVL) {
> > + /*
> > + * Both kernels run on the same hardware, so it's impossible for
> > + * kdump kernel to see the support for linear stream table only.
> > + */
> > + if (WARN_ON(FIELD_GET(IDR0_ST_LVL, idr0) != IDR0_ST_LVL_2LVL)) {
> > + ret = -EINVAL;
> > + } else {
> > + smmu->features |= ARM_SMMU_FEAT_2_LVL_STRTAB;
> > + ret = arm_smmu_kdump_adopt_strtab_2lvl(smmu, cfg_reg,
> > + base);
> > + }
> > + } else if (fmt == STRTAB_BASE_CFG_FMT_LINEAR) {
> > + /*
> > + * The kdump kernel need not match the crashed kernel. An older
> > + * crashed kernel that predates two-level stream table support
> > + * may have used a linear table on 2-level-capable hardware, so
> > + * enforce the same format here to match the adopted table.
> > + */
>
> The mainline kernel has always supported and favoured a 2-level table, no?

Yes. But here are just a few extra lines to support the kdump from
a modified kernel to a mainline code. I believe we can afford it.

Nicolin