Page MenuHomeFreeBSD

hwpmc: disable uncore class on Sandy Bridge and newer

Authored by mhorne on Aug 2 2021, 9:23 PM.



It was written for Nehalem and Westmere, but has failed to stay current
with major changes to the uncore architecture, beginning with Sandy
Bridge. These changes brought new layouts and locations for some uncore
MSRs. There was some minor but incomplete attempts to address this in
78d763a29b15 and cc0c1555d334.

Misprogramming these MSRs in ucp_start_pmc() may panic the system, and
this is trivially reproducible via pmcstat(8) on at least Broadwell and
Haswell. Disable the class on these CPUs until it can be updated more
completely and leave a TODO mentioning some of the work required. Note
that the nclasses value for Broadwell was already incorrect and doesn't
need changing.

The result is that any uncore events listed by pmcstat -L will no longer
be allocatable, but this is already the case for newer generations of
Intel CPUs.

PR: 253687

Diff Detail

R10 FreeBSD src repository
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.