Re: [PATCH v4 2/4] iommu/amd: Remove iommu_ignore_device()
From: Vasant Hegde
Date: Fri Sep 11 2026 - 00:27:51 EST
On 9/10/2026 7:56 PM, Pranjal Shrivastava wrote:
> The iommu_ignore_device() helper was historically called on device
> initialization failure to clear the primary Device Table Entry (DTE) via
> memset() and nullify the rlookup_table entry.
>
> However, clearing the DTE on probe failure is problematic:
> 1. During normal boot, DTEs start out unconfigured (blocking DMA), making
> clearing redundant.
> 2. During kdump boot, pre-existing translations should be kept running
> until deferred attach rather than abruptly clearing them, which risks
> breaking in-flight transfers.
> 3. Writing to the DTE table via memset without flushing the hardware DTE
> cache risks aliasing & torn writes.
> 4. Clearing the rlookup_table entry breaks interrupt remapping for
> devices that fail probe or operate in translation-less modes.
>
> Remove iommu_ignore_device() entirely and simplify the error return
> paths in amd_iommu_probe_device().
>
> Suggested-by: Jason Gunthorpe <jgg@xxxxxxxxxx>
> Suggested-by: Vasant Hegde <vasant.hegde@xxxxxxx>
> Reported-by: sashiko-bot@xxxxxxxxxx
> Closes: https://lore.kernel.org/all/20260529153216.2AD1E1F00899@xxxxxxxxxxxxxxx/
> Signed-off-by: Pranjal Shrivastava <praan@xxxxxxxxxx>
Reviewed-by: Vasant Hegde <vasant.hegde@xxxxxxx>
-Vasant