public inbox for platform-driver-x86@vger.kernel.org
 help / color / mirror / Atom feed
From: Mario Limonciello <superm1@kernel.org>
To: Shyam Sundar S K <Shyam-sundar.S-k@amd.com>,
	hansg@kernel.org, ilpo.jarvinen@linux.intel.com
Cc: platform-driver-x86@vger.kernel.org, Yijun.Shen@Dell.com,
	Sanket.Goswami@amd.com
Subject: Re: [PATCH v3 0/7] platform/x86/amd/pmf: Introduce PMF util layer with userspace interface
Date: Mon, 2 Mar 2026 13:36:25 -0600	[thread overview]
Message-ID: <ff438997-5d76-435e-a2e5-9ac6f8658eb1@kernel.org> (raw)
In-Reply-To: <20260301131124.1370565-1-Shyam-sundar.S-k@amd.com>

On 3/1/26 7:11 AM, Shyam Sundar S K wrote:
> This patch series introduces a new util layer for the AMD Platform
> Management Framework (PMF) driver that exposes a minimal userspace
> interface for metrics monitoring and feature discovery.
> 
> AMD PMF currently manages power and thermal policies internally through
> Smart PC features, Auto Mode, Policy Builder, Static/Dynamic Power
> Sliders. However, system designers and OEMs need visibility into PMF
> metrics and feature status for validation, debugging, and integration
> with monitoring tools.
> 
> This series addresses that need by adding a character device interface
> that allows controlled access to PMF metrics data while maintaining
> the driver's existing automated policy management.
> 
> The primary use case is integration with userspace tools like AMD
> SystemDeck, which are widely used by system designers to:
> - Monitor real-time power and thermal behavior
> - Validate PMF feature operation during platform bring-up
> - Debug thermal issues by tracking skin temperature, C-state residency,
>    and socket power metrics
> - Verify BIOS input/output policy values during Smart PC operation
> 
> The util layer reads from the existing Trusted Application (TA) shared
> memory buffer and cached BIOS output values, adding no new communication
> overhead with the TA.
> 
> v3:
>   - Stop exporting battery information via util layer.
>   - Optimize the core logic for fetching BIOS outputs.
>   - Update the documentation patch to reflect the current util layer design.
>   - Consolidate amd-pmf-io.h changes into common UAPI header.
>   - Define a single unified uAPI structure and IOCTL.
>   - Address other v2 review remarks [1]
> 
> v2:
>   - address remarks from v1
>   - add a new tool that exercises the IOCTLs from PMF interface
> 
> [1] https://lore.kernel.org/platform-driver-x86/20251111071010.4179492-1-Shyam-sundar.S-k@amd.com/
> 
> Shyam Sundar S K (7):
>    platform/x86/amd/pmf: Add util layer and userspace misc device
>      interface
>    platform/x86/amd/pmf: cache BIOS output values for user-space metrics
>      via util IOCTL
>    platform/x86/amd/pmf: Add feature discovery support to util interface
>    platform/x86/amd/pmf: Store commonly used enums in the header file
>    platform/x86/amd/pmf: Move debug helper functions to UAPI header
>    platform/x86/amd/pmf: Introduce AMD PMF testing tool for driver
>      metrics and features
>    Documentation/ABI: add testing entry for AMD PMF misc device interface
> 
>   .../ABI/testing/misc-amdpmf_interface         |  70 ++++
>   MAINTAINERS                                   |   1 +
>   .../amd-sfh-hid/sfh1_1/amd_sfh_interface.c    |   1 +
>   drivers/platform/x86/amd/pmf/Kconfig          |  10 +
>   drivers/platform/x86/amd/pmf/Makefile         |   2 +
>   drivers/platform/x86/amd/pmf/core.c           |   8 +
>   drivers/platform/x86/amd/pmf/pmf.h            |  32 +-
>   drivers/platform/x86/amd/pmf/spc.c            |  55 +--
>   drivers/platform/x86/amd/pmf/tee-if.c         |   9 +-
>   drivers/platform/x86/amd/pmf/util.c           | 210 ++++++++++++
>   include/linux/amd-pmf-io.h                    |   9 -
>   include/uapi/linux/amd-pmf.h                  | 324 ++++++++++++++++++
>   tools/testing/selftests/Makefile              |   1 +
>   .../drivers/platform/x86/amd/pmf/Makefile     |   8 +
>   .../drivers/platform/x86/amd/pmf/test_pmf.c   | 243 +++++++++++++
>   15 files changed, 897 insertions(+), 86 deletions(-)
>   create mode 100644 Documentation/ABI/testing/misc-amdpmf_interface
>   create mode 100644 drivers/platform/x86/amd/pmf/util.c
>   create mode 100644 include/uapi/linux/amd-pmf.h
>   create mode 100644 tools/testing/selftests/drivers/platform/x86/amd/pmf/Makefile
>   create mode 100644 tools/testing/selftests/drivers/platform/x86/amd/pmf/test_pmf.c
> 

