Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Riana Tauro" <riana.tauro@intel.com>, intel-xe@lists.freedesktop.org
Subject: Re: [PATCH v5 1/4] drm/xe/ras: Fail probe if the device is wedged
Date: Tue, 01 Dec 2026 10:06:21 +0000	[thread overview]
Message-ID: <sashiko-outbox-243034@kernel.org> (raw)
In-Reply-To: <20261201094549.3158286-7-riana.tauro@intel.com>

Thank you for your contribution! Sashiko AI review found 2 potential
issues to consider:
- [High] drm/xe/ras: failing probe in xe_ras_init() breaks wedge and
  survivability
- [Low] drm/xe/ras: contradictory comment in xe_ras_init() and Fixes tag
  mismatch
--

commit 030e0d12085cebf24ab059575d2d8f08044502e7
Author: Riana Tauro <riana.tauro@intel.com>

> drm/xe/ras: Fail probe if the device is wedged
>
> RAS error processing during probe may wedge the device when errors like
> Punit, CSC and Memory errors are reported.
> Stop initialization and fail probe for such errors.
>
> Fixes: 573f9e7ed1a9 ("drm/xe/xe_ras: Handle uncorrectable SoC Internal errors")
> Signed-off-by: Riana Tauro <riana.tauro@intel.com>

[Severity: Low]
Should the Fixes: tag point to 84474fbf9ae5 ("drm/xe/ras: Move
xe_ras_process_errors() to xe_ras") instead?  20bc4883c7c0 ("drm/xe/ras:
Fix boot-time ras error processing") had moved boot-time error processing
to the end of xe_device_probe(), and 84474fbf9ae5 ("drm/xe/ras: Move
xe_ras_process_errors() to xe_ras") moved xe_ras_process_errors() back
into xe_ras_init() in the middle of probe.

Also, the comment right above xe_ras_process_errors() in xe_ras_init()
still says that critical errors such as Punit and CSC are reported through
Pcode init failure rather than here, which contradicts the commit message
and the new comment below it:

drivers/gpu/drm/xe/xe_ras.c:xe_ras_init() {
	...
	/*
	 * During probe, process and log any errors detected by firmware while the driver was not
	 * loaded. Critical errors such as Punit and CSC are reported through Pcode init failure,
	 * causing the driver to enter survivability mode.
	 */
	xe_ras_process_errors(xe);
	...
}

> diff --git a/drivers/gpu/drm/xe/xe_ras.c b/drivers/gpu/drm/xe/xe_ras.c
> index 9b04be3405ca7..666b06b4bc008 100644
> --- a/drivers/gpu/drm/xe/xe_ras.c
> +++ b/drivers/gpu/drm/xe/xe_ras.c
> @@ -1515,6 +1515,10 @@ int xe_ras_init(struct xe_device *xe)
>  	 */
>  	xe_ras_process_errors(xe);
>  
> +	/* Fail probe if the device is already wedged due to errors */
> +	if (xe_wedged(xe))
> +		return -ENOTRECOVERABLE;

[Severity: High]
Does failing probe here undo the runtime survivability and wedge recovery
actions that xe_ras_process_errors() just set up?

When xe_ras_process_errors() handles a CSC firmware error,
handle_soc_internal_errors() calls xe_survivability_mode_runtime_enable(),
which creates devm-managed survivability sysfs attributes and calls
xe_wedge_declare(xe, DRM_WEDGE_RECOVERY_VENDOR).  Returning
-ENOTRECOVERABLE from xe_ras_init() aborts xe_device_probe() and causes
the driver core to run devres_release_all(), which immediately removes the
survivability sysfs files via xe_survivability_mode_fini() and leaves the
device unbound without initializing NVM or HECI GSC to flash the firmware.

For Punit, CSC, and memory errors alike, aborting probe in xe_ras_init()
also prevents drm_dev_register() from running and runs xe_wedge_fini() +
xe_driver_flr_fini() during devres teardown.  As a result, the DRM wedged
uevent queued by xe_wedge_declare() is cancelled before the primary DRM
minor device is registered, and xe_driver_flr_fini() issues an immediate
Driver-FLR (because xe_wedge_declare() sets xe->needs_flr_on_fini = true)
even when cold-reset recovery, vendor firmware flash, or no-reset wedge
mode was requested.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261201094549.3158286-6-riana.tauro@intel.com?part=1

  reply	other threads:[~2026-12-01 10:06 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-01  9:45 [PATCH v5 0/4] Handle sysctrl event for page offline full Riana Tauro
2026-12-01  9:45 ` [PATCH v5 1/4] drm/xe/ras: Fail probe if the device is wedged Riana Tauro
2026-12-01 10:06   ` sashiko-bot [this message]
2026-12-01  9:45 ` [PATCH v5 2/4] drm/xe/ras: Wedge for Critical BO page offline failures Riana Tauro
2026-12-01  9:45 ` [PATCH v5 3/4] drm/xe/sysctrl: Drain page offline queue on queue-full event Riana Tauro
2026-12-01  9:45 ` [PATCH v5 4/4] drm/xe/ras: Serialize RAS workers on an ordered workqueue Riana Tauro
2026-12-01 10:01   ` sashiko-bot
2026-12-01 10:11 ` ✓ CI.KUnit: success for Handle sysctrl event for page offline full (rev2) Patchwork
2026-12-01 10:49 ` ✓ Xe.CI.BAT: " 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=sashiko-outbox-243034@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