Re: [PATCH v3 2/5] iommu/amd: Fix DTE clearing and rename iommu_ignore_device()

From: Pranjal Shrivastava

Date: Tue Aug 25 2026 - 15:09:21 EST


On Tue, Aug 25, 2026 at 02:53:15PM -0300, Jason Gunthorpe wrote:
> On Tue, Aug 25, 2026 at 05:29:59PM +0000, Pranjal Shrivastava wrote:
>
> > I agree, but I wonder why the existing code used memset here
> > (in ignore_device):
> >
> > memset(&dev_table[devid], 0, sizeof(struct dev_table_entry));
> >
> > I was thinking it might've been done for probe failures in a kdump
> > kernel (normal kexec would've called shutdown for clearing all DTEs).
> > (I see this was added long time back and existed when PCI segments were
> > added [1]).
>
> For kdump you'd want to keep the original translation running in this
> case.
>
> > Are you suggesting to remove the DTE clearing from this path entirely?
>
> Yes
>

Even I'm not sure why we had this memset here, I'll just dig into
the history once if there's anything. Otherwise, I'll simply drop this.

Vasant, please let us know if there was a different context to it?

Thanks,
Praan