]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
drm/xe/svm: Ensure data will be migrated to system if indicated by madvise.
authorThomas Hellström <thomas.hellstrom@linux.intel.com>
Fri, 10 Oct 2025 10:41:48 +0000 (12:41 +0200)
committerThomas Hellström <thomas.hellstrom@linux.intel.com>
Tue, 14 Oct 2025 11:11:16 +0000 (13:11 +0200)
commit2cfcea7a745794f9b8e265a309717ca6ba335fc4
treeeb4e39421f393ace22a9f067b2cfe8c45f7a10d0
parentbb3d208250424ef25d34f2f05f18f094e5cebfa5
drm/xe/svm: Ensure data will be migrated to system if indicated by madvise.

If the location madvise() is set to
DRM_XE_PREFERRED_LOC_DEFAULT_SYSTEM, the drm_pagemap in the
SVM gpu fault handler will be set to NULL. However there is nothing
that explicitly migrates the data to system if it is already present
in device memory.

In that case, set the device memory owner to NULL to ensure
data gets properly migrated to system on page-fault.

v2:
- Remove redundant dpagemap assignment (Himal Prasad Ghimiray)

Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Reviewed-by: Matthew Brost <matthew.brost@intel.com> #v1
Reviewed-by: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com>
Link: https://lore.kernel.org/r/20251010104149.72783-2-thomas.hellstrom@linux.intel.com
Fixes: 10aa5c806030 ("drm/gpusvm, drm/xe: Fix userptr to not allow device private pages")
drivers/gpu/drm/xe/xe_svm.c