On Thu, 2025-08-07 at 11:53 +0200, Christian König wrote:
> On 06.08.25 19:43, Thomas Hellström wrote:
> > Hi, Christian
> >
> > On Wed, 2025-08-06 at 15:28 +0200, Christian König wrote:
> > > On some old x86 systems we had the problem that changing the
> > &
Hi, Christian
On Wed, 2025-08-06 at 15:28 +0200, Christian König wrote:
> On some old x86 systems we had the problem that changing the caching
> flags
> of system memory requires changing the global MTRR/PAT tables.
>
> But on any modern x86 system (CPUs introduced rughly after 2004) we
> actuall
On Sat, 2025-08-02 at 11:40 +0900, Simon Richter wrote:
> This driver, for the time being, assumes that the kernel page size is
> 4kB,
> so it fails on loong64 and aarch64 with 16kB pages, and ppc64el with
> 64kB
> pages.
>
> Signed-off-by: Simon Richter
> Cc: sta...@vger.kernel.org
> ---
> driv
On Fri, 2025-08-01 at 16:39 +0200, Thomas Hellström wrote:
> On Fri, 2025-08-01 at 19:19 +0900, Simon Richter wrote:
> > This driver, for the time being, assumes that the kernel page size
> > is
> > 4kB,
> > so it fails on loong64 and aarch64 with 16kB pages, an
.kernel.org
Reviewed-by: Thomas Hellström
I will add a Fixes: tag and push this.
Thanks,
Thomas
> ---
> drivers/gpu/drm/xe/Kconfig | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/xe/Kconfig b/drivers/gpu/drm/xe/Kconfig
> index 2bb2bc0
On Sun, 2025-07-27 at 16:04 +0900, Simon Richter wrote:
> This driver, for the time being, assumes that the kernel page size is
> 4kB,
> so it fails on loong64 and aarch64 with 16kB pages, and ppc64el with
> 64kB
> pages.
>
> Signed-off-by: Simon Richter
> Cc: sta...@vger.kernel.org
This looks r
Hi, Christian,
On Wed, 2025-07-16 at 18:04 +0200, Christian König wrote:
> Hi guys,
>
> so I hope Thomas is back from vacation while I will be on vacation
> for
> the next two weeks.
>
> Here is the patch set which cleans up TTM and XE in preperation of
> switching to drm_exec.
>
> Please take
On Tue, 2025-07-22 at 15:34 +0800, WangYuli wrote:
> There is a spelling mistake of 'notifer' in the comment which
> should be 'notifier'.
>
> Signed-off-by: WangYuli
Reviewed-by: Thomas Hellström
> ---
> drivers/gpu/drm/xe/xe_vm_types.h | 2 +-
> 1
On Sat, 2025-06-28 at 22:51 -0500, Dan Carpenter wrote:
> Hello Thomas Hellström,
>
> Commit bb8aa27eff6f ("drm/ttm, drm_xe, Implement
> ttm_lru_walk_for_evict() using the guarded LRU iteration") from Jun
> 23, 2025 (linux-next), leads to the following (unpublished
Hi!
On Tue, 2025-07-01 at 12:49 -0500, Dan Carpenter wrote:
> Hello Thomas Hellström,
>
> Commit bb8aa27eff6f ("drm/ttm, drm_xe, Implement
> ttm_lru_walk_for_evict() using the guarded LRU iteration") from Jun
> 23, 2025 (linux-next), leads to the following Smatch
On Thu, 2025-06-26 at 13:06 +0200, Christian König wrote:
> On 23.06.25 17:53, Thomas Hellström wrote:
> > To avoid duplicating the tricky bo locking implementation,
> > Implement ttm_lru_walk_for_evict() using the guarded bo LRU
> > iteration.
> >
> > To facil
from ticketlocking in the loop by
skipping to the next item. (Intel CI)
Signed-off-by: Thomas Hellström
---
drivers/gpu/drm/ttm/ttm_bo_util.c | 188 --
drivers/gpu/drm/xe/xe_shrinker.c | 7 +-
include/drm/ttm/ttm_bo.h | 9 +-
3 files changed, 88
Instead of the struct ttm_operation_ctx, Pass a struct ttm_lru_walk_arg
to enable us to easily extend the walk functionality, and to
implement ttm_lru_walk_for_evict() using the guarded LRU iteration.
Signed-off-by: Thomas Hellström
Reviewed-by: Christian König
---
drivers/gpu/drm/ttm
Let the locking functions take the new struct ttm_lru_walk_arg
as argument in order for them to be easily used from both
types of walk.
v2:
- Whitespace fix
Signed-off-by: Thomas Hellström
Reviewed-by: Christian König
---
drivers/gpu/drm/ttm/ttm_bo.c | 24
t the ttm_lru_walk_for_evict()
function in terms of the guarded iteration also exposed to drivers.
This means that when we get to implement locking using drm_exec,
we only need to do that in a single place.
Add ticketlocking support to the guarded iteration and modify
the iteration arguments.
Thomas Hell
Hi, Alistair,
On Thu, 2025-06-19 at 12:07 +0200, Thomas Hellström wrote:
>
> Hi, Alistair, Thanks for having a look!
That patch series is ready to be merged. Do you have any outstanding
concerns?
Thanks,
Thomas
>
> On Thu, 2025-06-19 at 14:52 +1000, Alistair Popple wrote:
>
Add runtime PM since we might call populate_mm on a foreign device.
v3:
- Fix a kerneldoc failure (Matt Brost)
- Revert the bo type change from device to kernel (Matt Brost)
v4:
- Add an assert in xe_svm_alloc_vram (Matt Brost)
Signed-off-by: Thomas Hellström
Reviewed-by: Matthew Brost
Add an operation to populate a part of a drm_mm with device
private memory. Clarify how migration using it is intended
to work.
v3:
- Kerneldoc fixes and updates (Matt Brost).
v4:
- More kerneldoc fixes. Rebase.
Signed-off-by: Thomas Hellström
Reviewed-by: Matthew Brost
---
drivers/gpu/drm
documentation about how the drm_pagemap
migration should be interpreted until upcoming
patches where the functionality is implemented.
(Matt Brost)
v4:
- More kerneldoc fixes around timeslice_ms
(Himal Ghimiray, Matt Brost)
v6:
- Fix an uninitialized pagemap pointer (CI)
Co-developed-by: Thom
st (1):
drm/gpusvm, drm/pagemap: Move migration functionality to drm_pagemap
Thomas Hellström (2):
drm/pagemap: Add a populate_mm op
drm/xe: Implement and use the drm_pagemap populate_mm op
Documentation/gpu/rfc/gpusvm.rst | 12 +-
drivers/gpu/drm/Makefile | 6 +-
driver
Hi, Alistair, Thanks for having a look!
On Thu, 2025-06-19 at 14:52 +1000, Alistair Popple wrote:
> On Wed, Jun 18, 2025 at 10:16:14PM +0200, Thomas Hellström wrote:
> > This patchset modifies the migration part of drm_gpusvm to
> > drm_pagemap and
> > adds a populate_m
documentation about how the drm_pagemap
migration should be interpreted until upcoming
patches where the functionality is implemented.
(Matt Brost)
v4:
- More kerneldoc fixes around timeslice_ms
(Himal Ghimiray, Matt Brost)
Co-developed-by: Thomas Hellström
Signed-off-by: Thomas Hellström
Add an operation to populate a part of a drm_mm with device
private memory. Clarify how migration using it is intended
to work.
v3:
- Kerneldoc fixes and updates (Matt Brost).
v4:
- More kerneldoc fixes. Rebase.
Signed-off-by: Thomas Hellström
Reviewed-by: Matthew Brost
---
drivers/gpu/drm
Add runtime PM since we might call populate_mm on a foreign device.
v3:
- Fix a kerneldoc failure (Matt Brost)
- Revert the bo type change from device to kernel (Matt Brost)
v4:
- Add an assert in xe_svm_alloc_vram (Matt Brost)
Signed-off-by: Thomas Hellström
Reviewed-by: Matthew Brost
Move migration functionality to drm_pagemap
Thomas Hellström (2):
drm/pagemap: Add a populate_mm op
drm/xe: Implement and use the drm_pagemap populate_mm op
Documentation/gpu/rfc/gpusvm.rst | 12 +-
drivers/gpu/drm/Makefile | 6 +-
drivers/gpu/drm/drm_gpusvm.c
Hi, Matt,
On Wed, 2025-06-18 at 08:26 -0700, Matthew Brost wrote:
> On Wed, Jun 18, 2025 at 04:21:22PM +0530, Ghimiray, Himal Prasad
> wrote:
> >
> >
> > On 18-06-2025 14:56, Thomas Hellström wrote:
> > > From: Matthew Brost
> > >
> > > T
Add runtime PM since we might call populate_mm on a foreign device.
v3:
- Fix a kerneldoc failure (Matt Brost)
- Revert the bo type change from device to kernel (Matt Brost)
v4:
- Add an assert in xe_svm_alloc_vram (Matt Brost)
Signed-off-by: Thomas Hellström
Reviewed-by: Matthew Brost
gemap
Thomas Hellström (2):
drm/pagemap: Add a populate_mm op
drm/xe: Implement and use the drm_pagemap populate_mm op
Documentation/gpu/rfc/gpusvm.rst | 12 +-
drivers/gpu/drm/Makefile | 6 +-
drivers/gpu/drm/drm_gpusvm.c | 761 +---
drivers/gp
documentation about how the drm_pagemap
migration should be interpreted until upcoming
patches where the functionality is implemented.
(Matt Brost)
v4:
- More kerneldoc fixes around timeslice_ms
(Himal Ghimiray, Matt Brost)
Co-developed-by: Thomas Hellström
Signed-off-by: Thomas Hellström
Add an operation to populate a part of a drm_mm with device
private memory. Clarify how migration using it is intended
to work.
v3:
- Kerneldoc fixes and updates (Matt Brost).
v4:
- More kerneldoc fixes. Rebase.
Signed-off-by: Thomas Hellström
Reviewed-by: Matthew Brost
---
drivers/gpu/drm
On Tue, 2025-06-17 at 10:04 -0700, Matthew Brost wrote:
> On Tue, Jun 17, 2025 at 04:55:26PM +0200, Thomas Hellström wrote:
> > On Tue, 2025-06-17 at 20:17 +0530, Ghimiray, Himal Prasad wrote:
> > >
> > >
> > > On 17-06-2025 18:41, Thomas Hellström wrote:
On Tue, 2025-06-17 at 10:09 -0700, Matthew Brost wrote:
> On Fri, Jun 13, 2025 at 04:02:19PM +0200, Thomas Hellström wrote:
> > Add runtime PM since we might call populate_mm on a foreign device.
> >
> > v3:
> > - Fix a kerneldoc failure (Matt Brost)
> > - Revert
On Tue, 2025-06-17 at 20:17 +0530, Ghimiray, Himal Prasad wrote:
>
>
> On 17-06-2025 18:41, Thomas Hellström wrote:
> > On Tue, 2025-06-17 at 18:25 +0530, Ghimiray, Himal Prasad wrote:
> > >
> > >
> > > On 13-06-2025 19:32, Thomas He
On Tue, 2025-06-17 at 18:25 +0530, Ghimiray, Himal Prasad wrote:
>
>
> On 13-06-2025 19:32, Thomas Hellström wrote:
> > From: Matthew Brost
> >
> > The migration functionality and track-keeping of per-pagemap VRAM
> > mapped to the CPU mm is not per GPU_vm, bu
Hi, Christian,
On Mon, 2025-06-16 at 15:07 +0200, Christian König wrote:
> Instead of keeping a separate reference count for the TTM object also
> use
> the reference count for DRM GEM objects inside TTM.
>
> Apart from avoiding two reference counts for one object this approach
> has
> the clear
On Mon, 2025-06-16 at 15:23 +0200, Christian König wrote:
> On 6/13/25 17:18, Thomas Hellström wrote:
> > To avoid duplicating the tricky bo locking implementation,
> > Implement ttm_lru_walk_for_evict() using the guarded bo LRU
> > iteration.
> >
> > To facil
Let the locking functions take the new struct ttm_lru_walk_arg
as argument in order for them to be easily used from both
types of walk.
Signed-off-by: Thomas Hellström
---
drivers/gpu/drm/ttm/ttm_bo.c | 24 ++--
drivers/gpu/drm/ttm/ttm_bo_util.c | 26
To avoid duplicating the tricky bo locking implementation,
Implement ttm_lru_walk_for_evict() using the guarded bo LRU iteration.
To facilitate this, support ticketlocking from the guarded bo LRU
iteration.
Signed-off-by: Thomas Hellström
---
drivers/gpu/drm/ttm/ttm_bo_util.c | 166
Instead of the struct ttm_operation_ctx, Pass a struct ttm_lru_walk_arg
to enable us to easily extend the walk functionality, and to
implement ttm_lru_walk_for_evict() using the guarded LRU iteration.
Signed-off-by: Thomas Hellström
---
drivers/gpu/drm/ttm/ttm_bo_util.c | 10 +-
drivers
t the ttm_lru_walk_for_evict()
function in terms of the guarded iteration also exposed to drivers.
This means that when we get to implement locking using drm_exec,
we only need to do that in a single place.
Add ticketlocking support to the guarded iteration and modify
the iteration arguments.
Thomas Hell
Add runtime PM since we might call populate_mm on a foreign device.
v3:
- Fix a kerneldoc failure (Matt Brost)
- Revert the bo type change from device to kernel (Matt Brost)
Signed-off-by: Thomas Hellström
---
drivers/gpu/drm/drm_pagemap.c | 1 +
drivers/gpu/drm/xe/xe_svm.c | 101
Add an operation to populate a part of a drm_mm with device
private memory. Clarify how migration using it is intended
to work.
v3:
- Kerneldoc fixes and updates (Matt Brost).
Signed-off-by: Thomas Hellström
Reviewed-by: Matthew Brost #v1
---
drivers/gpu/drm/drm_gpusvm.c | 7 ++--
drivers
:
- Rebase.
v3:
- Documentation updates (CI, Matt Brost)
- Don't change TTM buffer object type for VRAM allocations (Matt Brost)
Matthew Brost (1):
drm/gpusvm, drm/pagemap: Move migration functionality to drm_pagemap
Thomas Hellström (2):
drm/pagemap: Add a populate_mm op
drm/xe: Implement an
documentation about how the drm_pagemap
migration should be interpreted until upcoming
patches where the functionality is implemented.
(Matt Brost)
Co-developed-by: Thomas Hellström
Signed-off-by: Thomas Hellström
---
Documentation/gpu/rfc/gpusvm.rst | 12 +-
drivers/gpu/drm/Makefi
On Thu, 2025-06-05 at 15:16 -0700, Matthew Brost wrote:
> On Wed, Jun 04, 2025 at 11:35:36AM +0200, Thomas Hellström wrote:
> > Add runtime PM since we might call populate_mm on a foreign device.
> > Also create the VRAM bos as ttm_bo_type_kernel. This avoids the
> > ini
On Thu, 2025-06-05 at 15:44 -0700, Matthew Brost wrote:
> On Wed, Jun 04, 2025 at 11:35:34AM +0200, Thomas Hellström wrote:
> > From: Matthew Brost
> >
> > The migration functionality and track-keeping of per-pagemap VRAM
> > mapped to the CPU mm is not per GPU
On Wed, 2025-06-04 at 15:05 -0700, Matthew Brost wrote:
> On Wed, Jun 04, 2025 at 11:35:35AM +0200, Thomas Hellström wrote:
> > Add an operation to populate a part of a drm_mm with device
> > private memory.
> >
>
> With the kernel doc fixed:
> Reviewed-by: Matthe
On Wed, 2025-06-04 at 08:04 -0700, Matthew Brost wrote:
> On Wed, Jun 04, 2025 at 11:35:36AM +0200, Thomas Hellström wrote:
> > Add runtime PM since we might call populate_mm on a foreign device.
>
> I think taking a runtime PM will fix hard to hit splat [1] too.
&
ig b/drivers/gpu/drm/Kconfig
> index f094797f3b2b..ded28c71d89c 100644
> --- a/drivers/gpu/drm/Kconfig
> +++ b/drivers/gpu/drm/Kconfig
> @@ -188,6 +188,7 @@ source "drivers/gpu/drm/display/Kconfig"
> config DRM_TTM
> tristate
> depends on DRM && MMU
> + select SHMEM
> help
> GPU memory management subsystem for devices with multiple
> GPU memory types. Will be enabled automatically if a
> device driver
Reviewed-by: Thomas Hellström
Thanks,
Thomas
On Wed, 2025-06-04 at 08:04 -0400, Steven Rostedt wrote:
> On Wed, 4 Jun 2025 00:03:18 -0700 (PDT)
> Hugh Dickins wrote:
>
> > I vote for the "select SHMEM", but Thomas and dri-devel and Linus
> > should decide.
>
> I only tried "depends on SHMEM" which did not work, but it looks like
> "select
hanks,
> Christian.
Sure, Felix was CC'd and I'll make sure Philip will be CC'd on the next
revision.
Thanks,
Thomas
>
> On 6/4/25 11:35, Thomas Hellström wrote:
> > This patchset modifies the migration part of drm_gpusvm to
> > drm_pagemap and
> > ad
Add an operation to populate a part of a drm_mm with device
private memory.
Signed-off-by: Thomas Hellström
---
drivers/gpu/drm/drm_gpusvm.c | 7 ++-
drivers/gpu/drm/drm_pagemap.c | 34 ++
include/drm/drm_pagemap.h | 34
listed as author of this commit since he wrote most of the code,
and it makes sense to retain his git authorship.
Thomas mostly moved the code around.
Co-developed-by: Thomas Hellström
Signed-off-by: Thomas Hellström
---
Documentation/gpu/rfc/gpusvm.rst | 12 +-
drivers/gpu/dr
Add runtime PM since we might call populate_mm on a foreign device.
Also create the VRAM bos as ttm_bo_type_kernel. This avoids the
initial clearing and the creation of an mmap handle.
Signed-off-by: Thomas Hellström
---
drivers/gpu/drm/drm_pagemap.c | 1 +
drivers/gpu/drm/xe/xe_svm.c | 104
:
- Rebase.
Matthew Brost (1):
drm/gpusvm, drm/pagemap: Move migration functionality to drm_pagemap
Thomas Hellström (2):
drm/pagemap: Add a populate_mm op
drm/xe: Implement and use the drm_pagemap populate_mm op
Documentation/gpu/rfc/gpusvm.rst | 12 +-
drivers/gpu/drm/Makefile
On Fri, 2025-05-16 at 10:44 +0200, Christian König wrote:
> Hi Thomas,
>
> On 5/16/25 10:33, Thomas Hellström wrote:
> > Hi!
> >
> > I previously discussed this with Simona on IRC but would like to
> > get
> > some feedback also from a wider audience:
&g
Hi!
I previously discussed this with Simona on IRC but would like to get
some feedback also from a wider audience:
We're planning to share dma-bufs using a fast interconnect in a way
similar to pcie-p2p:
The rough plan is to identify dma-bufs capable of sharing this way by
looking at the address
/#mb153ab9216cb813b92bdeb36f391ad4808c2ba29
Suggested-by: Christian König
Fixes: 70d645deac98 ("drm/ttm: Add helpers for shrinking")
Signed-off-by: Thomas Hellström
---
drivers/gpu/drm/ttm/ttm_backup.c | 42 +---
drivers/gpu/drm/ttm/ttm_pool.c | 6 ++---
drivers/gpu/drm/ttm/ttm_tt.
The docs were not properly updated from an earlier version of the code.
Fixes: e7b5d23e5d47 ("drm/ttm: Provide a shmem backup implementation")
Cc: Christian König
Cc: Matthew Brost
Cc: Matthew Auld
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Thomas Hellström
---
drivers/g
On Fri, 2025-05-02 at 09:49 +0200, Christian König wrote:
> On 5/2/25 07:33, Al Viro wrote:
> > On Thu, May 01, 2025 at 09:52:08PM -0700, Matthew Brost wrote:
> > > On Fri, May 02, 2025 at 05:31:49AM +0100, Al Viro wrote:
> > > > On Thu, May 01, 2025 at 09:26:25PM -0700, Matthew Brost wrote:
> >
>
drm/xe: Update xe_ttm_access_memory to use GPU for non-visible
> access
> drm/print: Add drm_coredump_printer_is_full
> drm/xe: Abort printing coredump in VM printer output if full
> drm/xe: Drop force_alloc from xe_bo_evict in selftests
>
> Michal Wajdeczko (2)
On Fri, 2025-04-25 at 00:39 -0700, Matthew Brost wrote:
> On Fri, Apr 25, 2025 at 09:18:19AM +0200, Thomas Hellström wrote:
> > On Thu, 2025-04-24 at 11:03 -0700, Matthew Brost wrote:
> > > On Thu, Apr 24, 2025 at 04:39:21PM +0200, Thomas Hellström wrote:
> > > > On
On Thu, 2025-04-24 at 11:03 -0700, Matthew Brost wrote:
> On Thu, Apr 24, 2025 at 04:39:21PM +0200, Thomas Hellström wrote:
> > On Tue, 2025-04-22 at 10:04 -0700, Matthew Brost wrote:
> > > Mixing GPU and CPU atomics does not work unless a strict
> > > migration
> >
On Tue, 2025-04-22 at 10:04 -0700, Matthew Brost wrote:
> Mixing GPU and CPU atomics does not work unless a strict migration
> policy of GPU atomics must be device memory. Enforce a policy of must
> be
> in VRAM with a retry loop of 2 attempts, if retry loop fails abort
> fault.
>
> v2:
> - Only
Add an operation to populate a part of a drm_mm with device
private memory.
Signed-off-by: Thomas Hellström
---
drivers/gpu/drm/drm_gpusvm.c | 7 ++-
drivers/gpu/drm/drm_pagemap.c | 32
include/drm/drm_pagemap.h | 32
3
Brost (1):
drm/gpusvm, drm/pagemap: Move migration functionality to drm_pagemap
Thomas Hellström (2):
drm/pagemap: Add a populate_mm op
drm/xe: Implement and use the drm_pagemap populate_mm op
Documentation/gpu/rfc/gpusvm.rst | 12 +-
drivers/gpu/drm/Makefile | 6
Add runtime PM since we might call populate_mm on a foreign device.
Also create the VRAM bos as ttm_bo_type_kernel. This avoids the
initial clearing and the creation of an mmap handle.
Signed-off-by: Thomas Hellström
---
drivers/gpu/drm/drm_pagemap.c | 4 +-
drivers/gpu/drm/xe/xe_svm.c | 80
listed as author of this commit since he wrote most of the code,
and it makes sense to retain his git authorship.
Thomas mostly moved the code around.
Co-developed-by: Thomas Hellström
Signed-off-by: Thomas Hellström
---
Documentation/gpu/rfc/gpusvm.rst | 12 +-
drivers/gpu/dr
e import_attach optional.
>
> Signed-off-by: Thomas Zimmermann
> Cc: Lucas De Marchi
> Cc: "Thomas Hellström"
> Cc: Rodrigo Vivi
> Cc: intel...@lists.freedesktop.org
> Cc: dri-devel@lists.freedesktop.org
Reviewed-by: Thomas Hellström
> ---
> drivers/
On Thu, 2025-03-20 at 17:30 +, Matthew Auld wrote:
> If the memory is going to be accessed by the device, make sure we
> mark
> the pages accordingly such that the kernel knows this. This aligns
> with
> the xe-userptr code.
>
> Signed-off-by: Matthew Auld
> Cc
apped by the mm. Fix is based on the xe userptr code, which in
> a
> future patch will directly use gpusvm, so needs alignment here.
>
> Reported-by: Thomas Hellström
> Signed-off-by: Matthew Auld
> Cc: Matthew Brost
> ---
> drivers/gpu/drm/drm_gpusvm.c | 25
> good idea.
>
> Signed-off-by: Matthew Auld
> Cc: Thomas Hellström
> Cc: Matthew Brost
Reviewed-by: Thomas Hellström
> ---
> drivers/gpu/drm/drm_gpusvm.c | 8 +---
> 1 file changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_gpusvm.
On Thu, 2025-03-13 at 13:57 +0100, Christian König wrote:
> Am 13.03.25 um 13:50 schrieb Thomas Hellström:
> > Hi, Christian
> >
> > On Thu, 2025-03-13 at 11:19 +0100, Christian König wrote:
> > > Am 12.03.25 um 22:03 schrieb Thomas Hellström:
> > > > Thi
On Wed, 2025-03-12 at 22:04 +0100, Thomas Hellström wrote:
> On device unbind, migrate exported bos, including pagemap bos to
> system. This allows importers to take proper action without
> disruption. In particular, SVM clients on remote devices may
> continue as if nothing happe
Remove the xe embedded drm_pagemap, and instead allocate and
reference count.
This is a step towards adding drm_pagemaps on demand.
Signed-off-by: Thomas Hellström
---
drivers/gpu/drm/drm_pagemap.c| 58 +++-
drivers/gpu/drm/xe/xe_device_types.h | 2 +-
drivers
On Thu, 2025-03-13 at 13:57 +0100, Christian König wrote:
> Am 13.03.25 um 13:50 schrieb Thomas Hellström:
> > Hi, Christian
> >
> > On Thu, 2025-03-13 at 11:19 +0100, Christian König wrote:
> > > Am 12.03.25 um 22:03 schrieb Thomas Hellström:
> > > > Thi
Hi, Christian
On Thu, 2025-03-13 at 11:19 +0100, Christian König wrote:
> Am 12.03.25 um 22:03 schrieb Thomas Hellström:
> > This RFC implements and requests comments for a way to handle SVM
> > with multi-device,
> > typically with fast interconnects. It adds generic code a
With SVM, ranges forwarded to the PT code for binding can, mostly
due to races when migrating, point to both VRAM and system / foreign
device memory. Make the PT code able to handle that by checking,
for each PTE set up, whether it points to local VRAM or to system
memory.
Signed-off-by: Thomas
mapping of mixed ranges.
Signed-off-by: Thomas Hellström
---
drivers/gpu/drm/drm_gpusvm.c | 14 +-
1 file changed, 1 insertion(+), 13 deletions(-)
diff --git a/drivers/gpu/drm/drm_gpusvm.c b/drivers/gpu/drm/drm_gpusvm.c
index 8d836248f5fe..5d502ca091ee 100644
--- a/drivers/gpu/drm
air.
Patch 18:
- (Only for POC) Add an GPU madvise prefer_devmem IOCTL.
Patch 19:
- (Only for POC) Implement pcie p2p DMA as a fast interconnect and test.
Matthew Brost (1):
drm/gpusvm, drm/pagemap: Move migration functionality to drm_pagemap
Thomas Hellström (18):
drm/xe: Introduce CONFI
Register a driver-wide owner list, provide a callback to identify
fast interconnects and use the drm_pagemap_util helper to allocate
or reuse a suitable owner struct. For now we consider pagemaps on
different tiles on the same device as having fast interconnect.
Signed-off-by: Thomas Hellström
Add an operation to populate a part of a drm_mm with device
private memory.
Signed-off-by: Thomas Hellström
---
drivers/gpu/drm/drm_gpusvm.c | 7 ++-
drivers/gpu/drm/drm_pagemap.c | 32
include/drm/drm_pagemap.h | 32
3
to protect the UAF.
Signed-off-by: Thomas Hellström
---
drivers/gpu/drm/xe/xe_svm.c | 7 +--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/xe/xe_svm.c b/drivers/gpu/drm/xe/xe_svm.c
index c305d4c351d7..1a8e17a0005d 100644
--- a/drivers/gpu/drm/xe/xe_svm.c
+++ b
.
Signed-off-by: Thomas Hellström
---
drivers/gpu/drm/xe/xe_svm.c | 50 ++---
drivers/gpu/drm/xe/xe_svm.h | 1 +
2 files changed, 48 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/xe/xe_svm.c b/drivers/gpu/drm/xe/xe_svm.c
index 56c2c731be27..0b562b411fa4
-by: Thomas Hellström
---
drivers/gpu/drm/xe/xe_device.c | 2 +
drivers/gpu/drm/xe/xe_svm.c| 72 ++
drivers/gpu/drm/xe/xe_svm.h| 9 +
include/uapi/drm/xe_drm.h | 10 +
4 files changed, 93 insertions(+)
diff --git a/drivers/gpu/drm/xe
Add an IOCTL to get a file descriptor referencing a memory region
for SVM.
Signed-off-by: Thomas Hellström
---
drivers/gpu/drm/xe/xe_device.c | 1 +
drivers/gpu/drm/xe/xe_svm.c| 50 ++
drivers/gpu/drm/xe/xe_svm.h| 8 ++
include/uapi/drm/xe_drm.h
Introduce a preferred dpagemap, that can override the default.
The default is still the local tile vram dpagemap.
The preferred pagemap is intended to be set from user-space.
Signed-off-by: Thomas Hellström
---
drivers/gpu/drm/xe/xe_svm.c | 18 +-
drivers/gpu/drm/xe
fault capable gpu.
Signed-off-by: Thomas Hellström
---
drivers/gpu/drm/xe/xe_migrate.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/xe/xe_migrate.c b/drivers/gpu/drm/xe/xe_migrate.c
index 3894efe7ba60..23c258b775a0 100644
--- a/drivers/gpu/drm/xe/xe_migrate.c
Falicitate implementing uapi representing a struct drm_pagemap
as a file descriptor.
A drm_pagemap file descriptor holds, while open, a reference to
the struct drm_pagemap and to the drm_pagemap_helper module.
Signed-off-by: Thomas Hellström
---
drivers/gpu/drm/drm_pagemap_util.c | 78
isit.
Signed-off-by: Thomas Hellström
---
drivers/gpu/drm/Makefile | 3 +-
drivers/gpu/drm/drm_pagemap_util.c | 125 +
include/drm/drm_pagemap_util.h | 55 +
3 files changed, 182 insertions(+), 1 deletion(-)
create mode 100644 drivers/gpu/dr
It may not be known at drm_gpusvm_init time.
Signed-off-by: Thomas Hellström
---
drivers/gpu/drm/drm_gpusvm.c | 21 -
drivers/gpu/drm/xe/xe_svm.c | 5 +++--
include/drm/drm_gpusvm.h | 7 ---
3 files changed, 19 insertions(+), 14 deletions(-)
diff --git a/drivers
such a way that bos that
aren't exported are purged.
Signed-off-by: Thomas Hellström
---
drivers/gpu/drm/drm_pagemap.c| 113 ++--
drivers/gpu/drm/xe/xe_bo.c | 53 +++-
drivers/gpu/drm/xe/xe_bo.h | 2 +
drivers/gpu/drm/xe/xe_device.c | 5 +
driver
listed as author of this commit since he wrote most of the code,
and it makes sense to retain his git authorship.
Thomas mostly moved the code around.
Co-developed-by: Thomas Hellström
Signed-off-by: Thomas Hellström
---
Documentation/gpu/rfc/gpusvm.rst | 12 +-
drivers/gpu/dr
Now that there is always a valid page pointer, we can deduce the owner
from the page.
Signed-off-by: Thomas Hellström
---
drivers/gpu/drm/drm_pagemap.c | 15 ---
1 file changed, 4 insertions(+), 11 deletions(-)
diff --git a/drivers/gpu/drm/drm_pagemap.c b/drivers/gpu/drm
Add runtime PM since we might call populate_mm on a foreign device.
Also create the VRAM bos as ttm_bo_type_kernel. This avoids the
initial clearing and the creation of an mmap handle.
Signed-off-by: Thomas Hellström
---
drivers/gpu/drm/drm_pagemap.c | 4 +-
drivers/gpu/drm/xe/xe_svm.c | 80
Don't rely on CONFIG_DRM_GPUSVM because other drivers may enable it
causing us to compile in SVM support unintentionally.
Also take the opportunity to leave more code out of compilation if
!CONFIG_DRM_XE_GPUSVM and !CONFIG_DRM_XE_DEVMEM_MIRROR
Signed-off-by: Thomas Hellström
---
driver
hem:
> > Acked-by: Dave Airlie
> >
> > Dave.
> >
> > On Tue, 25 Feb 2025 at 18:44, Thomas Hellström
> > wrote:
> > > Hi, Christian,
> > >
> > > Ping? I'd really want to get this in before -rc6
> > >
> > > T
to drm-misc-next yesterday.
/Thomas
>
> On Tue, 25 Feb 2025 at 18:44, Thomas Hellström
> wrote:
> >
> > Hi, Christian,
> >
> > Ping? I'd really want to get this in before -rc6
> >
> > Thanks,
> > Thomas
> >
> >
> >
doc (Thomas)
> - Newline between function defs (Thomas)
> v5:
> - Kernel doc (Thomas)
> v6:
> - Only compile if CONFIG_DRM_GPUSVM selected (CI, Lucas)
>
> Signed-off-by: Matthew Brost
> Reviewed-by: Himal Prasad Ghimiray
Reviewed-by: Thomas Hellström
> ---
> dr
_GPUVA_OP_DRIVER (Thomas)
> v5:
> - Kernel doc (Thomas)
> v6:
> - Only compile if CONFIG_DRM_GPUSVM selected (CI, Lucas)
>
> Signed-off-by: Thomas Hellström
> Signed-off-by: Matthew Brost
This LGTM but since I'm a co-author to some of the code, we'd need an
ad
1 - 100 of 1656 matches
Mail list logo