Skip to content

platform/x86/amd/hsmp: Per-platform enabled-message bitmaps

Suma Hegde platform-driver-x86 2 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest11 patches 0 repliesNew
  2. v111 patches 3 repliesSuperseded

Changes in v2 from the cover letter

- Named HSMP_MSG_BIT() static bitmaps; zen6 PQOS bits added and HSMP_SET_XGMI_PSTATE_RANGE dropped from the zen6 write bitmap.
- validate_message() runs only after sock->dev is ready.
- Safer dynamic bitmap fetch helpers and default-bitmap fallback.
- Skip hwmon registration on client platforms in the plat probe path.
- Keep the short client-attribute visibility comment in the modes patch.
- Commit message / tagging cleanups (Co-developed-by, defensive null-check wording, typos).
- See per-patch "Changes since v1" for details.

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/11platform/x86/amd/hsmp: Fix sock_ind bounds check in hsmp_is_sock_attr_visible()drivers/platform/x86/amd/hsmp/plat.c+7 -20 replies
2/11platform/x86/amd/hsmp: Move proto_ver to hsmp_socket structuredrivers/platform/x86/amd/hsmp/acpi.c drivers/platform/x86/amd/hsmp/hsmp.c drivers/platform/x86/amd/hsmp/hsmp.h +1 more+13 -90 replies
3/11platform/x86/amd/hsmp: Null-check drvdata in hsmp_is_sock_attr_visible()drivers/platform/x86/amd/hsmp/acpi.c+10 -10 replies
4/11platform/x86/amd/hsmp: Move is_get_msg() before validate_message()drivers/platform/x86/amd/hsmp/hsmp.c+11 -110 replies
5/11platform/x86/amd/hsmp: Use local sock pointer in init_acpi()drivers/platform/x86/amd/hsmp/acpi.c+6 -30 replies
6/11platform/x86/amd/hsmp: Move the sock_ind bounds check before validate_message()drivers/platform/x86/amd/hsmp/hsmp.c+4 -30 replies
7/11platform/x86/amd/hsmp: Add per-platform bitmap to validate HSMP messagesdrivers/platform/x86/amd/hsmp/acpi.c drivers/platform/x86/amd/hsmp/hsmp.c drivers/platform/x86/amd/hsmp/hsmp.h +1 more+371 -40 replies
8/11platform/x86/amd/hsmp: Populate the bitmaps dynamically on 6th Gen AMD EPYC Serverdrivers/platform/x86/amd/hsmp/hsmp.c+47 -00 replies
9/11platform/x86/amd/hsmp: Populate the bitmaps dynamically for future platformsdrivers/platform/x86/amd/hsmp/hsmp.c+47 -40 replies
10/11platform/x86/amd/hsmp: Relocate to_hsmp_sys_attr() macrodrivers/platform/x86/amd/hsmp/acpi.c+2 -20 replies
11/11platform/x86/amd/hsmp: Update sysfs and hwmon file modes based on platform capabilitiesdrivers/platform/x86/amd/hsmp/acpi.c drivers/platform/x86/amd/hsmp/hwmon.c+67 -60 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH v2 00/11] platform/x86/amd/hsmp: Per-platform enabled-message bitmaps

From: Suma Hegde <[email protected]>

This series introduces per-socket read/write enabled-message bitmaps so the HSMP driver rejects unsupported messages before they reach the SMU. Prep patches fix sock_ind bounds checking, move proto_ver onto hsmp_socket, and reorder helpers for the validation path. Later patches populate the bitmaps statically and via HSMP_GET_ENABLED_HSMP_CMDS (6th Gen AMD EPYC Server and future platforms), and update sysfs/hwmon file modes from the bitmaps.

Client platforms skip bitmap init, populate, and validation until dedicated client tables exist; shared smu_fw_version and protocol_version sysfs attributes remain visible there.

Changes since v1:
- Named HSMP_MSG_BIT() static bitmaps; zen6 PQOS bits added and HSMP_SET_XGMI_PSTATE_RANGE dropped from the zen6 write bitmap.
- validate_message() runs only after sock->dev is ready.
- Safer dynamic bitmap fetch helpers and default-bitmap fallback.
- Skip hwmon registration on client platforms in the plat probe path.
- Keep the short client-attribute visibility comment in the modes patch.
- Commit message / tagging cleanups (Co-developed-by, defensive null-check wording, typos).
- See per-patch "Changes since v1" for details.

Patch summary:

  01/11  Fix sock_ind bounds check in hsmp_is_sock_attr_visible()
  02/11  Move proto_ver to hsmp_socket structure
  03/11  Null-check drvdata in hsmp_is_sock_attr_visible()
  04/11  Move is_get_msg() before validate_message()
  05/11  Use local sock pointer in init_acpi()
  06/11  Move the sock_ind bounds check before validate_message()
  07/11  Add per-platform bitmap to validate HSMP messages
  08/11  Populate the bitmaps dynamically on 6th Gen AMD EPYC Server
  09/11  Populate the bitmaps dynamically for future platforms
  10/11  Relocate to_hsmp_sys_attr() macro
  11/11  Update sysfs and hwmon file modes based on platform capabilities

Suma Hegde (11):
platform/x86/amd/hsmp: Fix sock_ind bounds check in
hsmp_is_sock_attr_visible()
platform/x86/amd/hsmp: Move proto_ver to hsmp_socket structure platform/x86/amd/hsmp: Null-check drvdata in
hsmp_is_sock_attr_visible()
platform/x86/amd/hsmp: Move is_get_msg() before validate_message() platform/x86/amd/hsmp: Use local sock pointer in init_acpi() platform/x86/amd/hsmp: Move the sock_ind bounds check before
validate_message()
platform/x86/amd/hsmp: Add per-platform bitmap to validate HSMP
messages
platform/x86/amd/hsmp: Populate the bitmaps dynamically on 6th Gen AMD
EPYC Server
platform/x86/amd/hsmp: Populate the bitmaps dynamically for future
platforms
platform/x86/amd/hsmp: Relocate to_hsmp_sys_attr() macro platform/x86/amd/hsmp: Update sysfs and hwmon file modes based on
platform capabilities

 drivers/platform/x86/amd/hsmp/acpi.c  |  94 +++++-
 drivers/platform/x86/amd/hsmp/hsmp.c  | 433 +++++++++++++++++++++++++-
 drivers/platform/x86/amd/hsmp/hsmp.h  |  29 +-
 drivers/platform/x86/amd/hsmp/hwmon.c |  24 +-
 drivers/platform/x86/amd/hsmp/plat.c  |  36 ++-
 5 files changed, 578 insertions(+), 38 deletions(-)

base-commit: c339f4010dea8b0d754f84ace70cd1b089878ef8 (rebased on platform-drivers-x86 master branch)

Signature · 1 line
2.34.1