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 BE93C41A78A; Sun, 20 Sep 2026 11:41:48 +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=1789904512; cv=none; b=n8XGQfDVUljF06vTPJ9KoZzOeSH0l+A28VYtCskHqLzObdC1tHw5x7IhJ5zrH3fqiqyXTylRV/GolRd2spoADsKJWQUIypFwizwBVHnfRTxLAgoH8wFr8jQCN/WBSdwL4Vb5oBp/Nvm+BBzds73qyVXC97/DBl54hhCQ+77wEzA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789904512; c=relaxed/simple; bh=QUzVSRZvTKg2E13vIgCE8+l+zgBTXZofkjJhl+ER15s=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=s4H2FymZKdHHZ+s7N8JVG4uLP4f0WO9Eul0KC6koQyFxf+giKszbkqHWuOrkF2WJBvbmCTBJXbmQ2ZHEpK6prnHbW1++eihHJZCpao8pTbVtsbetK/BaKGkvLpF4/cejpSAyBFMJW6o/qQRRLNig8QPqpOpZFqFdeN4/986ZhhU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=DskItDFS; 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="DskItDFS" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6404F1F00893; Sun, 20 Sep 2026 11:41:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1789904508; bh=6I7K2CcZKiNEkj3tMDTHshN0X+VnIpc+D+swyH4+62w=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=DskItDFSncfH8LsSl3L4tDvd1Nh6r6SWlq0gJ262aq6EGYpdlhSs8odG3/BTkwCwk YWNF0/bwmVtImLIVUVDcCWUHRvZ0mfQQUSYrhxxEQY5GR9FxXAZg8f//RLhNyk077f 9vE7STkQGnwx2kek1aTcC4XIpmTe/dOsz4Dtml8n+E8UZVEnAi587MUmAUuJbtEzQn xqj8g5nKEqpED7aew7tyUjaAiT23QsiRa6gpwOQCzJbQUYTxDxfTQmkMuoF0g0G1fq VmTvP+6M/MIk6Z3BkQONAy6lVWaM21P+9wMFtJXkJMsh+xDLfJtrOF2NQO47SNoL8x iu5iwAMLyX/UQ== 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 v7 01/19] PCI/P2PDMA: Document the TLP attribute assumptions Date: Sun, 20 Sep 2026 14:41:13 +0300 Message-ID: <20260920-fix-p2p-acs-v4-0-v7-1-ca0828ab697c@nvidia.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260920-fix-p2p-acs-v4-0-v7-0-ca0828ab697c@nvidia.com> References: <20260920-fix-p2p-acs-v4-0-v7-0-ca0828ab697c@nvidia.com> Precedence: bulk X-Mailing-List: linux-kernel@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 Tested-by: Tushar Dave 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