lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20251027073057.39077-1-ramkumar.s@nutanix.com>
Date: Mon, 27 Oct 2025 07:32:39 +0000
From: Ramkumar Santhanakrishnan <ramkumar.s@...anix.com>
To: Bjorn Helgaas <bhelgaas@...gle.com>,
        "linux-pci@...r.kernel.org"
	<linux-pci@...r.kernel.org>,
        "linux-kernel@...r.kernel.org"
	<linux-kernel@...r.kernel.org>
CC: Ramkumar Santhanakrishnan <ramkumar.s@...anix.com>
Subject: [PATCH] PCI: Enable ACS "Direct translated" feature on capable
 devices

From: "ramkumar.s" <ramkumar.s@...anix.com>

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.

Signed-off-by: ramkumar.s <ramkumar.s@...anix.com>
---
 drivers/pci/pci.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index b14dd064006c..e5e5ee3ccfc1 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -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);
 }
 
 /**
-- 
2.43.5


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