From: Matthew Brost <matthew.brost@intel.com>
To: Jason Gunthorpe <jgg@ziepe.ca>
Cc: <intel-xe@lists.freedesktop.org>,
<dri-devel@lists.freedesktop.org>, <leonro@nvidia.com>,
<francois.dugast@intel.com>, <thomas.hellstrom@linux.intel.com>,
<himal.prasad.ghimiray@intel.com>
Subject: Re: [RFC PATCH v3 06/11] drm/pagemap: Add IOVA interface to DRM pagemap
Date: Wed, 28 Jan 2026 12:24:25 -0800 [thread overview]
Message-ID: <aXpwecQRovIurYKV@lstrano-desk.jf.intel.com> (raw)
In-Reply-To: <20260128193509.GU1641016@ziepe.ca>
On Wed, Jan 28, 2026 at 03:35:09PM -0400, Jason Gunthorpe wrote:
> On Wed, Jan 28, 2026 at 10:42:53AM -0800, Matthew Brost wrote:
> > Yes, this is exactly what I envision here. First, let me explain the
> > possible addressing modes on the UAL fabric:
> >
> > - Physical (akin to IOMMU passthrough)
> > - Virtual (akin to IOMMU enabled)
> >
> > Physical mode is straightforward — resolve the PFN to a cross-device
> > physical address, then install it into the initiator’s page tables along
> > with a bit indicating routing over the network. In this mode, the vfuncs
> > here are basically NOPs.
>
> Ugh of course they would invent something so complicated.
>
Why wouldn't we... But conceptually really fairly close to IOMMU
paththrough vs. enabled.
> I'm not convinced this should be hidden inside DRM. The DMA API is the
Well, what I’m suggesting isn’t in DRM. A UAL API would be its own
layer, much like the DMA API. Of course we could stick this in the DMA
API and make it high-speed-fabric-generic, etc., but I do think the
fabric functions would have their own signatures and semantics (see my
explanation around device_ual_alloc reclaim rules, what locks it is
allowed to take, etc.).
> place to make things mappable and for an open standard like UALink it
> would make sense that the DMA API is the broker to connect things as
> it will be more than just one GPU driver talking to itself.
>
I agree that a UAL API would just be a broker, similar to the DMA API.
It should support multiple devices and drivers communicating with each
other. If the UAL API only works with, let’s say, two Xe devices, then
we’d be broken.
> There is a journey to get there, but I don't think it is too
> complicated. It also probably ties in fairly nicely with the ideas
I agree it will be a journey and really shouldn't be too complicated.
Open to other ideas here.
> coming for multi path PCIe fabrics.
>
> > So, if it isn’t clear — these vfuncs hide whether PCIe P2P is being used
> > (IOMMU in passthrough or enabled) or UAL is being used (physical or
> > virtual) for DRM common layer. They manage the resources for the
> > connection and provide the information needed to program the initiator
> > PTEs (address + “use interconnect” vs. “use PCIe P2P bit”).
>
> This looks like it is taking the DMA API and sticking drm_ in front of
> it :( I don't think this is a good direction for the kernel, DRM
> should not be internally building such key infrastructure.
>
Again, it’s not my intent to stick DRM into this. The DRM parts are
specific to how we do SVM (locking, migrations, page collections for
bindings, etc.) so each driver doesn’t reinvent this piece (see AMD’s
and Nouveau’s implementations), but the UAL mapping logic should be
generic, also being able to used in dma-buf, etc. Also, all of the DRM
SVM parts can be pulled into the device layer if needed as there really
isn't anything DRM specific in it and parts the existing DRM SVM code
could be pushed down into HMM type helpers too. The DRM SVM code only
has a single user for now (Xe) and this will evolve as others just in.
I can park the latter half of this series for now, as it isn’t really
required aside from multi-GPU performance work, and with larger device
pages this really shouldn’t matter anyway.
My feeling is we probably need to circle back to some high-speed-fabric
API consensus within the next 6-9 months though.
This was just a PoC I started thinking about when converting to IOVA
link for dma-map and UAL ideas popped into my head.
> I'm confident we will see NICs and storage wired up to these fabrics
> as well.
>
Yes, I agree eventually this will happen.
Matt
> Jason
next prev parent reply other threads:[~2026-01-28 20:24 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-28 0:48 [RFC PATCH v3 00/11] Use new dma-map IOVA alloc, link, and sync API in GPU SVM and DRM pagemap Matthew Brost
2026-01-28 0:48 ` [RFC PATCH v3 01/11] drm/pagemap: Add helper to access zone_device_data Matthew Brost
2026-01-28 13:53 ` Leon Romanovsky
2026-01-28 0:48 ` [RFC PATCH v3 02/11] drm/gpusvm: Use dma-map IOVA alloc, link, and sync API in GPU SVM Matthew Brost
2026-01-28 14:04 ` Leon Romanovsky
2026-01-28 0:48 ` [RFC PATCH v3 03/11] drm/pagemap: Split drm_pagemap_migrate_map_pages into device / system Matthew Brost
2026-01-28 0:48 ` [RFC PATCH v3 04/11] drm/pagemap: Use dma-map IOVA alloc, link, and sync API for DRM pagemap Matthew Brost
2026-01-28 14:28 ` Leon Romanovsky
2026-01-28 17:46 ` Matthew Brost
[not found] ` <20260128175531.GR1641016@ziepe.ca>
2026-01-28 19:29 ` Matthew Brost
2026-01-28 19:45 ` Leon Romanovsky
2026-01-28 21:04 ` Matthew Brost
2026-01-29 10:14 ` Leon Romanovsky
2026-01-29 18:22 ` Matthew Brost
2026-01-28 0:48 ` [RFC PATCH v3 05/11] drm/pagemap: Reduce number of IOVA link calls Matthew Brost
2026-01-28 0:48 ` [RFC PATCH v3 06/11] drm/pagemap: Add IOVA interface to DRM pagemap Matthew Brost
[not found] ` <20260128151458.GJ1641016@ziepe.ca>
2026-01-28 18:42 ` Matthew Brost
2026-01-28 19:41 ` Matthew Brost
[not found] ` <20260128193509.GU1641016@ziepe.ca>
2026-01-28 20:24 ` Matthew Brost [this message]
2026-01-29 18:57 ` Jason Gunthorpe
2026-01-29 19:28 ` Matthew Brost
2026-01-29 19:32 ` Jason Gunthorpe
2026-01-28 0:48 ` [RFC PATCH v3 07/11] drm/xe: Stub out DRM pagemap IOVA alloc implementation Matthew Brost
2026-01-28 0:48 ` [RFC PATCH v3 08/11] drm/pagemap: Use device-to-device IOVA alloc, link, and sync API for DRM pagemap Matthew Brost
2026-01-28 0:48 ` [RFC PATCH v3 09/11] drm/xe: Drop BO dma-resv lock during SVM migrate-to-device Matthew Brost
2026-01-28 0:48 ` [RFC PATCH v3 10/11] drm/xe: Implement DRM pagemap IOVA vfuncs Matthew Brost
2026-01-28 0:48 ` [RFC PATCH v3 11/11] drm/gpusvm: Use device-to-device IOVA alloc, link, and sync API in GPU SVM Matthew Brost
2026-01-28 0:59 ` ✗ CI.checkpatch: warning for Use new dma-map IOVA alloc, link, and sync API in GPU SVM and DRM pagemap (rev3) Patchwork
2026-01-28 1:01 ` ✓ CI.KUnit: success " Patchwork
2026-01-28 1:42 ` ✓ Xe.CI.BAT: " Patchwork
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=aXpwecQRovIurYKV@lstrano-desk.jf.intel.com \
--to=matthew.brost@intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=francois.dugast@intel.com \
--cc=himal.prasad.ghimiray@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=jgg@ziepe.ca \
--cc=leonro@nvidia.com \
--cc=thomas.hellstrom@linux.intel.com \
/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