[PATCH v6 0/8] platform/x86/amd/hsmp: Family 1Ah Model 50h-5Fh HSMP and metrics

From: Muralidhara M K

Date: Fri Jun 12 2026 - 00:26:49 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
coordinated metric-table access plus ACPI HSMP probe/remove lifetime
fixes on the shared global socket array. Documentation is updated in
Documentation/arch/x86/amd_hsmp.rst.

v5 submission (lore.kernel.org)

https://lore.kernel.org/platform-driver-x86/20260611052919.1095549-1-muralidhara.mk@xxxxxxx/T/#t

Changes since v5

* Patch 6/8: Tighten the Spectre-v1 changelog and subject around
clamping ioctl and hsmp_send_message() indices; wrap the commit
description so scripts/checkpatch.pl stays quiet on line length.

* Patch 8/8: Broaden the final fix beyond sysfs metric locking alone.
Serialize metric table refresh and memcpy_fromio(), refcount ACPI
HSMP sockets with a probe mutex across init_acpi(), misc_register(),
and refcount_inc(), replace devm metric DRAM maps with explicit
ioremap()/mutex_init plus hsmp_metric_tbl_unmap_all() on last ACPI
remove, add hsmp_acpi_free_sock_alloc_if_idle() for early probe
failures, and order legacy platform remove so misc is deregistered
before metric unmap (matching ACPI teardown).

The series is bisect-safe: each commit was built with
make M=drivers/platform/x86/amd/hsmp
after the previous commits, and scripts/checkpatch.pl -g <rev> was run on
each change (0 errors / 0 warnings).

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: Clamp ioctl/send_message indices (Spectre v1)
platform/x86/amd/hsmp: Enable HSMP_PROTO_VER7 metric tables on the
ACPI driver via the IOCTL
platform/x86/amd/hsmp: Serialize metric table access and ACPI HSMP
teardown

Documentation/arch/x86/amd_hsmp.rst | 30 ++-
arch/x86/include/uapi/asm/amd_hsmp.h | 310 +++++++++++++++++++++++++--
drivers/platform/x86/amd/hsmp/acpi.c | 81 +++++--
drivers/platform/x86/amd/hsmp/hsmp.c | 214 ++++++++++++++++---
drivers/platform/x86/amd/hsmp/hsmp.h | 13 +-
drivers/platform/x86/amd/hsmp/plat.c | 1 +
6 files changed, 594 insertions(+), 55 deletions(-)

--
2.34.1