From: sashiko-bot@kernel.org
To: "Riana Tauro" <riana.tauro@intel.com>, intel-xe@lists.freedesktop.org
Subject: Re: [PATCH v3 7/7] drm/xe/xe_ras: Skip double-bit ECC page offlining on AER path
Date: Tue, 03 Nov 2026 06:23:04 +0000 [thread overview]
Message-ID: <sashiko-outbox-194619@kernel.org> (raw)
In-Reply-To: <20261103060929.1586783-16-riana.tauro@intel.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] drm/xe/xe_ras: duplicate handle_page_offline() call on DB_ECC error path
--
commit 3c39adabce266f3b2fd96c271c13abe952fe58d0
Author: Riana Tauro <riana.tauro@intel.com>
drm/xe/xe_ras: Skip double-bit ECC page offlining on AER path
This commit skips double-bit ECC page offlining in
handle_device_memory_errors() when running on the AER path so pages are not
unnecessarily offlined and dropped from the firmware queue before a Secondary
Bus Reset clears them.
> diff --git a/drivers/gpu/drm/xe/xe_ras.c b/drivers/gpu/drm/xe/xe_ras.c
> index 1809c3c893dee..32aa376555bd5 100644
> --- a/drivers/gpu/drm/xe/xe_ras.c
> +++ b/drivers/gpu/drm/xe/xe_ras.c
> @@ -676,6 +676,23 @@ static u8 handle_device_memory_errors(struct xe_device *xe, struct xe_ras_error_
> info->sw_address);
> /*
> * Double-bit ECC errors are non-fatal errors and are reported via IRQ.
> + * On a race between AER for device fatal errors and non-fatal double-bit ECC
> + * errors, if AER pci error handlers execute first it will get all errors as
> + * a single response from system controller, which can include the double-bit
> + * ECC errors. This leads to unnecessary offlining of pages, since an SBR clears
> + * them on reload and firmware drops them from its queue once read.
> + * Skip handling of double-bit ECC errors on the AER path to avoid this.
> + *
> + * TODO: Remove this check once AER handling is optimized to retain soft
> + * offlined pages.
> + */
> + if (xe_ras_is_aer_internal_error(xe)) {
> + xe_info(xe, "[RAS]: Skipping double-bit ECC error handling on AER path\n");
> + break;
> + }
> +
> + ret = handle_page_offline(xe, info->sw_address, true);
[Severity: High]
Was the existing call to handle_page_offline() above xe_log_comp() in
handle_device_memory_errors() meant to be removed or moved here?
drivers/gpu/drm/xe/xe_ras.c:handle_device_memory_errors() {
...
case XE_RAS_MEMORY_DB_ECC:
ret = handle_page_offline(xe, info->sw_address, true);
xe_log_comp(xe, ret ? cper_sev : CPER_SEV_INFORMATIONAL,
DEVICE_MEMORY, &arr->counter, sizeof(arr->counter),
"Double-bit ECC error detected at sw address 0x%llx\n",
info->sw_address);
...
if (xe_ras_is_aer_internal_error(xe)) {
xe_info(xe, "[RAS]: Skipping double-bit ECC error handling on AER path\n");
break;
}
ret = handle_page_offline(xe, info->sw_address, true);
...
}
Because the earlier handle_page_offline() call is still present before the
xe_ras_is_aer_internal_error() check, the AER path still soft-offlines the
page and sends the page offline command to firmware before breaking out.
On the normal non-AER IRQ path, handle_page_offline() is now called twice in
a row for the same info->sw_address. When the first call soft-offlines a page
on its first error occurrence, the immediate second call sees -EEXIST from
xe_ttm_vram_handle_addr_fault():
drivers/gpu/drm/xe/xe_ras.c:handle_page_offline() {
...
case -EEXIST:
if (xa_load(&state->offlined_pages, page_address >> XE_PTE_SHIFT))
action = XE_RAS_PAGE_ACTION_REMOVE;
else
action = XE_RAS_PAGE_ACTION_OFFLINE;
...
}
Wouldn't this cause the second call to treat a single first-occurrence ECC
error as a second occurrence and request XE_RAS_PAGE_ACTION_OFFLINE (or fail
in send_page_offline_cmd() and wedge the device)?
Also, note that xe_log_comp() evaluates ret ? cper_sev :
CPER_SEV_INFORMATIONAL, so if the first handle_page_offline() call is
removed, xe_log_comp() would either need to be moved after
handle_page_offline() or updated so it does not use an uninitialized ret.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261103060929.1586783-9-riana.tauro@intel.com?part=7
next prev parent reply other threads:[~2026-11-03 6:23 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-03 6:09 [PATCH v3 0/7] Handle non-fatal errors routed via IRQ Riana Tauro
2026-11-03 6:09 ` [PATCH v3 1/7] drm/xe/hw_error: Reuse CSC worker for generic error handling Riana Tauro
2026-11-03 6:27 ` Mallesh, Koujalagi
2026-11-03 6:09 ` [PATCH v3 2/7] drm/xe/hw_error: Initialize hw_error_work per tile Riana Tauro
2026-11-03 6:23 ` sashiko-bot
2026-11-03 6:42 ` Tauro, Riana
2026-11-04 9:31 ` Mallesh, Koujalagi
2026-11-04 12:58 ` Tauro, Riana
2026-11-03 6:09 ` [PATCH v3 3/7] drm/xe/ras: Treat non-fatal PCIe errors as recovered Riana Tauro
2026-11-03 6:19 ` Mallesh, Koujalagi
2026-11-03 6:09 ` [PATCH v3 4/7] drm/xe/pci: Add upstream switch port lookup helper Riana Tauro
2026-11-03 6:09 ` [PATCH v3 5/7] drm/xe/xe_ras: Add a flag for uncorrectable internal error Riana Tauro
2026-11-03 8:19 ` Mallesh, Koujalagi
2026-11-03 6:09 ` [PATCH v3 6/7] drm/xe: Add support for wa_14028434957 Riana Tauro
2026-11-03 6:33 ` sashiko-bot
2026-11-03 6:45 ` Tauro, Riana
2026-11-04 10:38 ` Mallesh, Koujalagi
2026-11-04 10:44 ` Tauro, Riana
2026-11-03 6:09 ` [PATCH v3 7/7] drm/xe/xe_ras: Skip double-bit ECC page offlining on AER path Riana Tauro
2026-11-03 6:23 ` sashiko-bot [this message]
2026-11-03 7:32 ` ✓ CI.KUnit: success for Handle non-fatal errors routed via IRQ (rev3) Patchwork
2026-11-03 8:05 ` ✓ Xe.CI.BAT: " Patchwork
2026-11-03 13:34 ` ✓ 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=sashiko-outbox-194619@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