From: "Mallesh, Koujalagi" <mallesh.koujalagi@intel.com>
To: "Nilawar, Badal" <badal.nilawar@intel.com>
Cc: <anshuman.gupta@intel.com>, <vinay.belgaumkar@intel.com>,
<riana.tauro@intel.com>, <karthik.poosa@intel.com>,
<sk.anirban@intel.com>, <raag.jadav@intel.com>,
<aravind.iddamsetty@linux.intel.com>,
<jani.nikula@linux.intel.com>,
"intel-xe@lists.freedesktop.org" <intel-xe@lists.freedesktop.org>,
Rodrigo Vivi <rodrigo.vivi@intel.com>,
Matthew Brost <matthew.brost@intel.com>
Subject: Re: [PATCH v4 1/6] drm/xe/cper: Add software CPER emission entry point
Date: Tue, 17 Nov 2026 14:18:51 +0530 [thread overview]
Message-ID: <995b59c3-e985-464a-8917-f88c8b9abf02@intel.com> (raw)
In-Reply-To: <986988d2-acc0-4dac-a5d5-60d7d0fe5c82@intel.com>
[-- Attachment #1: Type: text/plain, Size: 5232 bytes --]
On 17-11-2026 01:00 pm, Nilawar, Badal wrote:
>
>
> On 12-11-2026 19:16, Mallesh Koujalagi wrote:
>> Add a software CPER emission handler for CRI SIGIDs.
>>
>> Keep hardware CPER handling unchanged and return early
>> when the Xe device is unavailable.
>
> I think no need to mention this explicitly.
>
hmm, ok
>> Cc: Badal Nilawar<badal.nilawar@intel.com>
>> Signed-off-by: Mallesh Koujalagi<mallesh.koujalagi@intel.com>
>> ---
>> v3:
>> - Handle early PCI probe where xe device is null. (Sashiko)
>>
>> v4:
>> - Add has_driver_cper flag. (Badal)
>> ---
>> drivers/gpu/drm/xe/xe_cper.c | 22 +++++++++++++++++++++-
>> drivers/gpu/drm/xe/xe_device_types.h | 2 ++
>> drivers/gpu/drm/xe/xe_pci.c | 2 ++
>> drivers/gpu/drm/xe/xe_pci_types.h | 1 +
>> 4 files changed, 26 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/xe/xe_cper.c b/drivers/gpu/drm/xe/xe_cper.c
>> index bb90030bcd2d..dd6d4251dd1d 100644
>> --- a/drivers/gpu/drm/xe/xe_cper.c
>> +++ b/drivers/gpu/drm/xe/xe_cper.c
>> @@ -32,6 +32,11 @@ static bool is_hw_sigid(enum xe_sigid sigid)
>> return in_range(sigid, INTEL_SIGID_GPU_XE_HARDWARE_START, INTEL_SIGID_BATCH);
>> }
>>
>> +static bool is_sw_sigid(enum xe_sigid sigid)
>> +{
>> + return in_range(sigid, INTEL_SIGID_GPU_XE_SOFTWARE_START, INTEL_SIGID_BATCH);
>> +}
>> +
>> /* CPER platform_id GUIDs (RFC 9562 UUIDv5) for each PCI device ID. */
>> static const struct xe_device_guid_entry xe_device_guids[] = {
>> { 0x674C, GUID_INIT(0x9046afe5, 0x9041, 0x5124,
>> @@ -240,6 +245,12 @@ static void cper_emit_hw_err(struct xe_device *xe, int cper_sev, enum xe_sigid s
>> xe_cper_emit_counter(xe, cper_sev, sigid, counter, &response);
>> }
>>
>> +static void cper_emit_sw_err(struct xe_device *xe, int cper_sev, enum xe_sigid sigid,
>> + u32 component, u32 location, const void *data,
>> + struct va_format *vaf)
>> +{
>> +}
>> +
>> /**
>> * xe_cper_emit() - Emit a CPER record for a SIGID log entry
>> * @xe: The &xe_device
>> @@ -268,12 +279,21 @@ void xe_cper_emit(struct xe_device *xe, int cper_sev, enum xe_sigid sigid,
>> u32 component, u32 location, const void *data, size_t len,
>> struct va_format *vaf)
>> {
>> + if (!xe)
>> + return;
>
> Add a TO DO to track a future enhancement to handle this using pdev
> instead of xe.
>
Ok, will update it like
/* TODO: Handle using pdev instead of xe */
>> +
>> if (is_hw_sigid(sigid) && !IS_ERR_OR_NULL(data)) {
>> cper_emit_hw_err(xe, cper_sev, sigid, data);
>> return;
>> }
>>
>> - /* TODO software CPER */
>> + if (xe->info.has_driver_cper) {
>> + if (is_sw_sigid(sigid) &&
>> + (cper_sev == CPER_SEV_RECOVERABLE ||
>> + cper_sev == CPER_SEV_FATAL))
>
> Nit: Severity check can fit on a single line.
>
Ok
>
> With comments addressed this is
>
> Reviewed-by: Badal Nilawar <badal.nilawar@intel.com>
>
Thanks Badal!
>
> Thanks,
> Badal
>
>> + cper_emit_sw_err(xe, cper_sev, sigid, component, location, data, vaf);
>> + return;
>> + }
>> }
>>
>> static ssize_t cper_on_query_show(struct device *dev, struct device_attribute *attr, char *buf)
>> diff --git a/drivers/gpu/drm/xe/xe_device_types.h b/drivers/gpu/drm/xe/xe_device_types.h
>> index 933f5d27aa62..d992ff8d2fc9 100644
>> --- a/drivers/gpu/drm/xe/xe_device_types.h
>> +++ b/drivers/gpu/drm/xe/xe_device_types.h
>> @@ -170,6 +170,8 @@ struct xe_device {
>> u8 has_device_atomics_on_smem:1;
>> /** @info.has_device_uid: Device supports unique 64-bit GPU SOC ID */
>> u8 has_device_uid:1;
>> + /** @info.has_driver_cper: Device supports driver-generated CPER records */
>> + u8 has_driver_cper:1;
>> /** @info.has_drm_ras: Device supports drm_ras (Reliability, Availability, Serviceability) */
>> u8 has_drm_ras:1;
>> /** @info.has_fan_control: Device supports fan control */
>> diff --git a/drivers/gpu/drm/xe/xe_pci.c b/drivers/gpu/drm/xe/xe_pci.c
>> index ce231069880a..c615eddb2abc 100644
>> --- a/drivers/gpu/drm/xe/xe_pci.c
>> +++ b/drivers/gpu/drm/xe/xe_pci.c
>> @@ -475,6 +475,7 @@ static const struct xe_device_desc cri_desc = {
>> .dma_mask_size = 52,
>> .has_display = false,
>> .has_device_uid = true,
>> + .has_driver_cper = true,
>> .has_drm_ras = true,
>> .has_flat_ccs = false,
>> .has_gsc_nvm = 1,
>> @@ -802,6 +803,7 @@ static int xe_info_init_early(struct xe_device *xe,
>> xe->info.is_dgfx = desc->is_dgfx;
>> xe->info.has_cached_pt = desc->has_cached_pt;
>> xe->info.has_device_uid = desc->has_device_uid;
>> + xe->info.has_driver_cper = desc->has_driver_cper;
>> xe->info.has_drm_ras = desc->has_drm_ras;
>> xe->info.has_fan_control = desc->has_fan_control;
>> xe->info.has_fixed_vram_channels = desc->has_fixed_vram_channels;
>> diff --git a/drivers/gpu/drm/xe/xe_pci_types.h b/drivers/gpu/drm/xe/xe_pci_types.h
>> index 74a6cd461b21..e7bf46ea729f 100644
>> --- a/drivers/gpu/drm/xe/xe_pci_types.h
>> +++ b/drivers/gpu/drm/xe/xe_pci_types.h
>> @@ -42,6 +42,7 @@ struct xe_device_desc {
>> u8 has_cached_pt:1;
>> u8 has_display:1;
>> u8 has_device_uid:1;
>> + u8 has_driver_cper:1;
>> u8 has_drm_ras:1;
>> u8 has_fan_control:1;
>> u8 has_fixed_vram_channels:1;
[-- Attachment #2: Type: text/html, Size: 7363 bytes --]
next prev parent reply other threads:[~2026-11-17 8:49 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-12 13:46 [PATCH v4 0/6] drm/xe/cper: Software (driver-detected) CPER error reporting Mallesh Koujalagi
2026-11-12 13:46 ` [PATCH v4 1/6] drm/xe/cper: Add software CPER emission entry point Mallesh Koujalagi
2026-11-17 7:30 ` Nilawar, Badal
2026-11-17 8:48 ` Mallesh, Koujalagi [this message]
2026-11-12 13:46 ` [PATCH v4 2/6] drm/xe/cper: Prepare CPER headers for software errors Mallesh Koujalagi
2026-11-17 5:49 ` Nilawar, Badal
2026-11-17 6:38 ` Mallesh, Koujalagi
2026-11-12 13:46 ` [PATCH v4 3/6] drm/xe/cper: Emit software CPER records Mallesh Koujalagi
2026-11-17 7:34 ` Nilawar, Badal
2026-11-17 12:38 ` Mallesh, Koujalagi
2026-11-12 13:46 ` [PATCH v4 4/6] drm/xe/cper: Make software CPER emission atomic-safe Mallesh Koujalagi
2026-11-12 13:46 ` [PATCH v4 5/6] drm/xe/log: Add software CPER information to KUnit output Mallesh Koujalagi
2026-11-18 7:33 ` Nilawar, Badal
2026-11-18 8:11 ` Mallesh, Koujalagi
2026-11-12 13:46 ` [PATCH v4 6/6] drm/xe/log: Test software CPER emission parameters Mallesh Koujalagi
2026-11-17 14:05 ` Nilawar, Badal
2026-11-12 14:21 ` ✓ CI.KUnit: success for drm/xe/cper: Software (driver-detected) CPER error reporting (rev4) Patchwork
2026-11-12 14:57 ` ✓ Xe.CI.BAT: " Patchwork
2026-11-12 23:17 ` ✓ 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=995b59c3-e985-464a-8917-f88c8b9abf02@intel.com \
--to=mallesh.koujalagi@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=jani.nikula@linux.intel.com \
--cc=karthik.poosa@intel.com \
--cc=matthew.brost@intel.com \
--cc=raag.jadav@intel.com \
--cc=riana.tauro@intel.com \
--cc=rodrigo.vivi@intel.com \
--cc=sk.anirban@intel.com \
--cc=vinay.belgaumkar@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