From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2F681420496; Thu, 10 Sep 2026 11:32:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789039947; cv=none; b=GLVX3RBydzY4dNrYhOeiGRFZb74MAQ5jBFwT47Uyh43GaBEKbfI2oiTWnW8GVojRfUAw+sHJPKviM6m9sjhhHp6Ws8n2pmM12Y+x4GDIXn6jDGeKVP70JWzMAbkPSROw19I+qtR18Vj3cauxiLgWz5sZ/WSDFAWeh5sCvkO+Zek= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789039947; c=relaxed/simple; bh=Lf8pxsTHkin8iU9aiJA0CK4BtBgEr+wkCX1jxEk/GQE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=DfP3cqH5b6DeVkiLwgrtPtUG8aFIWiMvx405hEHV10b93hZZ+GO1MTE0R79uZidy8BWNL0eKkmFDIjvF3oqKsmAEUjshbARoEa/EE/ffHbNxAMkBPiJ4dxcgIuCH+8RxR3Pard9QD6qLxn81UJU7dUO7Kc/1yKVTTOTA85gVIY8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=MvR7VdmN; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="MvR7VdmN" Received: by smtp.kernel.org (Postfix) with ESMTPSA id E7CB71F00893; Thu, 10 Sep 2026 11:32:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1789039943; bh=3YMYg7jFStAT+n5lMS0MTimOeAZfs69FZvv3CJKO2+g=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=MvR7VdmN1scind3AdnaOAELtbyQmi0B+dJa+PqXOYsuDjSEO9ZJ+87W81CHqQBNmV x3ZJd9VYw1Zd7r389htNRzHSb00pDhWon6/15rgw++/0Gx+maCoPq6UMiULdrcTkfn TfTtvSRbrBxxY4ZnYLjGaCvSTaT0KCT8+2qGJF+1Hp6tcpp0DZYeDFtuJv1mxl8pKy 3WX2W53XMXo4p7GIxY0HyBf1p86SSsJtxeRSn/fm9b3QgLUM9nQK/hE3df+HajrOns azfEOHyXCTxaerEr97OWEj9U5F8UbII4ztD91+fkxI1iC16Q4RxZmnDCArmH0aBMDf 1OXrqK9EtOoqA== From: Leon Romanovsky To: Bjorn Helgaas , Logan Gunthorpe , Chaitanya Kulkarni , Greg Kroah-Hartman , Jens Axboe , Alex Williamson , Leon Romanovsky , Ankit Agrawal , Jason Gunthorpe , Jonathan Corbet , Shuah Khan , "Joerg Roedel (AMD)" , Will Deacon , Robin Murphy , Randy Dunlap , Sumit Semwal , =?utf-8?q?Christian_K=C3=B6nig?= Cc: linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, iommu@lists.linux.dev, Tushar Dave , linux-media@vger.kernel.org, dri-devel@lists.freedesktop.org, linaro-mm-sig@lists.linaro.org, linux-rdma@vger.kernel.org, kvm@vger.kernel.org Subject: [PATCH v5 02/18] PCI/P2PDMA: Document the TLP attribute assumptions Date: Thu, 10 Sep 2026 14:31:57 +0300 Message-ID: <20260910-fix-p2p-acs-v4-0-v5-2-856087f63c0d@nvidia.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260910-fix-p2p-acs-v4-0-v5-0-856087f63c0d@nvidia.com> References: <20260910-fix-p2p-acs-v4-0-v5-0-856087f63c0d@nvidia.com> Precedence: bulk X-Mailing-List: linux-doc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" X-Mailer: b4 0.15-dev-18f8f Content-Transfer-Encoding: 8bit From: Leon Romanovsky P2PDMA selects a mapping without receiving the Request's ordering or Address Type attributes. Its ACS handles only strictly ordered Requests carrying an Untranslated address. Document that the result is not defined for Relaxed Ordering or ATS-translated Requests because those TLP attributes can select different routes through the fabric. Reviewed-by: Logan Gunthorpe Signed-off-by: Leon Romanovsky --- Documentation/driver-api/pci/p2pdma.rst | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Documentation/driver-api/pci/p2pdma.rst b/Documentation/driver-api/pci/p2pdma.rst index 63cff9e4d2c9..80f8fec9b0e9 100644 --- a/Documentation/driver-api/pci/p2pdma.rst +++ b/Documentation/driver-api/pci/p2pdma.rst @@ -15,6 +15,13 @@ 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. +This evaluation assumes clients issue strictly ordered Requests carrying an +Untranslated address. Its result is not defined when clients use Relaxed +Ordering or issue ATS-translated Requests because those TLP attributes can +select different routes through the fabric. Unless ACS Translation Blocking +is enabled, a Port with ACS Direct Translated P2P enabled routes a +Translated Request directly to the peer regardless of the redirect controls. + However, if the P2P transaction reaches the host bridge then it might have to hairpin back out the same root port, be routed inside the CPU SOC to another PCIe root port, or routed internally to the SOC. -- 2.55.0