diff options
| author | Osvaldo Janeri Filho <ojanerif@amd.com> | 2026-12-03 16:01:30 +0000 |
|---|---|---|
| committer | Mitchell Horne <mhorne@FreeBSD.org> | 2026-12-03 16:10:28 +0000 |
| commit | 9b5f148fd7087ef9fe6d4921db153fc2e0e8149e (patch) | |
| tree | 48f0426c0bb8ed4d15187fa1fdb9d069dfd5092e /usr.bin/window/string.c | |
| parent | 93f8c45c0314e1a78eb2f19074659d0f3efb2f3b (diff) | |
pmcs_per_umc is the UMC counter count from CPUID 0x80000022 EBX divided
by the number of active UMCs in ECX. If ECX is zero, e.g. in a guest
that only reports core counters, loading hwpmc divides by zero. If ECX
has more UMCs than counters, pmcs_per_umc is zero and the UMC row loop
never terminates.
Skip the division when ECX is zero and register no UMC counters when
pmcs_per_umc is zero.
Reviewed by: mhorne
Fixes: f19f44634afd ("pmc: Add support for AMD UMC counters")
Sponsored by: Advanced Micro Devices, Inc.
Signed-off-by: Osvaldo Janeri Filho <ojanerif@amd.com>
Differential Revision: https://reviews.freebsd.org/D62284
Diffstat (limited to 'usr.bin/window/string.c')
0 files changed, 0 insertions, 0 deletions
