[PATCH v5 0/8] platform/x86/amd/hsmp: Family 1Ah Model 50h-5Fh HSMP and metrics
From: Muralidhara M K
Date: Thu Jun 11 2026 - 01:29:51 EST
Hi,
This series extends the AMD HSMP platform driver and UAPI for Family 1Ah,
Model 50h-5Fh: new HSMP message IDs (including PQoS-related IDs in the
first patch), Zen 6 metric table layout in UAPI, 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 (avoiding
sysfs PAGE_SIZE limits and torn reads), ACPI enablement for protocol
version 7 tables, Spectre-v1 hardening on user-controlled indices, and
per-socket guard(mutex) around metric table refresh and copy.
Documentation is updated in Documentation/arch/x86/amd_hsmp.rst.
The series is bisect-safe: each commit was built with
make W=1 M=drivers/platform/x86/amd/hsmp
after the previous commits, and scripts/checkpatch.pl --strict -g <rev>
was run on each change.
v4 submission (lore.kernel.org)
---------------------------------
https://lore.kernel.org/platform-driver-x86/PH8PR12MB7325382A1DDC4A886C25F0D7851C2@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/T/#t
Changes since v4
----------------
* The HSMP_IOCTL_GET_TELEMETRY_DATA
commit (5/8) keeps Spectre-v1 mitigation for the telemetry ioctl path
limited to clamping req.sock_ind before indexing hsmp_pdev.sock[].
The array_index_nospec() on msg.msg_id at the entry to
hsmp_ioctl_msg() is moved into a dedicated follow-up patch (6/8) with
its own changelog, so review of the ioctl/UAPI patch and the generic
ioctl message path are separated.
* Patch 1/8 documents the additional PQoS-related HSMP message IDs
(0x3B / 0x3C) alongside the Family 1Ah Model 50h-5Fh message work; the
subject line is shortened to "Add HSMP messages ..." (drop "new") for
consistency with the expanded scope of that commit.
Thanks,
Muralidhara M K
Muralidhara M K (8):
platform/x86/amd/hsmp: Add HSMP messages for Family 1Ah, Model 50h-5Fh
platform/x86/amd/hsmp: Add UAPI structures for Family 1Ah Model
50h-5Fh metrics table
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: Sanitize hsmp_ioctl_msg() msg_id for Spectre v1
platform/x86/amd/hsmp: Enable HSMP_PROTO_VER7 metric tables on the
ACPI driver via the IOCTL
platform/x86/amd/hsmp: Make metric table read locking use guard(mutex)
Documentation/arch/x86/amd_hsmp.rst | 30 ++-
arch/x86/include/uapi/asm/amd_hsmp.h | 310 +++++++++++++++++++++++++--
drivers/platform/x86/amd/hsmp/acpi.c | 23 +-
drivers/platform/x86/amd/hsmp/hsmp.c | 168 +++++++++++++--
drivers/platform/x86/amd/hsmp/hsmp.h | 6 +-
5 files changed, 500 insertions(+), 37 deletions(-)
--
2.34.1