From: Greg Kroah-Hartman Date: Mon, 13 Apr 2026 15:12:10 +0000 (+0200) Subject: 6.1-stable patches X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=84e7553140015dc71f799daf4f4aa51a97553872;p=thirdparty%2Fkernel%2Fstable-queue.git 6.1-stable patches added patches: revert-pci-enable-acs-after-configuring-iommu-for-of-platforms.patch --- diff --git a/queue-6.1/revert-pci-enable-acs-after-configuring-iommu-for-of-platforms.patch b/queue-6.1/revert-pci-enable-acs-after-configuring-iommu-for-of-platforms.patch new file mode 100644 index 0000000000..ba7888f9ee --- /dev/null +++ b/queue-6.1/revert-pci-enable-acs-after-configuring-iommu-for-of-platforms.patch @@ -0,0 +1,95 @@ +From manivannan.sadhasivam@oss.qualcomm.com Mon Apr 13 17:02:30 2026 +From: Manivannan Sadhasivam +Date: Tue, 31 Mar 2026 14:44:55 +0530 +Subject: Revert "PCI: Enable ACS after configuring IOMMU for OF platforms" +To: stable@vger.kernel.org +Cc: bhelgaas@google.com, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, robin.murphy@arm.com, Manivannan Sadhasivam , John Hancock , bjorn.forsman@gmail.com, Linux kernel regressions list +Message-ID: <20260331091455.30394-1-manivannan.sadhasivam@oss.qualcomm.com> + +From: Manivannan Sadhasivam + +This reverts commit 5d57164c0ab0ac5c99eca49c577994bfbca70a2a which is +commit c41e2fb67e26b04d919257875fa954aa5f6e392e upstream. + +The original commit attempted to enable ACS in pci_dma_configure() prior +to IOMMU group assignment in iommu_init_device() to fix the ACS enablement +issue for OF platforms. But that assumption doesn't hold true for kernel +versions prior to v6.15, because on these older kernels, +pci_dma_configure() is called *after* iommu_init_device(). So the IOMMU +groups are already created before the ACS gets enabled. This causes the +devices that should have been split into separate groups by ACS, getting +merged into one group, thereby breaking the IOMMU isolation as reported on +the AMD machines. + +So revert the offending commit to restore the IOMMU group assignment on +those affected machines. It should be noted that ACS has never really +worked on kernel versions prior to v6.15, so the revert doesn't make any +difference for OF platforms. + +Reported-by: John Hancock +Reported-by: bjorn.forsman@gmail.com +Closes: https://bugzilla.kernel.org/show_bug.cgi?id=221234 +Fixes: b20b659c2c6a ("PCI: Enable ACS after configuring IOMMU for OF platforms") +Cc: Linux kernel regressions list +Link: https://lore.kernel.org/regressions/2c30f181-ffc6-4d63-a64e-763cf4528f48@leemhuis.info +Signed-off-by: Manivannan Sadhasivam +Signed-off-by: Greg Kroah-Hartman +--- + drivers/pci/pci-driver.c | 8 -------- + drivers/pci/pci.c | 10 +++++++++- + drivers/pci/pci.h | 1 - + 3 files changed, 9 insertions(+), 10 deletions(-) + +--- a/drivers/pci/pci-driver.c ++++ b/drivers/pci/pci-driver.c +@@ -1667,14 +1667,6 @@ static int pci_dma_configure(struct devi + ret = acpi_dma_configure(dev, acpi_get_dma_attr(adev)); + } + +- /* +- * Attempt to enable ACS regardless of capability because some Root +- * Ports (e.g. those quirked with *_intel_pch_acs_*) do not have +- * the standard ACS capability but still support ACS via those +- * quirks. +- */ +- pci_enable_acs(to_pci_dev(dev)); +- + pci_put_host_bridge_device(bridge); + + if (!ret && !driver->driver_managed_dma) { +--- a/drivers/pci/pci.c ++++ b/drivers/pci/pci.c +@@ -1040,7 +1040,7 @@ static void pci_std_enable_acs(struct pc + * pci_enable_acs - enable ACS if hardware support it + * @dev: the PCI device + */ +-void pci_enable_acs(struct pci_dev *dev) ++static void pci_enable_acs(struct pci_dev *dev) + { + if (!pci_acs_enable) + goto disable_acs_redir; +@@ -3777,6 +3777,14 @@ bool pci_acs_path_enabled(struct pci_dev + void pci_acs_init(struct pci_dev *dev) + { + dev->acs_cap = pci_find_ext_capability(dev, PCI_EXT_CAP_ID_ACS); ++ ++ /* ++ * Attempt to enable ACS regardless of capability because some Root ++ * Ports (e.g. those quirked with *_intel_pch_acs_*) do not have ++ * the standard ACS capability but still support ACS via those ++ * quirks. ++ */ ++ pci_enable_acs(dev); + } + + /** +--- a/drivers/pci/pci.h ++++ b/drivers/pci/pci.h +@@ -526,7 +526,6 @@ static inline resource_size_t pci_resour + } + + void pci_acs_init(struct pci_dev *dev); +-void pci_enable_acs(struct pci_dev *dev); + #ifdef CONFIG_PCI_QUIRKS + int pci_dev_specific_acs_enabled(struct pci_dev *dev, u16 acs_flags); + int pci_dev_specific_enable_acs(struct pci_dev *dev); diff --git a/queue-6.1/series b/queue-6.1/series index e573d730e1..20dc7316a5 100644 --- a/queue-6.1/series +++ b/queue-6.1/series @@ -52,3 +52,4 @@ net-qualcomm-qca_uart-report-the-consumed-byte-on-rx-skb-allocation-failure.patc net-stmmac-fix-integer-underflow-in-chain-mode.patch rxrpc-fix-reference-count-leak-in-rxrpc_server_keyring.patch rxrpc-fix-key-keyring-checks-in-setsockopt-rxrpc_security_key-keyring.patch +revert-pci-enable-acs-after-configuring-iommu-for-of-platforms.patch