From: sashiko-bot@kernel.org
To: "Riana Tauro" <riana.tauro@intel.com>
Cc: intel-xe@lists.freedesktop.org
Subject: Re: [PATCH 2/2] drm/xe/xe_guc: Skip GuC reset post SBR
Date: Fri, 28 Aug 2026 11:44:35 +0000 [thread overview]
Message-ID: <20260828114436.221BA1F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260828113104.319843-6-riana.tauro@intel.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] Returning 0 from xe_guc_reset() when the device is in PCI reset falsely signals success, causing a racing GT reset worker to attempt massive MMIO access on a disconnected device.
--
commit cd9fc028eb46b88c6e7e520f4ef7e342f490d472
Author: Riana Tauro <riana.tauro@intel.com>
drm/xe/xe_guc: Skip GuC reset post SBR
Secondary Bus Reset causes VRAM and hardware state loss. This patch skips
GuC reset during teardown when the device is in PCI reset to avoid accessing
the device in an unknown state.
> diff --git a/drivers/gpu/drm/xe/xe_guc.c b/drivers/gpu/drm/xe/xe_guc.c
> index c7f8bbd4cb927..2c7f411b89a79 100644
> --- a/drivers/gpu/drm/xe/xe_guc.c
> +++ b/drivers/gpu/drm/xe/xe_guc.c
> @@ -986,6 +986,11 @@ int xe_guc_reset(struct xe_guc *guc)
> u32 guc_status, gdrst;
> int ret;
>
> + if (xe_device_is_in_reset(gt_to_xe(gt))) {
> + xe_gt_dbg(gt, "Skipping GuC reset, device is in reset\n");
> + return 0;
> + }
> +
[Severity: High]
Could returning 0 here falsely signal a successful reset to callers?
When a GT reset worker (like do_gt_restart) races with a PCI error handler,
the worker might pass its initial reset checks before the PCI handler sets
the in_reset flag. If the worker then reaches xe_guc_reset() and receives 0
(success) because the device is in reset, it appears to proceed with MMIO
initialization (via xe_uc_load_hw()).
Since the device is disconnected or undergoing a Secondary Bus Reset,
would this lead to unintentional and extensive MMIO accesses, potentially
causing PCIe bus hangs, AER cascades, and multi-second thread hangs in
guc_wait_ucode()? Would returning an error code (like -ENODEV) safely abort
the racing GT reset worker while still being handled gracefully by teardown
paths like guc_fini_hw()?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260828113104.319843-4-riana.tauro@intel.com?part=2
next prev parent reply other threads:[~2026-08-28 11:44 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-28 11:31 [PATCH 0/2] Xe Pci error handling fixes Riana Tauro
2026-08-28 11:31 ` [PATCH 1/2] drm/xe/xe_pci_error: Wait for pcode init post SBR Riana Tauro
2026-08-28 11:41 ` sashiko-bot
2026-08-28 14:06 ` Gupta, Anshuman
2026-08-29 14:00 ` Raag Jadav
2026-08-31 12:32 ` Aravind Iddamsetty
2026-09-03 12:53 ` Gupta, Anshuman
2026-08-28 11:31 ` [PATCH 2/2] drm/xe/xe_guc: Skip GuC reset " Riana Tauro
2026-08-28 11:44 ` sashiko-bot [this message]
2026-09-03 16:34 ` Teres Alexis, Alan Previn
2026-08-28 11:38 ` ✓ CI.KUnit: success for Xe Pci error handling fixes Patchwork
2026-08-28 12:21 ` ✓ Xe.CI.BAT: " Patchwork
2026-08-28 13:30 ` ✓ Xe.CI.FULL: " 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=20260828114436.221BA1F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=riana.tauro@intel.com \
--cc=sashiko-reviews@lists.linux.dev \
/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