Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/19] drm/xe: Add structured SIGID error logging infrastructure
@ 2026-07-23 20:37 Michal Wajdeczko
  2026-07-23 20:37 ` [PATCH 01/19] drm/xe/log: " Michal Wajdeczko
                   ` (22 more replies)
  0 siblings, 23 replies; 37+ messages in thread
From: Michal Wajdeczko @ 2026-07-23 20:37 UTC (permalink / raw)
  To: intel-xe
  Cc: Michal Wajdeczko, Mallesh Koujalagi, Rodrigo Vivi,
	Thomas Hellström, Matthew Brost, Aravind Iddamsetty,
	Riana Tauro, Raag Jadav, Badal Nilawar

Today the driver reports faults with ad-hoc drm_err()/xe_gt_err()
strings that have no stable shape. That is readable for a human, but it
gives fleet tooling nothing durable to match on: the wording changes
between releases, lines can be rate-limited or dropped under an error
storm, and there is no consistent way to ask "which recognised fault
just happened?".

Introduce a signature identifier (SIGID): a small, stable integer that
names one recognised Xe fault situation and serves as the primary handle
for triage. A SIGID maps, through published end-user documentation, to a
description and a recommended action; the driver only has to emit the
right SIGID next to the usual human-readable text.

Design decisions:

 - Software-emitted signatures only. This header enumerates just the
   situations the driver detects and reports itself. Signatures that
   originate in firmware or hardware are identified by those layers (via
   their own records/counters) and are logged as received -- minting a
   driver-side id for them would duplicate an id the reporting layer
   already owns.

 - Flat catalogue, chosen per report site. Each site emits the single
   most specific situation for that site, so a multi-layer failure
   produces a chain of reports rather than one ambiguous classification
   (e.g. a failed GT reset reports GT_TDR and then WEDGED). A site that
   matches no defined situation keeps using ordinary xe_err() /
   xe_gt_err() rather than forcing a wrong id.

 - Stable numbering. A single flat list numbered sequentially from 1, in
   introduction order. Values are only ever appended, never renumbered
   or reused.

 - First-order action. Each SIGID carries a coarse, in-tree resolution
   bucket (COLLECT / RETRY / UPDATE / RECOVER) so it is actionable
   without an external reference, and so every new id must declare what
   to do about it.

 - Severity is decoupled from the SIGID and chosen at the call site via
   xe_ras_log_fatal() / _recoverable() / _info(); the same situation can
   be reported at different severities depending on the instance.

 - dmesg stays close to a normal xe error line by reusing xe_err() /
   xe_gt_err() (and their Tile/GT decoration); the only stable,
   machine-matchable token added is SIGID=<n>. dmesg is not an ABI --
   the durable machine record is the CPER carrying the same SIGID (a
   planned follow-up, left as a TODO).

Wire up a representative site for each software signature so the set is
exercised rather than merely declared:

 - PROBE: xe workqueue allocation failure during early init
 - WEDGED: xe_device_declare_wedged() (drop redundant "CRITICAL" + BDF)
 - SURVIVABILITY: entering boot survivability mode
 - RUNTIME_FW: GuC mmio request failure
 - DEVICE_FW: PCODE mailbox failure
 - GT_TDR: GT reset failure (which then chains into a WEDGED report)
 - MEM_FAULT: page-fault queue overflow
 - IO_BUS: PCI re-enable failure after a bus reset

Signed-off-by: Mallesh Koujalagi <mallesh.koujalagi@intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Cc: Matthew Brost <matthew.brost@intel.com>
Cc: Aravind Iddamsetty <aravind.iddamsetty@intel.com>
Cc: Riana Tauro <riana.tauro@intel.com>
Cc: Raag Jadav <raag.jadav@intel.com>
Cc: Badal Nilawar <badal.nilawar@intel.com>

Mallesh Koujalagi (1):
  drm/xe/log: Add structured SIGID error logging infrastructure

Michal Wajdeczko (18):
  drm/xe: Introduce xe_any helpers
  drm/xe/log: Add simple helpers for xe_log_emit
  drm/xe/log: Allow to emit SIGID dmesg/cper separately
  drm/xe/log: Add Tile/GT decorations for dmesg message
  drm/xe/log: Introduce structured log components
  drm/xe/log: Add component based SIGID log helper
  drm/xe/log: Add errno-only SIGID log helpers
  drm/xe/log: Add hardware error signatures
  drm/xe/log: Extend components list with hardware items
  drm/xe/tests: Add Kunit tests for xe_log
  drm/xe: Report 'probe blocked' error using SIGID
  drm/xe: Report 'device wedged' errors using SIGID
  drm/xe: Report 'Survivability Mode' errors using SIGID
  drm/xe/guc: Report 'GuC mmio' errors using SIGID
  drm/xe/pcode: Report 'Mailbox failed' error using SIGID
  drm/xe/gt: Report 'reset failed' errors using SIGID
  drm/xe/gt: Report 'pagefault' errors using SIGID
  drm/xe/pci: Report 'cannot re-enable' error using SIGID

 Documentation/gpu/xe/index.rst             |   1 +
 Documentation/gpu/xe/xe_sigid.rst          |  14 +
 drivers/gpu/drm/xe/Makefile                |   1 +
 drivers/gpu/drm/xe/abi/xe_log_abi.h        | 192 ++++++++++++
 drivers/gpu/drm/xe/abi/xe_sigid_abi.h      | 196 ++++++++++++
 drivers/gpu/drm/xe/tests/xe_log_kunit.c    | 331 +++++++++++++++++++++
 drivers/gpu/drm/xe/xe_any.h                | 107 +++++++
 drivers/gpu/drm/xe/xe_device.c             |  16 +-
 drivers/gpu/drm/xe/xe_gt.c                 |   7 +-
 drivers/gpu/drm/xe/xe_guc.c                |  18 +-
 drivers/gpu/drm/xe/xe_log.c                | 221 ++++++++++++++
 drivers/gpu/drm/xe/xe_log.h                | 175 +++++++++++
 drivers/gpu/drm/xe/xe_pagefault.c          |  10 +-
 drivers/gpu/drm/xe/xe_pci.c                |   5 +-
 drivers/gpu/drm/xe/xe_pci_error.c          |   7 +-
 drivers/gpu/drm/xe/xe_pcode.c              |   5 +-
 drivers/gpu/drm/xe/xe_survivability_mode.c |  23 +-
 17 files changed, 1290 insertions(+), 39 deletions(-)
 create mode 100644 Documentation/gpu/xe/xe_sigid.rst
 create mode 100644 drivers/gpu/drm/xe/abi/xe_log_abi.h
 create mode 100644 drivers/gpu/drm/xe/abi/xe_sigid_abi.h
 create mode 100644 drivers/gpu/drm/xe/tests/xe_log_kunit.c
 create mode 100644 drivers/gpu/drm/xe/xe_any.h
 create mode 100644 drivers/gpu/drm/xe/xe_log.c
 create mode 100644 drivers/gpu/drm/xe/xe_log.h

