From: Leon Romanovsky <leon@kernel.org>
To: Jason Gunthorpe <jgg@nvidia.com>
Cc: Bjorn Helgaas <bhelgaas@google.com>,
Logan Gunthorpe <logang@deltatee.com>,
Chaitanya Kulkarni <kch@nvidia.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Jens Axboe <axboe@kernel.dk>, Alex Williamson <alex@shazbot.org>,
Ankit Agrawal <ankita@nvidia.com>, Jason Gunthorpe <jgg@ziepe.ca>,
Jonathan Corbet <corbet@lwn.net>,
Shuah Khan <skhan@linuxfoundation.org>,
"Joerg Roedel (AMD)" <joro@8bytes.org>,
Will Deacon <will@kernel.org>,
Robin Murphy <robin.murphy@arm.com>,
linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-doc@vger.kernel.org, iommu@lists.linux.dev,
Tushar Dave <tdave@nvidia.com>, Matt Evans <matt@ozlabs.org>
Subject: Re: [PATCH v4 00/18] PCI/P2PDMA: Fix ACS egress control handling
Date: Sun, 30 Aug 2026 12:02:23 +0300 [thread overview]
Message-ID: <20260830090223.GC24140@unreal> (raw)
In-Reply-To: <178761377033.3197084.14418777457559555376.b4-review@b4>
On Mon, Aug 24, 2026 at 08:22:50PM -0300, Jason Gunthorpe wrote:
> > PCI P2PDMA treats any enabled ACS P2P Egress Control bit as an upstream
> > redirect. PCIe r7.0, sec 6.12.3, table 6-11 says the Egress Control
> > Vector bit for the target port decides instead: a clear bit routes a peer
> > request directly, regardless of P2P Request Redirect. Firmware can
> > therefore enable Egress Control with a permissive vector while Linux
> > incorrectly rejects a valid direct P2P path.
>
> I've never seen anyone use the egress control vector and broadly Linux
> doesn't support it. The ACS command line shouldn't enable "P2P Egress
> Control Enable" for this reason.
I tried to follow the PCI specification as closely as possible here, but
of course I always welcome the idea of eliminating one of the paths.
>
> It is not a bad thing to accommodate the egress vector when improving
> the ACS logic, but the main stream usage is the interaction of the
> other bits along with ATS & RO in the TLP. See the comment I left a
> long time ago:
>
> https://elixir.bootlin.com/linux/v7.2/source/drivers/infiniband/hw/mlx5/mlx5_ib.h#L1649
>
> So it would be nicer to read in the commit message how the mainstream
> stuff is fixed up and just a little bit about egress control.
I will split the series into bug-fix patches and code improvements.
This should also help describe the purpose of the series more clearly.
>
> > [ ... 36 lines skipped ... ]
> > A pre-existing gap comes first. The routing analysis covers only Requests
> > carrying an Untranslated address; ACS Direct Translated P2P overrides
> > those controls, so that scope is now written down rather than implied.
>
> What I talked about with Thomas is we probably need the P2P subsystem
> to know what kind of TLP the driver intends to put here when doing the
> evaluation: strict order, relaxed order and translated all have
> different possible routing options, and real system configure things
> so each one takes a different path :\
>
> Currently I think the P2P subsystem is assuming strict order
> non-translated TLPs when it makes its calculations. Which is fine, but
> as we go toward enhancing this each of the different paths should be
> kept seperate.
>
> I don't know how the driver facing API should work, but at least real
> devices have options to use ATS or not, use RO or not, and can make
> use of information from the P2P subsytem to make the right choice.
Do you see a function like mlx5_umem_needs_ats() being implemented as part of
the PCI P2P logic?
https://lore.kernel.org/all/4-v1-bd147097458e+ede-umem_dmabuf_jgg@nvidia.com/
>
> Further, when we get to things like an ACPI description of this stuff,
> it would be nice to still discover these differences as well.
>
> --
> Jason
prev parent reply other threads:[~2026-08-30 9:02 UTC|newest]
Thread overview: 63+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-21 19:38 [PATCH v4 00/18] PCI/P2PDMA: Fix ACS egress control handling Leon Romanovsky
2026-08-21 19:38 ` [PATCH v4 01/18] PCI/P2PDMA: Do not tear down the allocate attribute on registration failure Leon Romanovsky
2026-08-21 19:53 ` sashiko-bot
2026-08-21 23:08 ` Logan Gunthorpe
2026-08-24 23:22 ` Jason Gunthorpe
2026-08-21 19:38 ` [PATCH v4 02/18] PCI/P2PDMA: Wait for RCU readers before freeing state Leon Romanovsky
2026-08-21 19:48 ` sashiko-bot
2026-08-21 23:10 ` Logan Gunthorpe
2026-08-24 23:22 ` Jason Gunthorpe
2026-08-21 19:38 ` [PATCH v4 03/18] PCI/P2PDMA: Restrict the p2pmem search to pool backed providers Leon Romanovsky
2026-08-21 19:59 ` sashiko-bot
2026-08-21 23:14 ` Logan Gunthorpe
2026-08-24 23:22 ` Jason Gunthorpe
2026-08-21 19:38 ` [PATCH v4 04/18] PCI/P2PDMA: Safely terminate ACS redirect lists Leon Romanovsky
2026-08-21 19:47 ` sashiko-bot
2026-08-24 23:22 ` Jason Gunthorpe
2026-08-21 19:38 ` [PATCH v4 05/18] PCI/P2PDMA: Document the pdev->p2pdma lifetime and RCU rules Leon Romanovsky
2026-08-21 19:56 ` sashiko-bot
2026-08-24 20:29 ` I Logan Gunthorpe
2026-08-30 9:14 ` I Leon Romanovsky
2026-08-21 19:38 ` [PATCH v4 06/18] PCI/P2PDMA: Gate the host bridge whitelist warning on verbose Leon Romanovsky
2026-08-21 19:47 ` sashiko-bot
2026-08-24 21:08 ` Logan Gunthorpe
2026-08-24 23:22 ` Jason Gunthorpe
2026-08-21 19:38 ` [PATCH v4 07/18] PCI/P2PDMA: Document the Address Type assumption Leon Romanovsky
2026-08-21 19:43 ` sashiko-bot
2026-08-24 23:22 ` Jason Gunthorpe
2026-08-21 19:38 ` [PATCH v4 08/18] PCI: Account for Direct Translated P2P in ACS isolation checks Leon Romanovsky
2026-08-21 19:54 ` sashiko-bot
2026-08-24 23:22 ` Jason Gunthorpe
2026-08-25 15:59 ` Logan Gunthorpe
2026-08-21 19:38 ` [PATCH v4 09/18] PCI: Add ACS egress control vector accessor Leon Romanovsky
2026-08-21 19:50 ` sashiko-bot
2026-08-21 19:38 ` [PATCH v4 10/18] PCI: Account for ACS egress control in isolation checks Leon Romanovsky
2026-08-21 19:51 ` sashiko-bot
2026-08-24 23:22 ` Jason Gunthorpe
2026-08-30 9:20 ` Leon Romanovsky
2026-08-21 19:38 ` [PATCH v4 11/18] PCI/P2PDMA: Derive peer-to-peer routing from ACS control bits Leon Romanovsky
2026-08-21 19:54 ` sashiko-bot
2026-08-22 13:31 ` Leon Romanovsky
2026-08-25 19:17 ` Logan Gunthorpe
2026-08-21 19:38 ` [PATCH v4 12/18] PCI/P2PDMA: Honor ACS egress control vectors Leon Romanovsky
2026-08-21 19:56 ` sashiko-bot
2026-08-25 19:25 ` Logan Gunthorpe
2026-08-21 19:38 ` [PATCH v4 13/18] PCI/P2PDMA: Document ACS egress control handling Leon Romanovsky
2026-08-21 19:44 ` sashiko-bot
2026-08-25 19:52 ` Logan Gunthorpe
2026-08-21 19:38 ` [PATCH v4 14/18] PCI/P2PDMA: Extract pure ACS routing decision helpers Leon Romanovsky
2026-08-21 19:49 ` sashiko-bot
2026-08-25 19:55 ` Logan Gunthorpe
2026-08-21 19:38 ` [PATCH v4 15/18] PCI/P2PDMA: Add KUnit tests for ACS routing decisions Leon Romanovsky
2026-08-21 19:50 ` sashiko-bot
2026-08-21 19:38 ` [PATCH v4 16/18] PCI/P2PDMA: Add KUnit coverage for the ACS P2P routing walk Leon Romanovsky
2026-08-21 19:51 ` sashiko-bot
2026-08-21 19:38 ` [PATCH v4 17/18] PCI: Add KUnit coverage for ACS isolation checks Leon Romanovsky
2026-08-21 19:52 ` sashiko-bot
2026-08-21 19:38 ` [PATCH v4 18/18] PCI/P2PDMA: Log detailed ACS routing diagnostics Leon Romanovsky
2026-08-21 20:02 ` sashiko-bot
2026-08-22 13:28 ` Leon Romanovsky
2026-08-25 20:02 ` Logan Gunthorpe
2026-08-30 8:37 ` Leon Romanovsky
2026-08-24 23:22 ` [PATCH v4 00/18] PCI/P2PDMA: Fix ACS egress control handling Jason Gunthorpe
2026-08-30 9:02 ` Leon Romanovsky [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260830090223.GC24140@unreal \
--to=leon@kernel.org \
--cc=alex@shazbot.org \
--cc=ankita@nvidia.com \
--cc=axboe@kernel.dk \
--cc=bhelgaas@google.com \
--cc=corbet@lwn.net \
--cc=gregkh@linuxfoundation.org \
--cc=iommu@lists.linux.dev \
--cc=jgg@nvidia.com \
--cc=jgg@ziepe.ca \
--cc=joro@8bytes.org \
--cc=kch@nvidia.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=logang@deltatee.com \
--cc=matt@ozlabs.org \
--cc=robin.murphy@arm.com \
--cc=skhan@linuxfoundation.org \
--cc=tdave@nvidia.com \
--cc=will@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox