Page MenuHomeFreeBSD

hwpmc: disable uncore class on Sandy Bridge and newer
ClosedPublic

Authored by mhorne on Aug 2 2021, 9:23 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Sep 27, 6:03 PM
Unknown Object (File)
Thu, Sep 26, 6:14 PM
Unknown Object (File)
Thu, Sep 26, 5:38 PM
Unknown Object (File)
Tue, Sep 24, 7:48 AM
Unknown Object (File)
Tue, Sep 24, 4:20 AM
Unknown Object (File)
Sun, Sep 22, 8:27 PM
Unknown Object (File)
Sat, Sep 21, 12:03 PM
Unknown Object (File)
Fri, Sep 20, 5:30 AM
Subscribers

Details

Summary

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

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable