From: sashiko-bot@kernel.org
To: "Soham Purkait" <soham.purkait@intel.com>,
intel-xe@lists.freedesktop.org
Subject: Re: [PATCH v2 2/2] drm/xe/ras: Wedge device if page offline list is full at probe
Date: Thu, 26 Nov 2026 13:04:30 +0000 [thread overview]
Message-ID: <sashiko-outbox-235555@kernel.org> (raw)
In-Reply-To: <20261126124310.2187015-6-soham.purkait@intel.com>
Thank you for your contribution! Sashiko AI review found 3 potential
issues to consider:
- [High] drm/xe/ras: failing xe_ras_init() when wedged breaks uevent and
survivability
- [High] drm/xe/ras: xe_ras_init() drains firmware queues after
get_offline_list() wedges
- [Medium] drm/xe/ras: process_offline_pages() wedges when page
offlining is disabled
--
commit 5b8e982f9fdf2b8f109d3d2ea5883f110981be63
Author: Soham Purkait <soham.purkait@intel.com>
drm/xe/ras: Wedge device if page offline list is full at probe
This commit declares the device wedged in process_offline_pages() when the
firmware page offline list has reached its maximum capacity, and fails
xe_ras_init() with -ECANCELED if the device is wedged.
> diff --git a/drivers/gpu/drm/xe/xe_ras.c b/drivers/gpu/drm/xe/xe_ras.c
> index 7545144126941..1bb4d53db3d88 100644
> --- a/drivers/gpu/drm/xe/xe_ras.c
> +++ b/drivers/gpu/drm/xe/xe_ras.c
> @@ -487,6 +487,11 @@ static void process_offline_pages(struct xe_device *xe, u32 cmd, void *req, size
> return;
> }
> } while (common->additional_data);
> +
> + if (!xe_wedged(xe) && list_req && state->max_pages && total_pages >= state->max_pages) {
> + xe_err(xe, "[RAS]: page offline list is full\n");
> + xe_wedge_declare(xe, 0);
> + }
> }
>
> /*
[Severity: Medium]
Should this check skip wedging when xe_ras_get_disable_vram_page_offline(xe)
is true?
When disable_vram_page_offline is enabled in configfs, handle_page_offline()
bypasses page offlining and sends XE_RAS_PAGE_ACTION_REMOVE instead of
offlining additional pages in firmware. Wedging here still fails probe on a
device whose firmware offline list is already full, even though page
offlining has been disabled by user policy.
> @@ -1361,5 +1366,8 @@ int xe_ras_init(struct xe_device *xe)
> if (ret)
> return ret;
>
> + if (xe_wedged(xe))
> + return -ECANCELED;
> +
> return xe_cper_sysfs_init(xe);
> }
[Severity: High]
Does returning -ECANCELED from xe_ras_init() when xe_wedged(xe) is true
break runtime survivability mode and the wedged uevent?
xe_ras_init() runs in xe_device_probe() before drm_dev_register(). Because
this check is placed after xe_ras_process_errors(), any error handler that
wedges the device during probe now aborts probe and triggers devres teardown:
drivers/gpu/drm/xe/xe_ras.c:handle_soc_internal_errors() {
...
if (csc_error->hec_fw_error) {
xe_log_comp_fatal(xe, SOC_INTERNAL, &arr->counter, sizeof(arr->counter),
"CSC error detected: 0x%08x\n", csc_error->hec_fw_error);
xe_survivability_mode_runtime_enable(xe);
return XE_RAS_RECOVERY_ACTION_DISCONNECT;
}
...
}
Unlike boot survivability, __xe_pci_probe() does not intercept probe failure
for runtime survivability, so returning -ECANCELED immediately removes the
survivability sysfs files via xe_survivability_mode_fini() and runs a
Driver-FLR via xe_driver_flr_fini(). In addition, xe->wedged.work scheduled
by xe_wedge_declare() either gets canceled by disable_work_sync() in
xe_wedge_fini() before notifying userspace, or runs drm_dev_wedged_event()
on an unregistered drm_minor kdev before device_add().
[Severity: High]
When get_offline_list() wedges the device in xe_ras_init(), does continuing
through get_offline_queue() and xe_ras_process_errors() before checking
xe_wedged(xe) lose pending poison pages and error records?
In xe_ras_init(), get_offline_queue() soft-offlines queued pages in the
driver's volatile TTM VRAM manager and sends XE_RAS_PAGE_ACTION_REMOVE to
remove first-occurrence poison pages from the firmware's SRAM queue, and
xe_ras_process_errors() drains pending SoC error records via
XE_SYSCTRL_CMD_GET_SOC_ERROR. Returning -ECANCELED afterward tears down the
TTM VRAM manager's soft-offlined page reservations after those entries have
already been consumed from firmware.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261126124310.2187015-4-soham.purkait@intel.com?part=2
prev parent reply other threads:[~2026-11-26 13:04 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-26 12:43 [PATCH v2 0/2] Wedge device if page offline list is full Soham Purkait
2026-11-26 12:43 ` [PATCH v2 1/2] drm/xe/ras: Wedge device if page offline list is full during offlining Soham Purkait
2026-11-26 12:43 ` [PATCH v2 2/2] drm/xe/ras: Wedge device if page offline list is full at probe Soham Purkait
2026-11-26 13:04 ` sashiko-bot [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=sashiko-outbox-235555@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=sashiko-reviews@lists.linux.dev \
--cc=soham.purkait@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