All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matthew Brost <matthew.brost@intel.com>
To: Arvind Yadav <arvind.yadav@intel.com>
Cc: <intel-xe@lists.freedesktop.org>,
	<himal.prasad.ghimiray@intel.com>,
	<thomas.hellstrom@linux.intel.com>
Subject: Re: [PATCH] drm/xe: Reject page faults from non-fault-mode scratch VMs
Date: Fri, 21 Aug 2026 14:07:19 -0700	[thread overview]
Message-ID: <aoi+BzuiZE0NLr89@gsse-cloud1.jf.intel.com> (raw)
In-Reply-To: <20260820065445.567228-1-arvind.yadav@intel.com>

On Thu, Aug 20, 2026 at 12:24:45PM +0530, Arvind Yadav wrote:
> Having scratch enabled does not make a VM capable of handling recoverable
> page faults. Allowing scratch VMs through the ASID lookup also admits
> dma-fence mode VMs.
> 
> If such a VM faults on an already valid VMA, the handler reports success
> without fixing the fault, causing the GPU to retry indefinitely.
> 
> Only allow fault-mode VMs through the ASID lookup. Fault-mode VMs using
> scratch remain supported, while faults from 3D VMs are rejected.
> 
> Fixes: ad9843aac91a ("drm/xe/madvise: Implement purgeable buffer object support")
> Cc: Matthew Brost <matthew.brost@intel.com>

Reviewed-by: Matthew Brost <matthew.brost@intel.com>

> Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com>
> Cc: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com>
> Suggested-by: Matthew Brost <matthew.brost@intel.com>
> Signed-off-by: Arvind Yadav <arvind.yadav@intel.com>
> ---
>  drivers/gpu/drm/xe/xe_pagefault.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/xe/xe_pagefault.c b/drivers/gpu/drm/xe/xe_pagefault.c
> index b2d7bca9e407..19cc7c59bec4 100644
> --- a/drivers/gpu/drm/xe/xe_pagefault.c
> +++ b/drivers/gpu/drm/xe/xe_pagefault.c
> @@ -234,7 +234,7 @@ static struct xe_vm *xe_pagefault_asid_to_vm(struct xe_device *xe, u32 asid)
>  
>  	down_read(&xe->usm.lock);
>  	vm = xa_load(&xe->usm.asid_to_vm, asid);
> -	if (vm && (xe_vm_in_fault_mode(vm) || xe_vm_has_scratch(vm)))
> +	if (vm && xe_vm_in_fault_mode(vm))
>  		xe_vm_get(vm);
>  	else
>  		vm = ERR_PTR(-EINVAL);
> -- 
> 2.43.0
> 

      parent reply	other threads:[~2026-08-21 21:07 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-20  6:54 [PATCH] drm/xe: Reject page faults from non-fault-mode scratch VMs Arvind Yadav
2026-08-20  7:01 ` ✓ CI.KUnit: success for " Patchwork
2026-08-20  7:43 ` ✓ Xe.CI.BAT: " Patchwork
2026-08-20  8:48 ` ✓ Xe.CI.FULL: " Patchwork
2026-08-21 21:07 ` Matthew Brost [this message]

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=aoi+BzuiZE0NLr89@gsse-cloud1.jf.intel.com \
    --to=matthew.brost@intel.com \
    --cc=arvind.yadav@intel.com \
    --cc=himal.prasad.ghimiray@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=thomas.hellstrom@linux.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.