** Description changed:
+ SRU Justification:
+
+ [Impact]
+
+ * This is a hardware-enablement SRU that adds libpfm4 support for
+ the CPU-Measurement Facility (CPU-MF) counters of the new IBM z17
+ platform, for Ubuntu 22.04 LTS (Jammy).
+
+ * Without this update, the z17-specific hardware performance
+ counters (extended counter sets) cannot be looked up, decoded, or
+ used through libpfm4 on z17 systems, which in turn blocks perf
+ and other CPU-MF-based tooling on this platform from exposing
+ z17 counter names/events on Jammy.
+
+ * This SRU backports counter definitions that IBM has already
+ published in the public documentation:
+ SA23-2261-09, "The CPU-Measurement Facility Extended Counters
+ Definition for z10, z196/z114, zEC12/zBC12, z13/z13s, z14, z15,
+ z16 and z17", April 2025.
+
+ * The identical fix was already applied to Noble (24.04 LTS) and
+ Resolute (26.04) under LP: #2103418. Jammy was requested later
+ on top an is now separately handled here at LP: #2121808.
+
+ [Fix]
+
+ * 964baf9d35d5f88d8422f96d8a82c672042e7064
+ "s390: Add counter definition for IBM z17"
+ (accepted upstream into the libpfm4 project by Stephane Eranian
+ on 2025-08-29)
+
+ Upstream repository:
+ https://git.code.sf.net/p/perfmon2/libpfm4
+
+ * Commit was translated into a new quilt patch:
+ debian/patches/lp-2121808-s390-Add-counter-definition-for-IBM-z17.patch
+
+ * The patch applies cleanly (no fuzz) since the surrounding s390x CPU-MF
+ counter-table code is unchanged between the Jammy snapshot and the
+ Noble or Resolute snapshots where the same commit was already
+ cherry-picked.
+
+ [Test Plan]
+
+ * libpfm4 is a library, so the most reliable way to test it is with
+ the 'showevtinfo' and 'check_events' example tools that ship as
+ source with libpfm4-dev. They are trivial to build locally, since
+ they only need the headers/library that libpfm4-dev installs.
+
+ * On an Ubuntu 22.04 (Jammy) system running on IBM z17 hardware
+ (with hardware counters enabled), run the following, copy & paste
+ as-is:
+
+ # 1. Enable the test PPA and install the test packages
+ sudo add-apt-repository -y ppa:fheimes/lp2121808
+ sudo apt update
+ sudo apt install -y libpfm4 libpfm4-dev build-essential
+
+ # 2. Build the two example tools against the installed headers/lib
+ cd /usr/share/doc/libpfm4-dev/examples
+ gcc -O2 -o /tmp/showevtinfo showevtinfo.c -lpfm
+ gcc -O2 -o /tmp/check_events check_events.c -lpfm
+
+ # 3. List all events/masks/modifiers and confirm the new z17
+ # counters (added by commit 964baf9d, see SA23-2261-09) show up
+ /tmp/showevtinfo | grep -i z17
+
+ [Where problems could occur]
+
+ * The change only adds new counter/event table entries scoped to
+ the z17 machine type IDs (9175/9176); it does not modify parsing
+ logic or existing counter definitions for other machine
+ generations (z10 through z16), which remain byte-for-byte
+ identical.
+
+ * A regression could occur if:
+ - the new counter table is incorrectly sized/indexed (e.g. via a
+ wrong use of LIBPFM_ARRAY_SIZE()), causing out-of-bounds reads;
+ - the z17 machine-type IDs are mismatched, causing z17 counters
+ to be offered on the wrong hardware, or existing z15/z16
+ counters to be altered or hidden;
+ - a syntax/build issue in the generated tables breaks compilation
+ of libpfm4 on any architecture (mitigated by a full test build
+ across all supported architectures via the PPA before upload).
+
+ * Because this is an additive, hardware-scoped change, any
+ regression would be limited to IBM Z (s390x) users querying
+ CPU-MF counters, and specifically to z17-related event names; it
+ should not affect any other architecture or existing workloads on
+ any architecture.
+
+ * The patch is a straight, unmodified cherry-pick of the same
+ upstream commit already verified and released for Noble and
+ Resolute under LP: #2103418, reducing the risk of introducing a
+ Jammy-specific regression.
+
+ [Other Info]
+
+ * Jammy (22.04 LTS) is still within its standard maintenance
+ window; this SRU is a standard hardware-enablement update
+ following the same precedent as the equivalent z16 enablement
+ previously done for Jammy under LP: #1960118.
+
+ * Test build is available in this PPA:
+ https://launchpad.net/~fheimes/+archive/ubuntu/lp2121808
+ __________
+
Description:
Support for CPU-MF counters of new IBM z17 in kernel, s390-tools, perf
(kernel) and libpfm4.
This part covers the libpfm4 library changes.
The required patch for the libpfm4 part is the following:
commit 964baf9d35d5f88d8422f96d8a82c672042e7064
- s390: Add counter definition for IBM z17
+ s390: Add counter definition for IBM z17
** Changed in: ubuntu-z-systems
Status: Triaged => In Progress
** Changed in: libpfm4 (Ubuntu)
Status: Triaged => In Progress
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2121808
Title:
[UBUNTU 22.04] Support CPU-MF Counters for new IBM z17 - libpfm4 part
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu-z-systems/+bug/2121808/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs