mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] iommu/amd: Enable PCIe ACS only if AMD IOMMU is on
@ 2025-09-28  7:52 Jinhui Guo
  2025-10-10 19:57 ` Suthikulpanit, Suravee
  0 siblings, 1 reply; 2+ messages in thread
From: Jinhui Guo @ 2025-09-28  7:52 UTC (permalink / raw)
  To: joro, suravee.suthikulpanit; +Cc: guojinhui.liam, iommu, linux-kernel

To preserve PCIe performance, ACS is enabled only when
AMD IOMMU is not disabled.

Signed-off-by: Jinhui Guo <guojinhui.liam@bytedance.com>
---
 drivers/iommu/amd/init.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/iommu/amd/init.c b/drivers/iommu/amd/init.c
index ba9e582a8bbe..6e9eab365123 100644
--- a/drivers/iommu/amd/init.c
+++ b/drivers/iommu/amd/init.c
@@ -3212,8 +3212,10 @@ static bool __init detect_ivrs(void)
 	}
 
 out:
-	/* Make sure ACS will be enabled during PCI probe */
-	pci_request_acs();
+	if (!amd_iommu_disabled || amd_iommu_force_enable) {
+		/* Make sure ACS will be enabled during PCI probe */
+		pci_request_acs();
+	}
 
 	return true;
 }
-- 
2.20.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-10-10 19:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-09-28  7:52 [PATCH] iommu/amd: Enable PCIe ACS only if AMD IOMMU is on Jinhui Guo
2025-10-10 19:57 ` Suthikulpanit, Suravee

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®