]> Gentwo Git Trees - linux/.git/commit
drm/xe/uapi: Hide the madvise autoreset behind a VM_BIND flag
authorThomas Hellström <thomas.hellstrom@linux.intel.com>
Wed, 15 Oct 2025 17:07:26 +0000 (19:07 +0200)
committerThomas Hellström <thomas.hellstrom@linux.intel.com>
Fri, 17 Oct 2025 08:26:15 +0000 (10:26 +0200)
commit59a2d3f38ab23cce4cd9f0c4a5e08fdfe9e67ae7
tree88a933e45e939286d4d8543d54fb9af7a4671c66
parentb3af8658ec70f2196190c66103478352286aba3b
drm/xe/uapi: Hide the madvise autoreset behind a VM_BIND flag

The madvise implementation currently resets the SVM madvise if the
underlying CPU map is unmapped. This is in an attempt to mimic the
CPU madvise behaviour. However, it's not clear that this is a desired
behaviour since if the end app user relies on it for malloc()ed
objects or stack objects, it may not work as intended.

Instead of having the autoreset functionality being a direct
application-facing implicit UAPI, make the UMD explicitly choose
this behaviour if it wants to expose it by introducing
DRM_XE_VM_BIND_FLAG_MADVISE_AUTORESET, and add a semantics
description.

v2:
- Kerneldoc fixes. Fix a commit log message.

Fixes: a2eb8aec3ebe ("drm/xe: Reset VMA attributes to default in SVM garbage collector")
Cc: Matthew Brost <matthew.brost@intel.com>
Cc: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com>
Cc: "Falkowski, John" <john.falkowski@intel.com>
Cc: "Mrozek, Michal" <michal.mrozek@intel.com>
Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Reviewed-by: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com>
Link: https://lore.kernel.org/r/20251015170726.178685-2-thomas.hellstrom@linux.intel.com
drivers/gpu/drm/xe/xe_svm.c
drivers/gpu/drm/xe/xe_vm.c
drivers/gpu/drm/xe/xe_vm_types.h
include/uapi/drm/xe_drm.h