Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Michal Wajdeczko <michal.wajdeczko@intel.com>
To: Aravind Iddamsetty <aravind.iddamsetty@linux.intel.com>,
	<intel-xe@lists.freedesktop.org>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>,
	Aravind Iddamsetty <aravind.iddamsetty@intel.com>,
	Mallesh Koujalagi <mallesh.koujalagi@intel.com>,
	Raag Jadav <raag.jadav@intel.com>,
	Riana Tauro <riana.tauro@intel.com>,
	Yoni Levitt <yoni.levitt@intel.com>
Subject: Re: [PATCH 06/19] drm/xe/log: Introduce structured log components
Date: Fri, 24 Jul 2026 16:45:22 +0200	[thread overview]
Message-ID: <9a25f981-8fef-4df8-acc6-bf64adcf4af2@intel.com> (raw)
In-Reply-To: <18c6d6e0-f018-48e8-86aa-af11492dddb8@linux.intel.com>



On 7/24/2026 3:28 PM, Aravind Iddamsetty wrote:
> 
> On 24-07-2026 02:07, Michal Wajdeczko wrote:
>> Introduce structured identifiers for each component type that
>> could emit a SIGID log entry and for their locations. We plan
>> to store those IDs in the CPER records for better filtering.
>>
>> Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
>> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
>> ---
>> Cc: Aravind Iddamsetty <aravind.iddamsetty@intel.com>
>> Cc: Mallesh Koujalagi <mallesh.koujalagi@intel.com>
>> Cc: Raag Jadav <raag.jadav@intel.com>
>> Cc: Riana Tauro <riana.tauro@intel.com>
>> ---
>>  drivers/gpu/drm/xe/abi/xe_log_abi.h | 181 ++++++++++++++++++++++++++++
>>  1 file changed, 181 insertions(+)
>>  create mode 100644 drivers/gpu/drm/xe/abi/xe_log_abi.h
>>
>> diff --git a/drivers/gpu/drm/xe/abi/xe_log_abi.h b/drivers/gpu/drm/xe/abi/xe_log_abi.h
>> new file mode 100644
>> index 000000000000..cde86c6c08f2
>> --- /dev/null
>> +++ b/drivers/gpu/drm/xe/abi/xe_log_abi.h
>> @@ -0,0 +1,181 @@
>> +/* SPDX-License-Identifier: MIT */
>> +/*
>> + * Copyright © 2026 Intel Corporation
>> + */
>> +
>> +#ifndef _ABI_XE_LOG_ABI_H_
>> +#define _ABI_XE_LOG_ABI_H_
>> +
>> +#include <linux/bits.h>
>> +#include <linux/bitfield.h>
>> +
>> +#include "abi/xe_sigid_abi.h"
>> +
>> +/**
>> + * enum xe_log_component_bits - bits for components structure definitions
>> + *
>> + * Component identifiers are structured based on::
>> + *
>> + *     COMPONENT = TYPE(8b).ID(8b)
>> + *
>> + * and the structure looks like this::
>> + *
>> + *     ├── SYSTEM(0)
>> + *     │   └── ...
>> + *     ├── DRIVER(1)
>> + *     │   └── ...
>> + *     ├── FEATURE(2)
>> + *     │   └── ...
>> + *     ├── FIRMWARE(4)
>> + *     │   └── ...
>> + *     └── HARDWARE(8)
>> + *         └── ...
>> + *
>> + * Examples::
>> + *
>> + *     COMPONENT(0.type) = SYSTEM.type = system component
>> + *     COMPONENT(1.type) = DRIVER.type = driver core component
>> + *     COMPONENT(3.type) = DRIVER_FEATURE.type = driver feature
>> + *     COMPONENT(5.type) = DRIVER_FIRMWARE.type = firmware driver component
>> + *     COMPONENT(9.type) = DRIVER_HARDWARE.type = hardware drivr component
>> + *
>> + */
>> +enum xe_log_component_bits {
>> +	/* private: */
>> +	XE_LOG_COMPONENT_CLASS_MASK = GENMASK_U16(7, 0),
>> +	XE_LOG_COMPONENT_TYPE_MASK = GENMASK_U16(15, 8),
>> +	/* private: */
>> +	XE_LOG_COMPONENT_CLASS_SYSTEM = 0u,
>> +	XE_LOG_COMPONENT_CLASS_DRIVER = 1u,
>> +	XE_LOG_COMPONENT_CLASS_FEATURE = 2u,
>> +	XE_LOG_COMPONENT_CLASS_FIRMWARE = 4u,
>> +	XE_LOG_COMPONENT_CLASS_HARDWARE = 8u,
>> +	XE_LOG_COMPONENT_CLASS_DRIVER_FEATURE = XE_LOG_COMPONENT_CLASS_DRIVER |
>> +						XE_LOG_COMPONENT_CLASS_FEATURE,
>> +	XE_LOG_COMPONENT_CLASS_DRIVER_FIRMWARE = XE_LOG_COMPONENT_CLASS_DRIVER |
>> +						 XE_LOG_COMPONENT_CLASS_FIRMWARE,
>> +	XE_LOG_COMPONENT_CLASS_DRIVER_HARDWARE = XE_LOG_COMPONENT_CLASS_DRIVER |
>> +						 XE_LOG_COMPONENT_CLASS_HARDWARE,
>> +};
>> +
>> +#define MAKE_XE_LOG_COMPONENT(_CLASS, type) \
>> +	(FIELD_PREP_CONST(XE_LOG_COMPONENT_CLASS_MASK, \
>> +			  XE_LOG_COMPONENT_CLASS_##_CLASS) | \
>> +	 FIELD_PREP_CONST(XE_LOG_COMPONENT_TYPE_MASK, (type)))
>> +
>> +/**
>> + * enum xe_log_location_bits - bits for location structure definitions
>> + *
>> + * Location identifiers are structured based on::
>> + *
>> + *     LOCATION = TYPE(8b).ID(8b)
>> + *
>> + * and the structure looks like this::
>> + *
>> + *     ├── DEVICE(0)
>> + *     │   └── MBZ(0)
>> + *     ├── TILE(1)
>> + *     │   ├── Tile0(0)
>> + *     │   ├── ...
>> + *     │   └── TileN(n)
>> + *     ├── GT(1)
>> + *     │   ├── GT0(0)
>> + *     │   ├── ...
>> + *     │   └── GTn(n)
>> + *     └── ...
>> + *
>> + * Examples::
>> + *
>> + *     LOCATION(0.0) = DEVICE.0 = "Device"
>> + *     LOCATION(1.2) = TILE.2 = "Tile2"
>> + *     LOCATION(2.3) = GT.3 = "GT3"
>> + *
>> + */
>> +enum xe_log_location_bits {
>> +	/* private: */
>> +	XE_LOG_LOCATION_TYPE_MASK = GENMASK_U16(7, 0),
>> +	XE_LOG_LOCATION_ID_MASK = GENMASK_U16(15, 8),
>> +	/* */
>> +	XE_LOG_LOCATION_TYPE_DEVICE = 0u,
>> +	XE_LOG_LOCATION_TYPE_TILE = 1u,
>> +	XE_LOG_LOCATION_TYPE_GT = 2u,
>> +};
>> +
>> +#define PREP_XE_LOG_LOCATION(type, id) \
>> +	(FIELD_PREP(XE_LOG_LOCATION_TYPE_MASK, (type)) | \
>> +	 FIELD_PREP(XE_LOG_LOCATION_ID_MASK, (id)))
>> +
>> +#define MAKE_XE_LOG_LOCATION(_TYPE, id) \
>> +	PREP_XE_LOG_LOCATION(XE_LOG_LOCATION_TYPE_##_TYPE, (id))
>> +
>> +/**
>> + * DEFINE_XE_LOG_COMPONENTS() - Define log components.
>> + * @define: name of the inner macro to expand.
>> + *
>> + * Use this super macro to define custom code for the log components.
>> + * The following parameters are available for each component::
>> + *
>> + *     define(CLASS, ID, TAG, SIGID, NAME)
>> + *
>> + * where:
>> + *
>> + *     @ID is the unique component identifier within CLASS.SUBCLASS.CATEGORY
>> + *     @TAG is unique component tag (across all components)
>> + *     @SIGID is the default xe_sigid for the component (without the XE_SIGID_ prefix)
>> + */
>> +#define DEFINE_XE_LOG_COMPONENTS(define) \
>> +	/* */									\
>> +	define(SYSTEM, 1, PCI, SW, "Linux PCI Subsystem")			\
>> +	define(SYSTEM, 2, DRM, SW, "DRM")					\
>> +	/* */									\
>> +	define(DRIVER, 1, XE, SW, "Xe Driver")					\

[here]

>> +	define(DRIVER, 2, PROBE, PROBE, "Driver Initialization")		\
>> +	define(DRIVER, 3, WEDGED, WEDGED, "Device Malfunction")			\
>> +	define(DRIVER, 4, RTP, SW, "Register Table Processing")			\
>> +	define(DRIVER, 5, WA, SW, "Workarounds")				\
> 
> what is SIGID_SW supposed to indicate?

this is a general signature of errors in the driver software components for which we don't have a better/unique SIGID yet

(and I assume this question refers to enum definition included in patch 1/19)

> 
> In what cases XE component shall be used?

in case we don't have a better/unique component definition yet,
or it is too small component to deserve an unique component id

> 
> Thanks,
> Aravind.
>> +	define(DRIVER, 6, PAGEFAULT, MEM_FAULT, "Page Fault")			\
>> +	/* */									\
>> +	define(DRIVER_HARDWARE, 1, REGS, IO_BUS, "Registers")			\
>> +	define(DRIVER_HARDWARE, 2, GGTT, IO_BUS, "Global GTT")			\
>> +	define(DRIVER_HARDWARE, 3, GT, GT_TDR, "Graphics Technology")		\
>> +	define(DRIVER_HARDWARE, 4, LMTT, IO_BUS, "LMEM Translation Table")	\
>> +	define(DRIVER_HARDWARE, 5, MEMIRQ, IO_BUS, "Memory Based IRQ")		\
>> +	/* */									\
>> +	define(DRIVER_FEATURE, 1, PF, SW, "SR-IOV Physical Function")		\
>> +	define(DRIVER_FEATURE, 2, VF, SW, "SR-IOV Virtual Function")		\
>> +	define(DRIVER_FEATURE, 3, SURVIVABILITY, SURVIVABILITY, "Survivability") \
>> +	define(DRIVER_FEATURE, 4, RAS, SW, "Reliability, Accessibility, Serviceability") \
>> +	/* */									\
>> +	define(DRIVER_FIRMWARE, 1, GUC, RUNTIME_FW, "GuC")			\
>> +	define(DRIVER_FIRMWARE, 2, HUC, RUNTIME_FW, "HuC")			\
>> +	define(DRIVER_FIRMWARE, 3, GSC, RUNTIME_FW, "GSC")			\
>> +	define(DRIVER_FIRMWARE, 16, PCODE, DEVICE_FW, "PCode")			\
>> +	define(DRIVER_FIRMWARE, 17, SYSCTRL, DEVICE_FW, "System Controller")	\
>> +	/* eod */
>> +
>> +/**
>> + * enum xe_log_component_tags - TAGs of all supported components
>> + */
>> +enum xe_log_component_tags {
>> +	/* private: */
>> +#define MAKE_XE_LOG_COMPONENT_ENUM(_CLASS, _ID, _TAG, _SIG, _NAME) \
>> +	XE_LOG_COMPONENT_##_TAG = MAKE_XE_LOG_COMPONENT(_CLASS, (_ID)), \
>> +	XE_LOG_COMPONENT_##_CLASS##_##_ID = XE_LOG_COMPONENT_##_TAG, \
>> +	/* eod */
>> +	DEFINE_XE_LOG_COMPONENTS(MAKE_XE_LOG_COMPONENT_ENUM)
>> +#undef MAKE_XE_LOG_COMPONENT_ENUM
>> +};
>> +
>> +/**
>> + * enum xe_log_component_sigids - SIGIDs of all supported components
>> + */
>> +enum xe_log_component_sigids {
>> +	/* private: */
>> +#define MAKE_XE_LOG_COMPONENT_SIGID(_CLASS, _ID, _TAG, _SIG, _NAME) \
>> +	XE_LOG_COMPONENT_##_TAG##_SIGID = XE_SIGID_##_SIG, \
>> +	/* eod */
>> +	DEFINE_XE_LOG_COMPONENTS(MAKE_XE_LOG_COMPONENT_SIGID)
>> +#undef MAKE_XE_LOG_COMPONENT_SIGID
>> +};
>> +
>> +#endif


  reply	other threads:[~2026-07-24 14:45 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

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=9a25f981-8fef-4df8-acc6-bf64adcf4af2@intel.com \
    --to=michal.wajdeczko@intel.com \
    --cc=aravind.iddamsetty@intel.com \
    --cc=aravind.iddamsetty@linux.intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=mallesh.koujalagi@intel.com \
    --cc=raag.jadav@intel.com \
    --cc=riana.tauro@intel.com \
    --cc=rodrigo.vivi@intel.com \
    --cc=yoni.levitt@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