]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-client.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)
committerLucas De Marchi <lucas.demarchi@intel.com>
Tue, 21 Oct 2025 00:03:44 +0000 (17:03 -0700)
commitce831bffcef3d8f9691b5537d74ffa1b1256c017
tree28424071a5823df04905558ce56b0e544014d768
parent9a3c0d6834194b6e3cce4ffbb55f800c6cb58c86
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
(cherry picked from commit 59a2d3f38ab23cce4cd9f0c4a5e08fdfe9e67ae7)
Signed-off-by: Lucas De Marchi <lucas.demarchi@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