** Description changed: + SRU Justification: + ------------------- + + [Impact] + + * As hardware-enablement SRU, this adds libpfm4 support for the + CPU-Measurement Facility (CPU-MF) counters of the new IBM z17 + platform. + + * 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. + + * 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. + + [Fix] + + * 964baf9d35d5f88d8422f96d8a82c672042e7064 + "s390: Add counter definition for IBM z17" + (upstream accepted) + + [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 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 + # (https://launchpad.net/~fheimes/+archive/ubuntu/lp2103418) + sudo add-apt-repository -y ppa:fheimes/lp2103418 + 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 + + # 4. Confirm a sample of the new z17 events resolve correctly + # (replace EVENT_NAME with an actual z17 event name from the + # 'showevtinfo' output above, e.g. one of the CPU_CYCLES / + # extended-counter-set events listed under the z17 section) + /tmp/check_events EVENT_NAME + + * If possible, repeat step 3 on a non-z17 IBM Z machine (e.g. + z15/z16) too, to confirm the existing counter sets for those + machine types are unaffected by the change. + + [Where problems could occur] + + * The change only adds new counter/event table entries scoped to + the z17 machine type IDs; it does not modify parsing logic or + existing counter definitions for other machine generations. + + * 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 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. + + [Other Info] + + * This is one part of a coordinated hardware-enablement effort for + IBM z17 CPU-MF counters spanning kernel, s390-tools, perf and + libpfm4; see the companion bugs: + - LP: #2101111 (kernel part, Fix Released) + - LP: #2103415 (perf part, Fix Released) + + * Ubuntu 25.04 (Plucky) and 25.10 (Questing) have already reached + end of life and will not receive this fix (tracked as Won't Fix + on the relevant tasks); this SRU targets Noble (24.04 LTS) and + Resolute (26.04) and the current development release (Stonking). + + __________ + Feature Description: Support for CPU-MF counters of new IBM Z hardware in kernel, s390-tools, perf (kernel) and libpfm4. This part covers the libpfm4 library changes. The related patches / commit IDs will be provided as soon as the required information has been publicly disclosed.
-- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2103418 Title: [25.04 FEAT] [post announcement] [KRN2304] CPU-MF Counters for new IBM Z hardware - libpfm4 part To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu-z-systems/+bug/2103418/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
