All of 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 02/11] drm/xe/vf: Enable VF debug logging only on supported GUC versions
Date: Fri, 04 Dec 2026 15:22:01 +0000	[thread overview]
Message-ID: <sashiko-outbox-250084@kernel.org> (raw)
In-Reply-To: <20261204144712.3520695-15-satyanarayana.k.v.p@intel.com>

Thank you for your contribution! Sashiko AI review found 2 potential
issues to consider:
- [Medium] drm/xe/vf: per-GT xe_sriov_vf_debug_log_init_early() only
  checks root GT
- [Low] drm/xe/vf: missing feature prefix and newline in
  xe_sriov_notice()
--

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

drm/xe/vf: Enable VF debug logging only on supported GUC versions

This commit adds an early GuC ABI version check (>= 1.47.0) during VF GuC
initialization to disable SR-IOV VF debug logging on unsupported firmware
versions, along with a helper to query whether it is supported.

> diff --git a/drivers/gpu/drm/xe/xe_guc.c b/drivers/gpu/drm/xe/xe_guc.c
> index 00df83460022d..b8939f04ea24c 100644
> --- a/drivers/gpu/drm/xe/xe_guc.c
> +++ b/drivers/gpu/drm/xe/xe_guc.c

[ ... ]

> @@ -830,6 +831,8 @@ int xe_guc_init(struct xe_guc *guc)
>  		if (ret)
>  			goto out;
>  
> +		xe_sriov_vf_debug_log_init_early(xe);
> +
>  		ret = xe_guc_ct_init(&guc->ct);
>  		if (ret)
>  			goto out;

[Severity: Medium]
Should xe_sriov_vf_debug_log_init_early() check each GT rather than being
called per GT while hardcoding xe_root_mmio_gt(xe)?

xe_device_probe() invokes xe_gt_init() -> xe_uc_init() -> xe_guc_init()
once per GT, so on multi-GT VFs this runs repeatedly and always inspects
only the root GT.  If the root GT runs GuC ABI >= 1.47.0 while a media or
remote GT loads an older GuC binary, xe_sriov_vf_debug_log_supported()
stays true and allows unsupported debug-log queries on that GT.

When the root GT itself is below 1.47.0, probe also re-checks it on every
subsequent GT and emits duplicate notices.  Checking all GTs once at
device level after VF bootstrap, or tracking support per GT, would avoid
both issues.

> diff --git a/drivers/gpu/drm/xe/xe_sriov_vf.c b/drivers/gpu/drm/xe/xe_sriov_vf.c
> index 29894bd081c04..f2e519327f76d 100644
> --- a/drivers/gpu/drm/xe/xe_sriov_vf.c
> +++ b/drivers/gpu/drm/xe/xe_sriov_vf.c

[ ... ]

> +void xe_sriov_vf_debug_log_init_early(struct xe_device *xe)
> +{
> +	struct xe_gt *gt = xe_root_mmio_gt(xe);
> +	struct xe_uc_fw_version guc_version;
> +
> +	xe_gt_sriov_vf_guc_versions(gt, NULL, &guc_version);
> +	if (MAKE_GUC_VER_STRUCT(guc_version) < MAKE_GUC_VER(1, 47, 0)) {
> +		xe_sriov_notice(xe, "requires GuC ABI >= 1.47.0, but only %u.%u.%u found",
> +				guc_version.major, guc_version.minor, guc_version.patch);

[Severity: Low]
Is this xe_sriov_notice() missing both a feature prefix (such as "debug
logging disabled: ") and a trailing newline?

xe_sriov_notice() only prepends the VF prefix and does not append a
newline, unlike xe_sriov_vf_migration_disable() which wraps its message
with "migration disabled: %pV\n".  As written, dmesg gets an unterminated
line that does not mention which feature was disabled.

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

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

Thread overview: 27+ 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 [this message]
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
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
2026-12-05 12:17 ` ✗ 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=sashiko-outbox-250084@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 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.