From: sashiko-bot@kernel.org
To: "Nareshkumar Gollakoti" <naresh.kumar.g@intel.com>
Cc: intel-xe@lists.freedesktop.org
Subject: Re: [PATCH 1/6] drm/xe/devcoredump: Capture GT fuse registers in devcoredump
Date: Thu, 13 Aug 2026 13:52:29 +0000 [thread overview]
Message-ID: <20260813135230.2A65D1F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260813133037.2912699-2-naresh.kumar.g@intel.com>
Thank you for your contribution! Sashiko AI review found 3 potential issue(s) to consider:
- [High] Incorrect GT context passed to fuse capture functions causes MMIO offset corruption and missing forcewake.
- [Medium] Attempting to read PF-only physical fuse registers from a Virtual Function (VF) causes kernel warnings.
- [Medium] Unconditional capture of Media GT fuse registers without verifying if the hardware actually possesses a Media GT.
--
--- Patch [1]: [PATCH 1/6] drm/xe/devcoredump: Capture GT fuse registers in devcoredump ---
commit 83b02d67e48ca9a916843ba3c9656f4f78b755ae
Author: Nareshkumar Gollakoti <naresh.kumar.g@intel.com>
drm/xe/devcoredump: Capture GT fuse registers in devcoredump
This commit captures fuse-related GT register state in the Xe devcoredump to
preserve additional hardware configuration information. It adds generic
register snapshot storage and helpers for capturing and printing MMIO dumps.
> diff --git a/drivers/gpu/drm/xe/xe_devcoredump.c b/drivers/gpu/drm/xe/xe_devcoredump.c
> index 5f2b90b18f97b..35d8101f2a192 100644
> --- a/drivers/gpu/drm/xe/xe_devcoredump.c
> +++ b/drivers/gpu/drm/xe/xe_devcoredump.c
[ ... ]
> +static struct xe_dbg_reg_snapshot *xe_gt_fuse_snapshot_capture(struct xe_gt *gt)
> +{
> + struct xe_reg_desc_list reg_list;
> +
> + if (!xe_dbg_reg_snapshot_is_supported(gt_to_xe(gt)))
> + return NULL;
> +
> + reg_list.regs = xe3p_gt_fuse_reglist;
> + reg_list.num_regs = ARRAY_SIZE(xe3p_gt_fuse_reglist);
> +
> + return xe_dbg_reg_snapshot_capture(gt, ®_list);
> +}
[Severity: Medium]
Will this trigger kernel warnings when running as a Virtual Function (VF)?
If a GPU hang occurs in an SR-IOV VF environment,
xe_gt_fuse_snapshot_capture() calls xe_mmio_read32(), which routes to
xe_gt_sriov_vf_read32(). Since physical fuse registers like RPM_GCD are
PF-only and not on the VF MMIO whitelist, the access is rejected,
potentially polluting the kernel log with warnings for every register.
Should there be an IS_SRIOV_VF() guard before attempting to read PF-only
physical fuse registers?
[ ... ]
> @@ -349,6 +492,9 @@ static void devcoredump_snapshot(struct xe_devcoredump *coredump,
>
> cookie = dma_fence_begin_signalling();
>
> + ss->gt_fuse = xe_gt_fuse_snapshot_capture(q->gt);
> + ss->media_fuse = xe_media_gt_fuse_snapshot_capture(q->gt);
[Severity: High]
Does this pass the wrong GT context to the capture functions when the fault is
on the Media GT?
The faulting q->gt is passed unconditionally to both captures. xe_mmio_read32()
automatically adds a 0x380000 offset to register addresses when invoked on the
Media GT. If q->gt is the Media GT, xe_gt_fuse_snapshot_capture() will
erroneously capture Media GT registers instead of Primary GT registers.
Additionally, devcoredump only holds forcewake for the faulting q->gt. If
q->gt is the Primary GT, xe_media_gt_fuse_snapshot_capture() will attempt
to read Media GT registers while the Media GT is asleep, causing Unclaimed
Register errors and returning garbage data.
Should it capture using the specific primary and media GTs with appropriate
forcewake?
[Severity: Medium]
What happens on hardware configurations that do not possess a Media GT?
The unconditional call to xe_media_gt_fuse_snapshot_capture() attempts to
read registers at offset 0x380000. If the Media GT is physically absent or
fused off on the SKU, would this result in Unclaimed Register hardware errors
and system log spam?
Should there be a check for the existence of a Media GT before attempting
the capture?
> +
> ss->guc.log = xe_guc_log_snapshot_capture(&guc->log, true);
> ss->guc.ct = xe_guc_ct_snapshot_capture(&guc->ct);
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260813133037.2912699-1-naresh.kumar.g@intel.com?part=1
next prev parent reply other threads:[~2026-08-13 13:52 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-13 13:30 [PATCH 0/6] drm/xe: Capture additional HW register state in devcoredump Nareshkumar Gollakoti
2026-08-13 13:30 ` [PATCH 1/6] drm/xe/devcoredump: Capture GT fuse registers " Nareshkumar Gollakoti
2026-08-13 13:52 ` sashiko-bot [this message]
2026-08-13 13:30 ` [PATCH 2/6] drm/xe/devcoredump: Add GuC register snapshot to devcoredump Nareshkumar Gollakoti
2026-08-13 14:04 ` sashiko-bot
2026-08-13 13:30 ` [PATCH 3/6] drm/xe/guc: Print register addresses in capture snapshot output Nareshkumar Gollakoti
2026-08-13 14:11 ` sashiko-bot
2026-08-13 13:30 ` [PATCH 4/6] drm/xe: dump GAM page fault report registers in devcoredump Nareshkumar Gollakoti
2026-08-13 13:30 ` [PATCH 5/6] drm/xe/guc: add TDL gfx registers to capture list Nareshkumar Gollakoti
2026-08-13 14:25 ` sashiko-bot
2026-08-13 13:30 ` [PATCH 6/6] drm/xe: capture L3 node status registers in devcoredump Nareshkumar Gollakoti
2026-08-13 14:37 ` sashiko-bot
2026-08-13 13:39 ` ✓ CI.KUnit: success for drm/xe: Capture additional HW register state " Patchwork
2026-08-13 14:27 ` ✓ Xe.CI.BAT: " Patchwork
2026-08-13 15:58 ` ✗ Xe.CI.FULL: 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=20260813135230.2A65D1F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=naresh.kumar.g@intel.com \
--cc=sashiko-reviews@lists.linux.dev \
/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