From: "Tauro, Riana" <riana.tauro@intel.com>
To: "Mallesh, Koujalagi" <mallesh.koujalagi@intel.com>,
"Upadhyay, Tejas" <tejas.upadhyay@intel.com>,
"intel-xe@lists.freedesktop.org" <intel-xe@lists.freedesktop.org>
Cc: "Gupta, Anshuman" <anshuman.gupta@intel.com>,
"Vivi, Rodrigo" <rodrigo.vivi@intel.com>,
"aravind.iddamsetty@linux.intel.com"
<aravind.iddamsetty@linux.intel.com>,
"Nilawar, Badal" <badal.nilawar@intel.com>,
"Jadav, Raag" <raag.jadav@intel.com>,
"Koppuravuri, Ravi Kishore" <ravi.kishore.koppuravuri@intel.com>
Subject: Re: [PATCH v2 4/9] drm/xe/xe_hw_error: Handle non-fatal errors routed via direct IRQ
Date: Thu, 29 Oct 2026 13:47:50 +0530 [thread overview]
Message-ID: <d39d725e-eeaa-4f7a-9a27-be440e388429@intel.com> (raw)
In-Reply-To: <2ba9e0c5-8555-4cd3-83db-6858c014c427@intel.com>
On 29-10-2026 12:06, Mallesh, Koujalagi wrote:
>
> On 26-10-2026 07:38 pm, Tauro, Riana wrote:
>>
>> On 26-10-2026 16:19, Upadhyay, Tejas wrote:
>>>
>>>> -----Original Message-----
>>>> From: Tauro, Riana <riana.tauro@intel.com>
>>>> Sent: 26 October 2026 11:35
>>>> To: intel-xe@lists.freedesktop.org
>>>> Cc: Tauro, Riana <riana.tauro@intel.com>; Gupta, Anshuman
>>>> <anshuman.gupta@intel.com>; Vivi, Rodrigo <rodrigo.vivi@intel.com>;
>>>> aravind.iddamsetty@linux.intel.com; Nilawar, Badal
>>>> <badal.nilawar@intel.com>; Jadav, Raag <raag.jadav@intel.com>;
>>>> Koppuravuri, Ravi Kishore <ravi.kishore.koppuravuri@intel.com>;
>>>> Koujalagi,
>>>> Mallesh <mallesh.koujalagi@intel.com>; Upadhyay, Tejas
>>>> <tejas.upadhyay@intel.com>
>>>> Subject: [PATCH v2 4/9] drm/xe/xe_hw_error: Handle non-fatal errors
>>>> routed
>>>> via direct IRQ
>>>>
>>>> Process, log and recover non-fatal errors routed via direct IRQ.
>>>> Double-bit ecc errors belong to non-fatal error category and are
>>>> reported via
>>>> irq. For pages that belong to critical BO, wedge the device with
>>>> bus-reset as
>>>> the recovery action.
>>>>
>>>> Signed-off-by: Riana Tauro <riana.tauro@intel.com>
>>>> ---
>>>> drivers/gpu/drm/xe/xe_hw_error.c | 37
>>>> ++++++++++++++++++++++++++++----
>>>> drivers/gpu/drm/xe/xe_ras.c | 9 +++++++-
>>>> 2 files changed, 41 insertions(+), 5 deletions(-)
>>>>
>>>> diff --git a/drivers/gpu/drm/xe/xe_hw_error.c
>>>> b/drivers/gpu/drm/xe/xe_hw_error.c
>>>> index f7799c3c08aa..269ce6a19a80 100644
>>>> --- a/drivers/gpu/drm/xe/xe_hw_error.c
>>>> +++ b/drivers/gpu/drm/xe/xe_hw_error.c
>>>> @@ -5,6 +5,8 @@
>>>>
>>>> #include <linux/bitmap.h>
>>>>
>>>> +#include <generated/xe_device_wa_oob.h>
>>>> +
>>>> #include "regs/xe_gsc_regs.h"
>>>> #include "regs/xe_hw_error_regs.h"
>>>> #include "regs/xe_irq_regs.h"
>>>> @@ -15,7 +17,9 @@
>>>> #include "xe_hw_error.h"
>>>> #include "xe_mmio.h"
>>>> #include "xe_pm.h"
>>>> +#include "xe_ras.h"
>>>> #include "xe_survivability_mode.h"
>>>> +#include "xe_wa.h"
>>>>
>>>> #define GT_HW_ERROR_MAX_ERR_BITS 16
>>>> #define HEC_UNCORR_FW_ERR_BITS 4
>>>> @@ -166,12 +170,36 @@
>>>> static_assert(ARRAY_SIZE(pvc_master_local_nonfatal_err_reg) ==
>>>> XE_RAS_REG_SIZE);
>>>>
>>>> pvc_master_local_fatal_err_reg : \
>>>>
>>>> pvc_master_local_nonfatal_err_reg)
>>>>
>>>> +static const char *hw_err_to_str(const enum hardware_error hw_err) {
>>>> + switch (hw_err) {
>>>> + case HARDWARE_ERROR_CORRECTABLE:
>>>> + return "Correctable";
>>>> + case HARDWARE_ERROR_NONFATAL:
>>>> + return "Non-Fatal";
>>>> + case HARDWARE_ERROR_FATAL:
>>>> + return "Fatal";
>>>> + default:
>>>> + return "Unknown";
>>>> + }
>>>> +}
>>>> +
>>>> static void hw_error_work(struct work_struct *work) {
>>>> struct xe_tile *tile = container_of(work, typeof(*tile),
>>>> hw_error_work.work);
>>>> struct xe_device *xe = tile_to_xe(tile);
>>>>
>>>> guard(xe_pm_runtime)(xe);
>>>> +
>>>> + if (xe->info.has_sysctrl && XE_DEVICE_WA(xe, 14028434957)) {
>>> I think you should have all these in 1 patch for 14028434957
>>
>> I can combine 3 and 4. If i combine all usages, it would be
>> difficult to review.
>>
>> Thanks
>> Riana
>>
>>>
>>> Tejas
>>>> + /* If the device is in reset in AER path, skip processing
>>>> hardware errors */
>>>> + if (xe_device_is_in_reset(xe))
>>>> + return;
>>>> +
>>>> + xe_ras_process_errors(xe);
>>>> + return;
>>>> + }
>>>> +
>>>> xe_survivability_mode_runtime_enable(xe);
>>>> }
>>>>
>>>> @@ -433,12 +461,13 @@ static void hw_error_source_handler(struct
>>>> xe_tile
>>>> *tile, const enum hardware_er
>>>> return;
>>>>
>>>> /*
>>>> - * Hardware errors are reported through System Controller on the
>>>> platforms that
>>>> - * support it, and never routed as direct IRQ to SGUnit. So we
>>>> should
>>>> never be
>>>> - * here for those platforms.
>>>> + * Non fatal errors are routed as a direct IRQ on platforms
>>>> that support
>>>> + * system controller.
>>>> */
>>>> if (xe->info.has_sysctrl) {
>>>> - drm_err_ratelimited(&xe->drm, HW_ERR "Invalid error
>>>> routing\n");
>>>> + drm_err_ratelimited(&xe->drm, HW_ERR "%s %s reported\n",
>>>> hw_err_to_str(hw_err),
>>>> + severity_str);
>>>> + schedule_delayed_work(&tile->hw_error_work,
>>>> +msecs_to_jiffies(MSEC_PER_SEC));
>
> hmm, why we are scheduling hw_error_work worker after 1 sec, if we get
> AER before and after 1 sec, what is impact?
Its a best case scenario that if there is a non-fatal error which is
accompanied with a fatal at the same time. We will wait
for AER to get triggered to avoid unnecessary handling of non-fatal errors.
It is not guaranteed that we will see a AER in 1sec because even that
is a worker.
If we get AER when irq handling is in progress, it will wait for it to
complete before triggering a reset,
After 1sec is a same as normal scenario of irq followed by AER
Thanks
Riana
>
> Thanks,
>
> -/Mallesh
>
>>>> return;
>>>> }
>>>>
>>>> diff --git a/drivers/gpu/drm/xe/xe_ras.c
>>>> b/drivers/gpu/drm/xe/xe_ras.c index
>>>> db3cbc186a51..e6a0ee468b17 100644
>>>> --- a/drivers/gpu/drm/xe/xe_ras.c
>>>> +++ b/drivers/gpu/drm/xe/xe_ras.c
>>>> @@ -628,8 +628,15 @@ static u8 handle_device_memory_errors(struct
>>>> xe_device *xe, struct xe_ras_error_
>>>> break;
>>>> case XE_RAS_MEMORY_DB_ECC:
>>>> ret = handle_page_offline(xe, info->sw_address, true);
>>>> - if (ret)
>>>> + /*
>>>> + * Double-bit ECC errors are non-fatal errors and are
>>>> reported
>>>> via IRQ.
>>>> + * Wedge the device with a bus reset for errors that require
>>>> SBR to recover.
>>>> + * TODO: Trigger SBR using pci_reset_bus
>>>> + */
>>>> + if (ret) {
>>>> + xe_wedge_declare(xe,
>>>> DRM_WEDGE_RECOVERY_BUS_RESET);
>>>> return XE_RAS_RECOVERY_ACTION_RESET;
>>>> + }
>>>> break;
>>>> default:
>>>> return XE_RAS_RECOVERY_ACTION_RESET;
>>>> --
>>>> 2.47.1
next prev parent reply other threads:[~2026-10-29 8:18 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-26 6:04 [PATCH v2 0/9] Handle non-fatal errors routed via IRQ Riana Tauro
2026-10-26 6:05 ` [PATCH v2 1/9] drm/xe/hw_error: Reuse CSC worker for generic error handling Riana Tauro
2026-10-27 13:01 ` Mallesh, Koujalagi
2026-10-29 8:07 ` Tauro, Riana
2026-10-26 6:05 ` [PATCH v2 2/9] drm/xe/hw_error: Initialize hw_error_work per tile Riana Tauro
2026-10-26 9:37 ` sashiko-bot
2026-10-27 14:51 ` Mallesh, Koujalagi
2026-10-29 8:11 ` Tauro, Riana
2026-10-28 16:07 ` Andi Shyti
2026-10-26 6:05 ` [PATCH v2 3/9] drm/xe: Add wa_14028434957 to Graphics Version 35.11 Riana Tauro
2026-10-28 6:16 ` Mallesh, Koujalagi
2026-10-29 8:12 ` Tauro, Riana
2026-10-28 14:19 ` Gustavo Sousa
2026-10-29 8:32 ` Tauro, Riana
2026-10-26 6:05 ` [PATCH v2 4/9] drm/xe/xe_hw_error: Handle non-fatal errors routed via direct IRQ Riana Tauro
2026-10-26 10:09 ` sashiko-bot
2026-10-26 10:49 ` Upadhyay, Tejas
2026-10-26 14:08 ` Tauro, Riana
2026-10-29 6:36 ` Mallesh, Koujalagi
2026-10-29 8:17 ` Tauro, Riana [this message]
2026-10-28 16:15 ` Andi Shyti
2026-10-29 8:23 ` Tauro, Riana
2026-10-28 16:17 ` Andi Shyti
2026-10-29 8:20 ` Tauro, Riana
2026-10-26 6:05 ` [PATCH v2 5/9] drm/xe/ras: Treat non-fatal PCIe errors as recovered Riana Tauro
2026-10-28 9:24 ` Mallesh, Koujalagi
2026-10-29 8:27 ` Tauro, Riana
2026-10-26 6:05 ` [PATCH v2 6/9] drm/xe/pci: Add upstream switch port lookup helper Riana Tauro
2026-10-28 9:45 ` Mallesh, Koujalagi
2026-10-28 16:19 ` Andi Shyti
2026-10-29 8:28 ` Tauro, Riana
2026-10-26 6:05 ` [PATCH v2 7/9] drm/xe/xe_ras: Disable hw error worker when AER handling is in progress Riana Tauro
2026-10-26 10:32 ` sashiko-bot
2026-10-26 6:05 ` [PATCH v2 8/9] drm/xe/xe_ras: Trigger SBR for all device errors Riana Tauro
2026-10-28 16:25 ` Andi Shyti
2026-10-29 5:18 ` Mallesh, Koujalagi
2026-10-26 6:05 ` [PATCH v2 9/9] drm/xe/ras: Skip double-bit ECC page offlining on AER path Riana Tauro
2026-10-28 16:26 ` Andi Shyti
2026-10-29 5:25 ` Mallesh, Koujalagi
2026-10-26 6:30 ` ✓ CI.KUnit: success for Handle non-fatal errors routed via IRQ (rev2) Patchwork
2026-10-26 7:05 ` ✓ Xe.CI.BAT: " Patchwork
2026-10-26 8:55 ` ✗ Xe.CI.FULL: failure " 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=d39d725e-eeaa-4f7a-9a27-be440e388429@intel.com \
--to=riana.tauro@intel.com \
--cc=anshuman.gupta@intel.com \
--cc=aravind.iddamsetty@linux.intel.com \
--cc=badal.nilawar@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=mallesh.koujalagi@intel.com \
--cc=raag.jadav@intel.com \
--cc=ravi.kishore.koppuravuri@intel.com \
--cc=rodrigo.vivi@intel.com \
--cc=tejas.upadhyay@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