From: Michal Wajdeczko <michal.wajdeczko@intel.com>
To: "Mallesh, Koujalagi" <mallesh.koujalagi@intel.com>,
<intel-xe@lists.freedesktop.org>,
Jani Nikula <jani.nikula@intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Subject: Re: [PATCH v4 11/32] drm/xe/log: Index all SIGID printk messages
Date: Thu, 13 Aug 2026 15:29:14 +0200 [thread overview]
Message-ID: <c6ff4f5f-359f-4eec-9e60-f4953ece94a2@intel.com> (raw)
In-Reply-To: <e91dfe34-1e98-4f53-967b-a853a88427fb@intel.com>
On 8/13/2026 2:54 PM, Michal Wajdeczko wrote:
>
>
> On 8/13/2026 2:31 PM, Mallesh, Koujalagi wrote:
>>
>> On 13-08-2026 12:44 am, Michal Wajdeczko wrote:
>>> When CONFIG_PRINTK_INDEX is enabled, it is expected that all device
>>> level printk messages are indexed for audit. While usually this is
>>> done automatically behind the scenes when code is using regular
>>> dev_printk macros, since we are generating different dmesg messages
>>> inside xe_log_emit() based on the severity, component and location,
>>> we only get those entries in /sys/kernel/debug/printk/index/xe:
>>>
>>> <3> drivers/gpu/drm/xe/xe_log.c:142 log_dmesg_vprintk "%s %s: [drm] *ERROR* %pV"
>>> <6> drivers/gpu/drm/xe/xe_log.c:140 log_dmesg_vprintk "%s %s: [drm] %pV"
>>>
>>> Explicitly generate printk index using dev_printk_index_emit() with
>>> some generic prefix that includes the SIGID tag.
>>>
>>> Suggested-by: Jani Nikula <jani.nikula@intel.com>
>>> Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
>>> Cc: Jani Nikula <jani.nikula@intel.com>
>>> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
>>> ---
>>> drivers/gpu/drm/xe/xe_log.c | 8 ++++----
>>> drivers/gpu/drm/xe/xe_log.h | 14 +++++++++++---
>>> 2 files changed, 15 insertions(+), 7 deletions(-)
>>>
>>> diff --git a/drivers/gpu/drm/xe/xe_log.c b/drivers/gpu/drm/xe/xe_log.c
>>> index 0b423ed121cd..50a9b35e5b3e 100644
>>> --- a/drivers/gpu/drm/xe/xe_log.c
>>> +++ b/drivers/gpu/drm/xe/xe_log.c
>>> @@ -177,7 +177,7 @@ static void log_emit_dmesg(struct pci_dev *pdev, int cper_sev, enum xe_sigid sig
>>> }
>>> /**
>>> - * xe_log_emit() - Emit a structured SIGID log entry
>>> + * __xe_log_emit() - Emit a structured SIGID log entry
>>> * @pdev: the &pci_dev device
>>> * @cper_sev: CPER severity (CPER_SEV_FATAL, CPER_SEV_RECOVERABLE, ...)
>>> * @sigid: signature identifier, see &enum xe_sigid
>>> @@ -206,9 +206,9 @@ static void log_emit_dmesg(struct pci_dev *pdev, int cper_sev, enum xe_sigid sig
>>> * <3> xe 0000:03:00.0: [drm] *ERROR* SIGID=106 (-ETIMEDOUT) Engine 'rcs0' hung
>>> * <6> xe 0000:03:00.0: [drm] SIGID=103 In survivability mode
>>> */
>>> -void xe_log_emit(struct pci_dev *pdev, int cper_sev, enum xe_sigid sigid,
>>> - u32 component, u32 location, const void *data, size_t len,
>>> - const char *fmt, ...)
>>> +void __xe_log_emit(struct pci_dev *pdev, int cper_sev, enum xe_sigid sigid,
>>> + u32 component, u32 location, const void *data, size_t len,
>>> + const char *fmt, ...)
>>> {
>>> struct va_format vaf;
>>> va_list args;
>>> diff --git a/drivers/gpu/drm/xe/xe_log.h b/drivers/gpu/drm/xe/xe_log.h
>>> index 0928b0866617..53fe2bb7ddd3 100644
>>> --- a/drivers/gpu/drm/xe/xe_log.h
>>> +++ b/drivers/gpu/drm/xe/xe_log.h
>>> @@ -16,9 +16,17 @@
>>> struct pci_dev;
>>> __printf(8, 9)
>>> -void xe_log_emit(struct pci_dev *pdev, int cper_sev, enum xe_sigid sigid,
>>> - u32 component, u32 location, const void *data, size_t len,
>>> - const char *fmt, ...);
>>> +void __xe_log_emit(struct pci_dev *pdev, int cper_sev, enum xe_sigid sigid,
>>> + u32 component, u32 location, const void *data, size_t len,
>>> + const char *fmt, ...);
>>> +
>>> +#define __xe_log_emit_printk_index(fmt) \
>>> + dev_printk_index_emit(NULL, "[drm]%s SIGID=%u %s(%s)%s%s%s: " fmt);
>> We need to change format for a. error path b. blob path c. plain or info path right?
>
> well, that's not doable as final format/output depends on the
> severity and data value, which could be non-const at compile
> time, while printk-index requires this to emit right entry
>
> I can change that to a something more generic (and unfriendly), like:
>
> dev_printk_index_emit(NULL, "%sSIGID=%u %s" fmt);
>
> but that will catch and match all our outputs.
and this is how this will look like for current series:
$ sudo cat /sys/kernel/debug/printk/index/xe | grep SIGID
<3> drivers/gpu/drm/xe/xe_device.c:1481 xe_device_declare_wedged "%s %s: %s SIGID=%u %sDevice declared wedged!\n"
<3> drivers/gpu/drm/xe/xe_gt.c:977 gt_reset_worker "%s %s: %s SIGID=%u %sreset failed\n"
<6> drivers/gpu/drm/xe/xe_gt.c:968 gt_reset_worker "%s %s: %s SIGID=%u %sreset done\n"
<6> drivers/gpu/drm/xe/xe_gt.c:929 gt_reset_worker "%s %s: %s SIGID=%u %sreset started\n"
<3> drivers/gpu/drm/xe/xe_guc.c:1620 xe_guc_mmio_send_recv "%s %s: %s SIGID=%u %sMMIO request %#x: unexpected reply %#x\n"
<3> drivers/gpu/drm/xe/xe_guc.c:1612 xe_guc_mmio_send_recv "%s %s: %s SIGID=%u %sMMIO request %#x: failure %#x hint %#x\n"
<3> drivers/gpu/drm/xe/xe_guc.c:1556 xe_guc_mmio_send_recv "%s %s: %s SIGID=%u %sMMIO request %#x: no reply %#x\n"
<3> drivers/gpu/drm/xe/xe_guc.c:1546 xe_guc_mmio_send_recv "%s %s: %s SIGID=%u %sMMIO request %#x: lost, too many retries %u\n"
<3> drivers/gpu/drm/xe/xe_pagefault.c:631 xe_pagefault_queue_work "%s %s: %s SIGID=%u %sUnsuccessful response\n"
<3> drivers/gpu/drm/xe/xe_pagefault.c:332 xe_pagefault_queue_add "%s %s: %s SIGID=%u %sQueue full!\n"
<3> drivers/gpu/drm/xe/xe_pci.c:1181 xe_pci_probe "%s %s: %s SIGID=%u %sdriver loading failed for device '%04x'\n"
<6> drivers/gpu/drm/xe/xe_pci.c:1171 xe_pci_probe "%s %s: %s SIGID=%u %sdriver loading blocked for device '%04x'\n"
<3> drivers/gpu/drm/xe/xe_pci_error.c:102 xe_pci_error_slot_reset "%s %s: %s SIGID=%u %sCannot re-enable PCI device after reset\n"
<3> drivers/gpu/drm/xe/xe_pcode.c:321 xe_pcode_ready "%s %s: %s SIGID=%u %sinitialization timedout after %ld seconds\n"
<3> drivers/gpu/drm/xe/xe_pcode.c:221 xe_pcode_request "%s %s: %s SIGID=%u %stimeout, retrying with preemption disabled\n"
<3> drivers/gpu/drm/xe/xe_pcode.c:65 pcode_mailbox_status "%s %s: %s SIGID=%u %sMailbox failed: %s\n"
<6> drivers/gpu/drm/xe/xe_survivability_mode.c:440 log_survivability_info "%s %s: %s SIGID=%u %s%s: %#x\n"
<3> drivers/gpu/drm/xe/xe_survivability_mode.c:433 log_survivability_info "%s %s: %s SIGID=%u %sBoot Status: %s (%u)\n"
<6> drivers/gpu/drm/xe/xe_survivability_mode.c:422 xe_survivability_mode_runtime_enable "%s %s: %s SIGID=%u %sFirmware flash required!\n"
<6> drivers/gpu/drm/xe/xe_survivability_mode.c:417 xe_survivability_mode_runtime_enable "%s %s: %s SIGID=%u %sRuntime Mode enabled!\n"
<3> drivers/gpu/drm/xe/xe_survivability_mode.c:409 xe_survivability_mode_runtime_enable "%s %s: %s SIGID=%u %sRuntime Mode not supported!\n"
<3> drivers/gpu/drm/xe/xe_survivability_mode.c:344 enable_boot_survivability_mode "%s %s: %s SIGID=%u %sFailed to enable Boot Mode!\n"
<6> drivers/gpu/drm/xe/xe_survivability_mode.c:339 enable_boot_survivability_mode "%s %s: %s SIGID=%u %sBoot Mode enabled!\n"
<3> drivers/gpu/drm/xe/xe_survivability_mode.c:334 enable_boot_survivability_mode "%s %s: %s SIGID=%u %sBoot Mode enabled!\n"
<3> drivers/gpu/drm/xe/xe_survivability_mode.c:302 create_survivability_sysfs "%s %s: %s SIGID=%u %sFailed to create sysfs files!\n"
>
> @Jani, are you OK with that?
>
>>> +
>>> +#define xe_log_emit(pdev, sev, sig, comp, loc, data, len, fmt, args...) ({ \
>>> + __xe_log_emit_printk_index(fmt); \
>>> + __xe_log_emit((pdev), (sev), (sig), (comp), (loc), (data), (len), fmt, ##args); \
>>> +})
>>
>> nit: use do{} while (0)
>>
>> Reviewed-by: Mallesh Koujalagi <mallesh.koujalagi@intel.com>
>>
>>> #define xe_log_emit_fatal(pdev, sig, comp, loc, data, len, fmt, args...) \
>>> xe_log_emit((pdev), CPER_SEV_FATAL, (sig), (comp), (loc), \
>
next prev parent reply other threads:[~2026-08-13 13:29 UTC|newest]
Thread overview: 78+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-12 19:14 [PATCH v4 00/32] drm/xe: Add structured SIGID error logging infrastructure Michal Wajdeczko
2026-08-12 19:14 ` [PATCH v4 01/32] drm/xe: Introduce xe_any helpers Michal Wajdeczko
2026-08-12 19:29 ` sashiko-bot
2026-08-13 16:51 ` Rodrigo Vivi
2026-08-12 19:14 ` [PATCH v4 02/32] drm/xe/log: Add structured SIGID error logging infrastructure Michal Wajdeczko
2026-08-13 13:33 ` Mallesh, Koujalagi
2026-08-13 13:57 ` Michal Wajdeczko
2026-08-13 13:42 ` Nilawar, Badal
2026-08-13 19:00 ` Rodrigo Vivi
2026-08-13 18:51 ` Rodrigo Vivi
2026-08-12 19:14 ` [PATCH v4 03/32] drm/xe/log: Introduce structured component/location identifiers Michal Wajdeczko
2026-08-13 17:20 ` Rodrigo Vivi
2026-08-12 19:14 ` [PATCH v4 04/32] drm/xe/log: Add component/location decorations to dmesg Michal Wajdeczko
2026-08-12 19:14 ` [PATCH v4 05/32] drm/xe/log: Add SIGID log helpers for severity Michal Wajdeczko
2026-08-12 19:14 ` [PATCH v4 06/32] drm/xe/log: Add SIGID log helpers for location Michal Wajdeczko
2026-08-12 19:14 ` [PATCH v4 07/32] drm/xe/log: Add SIGID log helpers for location & severity Michal Wajdeczko
2026-08-12 19:14 ` [PATCH v4 08/32] drm/xe/log: Add SIGID log helpers for components Michal Wajdeczko
2026-08-12 19:14 ` [PATCH v4 09/32] drm/xe/log: Add SIGID log helpers for component & severity Michal Wajdeczko
2026-08-13 4:38 ` Mallesh, Koujalagi
2026-08-12 19:14 ` [PATCH v4 10/32] drm/xe/log: Add SIGID log helpers for errno-only Michal Wajdeczko
2026-08-12 19:14 ` [PATCH v4 11/32] drm/xe/log: Index all SIGID printk messages Michal Wajdeczko
2026-08-12 19:35 ` sashiko-bot
2026-08-13 12:31 ` Mallesh, Koujalagi
2026-08-13 12:54 ` Michal Wajdeczko
2026-08-13 13:29 ` Michal Wajdeczko [this message]
2026-08-12 19:14 ` [PATCH v4 12/32] drm/xe/log: Add hardware error signatures Michal Wajdeczko
2026-08-13 5:03 ` Mallesh, Koujalagi
2026-08-12 19:14 ` [PATCH v4 13/32] drm/xe/log: Extend components list with hardware items Michal Wajdeczko
2026-08-12 19:14 ` [PATCH v4 14/32] drm/xe/ras: Check RAS and LOG component definitions Michal Wajdeczko
2026-08-12 19:14 ` [PATCH v4 15/32] drm/xe/kunit: Setup driver data in the test device Michal Wajdeczko
2026-08-12 19:14 ` [PATCH v4 16/32] drm/xe/tests: Add Kunit tests for xe_log Michal Wajdeczko
2026-08-12 19:14 ` [PATCH v4 17/32] drm/xe/tests: Add kunit tests for xe_any Michal Wajdeczko
2026-08-12 19:14 ` [PATCH v4 18/32] drm/xe: Report 'probe blocked' error using SIGID Michal Wajdeczko
2026-08-13 6:26 ` Mallesh, Koujalagi
2026-08-12 19:14 ` [PATCH v4 19/32] drm/xe: Report all probe errors " Michal Wajdeczko
2026-08-13 6:50 ` Mallesh, Koujalagi
2026-08-13 9:12 ` Michal Wajdeczko
2026-08-13 9:58 ` Mallesh, Koujalagi
2026-08-13 10:09 ` Michal Wajdeczko
2026-08-12 19:14 ` [PATCH v4 20/32] drm/xe/survivability: Report 'boot status' " Michal Wajdeczko
2026-08-13 8:38 ` Mallesh, Koujalagi
2026-08-13 9:28 ` Michal Wajdeczko
2026-08-13 10:07 ` Mallesh, Koujalagi
2026-08-13 10:18 ` Michal Wajdeczko
2026-08-12 19:14 ` [PATCH v4 21/32] drm/xe/survivability: Report 'sysfs failure' error " Michal Wajdeczko
2026-08-13 8:54 ` Mallesh, Koujalagi
2026-08-12 19:14 ` [PATCH v4 22/32] drm/xe/survivability: Report 'Boot Mode enabled' status " Michal Wajdeczko
2026-08-13 10:52 ` Mallesh, Koujalagi
2026-08-13 11:01 ` Michal Wajdeczko
2026-08-12 19:14 ` [PATCH v4 23/32] drm/xe/survivability: Report 'Runtime " Michal Wajdeczko
2026-08-13 11:40 ` Mallesh, Koujalagi
2026-08-13 12:46 ` Michal Wajdeczko
2026-08-13 13:16 ` Mallesh, Koujalagi
2026-08-12 19:14 ` [PATCH v4 24/32] drm/xe: Report 'device wedged' errors " Michal Wajdeczko
2026-08-12 22:28 ` Rodrigo Vivi
2026-08-13 11:56 ` Mallesh, Koujalagi
2026-08-12 19:14 ` [PATCH v4 25/32] drm/xe/pcode: Report 'Mailbox failed' error " Michal Wajdeczko
2026-08-13 12:10 ` Bhadane, Dnyaneshwar
2026-08-13 12:35 ` Michal Wajdeczko
2026-08-12 19:14 ` [PATCH v4 26/32] drm/xe/pcode: Report 'timeout, retrying' " Michal Wajdeczko
2026-08-12 19:51 ` sashiko-bot
2026-08-13 16:46 ` Umesh Nerlige Ramappa
2026-08-13 18:42 ` Rodrigo Vivi
2026-08-12 19:14 ` [PATCH v4 27/32] drm/xe/pcode: Report 'initialization timedout' " Michal Wajdeczko
2026-08-12 19:49 ` sashiko-bot
2026-08-13 18:40 ` Rodrigo Vivi
2026-08-12 19:14 ` [PATCH v4 28/32] drm/xe/guc: Report 'GuC mmio' errors " Michal Wajdeczko
2026-08-12 19:14 ` [PATCH v4 29/32] drm/xe/gt: Report 'reset failed' " Michal Wajdeczko
2026-08-12 19:14 ` [PATCH v4 30/32] drm/xe/gt: Report 'Fault response' pagefault error " Michal Wajdeczko
2026-08-13 18:37 ` Rodrigo Vivi
2026-08-12 19:14 ` [PATCH v4 31/32] drm/xe/gt: Report 'Queue full' " Michal Wajdeczko
2026-08-13 17:25 ` Rodrigo Vivi
2026-08-12 19:14 ` [PATCH v4 32/32] drm/xe/pci: Report 'cannot re-enable' " Michal Wajdeczko
2026-08-13 17:21 ` Rodrigo Vivi
2026-08-12 19:22 ` ✗ CI.checkpatch: warning for drm/xe: Add structured SIGID error logging infrastructure (rev4) Patchwork
2026-08-12 19:24 ` ✓ CI.KUnit: success " Patchwork
2026-08-12 20:34 ` ✗ Xe.CI.BAT: failure " Patchwork
2026-08-13 2:47 ` ✗ 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=c6ff4f5f-359f-4eec-9e60-f4953ece94a2@intel.com \
--to=michal.wajdeczko@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=jani.nikula@intel.com \
--cc=mallesh.koujalagi@intel.com \
--cc=rodrigo.vivi@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.