diff options
| author | Alexander Leidinger <netchild@FreeBSD.org> | 2026-08-21 22:29:05 +0000 |
|---|---|---|
| committer | Alexander Leidinger <netchild@FreeBSD.org> | 2026-08-23 08:09:20 +0000 |
| commit | 469727f0637beec05e0478c1391e3df1e684e53c (patch) | |
| tree | e433e1e45567bf9482741c0f746a546da466024d /packages/Python/lldbsuite/test/python_api | |
| parent | 790817f5a7a640c9ceb5c2ad99135f1a69aeb77d (diff) | |
hwpmc: probe the RAPL unit MSR instead of faulting on it
The RAPL probe read MSR_RAPL_POWER_UNIT with a bare rdmsr(). RAPL is not
enumerated by CPUID on either vendor and the register is absent on older
Intel and AMD parts and under a hypervisor that does not emulate it, so
the read raises #GP and loading hwpmc panics the machine.
Read it with rdmsr_safe() and return ENXIO when it is not there, as this
function already does for the energy MSRs. Both callers already drop the
class when the probe fails.
Fixes: a99d04f39dab ("hwpmc: add RAPL energy-counter class (AMD + Intel)")
Assisted-by: Claude Code (Opus 5)
Diffstat (limited to 'packages/Python/lldbsuite/test/python_api')
0 files changed, 0 insertions, 0 deletions
