Thread (56 messages) 56 messages, 9 authors, 2026-01-23

Re: [PATCH v2 04/11] mm/migrate_device: Add migrate PFN flag to track device private pages

From: Jordan Niethe <hidden>
Date: 2026-01-08 23:41:23
Also in: dri-devel, intel-xe, linux-mm, linuxppc-dev

Hi,

On 9/1/26 07:01, Felix Kuehling wrote:
quoted
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_migrate.c b/drivers/gpu/ 
drm/amd/amdkfd/kfd_migrate.c
index c493b19268cc..1a07a8b92e8f 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_migrate.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_migrate.c
@@ -206,7 +206,12 @@ svm_migrate_copy_done(struct amdgpu_device *adev, 
struct dma_fence *mfence)
  unsigned long
  svm_migrate_addr_to_mpfn(struct amdgpu_device *adev, unsigned long 
addr)
  {
-    return migrate_pfn((addr + adev->kfd.pgmap.range.start) >> 
PAGE_SHIFT);
+    unsigned long flags = 0;
+
+    if (!adev->gmc.xgmi.connected_to_cpu)
We could probably use adev->kfd.pgmap.type == MEMORY_DEVICE_PRIVATE 
here. This avoids making any assumptions about how KFD decides device 
page type it wants to use, which may change on future HW generations.

Other than that, this looks good to me.
That's a good point - I'll update.

Thanks for review,
Jordan.
Thanks,
   Felix
  
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help