Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Satyanarayana K V P" <satyanarayana.k.v.p@intel.com>,
	intel-xe@lists.freedesktop.org
Subject: Re: [RFC 03/11] drm/xe/guc: Add KLV definitions for GuC log and debug state capture
Date: Fri, 04 Dec 2026 15:34:53 +0000	[thread overview]
Message-ID: <sashiko-outbox-250120@kernel.org> (raw)
In-Reply-To: <20261204144712.3520695-16-satyanarayana.k.v.p@intel.com>

Thank you for your contribution! Sashiko AI review found 3 potential
issues to consider:
- [Low] drm/xe/guc: VF provisioning KLVs 0x0600/0x0601 misclassified as
  SELF_CFG
- [Low] drm/xe/guc: SR-IOV actions 0x5511-0x5514 placed in legacy
  guc_actions_abi.h
- [Low] drm/xe: new GuC log/capture KLVs missing from
  xe_guc_klv_key_to_string()
--

commit ace21c007b77c5e7ec1166d46f5f5a0fc932e85c
Author: Satyanarayana K V P <satyanarayana.k.v.p@intel.com>

drm/xe/guc: Add KLV definitions for GuC log and debug state capture

This commit adds GuC ABI definitions for VF access to GuC logs and debug
state capture buffers, including four new GuC actions and several Global
Config and Self Config KLVs.

