HomeFreeBSD

hwpmc: fix event allocation on pre-Zen AMD CPUs

Description

hwpmc: fix event allocation on pre-Zen AMD CPUs

amd_allocate_pmc() chose the pmu-events code path whenever pmc_cpuid was
non-empty, and rejected any allocation lacking PMC_F_EV_PMU.
But pmc_cpuid is set for every AMD CPU, while the pmu-events tables only cover
Zen and later.
On older families (K8, Bobcat, Jaguar/16h, Bulldozer) libpmc finds no
pmu-events entry and falls back to the legacy path, which never sets
PMC_F_EV_PMU.

Reviewed by: mhorne
Approved by: mhorne
MFC after: 1 week
MFC to: stable/14, stable/15
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D58468

Details

Provenance
olivierAuthored on Jul 28 2026, 7:06 PM
Reviewer
mhorne
Differential Revision
D58468: hwpmc: fix event allocation on pre-Zen AMD CPUs
Parents
rGf884e820d87f: netinet6: Tear down IPv6 source address selection policies with rest of IPv6.
Branches
Unknown
Tags
Unknown