Re: [PATCH 2/2] tools/power/turbostat: Fix division by zero when TDP calculation fails
From: Len Brown
Date: Mon Dec 01 2025 - 12:07:42 EST
> Reading the MSR succeeds, but the read value is 0. So at least for the
> Nitro Hypervisor testing for 0 would be sufficient.
Great!
> I am not sure how
> other hypervisor solutions handle this issue, but I assume it will either
> be 0 as well or not provide the /dev/cpu/*/msr file.
Agreed.
The historic probe strategy blindly read the MSRs
and tried to determine anoint an MSR as present
if it behaved according to some heuristics.
Today we have MSRs enumerated in a table.
So we can use the reverse probe strategy --
probe the enumerated MSRs and disqualify
them if they don't read, or read 0.
Indeed, RAPL Package Domain is universal -- if that doesn't
work, then I think we can disqualify all of RAPL.
I'll send you a patch for this later today.
Len Brown, Intel Open Source Technology Center