HomeFreeBSD

hwpmc: disable uncore class on Sandy Bridge and newer

Description

hwpmc: disable uncore class on Sandy Bridge and newer

It was written for Nehalem and Westmere, with minor but incomplete
updates for Sandy Bridge in 78d763a29b15. The uncore architecture
changed significantly with this generation, bringing new layouts and
locations for some MSRs.

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 comment detailing 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
Reported by: Zhenlei Huang <zlei.huang@gmail.com>
Reviewed by: kib
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D31389

(cherry picked from commit 4f35e8cba232d9256ab1399b8adfb761988e5eff)

Details

Provenance
mhorneAuthored on Aug 4 2021, 5:31 PM
Reviewer
kib
Differential Revision
D31389: hwpmc: disable uncore class on Sandy Bridge and newer
Parents
R10:bf60d2826768: pf: batch critical section for several counters
Branches
Unknown
Tags
Unknown