[PATCH v7 0/5] platform/x86/amd/hsmp: Family 1Ah Model 50h-5Fh HSMP and metrics
From: Muralidhara M K
Date: Mon Jul 27 2026 - 10:21:11 EST
This series extends the AMD HSMP platform driver and UAPI for Family 1Ah,
Model 50h-5Fh: new HSMP message IDs (including the PQoS-related IDs),
relaxed response_sz handling against the descriptor table,
firmware-reported metric table sizing for ioremap and reads,
HSMP_IOCTL_GET_TELEMETRY_DATA on the existing character device for a
single-shot full-table copy, and ACPI enablement for protocol version 7
tables. Documentation is updated in Documentation/arch/x86/amd_hsmp.rst.
The motivation for the new ioctl is that the sysfs metrics_bin path
cannot serve the newer tables. It is a file read, so userspace can read
it in chunks and observe a torn snapshot if an SMU refresh lands between
read() calls, and it is bounded by PAGE_SIZE, so the ~13 KB table used by
protocol version 7 on Family 1Ah Model 50h-5Fh cannot be returned at all.
Rather than extend sysfs to lift both restrictions, the metric table is
exposed through /dev/hsmp with an ioctl that always copies the table in
one shot.
v6 submission (lore.kernel.org)
https://lore.kernel.org/platform-driver-x86/20260612042610.1629037-2-muralidhara.mk@xxxxxxx/T/#m2fd6e85bd5fda3cf66fbdee3d8e34ccebef64dd3
This series applies on top of the HSMP concurrency series.
The series is bisect-safe: each commit was built with
make W=1 drivers/platform/x86/amd/hsmp/
on top of the previous commits with no warnings, and
scripts/checkpatch.pl --strict -g <rev> was run on each change
(0 errors / 0 warnings / 0 checks).
Muralidhara M K (5):
platform/x86/amd/hsmp: Add HSMP messages for Family 1Ah, Model 50h-5Fh
platform/x86/amd/hsmp: Unify response_sz validation to an upper-bound
check
platform/x86/amd/hsmp: Source metric-table size from firmware
platform/x86/amd/hsmp: Add IOCTL_GET_TELEMETRY_DATA for metric table
reads
platform/x86/amd/hsmp: Enable protocol version 7 metric tables on the
ACPI driver
Documentation/arch/x86/amd_hsmp.rst | 35 ++++-
arch/x86/include/uapi/asm/amd_hsmp.h | 222 +++++++++++++++++++++++++--
drivers/platform/x86/amd/hsmp/acpi.c | 22 ++-
drivers/platform/x86/amd/hsmp/hsmp.c | 183 +++++++++++++++++++---
drivers/platform/x86/amd/hsmp/hsmp.h | 5 +-
5 files changed, 428 insertions(+), 39 deletions(-)
base-commit: da97ec927e4441fed07044e3fed59763d7e07c3b
--
2.34.1