Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Nilawar, Badal" <badal.nilawar@intel.com>
To: Mallesh Koujalagi <mallesh.koujalagi@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 3/6] drm/xe/cper: Emit software CPER records
Date: Tue, 17 Nov 2026 13:04:21 +0530	[thread overview]
Message-ID: <55e3f454-bdba-4385-bcf2-be08de32e618@intel.com> (raw)
In-Reply-To: <20261112134636.1860446-11-mallesh.koujalagi@intel.com>


On 12-11-2026 19:16, Mallesh Koujalagi wrote:
> Emit CPER records for software SIGIDs and attach the
> formatted log message as record data.
>
> Cc: Badal Nilawar <badal.nilawar@intel.com>
> Signed-off-by: Mallesh Koujalagi <mallesh.koujalagi@intel.com>
> ---
> v4:
> - Emit complete message. (Badal/Aravind)
> ---
>   drivers/gpu/drm/xe/xe_cper.c       | 9 +++++++++
>   drivers/gpu/drm/xe/xe_cper_types.h | 4 ++++
>   2 files changed, 13 insertions(+)
>
> diff --git a/drivers/gpu/drm/xe/xe_cper.c b/drivers/gpu/drm/xe/xe_cper.c
> index b23f8bc9f993..5a776aa571d0 100644
> --- a/drivers/gpu/drm/xe/xe_cper.c
> +++ b/drivers/gpu/drm/xe/xe_cper.c
> @@ -258,7 +258,12 @@ static void cper_emit_sw_err(struct xe_device *xe, int cper_sev, enum xe_sigid s
>   	union xe_cper_error_class error_class = {};
>   	struct xe_cper_intel_hdr ihdr = {};
>   	struct xe_cper_driver_error_class *driver = &error_class.driver;
> +	char *msg = kvasprintf(GFP_KERNEL, vaf->fmt, *vaf->va);
move initialization closer to its use.
>   	u64 timestamp = ktime_get_real_ns();
> +	size_t msg_len;
> +
> +	if (!msg)
> +		return;
This silently drops CPER record if allocation fails, xe_warn here?
>   
>   	driver->error_type = cper_sev;
>   	driver->error_component = component;
> @@ -266,7 +271,11 @@ static void cper_emit_sw_err(struct xe_device *xe, int cper_sev, enum xe_sigid s
>   	if (IS_ERR(data))
>   		driver->cause = -PTR_ERR(data);
>   
> +	msg_len = strlen(msg) + 1;
> +
>   	cper_init_intel_hdr(xe, &error_class, timestamp, sigid, 1, &ihdr);
> +	cper_record_emit(xe, cper_sev, &INTEL_CPER_NOTIFY_DRV_ERROR, &ihdr, msg, msg_len);

if message allocation fails it is make sense to emit CPER record just 
with header?

Thanks,
Badal

> +	kfree(msg);
>   }
>   
>   /**
> diff --git a/drivers/gpu/drm/xe/xe_cper_types.h b/drivers/gpu/drm/xe/xe_cper_types.h
> index 8e90a3220919..0178a5521212 100644
> --- a/drivers/gpu/drm/xe/xe_cper_types.h
> +++ b/drivers/gpu/drm/xe/xe_cper_types.h
> @@ -40,6 +40,10 @@
>   	GUID_INIT(0x4ae12aef, 0x8745, 0x5fc7, \
>   		  0xb9, 0x96, 0x71, 0xee, 0xbb, 0x51, 0xf2, 0x23)
>   
> +#define INTEL_CPER_NOTIFY_DRV_ERROR \
> +	GUID_INIT(0xcef7e934, 0x51e7, 0x535f, \
> +		  0xa6, 0x78, 0x5a, 0x4c, 0xcc, 0xb6, 0x96, 0x09)
> +
>   /* Section Types */
>   #define INTEL_CPER_SECTION_ACCEL_GENERIC \
>   	GUID_INIT(0xea9d8f84, 0x4258, 0x5227, \

  reply	other threads:[~2026-11-17  7:34 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 [this message]
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=55e3f454-bdba-4385-bcf2-be08de32e618@intel.com \
    --to=badal.nilawar@intel.com \
    --cc=anshuman.gupta@intel.com \
    --cc=aravind.iddamsetty@linux.intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=jani.nikula@linux.intel.com \
    --cc=karthik.poosa@intel.com \
    --cc=mallesh.koujalagi@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