From: "Thomas Hellström" <thomas.hellstrom@linux.intel.com>
To: Matthew Brost <matthew.brost@intel.com>
Cc: intel-xe@lists.freedesktop.org,
Matthew Auld <matthew.auld@intel.com>,
Oak Zeng <oak.zeng@intel.com>
Subject: Re: [PATCH v3 0/3] drm/xe: Userptr invalid page access fixes
Date: Wed, 05 Mar 2025 13:51:06 +0100 [thread overview]
Message-ID: <fa7df4560cfbdc5372581bbeb0825479a06f1192.camel@linux.intel.com> (raw)
In-Reply-To: <Z8frE6L2styWTD2R@lstrano-desk.jf.intel.com>
On Tue, 2025-03-04 at 22:11 -0800, Matthew Brost wrote:
> 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@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.
I fully agree.
One thing Matt Auld brought up, though, is that the size of a page
(hmm_pfn_page_order()) may be larger than a range (userptr or SVM) and
cross the range start and range end. Do we address that problem in SVM?
Or perhaps it's not really a problem there.
/Thomas
>
> Matt
>
> > v2:
> > - Address review comments by Matt Auld
> >
> > Cc: Matthew Auld <matthew.auld@intel.com>
> > Cc: Oak Zeng <oak.zeng@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
> >
next prev parent reply other threads:[~2025-03-05 12:51 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-04 17:33 [PATCH v3 0/3] drm/xe: Userptr invalid page access fixes Thomas Hellström
2025-03-04 17:33 ` [PATCH v3 1/3] drm/xe/hmm: Style- and include fixes Thomas Hellström
2025-03-04 17:33 ` [PATCH v3 2/3] drm/xe/hmm: Don't dereference struct page pointers without notifier lock Thomas Hellström
2025-03-04 17:33 ` [PATCH v3 3/3] drm/xe/userptr: Unmap userptrs in the mmu notifier Thomas Hellström
2025-03-04 19:03 ` ✗ CI.Patch_applied: failure for drm/xe: Userptr invalid page access fixes (rev3) Patchwork
2025-03-05 6:11 ` [PATCH v3 0/3] drm/xe: Userptr invalid page access fixes Matthew Brost
2025-03-05 12:51 ` Thomas Hellström [this message]
2025-03-05 10:24 ` ✓ CI.Patch_applied: success for drm/xe: Userptr invalid page access fixes (rev4) Patchwork
2025-03-05 10:25 ` ✓ CI.checkpatch: " Patchwork
2025-03-05 10:26 ` ✓ CI.KUnit: " Patchwork
2025-03-05 10:42 ` ✓ CI.Build: " Patchwork
2025-03-05 10:45 ` ✓ CI.Hooks: " Patchwork
2025-03-05 10:46 ` ✓ CI.checksparse: " Patchwork
2025-03-05 11:07 ` ✓ Xe.CI.BAT: " Patchwork
2025-03-05 12:56 ` ✗ Xe.CI.Full: failure " Patchwork
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=fa7df4560cfbdc5372581bbeb0825479a06f1192.camel@linux.intel.com \
--to=thomas.hellstrom@linux.intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=matthew.auld@intel.com \
--cc=matthew.brost@intel.com \
--cc=oak.zeng@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox