[PATCH v11 09/11] iommu/arm-smmu-v3: Retain CR0_SMMUEN during kdump device reset

Nicolin Chen nicolinc at nvidia.com
Wed Oct 21 10:52:50 PDT 2026


On Wed, Oct 21, 2026 at 05:53:23PM +0100, John Garry wrote:
> On 10/5/26 20:30, Nicolin Chen wrote:
> > +	/*
> > +	 * In a kdump case (set when CR0_SMMUEN=1 and !GERROR_SFM_ERR), retain
> > +	 * all the live CR0 fields, e.g. CR0_SMMUEN to avoid aborting in-flight
> > +	 * DMA and CR0_ATSCHK to carry on the ATS-check policy, while clearing
> > +	 * only the queue enable bits for this kernel to take over the queues.
> > +	 *
> > +	 * According to spec, updating STRTAB_BASE/CR1/CR2 when CR0_SMMUEN=1 is
> > +	 * CONSTRAINED UNPREDICTABLE. So, skip those register updates and rely
> > +	 * on the adopted stream table from the crashed kernel.
> > +	 */
> > +	if (smmu->options & ARM_SMMU_OPT_KDUMP_ADOPT) {
> > +		dev_info(smmu->dev,
> > +			 "kdump: retaining SMMUEN for in-flight DMA\n");
> > +		enables = reg & ~(CR0_CMDQEN | CR0_EVTQEN | CR0_PRIQEN);
> > +		goto reset_queues;
> 
> nit: Is there some reason to separate the call to arm_smmu_write_reg_sync()
> under the ARM_SMMU_OPT_KDUMP_ADOPT check, below?

Hmm, I think it's left over the versions and they can be merged.

I'll do it in v12.

Thanks
Nicolin



More information about the linux-arm-kernel mailing list