]> Gentwo Git Trees - linux/.git/commit
drm/xe/userptr: replace xe_hmm with gpusvm
authorMatthew Auld <matthew.auld@intel.com>
Thu, 28 Aug 2025 14:24:38 +0000 (15:24 +0100)
committerMatthew Auld <matthew.auld@intel.com>
Fri, 5 Sep 2025 10:45:47 +0000 (11:45 +0100)
commit9e978741488261e117bb50e5dfcf8e4080990958
tree5baa3fac58f3da32d114cf042ce57bded200b410
parentdd25b995a2711cb135dba9af7670c6debeea7b04
drm/xe/userptr: replace xe_hmm with gpusvm

Goal here is cut over to gpusvm and remove xe_hmm, relying instead on
common code. The core facilities we need are get_pages(), unmap_pages()
and free_pages() for a given useptr range, plus a vm level notifier
lock, which is now provided by gpusvm.

v2:
  - Reuse the same SVM vm struct we use for full SVM, that way we can
    use the same lock (Matt B & Himal)
v3:
  - Re-use svm_init/fini for userptr.
v4:
  - Allow building xe without userptr if we are missing DRM_GPUSVM
    config. (Matt B)
  - Always make .read_only match xe_vma_read_only() for the ctx. (Dafna)
v5:
  - Fix missing conversion with CONFIG_DRM_XE_USERPTR_INVAL_INJECT
v6:
  - Convert the new user in xe_vm_madise.

Signed-off-by: Matthew Auld <matthew.auld@intel.com>
Cc: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com>
Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Cc: Dafna Hirschfeld <dafna.hirschfeld@intel.com>
Cc: Matthew Brost <matthew.brost@intel.com>
Reviewed-by: Matthew Brost <matthew.brost@intel.com>
Link: https://lore.kernel.org/r/20250828142430.615826-17-matthew.auld@intel.com
14 files changed:
drivers/gpu/drm/xe/Kconfig
drivers/gpu/drm/xe/Kconfig.debug
drivers/gpu/drm/xe/Makefile
drivers/gpu/drm/xe/xe_exec.c
drivers/gpu/drm/xe/xe_hmm.c [deleted file]
drivers/gpu/drm/xe/xe_hmm.h [deleted file]
drivers/gpu/drm/xe/xe_pt.c
drivers/gpu/drm/xe/xe_svm.c
drivers/gpu/drm/xe/xe_svm.h
drivers/gpu/drm/xe/xe_userptr.c
drivers/gpu/drm/xe/xe_userptr.h
drivers/gpu/drm/xe/xe_vm.c
drivers/gpu/drm/xe/xe_vm_madvise.c
drivers/gpu/drm/xe/xe_vm_types.h