[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250430212106.369208-1-david.e.box@linux.intel.com>
Date: Wed, 30 Apr 2025 14:20:49 -0700
From: "David E. Box" <david.e.box@...ux.intel.com>
To: linux-kernel@...r.kernel.org,
platform-driver-x86@...r.kernel.org,
david.e.box@...ux.intel.com,
srinivas.pandruvada@...ux.intel.com,
andriy.shevchenko@...ux.intel.com,
ilpo.jarvinen@...ux.intel.com,
tony.luck@...el.com,
xi.pardee@...ux.intel.com
Cc: hdegoede@...hat.com
Subject: [PATCH 00/15] Intel VSEC/PMT: Introduce Discovery Driver
This patch series introduces a new discovery driver for Intel Platform
Monitoring Technology (PMT) and a set of supporting changes to improve
telemetry integration across Intel VSEC features.
The primary goal of this series is to add the PMT Discovery driver, which
enumerates and exposes telemetry attributes by parsing hardware-provided
discovery tables from OOBMSM devices. In particular, the discovery driver
gathers detailed capability information (such as telemetry region
attributes) that will later enable direct access to telemetry regions via a
new API (intel_pmt_get_regions_by_feature()). This API is crucial for
retrieving data like per-RMID counters.
The remainder of the series consists of several preparatory and testing
patches:
1. Private Data and CPU Mapping: The VSEC driver now includes
per-device private data to store the OOBMSM-to-CPU mapping. The TPMI driver
copies its platform info into this common area (via
intel_vsec_set_mapping()), allowing other VSEC features to access CPU
mapping information without redundant queries.
2. Device Links Enhancements: With telemetry now depending on both the
TPMI driver (for CPU mapping) and the new discovery driver (for telemetry
region attributes), device links have been added and optimized. These
changes ensure that supplier drivers are probed and registered before
consumer drivers, enforcing the proper dependency order for reliable
telemetry feature access.
4. Discovery Driver and API: The core of the series is the addition of
the PMT Discovery driver. This driver not only implements discovery of
telemetry attributes and capability data (exposed via sysfs) but also
introduces an API to retrieve telemetry regions by feature, which is
essential for features like per-RMID telemetry counters.
5. Testing: A simple KUNIT test is provided for the enhanced discovery
API to ensure its reliability and correctness.
Together, these patches provide a foundation for future telemetry
enhancements in the Intel VSEC framework. They enable a unified interface
for accessing hardware telemetry capabilities and ensure that inter-driver
dependencies are properly managed through device links.
David E. Box (15):
MAINTAINERS: Add link to documentation of Intel PMT ABI
platform/x86/intel/vsec: Add private data for per-device data
platform/x86/intel/vsec: Create wrapper to walk PCI config space
platform/x86/intel/vsec: Add device links to enforce dependencies
platform/x86/intel/vsec: Skip absent features during initialization
platform/x86/intel/vsec: Skip driverless features
platform/x86/intel/vsec: Add new Discovery feature
platform/x86/intel/pmt: Add PMT Discovery driver
docs: Add ABI documentation for intel_pmt feature directories
platform/x86/intel/tpmi: Relocate platform info to intel_vsec.h
platform/x86/intel/vsec: Set OOBMSM to CPU mapping
platform/x86/intel/tpmi: Get OOBMSM CPU mapping from TPMI
platform/x86/intel/pmt/discovery: Get telemetry attributes
platform/x86/intel/pmt/telemetry: Add API to retrieve telemetry
regions by feature
platform/x86/intel/pmt: KUNIT test for PMT Enhanced Discovery API
.../testing/sysfs-class-intel_pmt-features | 128 ++++
MAINTAINERS | 2 +
drivers/platform/x86/intel/plr_tpmi.c | 3 +-
drivers/platform/x86/intel/pmt/Kconfig | 27 +
drivers/platform/x86/intel/pmt/Makefile | 4 +
drivers/platform/x86/intel/pmt/class.c | 35 +-
drivers/platform/x86/intel/pmt/class.h | 9 +
.../platform/x86/intel/pmt/discovery-kunit.c | 116 ++++
drivers/platform/x86/intel/pmt/discovery.c | 633 ++++++++++++++++++
drivers/platform/x86/intel/pmt/features.c | 205 ++++++
drivers/platform/x86/intel/pmt/telemetry.c | 94 ++-
.../intel/speed_select_if/isst_tpmi_core.c | 9 +-
.../uncore-frequency/uncore-frequency-tpmi.c | 5 +-
drivers/platform/x86/intel/vsec.c | 358 +++++++++-
drivers/platform/x86/intel/vsec_tpmi.c | 8 +-
drivers/powercap/intel_rapl_tpmi.c | 9 +-
include/linux/intel_pmt_features.h | 157 +++++
include/linux/intel_tpmi.h | 26 +-
include/linux/intel_vsec.h | 97 ++-
19 files changed, 1865 insertions(+), 60 deletions(-)
create mode 100644 Documentation/ABI/testing/sysfs-class-intel_pmt-features
create mode 100644 drivers/platform/x86/intel/pmt/discovery-kunit.c
create mode 100644 drivers/platform/x86/intel/pmt/discovery.c
create mode 100644 drivers/platform/x86/intel/pmt/features.c
create mode 100644 include/linux/intel_pmt_features.h
base-commit: 67e2635fe0cca5f0383c0780db986d8237e83f0a
--
2.43.0
Powered by blists - more mailing lists