opnsense-src/sys/dev/hwpmc
Mitchell Horne 2e50ba7074 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 78d763a29b. 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 4f35e8cba2)
2021-08-11 13:49:44 -03:00
..
hwpmc_amd.c hwpmc: mostly clean up cc --analyze 2021-07-25 07:00:05 +00:00
hwpmc_amd.h hwpmc : fix AMD perf counter MSR access 2019-11-07 19:54:24 +00:00
hwpmc_arm.c
hwpmc_arm64.c hwpmc_arm64: add a PMCDBG to the interrupt handler 2021-07-29 12:05:55 -03:00
hwpmc_arm64.h arm64: Fix finding the pmc event ID 2021-07-29 12:00:37 -03:00
hwpmc_arm64_md.c
hwpmc_armv7.c Move the PMC overflow count to make it per-CPU 2021-01-08 14:24:43 +00:00
hwpmc_armv7.h
hwpmc_beri.c Add support for BERI statcounters. 2019-09-18 16:13:50 +00:00
hwpmc_beri.h Add support for BERI statcounters. 2019-09-18 16:13:50 +00:00
hwpmc_core.c hwpmc: mostly clean up cc --analyze 2021-07-25 07:00:05 +00:00
hwpmc_core.h
hwpmc_e500.c [PowerPC] hwpmc: add support for POWER8/9 PMCs 2020-11-05 16:36:39 +00:00
hwpmc_intel.c hwpmc: disable uncore class on Sandy Bridge and newer 2021-08-11 13:49:44 -03:00
hwpmc_logging.c hwpmc: mostly clean up cc --analyze 2021-07-25 07:00:05 +00:00
hwpmc_mips.c
hwpmc_mips24k.c
hwpmc_mips74k.c
hwpmc_mod.c hwpmc: mostly clean up cc --analyze 2021-07-25 07:00:05 +00:00
hwpmc_mpc7xxx.c [PowerPC] hwpmc: add support for POWER8/9 PMCs 2020-11-05 16:36:39 +00:00
hwpmc_octeon.c
hwpmc_power8.c [PowerPC] hwpmc: add support for POWER8/9 PMCs 2020-11-05 16:36:39 +00:00
hwpmc_powerpc.c [PowerPC] hwpmc: add support for POWER8/9 PMCs 2020-11-05 16:36:39 +00:00
hwpmc_powerpc.h [PowerPC] hwpmc: add support for POWER8/9 PMCs 2020-11-05 16:36:39 +00:00
hwpmc_ppc970.c [PowerPC] hwpmc: add support for POWER8/9 PMCs 2020-11-05 16:36:39 +00:00
hwpmc_riscv.h
hwpmc_soft.c hwpmc: mostly clean up cc --analyze 2021-07-25 07:00:05 +00:00
hwpmc_soft.h
hwpmc_tsc.c hwpmc: mostly clean up cc --analyze 2021-07-25 07:00:05 +00:00
hwpmc_tsc.h
hwpmc_uncore.c hwpmc: mostly clean up cc --analyze 2021-07-25 07:00:05 +00:00
hwpmc_uncore.h
hwpmc_x86.c pmc: Add Hygon Dhyana support. 2020-02-07 22:28:04 +00:00
pmc_events.h PMC: remove now orphaned PMC for INTEL XScale processors. 2020-12-25 15:21:53 +01:00