Re: [PATCH 2/2] tools/power/turbostat: Fix division by zero when TDP calculation fails
From: Len Brown
Date: Mon Dec 01 2025 - 14:14:46 EST
> I'll send you a patch for this later today.
Please try the latest turbostat in my public tree:
git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux.git turbostat
The top commit should be this:
commit 4b295ae45d3e6eb4d811c8fc2408b9e4e91c9474 (turbostat, next)
Author: Len Brown <len.brown@xxxxxxxxx>
Date: Sun Nov 30 00:11:22 2025 -0500
tools/power turbostat: Validate that RAPL MSRs really exist
Even though the platform->plat_rapl_msrs enumeration may be accurate,
a VM may deny access to the underlying MSRs.
Probe if PKG_ENERGY is readable and non-zero.
If no, ignore all RAPL MSRs.
Reported-by: Emily Ehlert <ehemily@xxxxxxxxx>
Signed-off-by: Len Brown <len.brown@xxxxxxxxx>