From: Jason Gunthorpe <jgg@nvidia.com>
To: Pranjal Shrivastava <praan@google.com>
Cc: iommu@lists.linux.dev, linux-pci@vger.kernel.org,
linux-kernel@vger.kernel.org, Joerg Roedel <joro@8bytes.org>,
Will Deacon <will@kernel.org>,
Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>,
Vasant Hegde <vasant.hegde@amd.com>,
Ankit Soni <ankit.soni@amd.com>,
Bjorn Helgaas <bhelgaas@google.com>,
Samiullah Khawaja <skhawaja@google.com>,
sashiko-bot@kernel.org
Subject: Re: [PATCH v4 2/4] iommu/amd: Remove iommu_ignore_device()
Date: Thu, 10 Sep 2026 11:40:10 -0300 [thread overview]
Message-ID: <20260910144010.GE3968357@nvidia.com> (raw)
In-Reply-To: <20260910142655.3281464-3-praan@google.com>
On Thu, Sep 10, 2026 at 02:26:53PM +0000, 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@nvidia.com>
> Suggested-by: Vasant Hegde <vasant.hegde@amd.com>
> Reported-by: sashiko-bot@kernel.org
> Closes: https://lore.kernel.org/all/20260529153216.2AD1E1F00899@smtp.kernel.org/
> Signed-off-by: Pranjal Shrivastava <praan@google.com>
> ---
> drivers/iommu/amd/iommu.c | 24 ++----------------------
> 1 file changed, 2 insertions(+), 22 deletions(-)
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Jason
next prev parent reply other threads:[~2026-09-10 14:40 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-10 14:26 [PATCH v4 0/4] iommu/amd: Refactors for ATS robustness Pranjal Shrivastava
2026-09-10 14:26 ` [PATCH v4 1/4] iommu/amd: Refactor device probe and capability initialization Pranjal Shrivastava
2026-09-10 14:26 ` [PATCH v4 2/4] iommu/amd: Remove iommu_ignore_device() Pranjal Shrivastava
2026-09-10 14:40 ` Jason Gunthorpe [this message]
2026-09-11 4:26 ` Vasant Hegde
2026-09-10 14:26 ` [PATCH v4 3/4] iommu/amd: Fail probe on ATS configuration failure Pranjal Shrivastava
2026-09-10 14:26 ` [PATCH v4 4/4] PCI/ATS: Mandate checking pci_ats_supported() before pci_prepare_ats() Pranjal Shrivastava
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260910144010.GE3968357@nvidia.com \
--to=jgg@nvidia.com \
--cc=ankit.soni@amd.com \
--cc=bhelgaas@google.com \
--cc=iommu@lists.linux.dev \
--cc=joro@8bytes.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=praan@google.com \
--cc=sashiko-bot@kernel.org \
--cc=skhawaja@google.com \
--cc=suravee.suthikulpanit@amd.com \
--cc=vasant.hegde@amd.com \
--cc=will@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®