> diff --git a/drivers/gpu/drm/xe/abi/guc_actions_abi.h b/drivers/gpu/drm/xe/abi/guc_actions_abi.h
> index 520b771906cdd..053af1efa74e9 100644
> --- a/drivers/gpu/drm/xe/abi/guc_actions_abi.h
> +++ b/drivers/gpu/drm/xe/abi/guc_actions_abi.h
> @@ -149,6 +149,10 @@ enum xe_guc_action {
>  	XE_GUC_ACTION_SET_DEVICE_ENGINE_ACTIVITY_BUFFER = 0x550C,
>  	XE_GUC_ACTION_SET_FUNCTION_ENGINE_ACTIVITY_BUFFER = 0x550D,
>  	XE_GUC_ACTION_OPT_IN_FEATURE_KLV = 0x550E,
> +	XE_GUC_ACTION_VF2GUC_REQUEST_GUC_LOGS = 0x5511,
> +	XE_GUC_ACTION_VF2GUC_REQUEST_GUC_LOGS_MMIO = 0x5512,
> +	XE_GUC_ACTION_GUC2VF_NOTIFY_GUC_LOG_READY = 0x5513,
> +	XE_GUC_ACTION_GUC2VF_NOTIFY_DEBUG_STATE_CAPTURE = 0x5514,

[Severity: Low]
Should these four SR-IOV actions live in
drivers/gpu/drm/xe/abi/guc_actions_sriov_abi.h instead of the legacy
enum xe_guc_action?

All other 0x55xx SR-IOV actions (such as GUC_ACTION_VF2GUC_RESFIX_START)
are defined there with GUC_ACTION_* macros and HXG message layout
documentation.  Placing these in guc_actions_abi.h splits the SR-IOV
action space across two headers and leaves their HXG wire formats
undocumented.

Also, the commit subject mentions only KLV definitions and omits these
four new GuC actions.

> diff --git a/drivers/gpu/drm/xe/abi/guc_klvs_abi.h b/drivers/gpu/drm/xe/abi/guc_klvs_abi.h
> index d6fa69f154b3f..87f7f04cf4097 100644
> --- a/drivers/gpu/drm/xe/abi/guc_klvs_abi.h
> +++ b/drivers/gpu/drm/xe/abi/guc_klvs_abi.h

[ ... ]

> @@ -70,11 +86,29 @@
>  #define GUC_KLV_GLOBAL_CFG_NUM_PAGING_ENGINE_INSTANCES_KEY	0x3003u
>  #define GUC_KLV_GLOBAL_CFG_NUM_PAGING_ENGINE_INSTANCES_LEN	1u
>  
> +#define GUC_KLV_GLOBAL_CFG_GUC_LOG_BUFF_SIZE_KEY		0x3004u
> +#define GUC_KLV_GLOBAL_CFG_GUC_LOG_BUFF_SIZE_LEN		1u
> +
> +#define GUC_KLV_GLOBAL_CFG_GUC_DEBUG_CAPTURE_BUFF_SIZE_KEY	0x3005u
> +#define GUC_KLV_GLOBAL_CFG_GUC_DEBUG_CAPTURE_BUFF_SIZE_LEN	1u

[Severity: Low]
Should xe_guc_klv_key_to_string() in xe_guc_klv_helpers.c also be
updated for the new Global Config KLVs (0x3004, 0x3005) and the PF
provisioning KLVs (0x0600, 0x0601)?

Once commit "drm/xe/pf: Enable VF Guc log and debug state capture" wires
0x0600 and 0x0601 into pf_push_vf_cfg_klvs(), xe_guc_klv_print() will
log them as (unknown) on errors and when CONFIG_DRM_XE_DEBUG_SRIOV is
enabled, unlike every other KLV pushed through pf_push_vf_buf_klvs().
The two Global Config KLVs are likewise unmapped alongside their sibling
Global Config entries.

> +
>  /**
>   * DOC: GuC Self Config KLVs
>   *
>   * `GuC KLV`_ keys available for use with HOST2GUC_SELF_CFG_.
>   *
> + * _`GUC_KLV_SELF_CONFIG_DEBUG_STATE_CAPTURE_ENABLE` : 0x0600
> + *	This KLV is configured only by PF to enable debug state capture for a
> + *	specific VF during provisioning. When set, debug state capture is enabled
> + *	for this VF and when cleared, debug state capture is disabled by default.
> + *	This KLV is independent of GUC_KLV_OPT_IN_FEATURE_GUC_LOG_ENABLE and
> + *	does not enable or disable GuC log access.
> + *
> + * _`GUC_KLV_SELF_CONFIG_GUC_LOG_ENABLE` : 0x0601
> + *	This KLV is configured only by PF to enable GuC log access for a specific
> + *	VF during provisioning. When set, GuC log access is enabled for this VF
> + *	and when cleared, GuC log access is disabled by default.

[ ... ]

> +#define GUC_KLV_SELF_CFG_DEBUG_STATE_CAPTURE_ENABLE_KEY	0x0600u
> +#define GUC_KLV_SELF_CFG_DEBUG_STATE_CAPTURE_ENABLE_LEN	1u
> +
> +#define GUC_KLV_SELF_CFG_GUC_LOG_ENABLE_KEY		0x0601u
> +#define GUC_KLV_SELF_CFG_GUC_LOG_ENABLE_LEN		1u

[Severity: Low]
Should keys 0x0600 and 0x0601 be defined under DOC: GuC VF Configuration
KLVs with a GUC_KLV_VF_CFG_ prefix rather than under GuC Self Config
KLVs?

GUC_ACTION_HOST2GUC_SELF_CFG carries no VFID and can only configure the
calling function itself.  As the comments state, these two keys are
configured only by the PF for a specific VF during provisioning and are
sent via GUC_ACTION_PF2GUC_UPDATE_VF_CFG (pf_push_vf_cfg_klvs() ->
guc_action_update_vf_cfg()).

In addition, the DOC anchors use GUC_KLV_SELF_CONFIG_* while the macros
use GUC_KLV_SELF_CFG_*.  The comment for 0x0600 also references
GUC_KLV_OPT_IN_FEATURE_GUC_LOG_ENABLE, which does not exist in the tree
and appears to mean the 0x0601 GuC log enable KLV below it.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261204144712.3520695-13-satyanarayana.k.v.p@intel.com?part=3

  reply	other threads:[~2026-12-04 15:35 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-04 14:47 [RFC 00/11] Enable GuC log and debug error state capture for VF Satyanarayana K V P
2026-12-04 14:47 ` [RFC 01/11] drm/xe/pf: Allow VF access to GuC timestamp registers Satyanarayana K V P
2026-12-04 15:09   ` sashiko-bot
2026-12-04 14:47 ` [RFC 02/11] drm/xe/vf: Enable VF debug logging only on supported GUC versions Satyanarayana K V P
2026-12-04 15:22   ` sashiko-bot
2026-12-04 14:47 ` [RFC 03/11] drm/xe/guc: Add KLV definitions for GuC log and debug state capture Satyanarayana K V P
2026-12-04 15:34   ` sashiko-bot [this message]
2026-12-04 14:47 ` [RFC 04/11] drm/xe/pf: Enable VF debug logging only on supported GUC versions Satyanarayana K V P
2026-12-04 15:50   ` sashiko-bot
2026-12-04 14:47 ` [RFC 05/11] drm/xe/pf: Enable VF Guc log and debug state capture Satyanarayana K V P
2026-12-04 16:04   ` sashiko-bot
2026-12-04 14:47 ` [RFC 06/11] drm/xe/vf: Query and allocate VF GuC log and debug capture buffers Satyanarayana K V P
2026-12-04 16:31   ` sashiko-bot
2026-12-04 14:47 ` [RFC 07/11] drm/xe/vf: Register VF GuC log and debug state " Satyanarayana K V P
2026-12-04 17:04   ` sashiko-bot
2026-12-04 14:47 ` [RFC 08/11] drm/xe/vf: Initialize GuC logging buffers during GuC setup Satyanarayana K V P
2026-12-04 17:30   ` sashiko-bot
2026-12-04 14:47 ` [RFC 09/11] drm/xe/guc: Register VF-accessible registers for error capture Satyanarayana K V P
2026-12-04 17:52   ` sashiko-bot
2026-12-04 14:47 ` [RFC 10/11] drm/xe/guc: Handle GuC debug state capture notifications for VF Satyanarayana K V P
2026-12-04 18:13   ` sashiko-bot
2026-12-04 14:47 ` [RFC 11/11] drm/xe/guc: Process VF GuC error state captures Satyanarayana K V P
2026-12-04 18:41   ` sashiko-bot
2026-12-04 14:56 ` ✗ CI.checkpatch: warning for Enable GuC log and debug error state capture for VF Patchwork
2026-12-04 14:58 ` ✓ CI.KUnit: success " Patchwork
2026-12-04 15:34 ` ✗ Xe.CI.BAT: failure " 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=sashiko-outbox-250120@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=satyanarayana.k.v.p@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