Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Ravi Kishore Koppuravuri" <ravi.kishore.koppuravuri@intel.com>,
	intel-xe@lists.freedesktop.org
Subject: Re: [PATCH v1 1/1] drm/xe/xe_ras: Skip gpu_health sysfs commands during reset or wedged
Date: Thu, 19 Nov 2026 16:57:03 +0000	[thread overview]
Message-ID: <sashiko-outbox-223600@kernel.org> (raw)
In-Reply-To: <20261119163913.1760721-2-ravi.kishore.koppuravuri@intel.com>

Thank you for your contribution! Sashiko AI review found 2 potential
issues to consider:
- [Low] drm/xe/xe_ras: un-ratelimited xe_err() in gpu_health sysfs when
  wedged
- [Low] drm/xe/xe_ras: missing Fixes: trailer for gpu_health
  wedged/reset guard
--

commit 0948e71b1e312f40ff2a8325669e3afa172811c6
Author: Ravi Kishore Koppuravuri <ravi.kishore.koppuravuri@intel.com>

> drm/xe/xe_ras: Skip gpu_health sysfs commands during reset or wedged
>
> Accessing gpu_health sysfs attribute sends a command to the system
> controller. Add a guard to verify and skip if the device is wedged or in
> reset. It protects against touching the fw or device when it is not in
> usable state.
>
> Signed-off-by: Ravi Kishore Koppuravuri <ravi.kishore.koppuravuri@intel.com>

[Severity: Low]
Since this fixes accessing gpu_health while the device is wedged or in
reset, should this include a Fixes: tag?

  Fixes: 53a7115f9862 ("drm/xe/xe_ras: Add RAS GPU health indicator")

> diff --git a/drivers/gpu/drm/xe/xe_ras.c b/drivers/gpu/drm/xe/xe_ras.c
> index 2c01c183d02b1..e8e168d345532 100644
> --- a/drivers/gpu/drm/xe/xe_ras.c
> +++ b/drivers/gpu/drm/xe/xe_ras.c
> @@ -1116,6 +1116,12 @@ static ssize_t gpu_health_show(struct device *dev, struct device_attribute *attr
>  	size_t rlen;
>  	int ret;
>  
> +	if (xe_wedged(xe) || xe_device_is_in_reset(xe)) {
> +		xe_err(xe, "[RAS]: GPU is wedged or in reset\n");
> +		return -ECANCELED;
> +	}
> +
> +
>  	xe_sysctrl_create_command(&command, XE_SYSCTRL_GROUP_GFSP, XE_SYSCTRL_CMD_GET_HEALTH,
>  				  &request, sizeof(request), &response, sizeof(response));
>  	guard(xe_pm_runtime)(xe);
> @@ -1159,6 +1165,11 @@ static ssize_t gpu_health_store(struct device *dev, struct device_attribute *att
>  	if (state < 0)
>  		return -EINVAL;
>  
> +	if (xe_wedged(xe) || xe_device_is_in_reset(xe)) {
> +		xe_err(xe, "[RAS]: GPU is wedged or in reset\n");
> +		return -ECANCELED;
> +	}

[Severity: Low]
Should gpu_health_show() and gpu_health_store() avoid logging an
un-ratelimited xe_err() when the device is wedged or in reset?

Because gpu_health is world-readable (0644) and intended for polling by
monitoring tools, repeated reads while the GPU is wedged or resetting will
flood dmesg with error messages.  Using xe_dbg() or dropping the log line
would match other -ECANCELED wedged/reset checks in the driver.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261119163913.1760721-1-ravi.kishore.koppuravuri@intel.com?part=1

  reply	other threads:[~2026-11-19 16:57 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-19 16:39 [PATCH v1 0/1] drm/xe/xe_ras: Skip gpu_health sysfs commands during reset or wedged Ravi Kishore Koppuravuri
2026-11-19 16:39 ` [PATCH v1 1/1] " Ravi Kishore Koppuravuri
2026-11-19 16:57   ` sashiko-bot [this message]
2026-11-19 20:57 ` ✗ CI.checkpatch: warning for " Patchwork
2026-11-19 20:59 ` ✓ CI.KUnit: success " Patchwork
2026-11-19 21:37 ` ✓ 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-223600@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=ravi.kishore.koppuravuri@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