From: "Ghimiray, Himal Prasad" <himal.prasad.ghimiray@intel.com>
To: Matthew Brost <matthew.brost@intel.com>,
<intel-xe@lists.freedesktop.org>
Subject: Re: [PATCH] drm/xe: Do not run GPU page fault handler on a closed VM
Date: Wed, 11 Sep 2024 11:55:43 +0530 [thread overview]
Message-ID: <72fde079-f58f-48c3-89db-ece07469a790@intel.com> (raw)
In-Reply-To: <20240911011820.825127-1-matthew.brost@intel.com>
On 11-09-2024 06:48, Matthew Brost wrote:
> Closing a VM removes page table memory thus we shouldn't touch page
> tables when a VM is closed. Do not run the GPU page fault handler once
> the VM is closed to avoid touching page tables.
>
> Signed-off-by: Matthew Brost <matthew.brost@intel.com>
> ---
> drivers/gpu/drm/xe/xe_gt_pagefault.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/drivers/gpu/drm/xe/xe_gt_pagefault.c b/drivers/gpu/drm/xe/xe_gt_pagefault.c
> index 730eec07795e..00af059a8971 100644
> --- a/drivers/gpu/drm/xe/xe_gt_pagefault.c
> +++ b/drivers/gpu/drm/xe/xe_gt_pagefault.c
> @@ -212,6 +212,12 @@ static int handle_pagefault(struct xe_gt *gt, struct pagefault *pf)
> * TODO: Change to read lock? Using write lock for simplicity.
> */
> down_write(&vm->lock);
> +
> + if (xe_vm_is_closed(vm)) {
> + err = -ENOENT;
> + goto unlock_vm;
> + }
LGTM.
Reviewed-by: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com>
> +
> vma = lookup_vma(vm, pf->page_addr);
> if (!vma) {
> err = -EINVAL;
prev parent reply other threads:[~2024-09-11 6:25 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-11 1:18 [PATCH] drm/xe: Do not run GPU page fault handler on a closed VM Matthew Brost
2024-09-11 1:23 ` ✓ CI.Patch_applied: success for " Patchwork
2024-09-11 1:23 ` ✓ CI.checkpatch: " Patchwork
2024-09-11 1:24 ` ✓ CI.KUnit: " Patchwork
2024-09-11 1:36 ` ✓ CI.Build: " Patchwork
2024-09-11 1:39 ` ✓ CI.Hooks: " Patchwork
2024-09-11 1:40 ` ✓ CI.checksparse: " Patchwork
2024-09-11 2:23 ` ✓ CI.BAT: " Patchwork
2024-09-11 4:18 ` ✗ CI.FULL: failure " Patchwork
2024-09-11 6:25 ` Ghimiray, Himal Prasad [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=72fde079-f58f-48c3-89db-ece07469a790@intel.com \
--to=himal.prasad.ghimiray@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=matthew.brost@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