mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git
synced 2026-10-31 14:23:49 +01:00
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 <[email protected]> Cc: Himal Prasad Ghimiray <[email protected]> Cc: Matthew Brost <[email protected]> Signed-off-by: Thomas Hellström <[email protected]> Reviewed-by: Matthew Auld <[email protected]> Reviewed-by: Matthew Brost <[email protected]> Acked-by: Maarten Lankhorst <[email protected]> Link: https://lore.kernel.org/r/[email protected] (cherry picked from commitad298d9ec9) Signed-off-by: Lucas De Marchi <[email protected]>