From: sashiko-bot@kernel.org
To: "Michael J. Ruhl" <michael.j.ruhl@intel.com>
Cc: intel-xe@lists.freedesktop.org
Subject: Re: [PATCH v6 17/18] drm/xe/vsec: Update PMT internal access
Date: Fri, 04 Sep 2026 18:55:25 +0000 [thread overview]
Message-ID: <20260904185526.472811F00A3D@smtp.kernel.org> (raw)
In-Reply-To: <20260904182451.1164868-37-michael.j.ruhl@intel.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
Pre-existing issues:
- [High] Uninitialized MMIO offset used in PMT telemetry reads during hardware monitor registration, causing invalid MMIO accesses.
--
commit d59cca0476ebbe3cb43377a85bcbb964d1b8401f
Author: Michael J. Ruhl <michael.j.ruhl@intel.com>
drm/xe/vsec: Update PMT internal access
Current PMT internal access assumes BMG devices. Use the new PMT GUID API
to read the device specific guid, and cleanup newly unused mmio parameter.
[ ... ]
> diff --git a/drivers/gpu/drm/xe/xe_hwmon.c b/drivers/gpu/drm/xe/xe_hwmon.c
> index b9740224e07ff..c44a7d24816d1 100644
> --- a/drivers/gpu/drm/xe/xe_hwmon.c
> +++ b/drivers/gpu/drm/xe/xe_hwmon.c
> @@ -517,9 +517,15 @@ xe_hwmon_energy_get(struct xe_hwmon *hwmon, int channel, long *energy)
>
> if (hwmon->xe->info.platform == XE_BATTLEMAGE) {
> u64 pmt_val;
> + u32 guid;
>
> - ret = xe_pmt_telem_read(hwmon->xe->drm.dev,
> - xe_mmio_read32(mmio, BMG_PUNIT_TELEMETRY_GUID),
> + ret = xe_vsec_get_guid(hwmon->xe, &guid);
> + if (ret) {
> + drm_warn(&hwmon->xe->drm, "PMT device is not available: %d\n", ret);
> + *energy = 0;
> + return;
> + }
> + ret = xe_pmt_telem_read(hwmon->xe->drm.dev, guid,
[Severity: High]
This is a pre-existing issue, but does this telemetry read target an invalid
MMIO address during hardware monitor registration?
xe_device_probe() calls xe_hwmon_register() before xe_vsec_init().
xe_hwmon_register() internally calls xe_hwmon_energy_get() during
preregistration, triggering this xe_pmt_telem_read().
Because xe->pmt.base_offset is still uninitialized (0) at this point, the
read in xe_pmt_telem_read():
drivers/gpu/drm/xe/xe_vsec.c:xe_pmt_telem_read() {
void __iomem *telem_addr = xe->mmio.regs + xe->pmt.base_offset;
...
telem_addr += offset + user_offset;
...
memcpy_fromio(data, telem_addr, count);
}
seems to evaluate to an incorrect platform-specific telemetry offset (e.g.,
xe->mmio.regs + 0 + 0x0230) instead of the correct base. Reading unmapped
PCI address space can cause a PCIe Unsupported Request and Machine Check
Exception during boot on BMG platforms.
> &pmt_val, BMG_ENERGY_STATUS_PMT_OFFSET, sizeof(pmt_val));
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260904182451.1164868-20-michael.j.ruhl@intel.com?part=17
next prev parent reply other threads:[~2026-09-04 18:55 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-04 18:24 [PATCH v6 00/18] Crescent Island PMT support Michael J. Ruhl
2026-09-04 18:24 ` [PATCH v6 01/18] platform/x86/intel/pmt: complete pcidev to device update Michael J. Ruhl
2026-09-04 18:45 ` sashiko-bot
2026-09-04 18:24 ` [PATCH v6 02/18] platform/x86/intel/pmt: refactor rmw with a return value Michael J. Ruhl
2026-09-04 18:24 ` [PATCH v6 03/18] platform/x86/intel/pmt: refactor rc " Michael J. Ruhl
2026-09-04 18:24 ` [PATCH v6 04/18] platform/x86/intel/pmt: Add register access callbacks Michael J. Ruhl
2026-09-04 18:24 ` [PATCH v6 05/18] platform/x86/intel/pmt: Do not remap when using callbacks Michael J. Ruhl
2026-09-04 18:42 ` sashiko-bot
2026-09-04 18:24 ` [PATCH v6 06/18] drm/xe/vsec: Do not register BMG PMT for VF Michael J. Ruhl
2026-09-04 18:24 ` [PATCH v6 07/18] drm/xe/vsec: Correct locking order Michael J. Ruhl
2026-09-04 18:24 ` [PATCH v6 08/18] drm/xe/vsec: Use correct pm state get Michael J. Ruhl
2026-09-04 18:24 ` [PATCH v6 09/18] drm/xe/vsec: Add DOC text for VSEC Michael J. Ruhl
2026-09-04 18:25 ` [PATCH v6 10/18] drm/xe/vsec: Support possible hotplug exit Michael J. Ruhl
2026-09-04 18:25 ` [PATCH v6 11/18] drm/xe/vsec: Support Crescent Island PMT Michael J. Ruhl
2026-09-04 18:25 ` [PATCH v6 12/18] drm/xe/vsec: Refactor BattleMage PMT defines Michael J. Ruhl
2026-09-04 18:53 ` sashiko-bot
2026-09-04 19:37 ` Ruhl, Michael J
2026-09-04 18:25 ` [PATCH v6 13/18] drm/xe/vsec: Crescent Island PMT decode Michael J. Ruhl
2026-09-04 18:50 ` sashiko-bot
2026-09-04 18:25 ` [PATCH v6 14/18] drm/xe/vsec: Crescent Island PMT callbacks Michael J. Ruhl
2026-09-04 18:51 ` sashiko-bot
2026-09-04 18:25 ` [PATCH v6 15/18] drm/xe/vsec: Support late bind fw information Michael J. Ruhl
2026-09-04 18:56 ` sashiko-bot
2026-09-04 18:25 ` [PATCH v6 16/18] drm/xe/vsec: Add PMT GUID internal access Michael J. Ruhl
2026-09-04 18:25 ` [PATCH v6 17/18] drm/xe/vsec: Update PMT " Michael J. Ruhl
2026-09-04 18:55 ` sashiko-bot [this message]
2026-09-04 18:25 ` [PATCH v6 18/18] drm/xe/vsec: Refactor platform check Michael J. Ruhl
2026-09-04 18:55 ` ✗ CI.checkpatch: warning for Crescent Island PMT support (rev8) Patchwork
2026-09-04 18:56 ` ✗ CI.KUnit: 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=20260904185526.472811F00A3D@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=michael.j.ruhl@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