From: sashiko-bot@kernel.org
To: "David Matlack" <dmatlack@google.com>, linux-pci@vger.kernel.org
Subject: Re: [PATCH v5] PCI: Ensure ATS disabled via quirk before notifying IOMMU drivers
Date: Tue, 10 Nov 2026 00:40:00 +0000 [thread overview]
Message-ID: <sashiko-outbox-205881@kernel.org> (raw)
In-Reply-To: <20261110003353.1824793-1-dmatlack@google.com>
> Apply the quirks that disable ATS before IOMMU drivers are notified
> about the device. Convert the quirks from final to header fixups and
> have them set a new no_ats bit in struct pci_dev, which keeps
> pci_ats_init() from setting pci_dev.ats_cap.
>
> Header fixups run in pci_device_add() before pci_init_capabilities()
> initializes ATS and before device_add() notifies IOMMU drivers. Final
> fixups run later, in pci_bus_add_device(). Use header fixups instead of
> early fixups because quirk_amd_harvest_no_ats() needs subsystem_vendor
> and subsystem_device, which are not yet set during early fixups.
>
> This ensures that pci_ats_supported() returns the same value in
> iommu_ops.probe_device() and iommu_ops.release_device(). Since commit
> 89436f4f5412 ("iommu/vt-d: Fix WARN_ON in iommu probe path"), the Intel
> IOMMU driver relies on this to decide whether to add a device to, and
> remove it from, iommu->device_rbtree. With final fixups,
> pci_ats_supported() returns true at probe but false at release, so the
> device is never removed from the rbtree, leading to a later
> use-after-free.
>
> This only affects PCI devices added after IOMMU bus notifiers are set
> up, e.g. hot-plugged devices and VFs.
>
> Fixes: a18615b1cfc0 ("PCI: Disable ATS for specific Intel IPU E2000 devices")
> Fixes: 9b44b0b09dec ("PCI: Mark AMD Stoney GPU ATS as broken")
> Fixes: 3f1271b54edc ("PCI: Mark all AMD Navi10 and Navi14 GPU ATS as broken")
> Closes: https://lore.kernel.org/linux-iommu/aYUQ_HkDJU9kjsUl@google.com/
> Signed-off-by: David Matlack <dmatlack@google.com>
Sashiko has reviewed this patch and found no issues.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261110003353.1824793-1-dmatlack@google.com?part=1
prev parent reply other threads:[~2026-11-10 0:40 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-10 0:33 [PATCH v5] PCI: Ensure ATS disabled via quirk before notifying IOMMU drivers David Matlack
2026-11-10 0:40 ` sashiko-bot [this message]
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=sashiko-outbox-205881@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=dmatlack@google.com \
--cc=linux-pci@vger.kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/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