From: "Mallesh, Koujalagi" <mallesh.koujalagi@intel.com>
To: "Nilawar, Badal" <badal.nilawar@intel.com>,
<intel-xe@lists.freedesktop.org>, <rodrigo.vivi@intel.com>,
<matthew.brost@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>
Subject: Re: [PATCH v4 5/6] drm/xe/log: Add software CPER information to KUnit output
Date: Wed, 18 Nov 2026 13:41:37 +0530 [thread overview]
Message-ID: <79c77074-2b72-41f3-b888-b678c03ecacf@intel.com> (raw)
In-Reply-To: <72fa0db6-8809-4cfe-82cb-c4dc03888a2d@intel.com>
[-- Attachment #1: Type: text/plain, Size: 3682 bytes --]
On 18-11-2026 01:03 pm, Nilawar, Badal wrote:
>
>
> On 12-11-2026 19:16, Mallesh Koujalagi wrote:
>> Display driver classification details for software CPER records
>
> Could we use “Print” instead of “Display” to avoid ambiguity with the
> display driver?
Sure!
>
>> in the fake CPER emitter used by KUnit tests.
>>
>> Cc: Badal Nilawar<badal.nilawar@intel.com>
>> Signed-off-by: Mallesh Koujalagi<mallesh.koujalagi@intel.com>
>> ---
>> drivers/gpu/drm/xe/tests/xe_log_kunit.c | 21 ++++++++++++++++++++-
>> 1 file changed, 20 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/xe/tests/xe_log_kunit.c b/drivers/gpu/drm/xe/tests/xe_log_kunit.c
>> index 56c36c8a08e1..08828ecc9098 100644
>> --- a/drivers/gpu/drm/xe/tests/xe_log_kunit.c
>> +++ b/drivers/gpu/drm/xe/tests/xe_log_kunit.c
>> @@ -6,11 +6,14 @@
>> #include <kunit/static_stub.h>
>> #include <kunit/test.h>
>> #include <kunit/test-bug.h>
>> +#include <linux/minmax.h>
>>
>> #include "tests/xe_kunit_helpers.h"
>> #include "tests/xe_pci_test.h"
>> +#include "xe_cper.h"
>> #include "xe_device.h"
>> #include "xe_log.h"
>> +#include "xe_ras_types.h"
>>
>> static void nop_dmesg_vprintk(struct pci_dev *pdev, int cper_sev, struct va_format *vaf)
>> {
>> @@ -43,6 +46,19 @@ static const char *location_type(u32 location)
>> location ? "?" : "";
>> }
>>
>> +static bool is_sw_cper(enum xe_sigid sigid)
>> +{
>> + return in_range(sigid, INTEL_SIGID_GPU_XE_SOFTWARE_START, INTEL_SIGID_BATCH);
>> +}
>> +
>> +static void fake_emit_sw_cper(int cper_sev, u32 component, u32 location, const void *data)
>> +{
>> + /* mirrors xe_cper_driver_error_class: full 16-bit component/tile, unconditional */
>> + pr_info("SW CPER CLASS=severity:%u component:%u tile:%u cause:%u\n",
>> + cper_sev, (u16)component, (u16)location,
>> + IS_ERR(data) ? (u32)-PTR_ERR(data) : 0);
>
> This only prints the driver error classification fields and doesn't
> actually emit a fake CPER record. Do we need to call this
> fake_emit_sw_cper()?
> I think this was introduced when CPER doesn't exist. Now does this
> test needed?
>
That will provide how Software CPER looks like, similarly we emitted h/w
CPER as well. We added fake_emit_sw_cper() function for consistency.
CPER SEV=1 SIGID=101 # software
CPER DEVICE=demo_cper.drm-kunit-mock-device
CPER ERR=-19 # -ENODEV
CPER MSG=00000000: 74 65 73 74 69 6e 67 20 73 6f 66 74 77 61 72 65
testing software
CPER MSG=00000010: 20 73 69 67 6e 61 74 75 72 65 0a
signature.
SW CPER CLASS=severity:1 component:0 tile:0 cause:19
CPER END
Thanks,
-/Mallesh
> Thanks,
> Badal
>
>> +}
>> +
>> static void fake_emit_cper(struct pci_dev *pdev, int cper_sev,
>> enum xe_sigid sigid, u32 component, u32 location,
>> const void *data, size_t len, struct va_format *vaf)
>> @@ -51,7 +67,8 @@ static void fake_emit_cper(struct pci_dev *pdev, int cper_sev,
>> int n;
>>
>> pr_info("\n");
>> - pr_info("CPER SEV=%u SIGID=%u\n", cper_sev, sigid);
>> + pr_info("CPER SEV=%u SIGID=%u \t# %s\n", cper_sev, sigid,
>> + is_sw_cper(sigid) ? "software" : "");
>> pr_info("CPER DEVICE=%s\n", dev_name(&pdev->dev));
>> if (location)
>> pr_info("CPER LOCATION=%#x \t# %s.%u\n",
>> @@ -68,6 +85,8 @@ static void fake_emit_cper(struct pci_dev *pdev, int cper_sev,
>>
>> n = vscnprintf(msg, sizeof(msg), vaf->fmt, *vaf->va);
>> print_hex_dump(KERN_INFO, "CPER MSG=", DUMP_PREFIX_OFFSET, 16, 1, msg, n, true);
>> + if (is_sw_cper(sigid))
>> + fake_emit_sw_cper(cper_sev, component, location, data);
>> pr_info("CPER END\n");
>> }
>>
[-- Attachment #2: Type: text/html, Size: 5901 bytes --]
next prev parent reply other threads:[~2026-11-18 8:12 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
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 [this message]
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=79c77074-2b72-41f3-b888-b678c03ecacf@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