[PATCH v3 0/3] drm/xe: Userptr invalid page access fixes
Matthew Brost
matthew.brost at intel.com
Wed Mar 5 06:11:31 UTC 2025
On Tue, Mar 04, 2025 at 06:33:39PM +0100, Thomas Hellström wrote:
> Fix a number of potential invalid page-accesses by the userptr code.
>
> Patch 1:
> - Some coding style fixes.
> Patch 2:
> - Avoids invalid struct page accesses during userptr pinning.
> Patch 3:
> - Block xe device accesses on mmu_invalidation on the iommu level.
>
For the series:
Acked-by: Matthew Brost <matthew.brost at intel.com>
In the long term, I believe it would be beneficial if we could unify Xe userptr
with the DRM common GPU SVM get_pages/notifiers. This is really hard to get
right, and I think everything we have fixed here has already been correctly
handled in GPU SVM. It would also help other drivers getting userptr correct
going forward.
Matt
> v2:
> - Address review comments by Matt Auld
>
> Cc: Matthew Auld <matthew.auld at intel.com>
> Cc: Oak Zeng <oak.zeng at intel.com>
>
> Thomas Hellström (3):
> drm/xe/hmm: Style- and include fixes
> drm/xe/hmm: Don't dereference struct page pointers without notifier
> lock
> drm/xe/userptr: Unmap userptrs in the mmu notifier
>
> drivers/gpu/drm/xe/xe_hmm.c | 170 +++++++++++++++++++++++--------
> drivers/gpu/drm/xe/xe_hmm.h | 7 ++
> drivers/gpu/drm/xe/xe_vm.c | 4 +
> drivers/gpu/drm/xe/xe_vm_types.h | 4 +
> 4 files changed, 145 insertions(+), 40 deletions(-)
>
> --
> 2.48.1
>
More information about the Intel-xe
mailing list