From: Danny Gonzalez <digonzal@google.com>
To: Bjorn Helgaas <bhelgaas@google.com>,
Joerg Roedel <joro@8bytes.org>, Will Deacon <will@kernel.org>,
Robin Murphy <robin.murphy@arm.com>
Cc: "Rafael J . Wysocki" <rafael@kernel.org>,
Len Brown <lenb@kernel.org>, Jason Gunthorpe <jgg@nvidia.com>,
Nicolin Chen <nicolinc@nvidia.com>,
Lu Baolu <baolu.lu@linux.intel.com>,
Kevin Tian <kevin.tian@intel.com>,
decot@google.com, praan@google.com, sheenamo@google.com,
linux-pci@vger.kernel.org, iommu@lists.linux.dev,
linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org,
Danny Gonzalez <digonzal@google.com>
Subject: [PATCH v3 0/2] PCI/ATS: Disable ATS when ACS TB is set upstream
Date: Fri, 20 Nov 2026 00:23:09 +0000 [thread overview]
Message-ID: <20261120002311.394649-1-digonzal@google.com> (raw)
This series disables ATS on endpoints when an upstream bridge has ACS
Translation Blocking (PCI_ACS_TB) enabled, preventing ACS Violations on
translated DMA requests.
Patch 1/2 stops pci_dev_reset_iommu_done() from re-evaluating
pci_ats_supported() and dev_has_iommu() independently from
pci_dev_reset_iommu_prepare(), tracking whether state needs to be
restored via a @restore output flag instead. It can be merged
independently.
Patch 2/2 updates pci_ats_supported() to walk upstream bridges and
return false if any bridge has PCI_ACS_TB set in PCI_ACS_CTRL.
Changes since v2:
- Add patch 1/2 to track IOMMU reset restore state between
pci_dev_reset_iommu_prepare() and pci_dev_reset_iommu_done()
- Move the upstream ACS TB check back into pci_ats_supported(),
dropping pci_ats_check_acs() and changes to pci-driver.c and pci.h
- Read PCI_ACS_CTRL directly and check the return value and
PCI_POSSIBLE_ERROR() so inaccessible bridges are not treated as
having PCI_ACS_TB set
- Remove the pci_warn_once() logging and helper function
Changes since v1 (v2, based on Sashiko review):
- Move the upstream ACS TB check from pci_ats_supported() into
pci_ats_check_acs() called after pci_enable_acs()
- Use pci_acs_enabled() instead of reading PCI_ACS_CTRL directly
Danny Gonzalez (2):
iommu: Track whether pci_dev_reset_iommu_done() needs to restore state
PCI/ATS: Disable ATS when ACS TB is set upstream
drivers/iommu/iommu.c | 14 ++++++++++----
drivers/pci/ats.c | 19 +++++++++++++++++++
drivers/pci/pci-acpi.c | 5 +++--
drivers/pci/pci.c | 25 +++++++++++++++----------
drivers/pci/quirks.c | 5 +++--
include/linux/iommu.h | 9 +++++----
6 files changed, 55 insertions(+), 22 deletions(-)
--
2.56.1.708.g77570a6a1d-goog
next reply other threads:[~2026-11-20 0:23 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-20 0:23 Danny Gonzalez [this message]
2026-11-20 0:23 ` [PATCH v3 1/2] iommu: Track whether pci_dev_reset_iommu_done() needs to restore state Danny Gonzalez
2026-11-20 0:33 ` sashiko-bot
2026-11-20 0:23 ` [PATCH v3 2/2] PCI/ATS: Disable ATS when ACS TB is set upstream Danny Gonzalez
2026-11-20 0:34 ` sashiko-bot
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=20261120002311.394649-1-digonzal@google.com \
--to=digonzal@google.com \
--cc=baolu.lu@linux.intel.com \
--cc=bhelgaas@google.com \
--cc=decot@google.com \
--cc=iommu@lists.linux.dev \
--cc=jgg@nvidia.com \
--cc=joro@8bytes.org \
--cc=kevin.tian@intel.com \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=nicolinc@nvidia.com \
--cc=praan@google.com \
--cc=rafael@kernel.org \
--cc=robin.murphy@arm.com \
--cc=sheenamo@google.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.