aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/window/string.c
diff options
context:
space:
mode:
authorOsvaldo Janeri Filho <ojanerif@amd.com>2026-12-03 16:01:30 +0000
committerMitchell Horne <mhorne@FreeBSD.org>2026-12-03 16:10:28 +0000
commit9b5f148fd7087ef9fe6d4921db153fc2e0e8149e (patch)
tree48f0426c0bb8ed4d15187fa1fdb9d069dfd5092e /usr.bin/window/string.c
parent93f8c45c0314e1a78eb2f19074659d0f3efb2f3b (diff)
hwpmc_amd: Ignore UMC counters when CPUID reports no usable UMCHEADmain
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