Re: [RFC PATCH 1/8] platform/x86/amd/hsmp: Add new HSMP messages for Family 1Ah, Model 50h-5Fh

From: M K, Muralidhara

Date: Tue Jun 09 2026 - 06:09:50 EST




On 6/9/2026 1:44 PM, Qinyun Tan wrote:
[Some people who received this message don't often get email from qinyuntan@xxxxxxxxxxxxxxxxx. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ]

Caution: This message originated from an External Source. Use proper caution when opening attachments, clicking links, or responding.


On Mon, 19 Jan 2026, Muralidhara M K wrote:
The same firmware also extends three existing SET-only messages
(HSMP_SET_XGMI_LINK_WIDTH 0x0C, HSMP_SET_DF_PSTATE 0x0D,
HSMP_SET_PSTATE_MAX_MIN 0x22) with a read-back path selected by
bit[31] of args[0] (0 = set, 1 = get). Without converting these
entries to HSMP_SET_GET, userspace cannot query the currently
programmed value even though firmware now supports it.

I noticed that HSMP_SET_XGMI_PSTATE_RANGE (0x26) is not converted
here. The esmi_ib_library already implements a GET path for it in
esmi_xgmi_pstate_range_get() using the same bit[31] convention:

msg.msg_id = HSMP_SET_XGMI_PSTATE_RANGE;
msg.args[0] = BIT(31);
ret = hsmp_xfer(&msg, O_RDONLY);

Since the kernel descriptor is still {1, 0, HSMP_SET}, hsmp_ioctl()
would reject the O_RDONLY open with -EPERM because is_get_msg() only
recognises HSMP_GET and HSMP_SET_GET types.

/*
- * HSMP_SET_XGMI_LINK_WIDTH, num_args = 1, response_sz = 0
+ * HSMP_SET_XGMI_LINK_WIDTH, num_args = 1, response_sz = 0/1
+ * input: args[0] = set/get XGMI Link width[31] (0 = set, 1 = get) +
[...]
- {1, 0, HSMP_SET},
+ {1, 1, HSMP_SET_GET},

Does HSMP_SET_XGMI_PSTATE_RANGE also need the same conversion?

Hi Qinyun Tan,

This command is not supported on the Venice platform (Family 1A Models 50h-5Fh). Please Refer https://docs.amd.com/v/u/en-US/58264_B0_Venice_PPR_026
The modifications need to be made in the esmi_ib_library, not in this patch.


Thanks,
Qinyun