[PATCH v4 13/18] PCI/P2PDMA: Document ACS egress control handling

From: Leon Romanovsky

Date: Fri Aug 21 2026 - 15:46:47 EST


From: Leon Romanovsky <leonro@xxxxxxxxxx>

ACS controls are directional and affect only a peer-versus-upstream routing
decision, but the P2PDMA documentation describes them as path-wide. This
can make valid asymmetric or nested configurations appear unsupported.

Document the fixed transaction roles and the two ports at the path
divergence. Request Redirect and Egress Control apply on the client-side
port, while Completion Redirect applies on the provider-side port. Controls
below the divergence cannot change traffic whose only route is upstream.

Distinguish redirects, which establish a host route, from ACS Violations
and unreadable routing state, which must be rejected.

Tested-by: Tushar Dave <tdave@xxxxxxxxxx>
Signed-off-by: Leon Romanovsky <leonro@xxxxxxxxxx>
---
Documentation/admin-guide/kernel-parameters.txt | 9 +++++----
Documentation/driver-api/pci/p2pdma.rst | 17 +++++++++++++++++
2 files changed, 22 insertions(+), 4 deletions(-)

diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt
index b5493a7f8f22..5c3ed4fd439c 100644
--- a/Documentation/admin-guide/kernel-parameters.txt
+++ b/Documentation/admin-guide/kernel-parameters.txt
@@ -5226,10 +5226,11 @@ Kernel parameters
disable_acs_redir=<pci_dev>[; ...]
Specify one or more PCI devices (in the format
specified above) separated by semicolons.
- Each device specified will have the PCI ACS
- redirect capabilities forced off which will
- allow P2P traffic between devices through
- bridges without forcing it upstream. Note:
+ Each device specified will have the PCI ACS P2P
+ Request Redirect, Completion Redirect, and Egress
+ Control features forced off. This may allow P2P
+ traffic through bridges that would otherwise be
+ redirected upstream or blocked. Note:
this removes isolation between devices and
may put more devices in an IOMMU group.
config_acs=
diff --git a/Documentation/driver-api/pci/p2pdma.rst b/Documentation/driver-api/pci/p2pdma.rst
index a7fd426c3685..4e21942eab65 100644
--- a/Documentation/driver-api/pci/p2pdma.rst
+++ b/Documentation/driver-api/pci/p2pdma.rst
@@ -15,6 +15,23 @@ then based on the ACS settings the transaction can route entirely within
the PCIe hierarchy and never reach the root port. The kernel will evaluate
the PCIe topology and always permit P2P in these well-defined cases.

+ACS P2P Egress Control does not, by itself, force a transaction upstream. A
+clear Egress Control Vector bit for the peer port permits direct routing; a
+set bit redirects the request upstream when P2P Request Redirect is enabled.
+When Request Redirect is disabled, a set vector bit causes an ACS Violation
+instead.
+
+The client remains the PCIe requester when it reads or writes provider memory.
+Where the paths diverge, the kernel therefore evaluates P2P Request Redirect
+and Egress Control on the client-side port, and P2P Completion Redirect on the
+provider-side port for completions from a read. Below the divergence, the route
+toward the other branch is already upstream, so those P2P redirect controls do
+not affect it. Redirect controls for the reverse transaction directions do not
+affect the mapping. P2P DMA is routed through the host bridge when either
+applicable port redirects. If an applicable port blocks the direct path or its
+routing cannot be determined, P2P DMA is rejected because neither condition
+establishes an upstream route.
+
This evaluation covers the ACS controls that govern Requests carrying an
Untranslated address. Unless ACS Translation Blocking is enabled, a Port
with ACS Direct Translated P2P enabled routes a Request carrying a Translated

--
2.55.0