mirror-linux/include
Thomas Hellström 10aa5c8060 drm/gpusvm, drm/xe: Fix userptr to not allow device private pages
When userptr is used on SVM-enabled VMs, a non-NULL
hmm_range::dev_private_owner value might mean that
hmm_range_fault() attempts to return device private pages.
Either that will fail, or the userptr code will not know
how to handle those.

Use NULL for hmm_range::dev_private_owner to migrate
such pages to system. In order to do that, move the
struct drm_gpusvm::device_private_page_owner field to
struct drm_gpusvm_ctx::device_private_page_owner so that
it doesn't remain immutable over the drm_gpusvm lifetime.

v2:
- Don't conditionally compile xe_svm_devm_owner().
- Kerneldoc xe_svm_devm_owner().

Fixes: 9e97874148 ("drm/xe/userptr: replace xe_hmm with gpusvm")
Cc: Matthew Auld <matthew.auld@intel.com>
Cc: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com>
Cc: Matthew Brost <matthew.brost@intel.com>
Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Reviewed-by: Matthew Brost <matthew.brost@intel.com>
Acked-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Link: https://lore.kernel.org/r/20250930122752.96034-1-thomas.hellstrom@linux.intel.com
(cherry picked from commit ad298d9ec9)
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
2025-10-02 21:57:52 -07:00
..
acpi mailbox/pcc: support mailbox management of the shared buffer 2025-08-07 23:49:56 -05:00
asm-generic Deferred unwind changes for 6.17 2025-08-01 09:46:24 -07:00
clocksource
crypto This push fixes a regression that breaks hmac(sha3-224-s390). 2025-08-09 07:26:19 +03:00
cxl
drm drm/gpusvm, drm/xe: Fix userptr to not allow device private pages 2025-10-02 21:57:52 -07:00
dt-bindings Pin control changes for v6.17 2025-08-02 12:07:09 -07:00
hyperv
keys
kunit
kvm
linux accel/habanalabs: add HL_GET_P_STATE passthrough type 2025-09-25 09:09:31 +03:00
math-emu
media
memory
misc
net netfilter: nf_tables: make nft_set_do_lookup available unconditionally 2025-09-10 20:30:37 +02:00
pcmcia pcmcia: remove PCCARD_IODYN 2025-08-16 15:37:47 +02:00
ras
rdma
rv
scsi
soc
sound ASoC: Fixes for v6.17 2025-08-21 09:02:28 +02:00
target
trace accel/habanalabs: fix typo in trace output (cms -> cmd) 2025-09-25 09:09:28 +03:00
uapi amd-drm-next-6.18-2025-09-19: 2025-09-22 08:45:51 +10:00
ufs
vdso
video drm/vesadrm: Support DRM_FORMAT_C8 2025-08-26 09:54:20 +02:00
xen Significant patch series in this pull request: 2025-08-03 16:23:09 -07:00
Kbuild