Re: [PATCH v12 09/12] iommu/arm-smmu-v3-kexec: Implement is_attach_deferred()

From: John Garry

Date: Mon Nov 16 2026 - 07:04:10 EST


On 11/2/26 05:19, Nicolin Chen wrote:
Though the kdump kernel adopts the crashed kernel's stream table, the iommu
core will still try to attach each probed device to a default domain, which
overwrites the adopted STE and breaks in-flight DMA from that device.

Implement an is_attach_deferred() callback to prevent this. For each device
that has STE.V=1 and STE.Cfg!=Abort in the adopted table, defer the default
domain attachment, until the device driver explicitly requests it.

Also, move arm_smmu_get_step_for_sid() to the header for the kdump function
to use.

Reviewed-by: Kevin Tian <kevin.tian@xxxxxxxxx>
Reviewed-by: Jason Gunthorpe <jgg@xxxxxxxxxx>
Reviewed-by: Pranjal Shrivastava <praan@xxxxxxxxxx>
Tested-by: Breno Leitao <leitao@xxxxxxxxxx>
Tested-by: Cristian Prundeanu <cpru@xxxxxxxxxx>
Tested-by: Shuai Xue <xueshuai@xxxxxxxxxxxxxxxxx>
Signed-off-by: Nicolin Chen <nicolinc@xxxxxxxxxx>

FWIW:

Reviewed-by: John Garry <john.garry@xxxxxxx>