Skip to contentSkip to conversation

PCI: Enable ACS "Direct translated" feature on capable devices

PATCH New Ramkumar Santhanakrishnan 1 participant 1 message Oct 27, 2025 PCI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 PCI: Enable ACS "Direct translated" feature on capable devices

From: "ramkumar.s" <[email protected]>

The "Direct Translated" feature of ACS should be enabled on the PCIe bridges to direct the transaction with translated address from one downstream device to another downstream device.

The ATS capable devices can accelerate the P2P transaction by caching the address translation and directly send the PCIe transaction with the translated address. The parent bridge of these ATS capable devices should have "Direct translated" feature enabled to forward these packets to the target devices.

The intention is to enable the "Direct Translated" feature when the ATS is not disabled and the device is trusted and not external.

---
 drivers/pci/pci.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
drivers/pci/pci.c +6 -1
index b14dd064006c..e5e5ee3ccfc1 100644
@@ -1006,9 +1006,14 @@ static void pci_std_enable_acs(struct pci_dev *dev, struct pci_acs *caps)
 	/* Upstream Forwarding */
 	caps->ctrl |= (caps->cap & PCI_ACS_UF);
 
-	/* Enable Translation Blocking for external devices and noats */
+	/*
+	 * Enable Translation Blocking for external devices and noats,
+	 * otherwise allow Direct Translated.
+	 */
 	if (pci_ats_disabled() || dev->external_facing || dev->untrusted)
 		caps->ctrl |= (caps->cap & PCI_ACS_TB);
+	else
+		caps->ctrl |= (caps->cap & PCI_ACS_DT);
 }
 
 /**
Signature · 1 line
2.43.5