From: Qinyun Tan <qinyuntan@linux.alibaba.com>
To: Muralidhara M K <muralidhara.mk@amd.com>
Cc: "Suma Hegde" <suma.hegde@amd.com>,
"Muthusamy Ramalingam" <muthusamy.ramalingam@amd.com>,
"Naveen Krishna Chatradhi" <naveenkrishna.chatradhi@amd.com>,
"Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>,
"Hans de Goede" <hdegoede@redhat.com>,
platform-driver-x86@vger.kernel.org,
linux-kernel@vger.kernel.org,
"Qinyun Tan" <qinyuntan@linux.alibaba.com>
Subject: Re: [RFC PATCH 1/8] platform/x86/amd/hsmp: Add new HSMP messages for Family 1Ah, Model 50h-5Fh
Date: Tue, 9 Jun 2026 16:14:56 +0800 [thread overview]
Message-ID: <20260609081456.1152820-1-qinyuntan@linux.alibaba.com> (raw)
In-Reply-To: <20260528093954.2461272-2-muralidhara.mk@amd.com>
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?
Thanks,
Qinyun
next prev parent reply other threads:[~2026-06-09 8:14 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-28 9:39 [PATCH v4 0/7] platform/x86/amd/hsmp: Support Family 1Ah Model 50h-5Fh telemetry Muralidhara M K
2026-05-28 9:39 ` [PATCH v4 1/7] platform/x86/amd/hsmp: Add new HSMP messages for Family 1Ah, Model 50h-5Fh Muralidhara M K
2026-06-09 8:14 ` Qinyun Tan [this message]
2026-06-09 10:06 ` [RFC PATCH 1/8] " M K, Muralidhara
2026-06-09 11:14 ` qinyuntan
2026-05-28 9:39 ` [PATCH v4 2/7] platform/x86/amd/hsmp: Add UAPI structures for Family 1Ah Model 50h-5Fh metrics table Muralidhara M K
2026-05-28 9:39 ` [PATCH v4 3/7] platform/x86/amd/hsmp: Unify response_sz validation to an upper-bound check Muralidhara M K
2026-05-28 9:39 ` [PATCH v4 4/7] platform/x86/amd/hsmp: Source metric-table size from firmware Muralidhara M K
2026-06-10 11:05 ` Ilpo Järvinen
2026-06-11 4:38 ` M K, Muralidhara
2026-06-11 8:20 ` Ilpo Järvinen
2026-06-11 16:44 ` M K, Muralidhara
2026-06-11 16:45 ` M K, Muralidhara
2026-05-28 9:39 ` [PATCH v4 5/7] platform/x86/amd/hsmp: Add IOCTL_GET_TELEMETRY_DATA for metric table reads Muralidhara M K
2026-06-10 11:02 ` Ilpo Järvinen
2026-06-11 4:13 ` M K, Muralidhara
2026-05-28 9:39 ` [PATCH v4 6/7] platform/x86/amd/hsmp: Enable HSMP_PROTO_VER7 metric tables on the ACPI driver via the IOCTL Muralidhara M K
2026-05-28 9:39 ` [PATCH v4 7/7] platform/x86/amd/hsmp: Make metric table read locking use guard(mutex) Muralidhara M K
2026-06-10 11:07 ` Ilpo Järvinen
2026-06-08 16:14 ` [PATCH v4 0/7] platform/x86/amd/hsmp: Support Family 1Ah Model 50h-5Fh telemetry M K, Muralidhara
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260609081456.1152820-1-qinyuntan@linux.alibaba.com \
--to=qinyuntan@linux.alibaba.com \
--cc=hdegoede@redhat.com \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=muralidhara.mk@amd.com \
--cc=muthusamy.ramalingam@amd.com \
--cc=naveenkrishna.chatradhi@amd.com \
--cc=platform-driver-x86@vger.kernel.org \
--cc=suma.hegde@amd.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®