Thanks, looks good to me.  You can add this to the next version (which 
incorporates Randy's feedback).

Reviewed-by: Mario Limonciello (AMD) <superm1@kernel.org>


  parent reply	other threads:[~2026-03-02 19:36 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-01 13:11 [PATCH v3 0/7] platform/x86/amd/pmf: Introduce PMF util layer with userspace interface Shyam Sundar S K
2026-03-01 13:11 ` [PATCH v3 1/7] platform/x86/amd/pmf: Add util layer and userspace misc device interface Shyam Sundar S K
2026-03-01 18:45   ` Randy Dunlap
2026-03-03 15:22     ` Shyam Sundar S K
2026-03-25 13:16   ` Ilpo Järvinen
2026-03-25 13:18   ` Ilpo Järvinen
2026-03-25 14:05   ` Ilpo Järvinen
2026-03-30 12:12     ` Shyam Sundar S K
2026-03-30 15:10       ` Ilpo Järvinen
2026-03-01 13:11 ` [PATCH v3 2/7] platform/x86/amd/pmf: cache BIOS output values for user-space metrics via util IOCTL Shyam Sundar S K
2026-03-25 14:08   ` Ilpo Järvinen
2026-03-01 13:11 ` [PATCH v3 3/7] platform/x86/amd/pmf: Add feature discovery support to util interface Shyam Sundar S K
2026-03-25 14:07   ` Ilpo Järvinen
2026-03-30 11:41     ` Shyam Sundar S K
2026-03-01 13:11 ` [PATCH v3 4/7] platform/x86/amd/pmf: Store commonly used enums in the header file Shyam Sundar S K
2026-03-25 13:34   ` Ilpo Järvinen
2026-03-01 13:11 ` [PATCH v3 5/7] platform/x86/amd/pmf: Move debug helper functions to UAPI header Shyam Sundar S K
2026-03-25 13:39   ` Ilpo Järvinen
2026-03-30 11:45     ` Shyam Sundar S K
2026-03-01 13:11 ` [PATCH v3 6/7] platform/x86/amd/pmf: Introduce AMD PMF testing tool for driver metrics and features Shyam Sundar S K
2026-03-25 13:54   ` Ilpo Järvinen
2026-03-25 15:07     ` Mario Limonciello
2026-03-26 10:20       ` Ilpo Järvinen
2026-03-30 11:42         ` Shyam Sundar S K
2026-03-01 13:11 ` [PATCH v3 7/7] Documentation/ABI: add testing entry for AMD PMF misc device interface Shyam Sundar S K
2026-03-25 13:58   ` Ilpo Järvinen
2026-03-25 15:08     ` Mario Limonciello
2026-03-26 10:14       ` Ilpo Järvinen
2026-03-02 19:36 ` Mario Limonciello [this message]
2026-03-03 15:23   ` [PATCH v3 0/7] platform/x86/amd/pmf: Introduce PMF util layer with userspace interface Shyam Sundar S K

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=ff438997-5d76-435e-a2e5-9ac6f8658eb1@kernel.org \
    --to=superm1@kernel.org \
    --cc=Sanket.Goswami@amd.com \
    --cc=Shyam-sundar.S-k@amd.com \
    --cc=Yijun.Shen@Dell.com \
    --cc=hansg@kernel.org \
    --cc=ilpo.jarvinen@linux.intel.com \
    --cc=platform-driver-x86@vger.kernel.org \
    /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