-- 
2.47.1


^ permalink raw reply	[flat|nested] 37+ messages in thread

end of thread, other threads:[~2026-07-28 19:04 UTC | newest]

Thread overview: 37+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-23 20:37 [PATCH 00/19] drm/xe: Add structured SIGID error logging infrastructure Michal Wajdeczko
2026-07-23 20:37 ` [PATCH 01/19] drm/xe/log: " Michal Wajdeczko
2026-07-24 13:01   ` Aravind Iddamsetty
2026-07-24 14:34     ` Michal Wajdeczko
2026-07-28 19:04       ` Rodrigo Vivi
2026-07-23 20:37 ` [PATCH 02/19] drm/xe: Introduce xe_any helpers Michal Wajdeczko
2026-07-28  5:23   ` Mallesh, Koujalagi
2026-07-23 20:37 ` [PATCH 03/19] drm/xe/log: Add simple helpers for xe_log_emit Michal Wajdeczko
2026-07-23 20:37 ` [PATCH 04/19] drm/xe/log: Allow to emit SIGID dmesg/cper separately Michal Wajdeczko
2026-07-23 20:37 ` [PATCH 05/19] drm/xe/log: Add Tile/GT decorations for dmesg message Michal Wajdeczko
2026-07-23 20:37 ` [PATCH 06/19] drm/xe/log: Introduce structured log components Michal Wajdeczko
2026-07-24 13:28   ` Aravind Iddamsetty
2026-07-24 14:45     ` Michal Wajdeczko
2026-07-23 20:37 ` [PATCH 07/19] drm/xe/log: Add component based SIGID log helper Michal Wajdeczko
2026-07-23 20:37 ` [PATCH 08/19] drm/xe/log: Add errno-only SIGID log helpers Michal Wajdeczko
2026-07-23 20:37 ` [PATCH 09/19] drm/xe/log: Add hardware error signatures Michal Wajdeczko
2026-07-23 20:37 ` [PATCH 10/19] drm/xe/log: Extend components list with hardware items Michal Wajdeczko
2026-07-24 11:49   ` Aravind Iddamsetty
2026-07-24 15:11     ` Michal Wajdeczko
2026-07-28 14:47       ` Aravind Iddamsetty
2026-07-28 16:31         ` Michal Wajdeczko
2026-07-23 20:37 ` [PATCH 11/19] drm/xe/tests: Add Kunit tests for xe_log Michal Wajdeczko
2026-07-23 20:37 ` [PATCH 12/19] drm/xe: Report 'probe blocked' error using SIGID Michal Wajdeczko
2026-07-24 12:28   ` Aravind Iddamsetty
2026-07-24 14:19     ` Michal Wajdeczko
2026-07-23 20:37 ` [PATCH 13/19] drm/xe: Report 'device wedged' errors " Michal Wajdeczko
2026-07-23 20:37 ` [PATCH 14/19] drm/xe: Report 'Survivability Mode' " Michal Wajdeczko
2026-07-23 20:37 ` [PATCH 15/19] drm/xe/guc: Report 'GuC mmio' " Michal Wajdeczko
2026-07-23 20:37 ` [PATCH 16/19] drm/xe/pcode: Report 'Mailbox failed' error " Michal Wajdeczko
2026-07-23 20:37 ` [PATCH 17/19] drm/xe/gt: Report 'reset failed' errors " Michal Wajdeczko
2026-07-23 20:37 ` [PATCH 18/19] drm/xe/gt: Report 'pagefault' " Michal Wajdeczko
2026-07-23 22:02   ` Michal Wajdeczko
2026-07-23 20:37 ` [PATCH 19/19] drm/xe/pci: Report 'cannot re-enable' error " Michal Wajdeczko
2026-07-23 20:44 ` ✗ CI.checkpatch: warning for drm/xe: Add structured SIGID error logging infrastructure Patchwork
2026-07-23 20:45 ` ✓ CI.KUnit: success " Patchwork
2026-07-23 21:35 ` ✗ Xe.CI.BAT: failure " Patchwork
2026-07-24 18:35 ` ✗ Xe.CI.FULL: " Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox