From: Rodrigo Vivi <rodrigo.vivi@intel.com>
To: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: <intel-xe@lists.freedesktop.org>,
Mallesh Koujalagi <mallesh.koujalagi@intel.com>,
Aravind Iddamsetty <aravind.iddamsetty@intel.com>,
Raag Jadav <raag.jadav@intel.com>,
"Riana Tauro" <riana.tauro@intel.com>
Subject: Re: [PATCH v4 03/32] drm/xe/log: Introduce structured component/location identifiers
Date: Thu, 13 Aug 2026 13:20:17 -0400 [thread overview]
Message-ID: <an380YttikjOTigL@intel.com> (raw)
In-Reply-To: <20260812191450.11690-4-michal.wajdeczko@intel.com>
On Wed, Aug 12, 2026 at 09:14:19PM +0200, 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.
> Define also structured identifiers for the supported locations.
>
> Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
> Reviewed-by: Mallesh Koujalagi <mallesh.koujalagi@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>
> ---
> v2: fix typo, define reserved ids (Michal)
> v3: fix kernel-doc to match code (Sashiko)
> v4: update comment (Michal)
> ---
> drivers/gpu/drm/xe/abi/xe_log_abi.h | 187 ++++++++++++++++++++++++++++
> 1 file changed, 187 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..92547805326f
> --- /dev/null
> +++ b/drivers/gpu/drm/xe/abi/xe_log_abi.h
> @@ -0,0 +1,187 @@
> +/* 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 = CLASS(8b).TYPE(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 driver 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: component classes */
> + 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,
> + /* private: reserved identifiers */
> + XE_LOG_COMPONENT_NONE = 0u,
> +};
> +
> +#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) = NONE
> + * LOCATION(1.0) = DEVICE.0 = "Device"
> + * LOCATION(2.1) = TILE.1 = "Tile1"
> + * LOCATION(3.2) = GT.2 = "GT2"
> + *
> + */
> +enum xe_log_location_bits {
> + /* private: */
> + XE_LOG_LOCATION_TYPE_MASK = GENMASK_U16(7, 0),
> + XE_LOG_LOCATION_ID_MASK = GENMASK_U16(15, 8),
> + /* private: location types */
> + XE_LOG_LOCATION_TYPE_DEVICE = 1u,
> + XE_LOG_LOCATION_TYPE_TILE = 2u,
> + XE_LOG_LOCATION_TYPE_GT = 3u,
> + /* private: reserved identifiers */
> + XE_LOG_LOCATION_NONE = 0u,
> +};
> +
> +#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:
> + *
> + * @CLASS is the component class name (without the XE_LOG_COMPONENT_CLASS_ prefix)
> + * @ID is the unique component identifier within @CLASS
> + * @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") \
As we discussed offline, based on the review of the last patch of this series
it becomes clear that this PCI bucket should be IO_BUS.
Let's change this and keep my rv-b...
> + define(SYSTEM, 2, DRM, SW, "DRM") \
> + /* */ \
> + define(DRIVER, 1, XE, SW, "Xe Driver") \
> + 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") \
> + 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
> --
> 2.47.1
>
next prev parent reply other threads:[~2026-08-13 17:20 UTC|newest]
Thread overview: 80+ 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 20:38 ` Michal Wajdeczko
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 [this message]
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
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-13 19:46 ` Michal Wajdeczko
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=an380YttikjOTigL@intel.com \
--to=rodrigo.vivi@intel.com \
--cc=aravind.iddamsetty@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=mallesh.koujalagi@intel.com \
--cc=michal.wajdeczko@intel.com \
--cc=raag.jadav@intel.com \
--cc=riana.tauro@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.