[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAJvTdK=Ty4W=5diU0D0JYHh70ZN4avKjodUoLhuz_D7+=3xcdA@mail.gmail.com>
Date: Mon, 1 Dec 2025 12:07:22 -0500
From: Len Brown <lenb@...nel.org>
To: "Ehlert, Emily" <ehemily@...zon.de>
Cc: "Zhang, Rui" <rui.zhang@...el.com>,
"linux-pm@...r.kernel.org" <linux-pm@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>, Emily Ehlert <ehemily@...zon.com>
Subject: Re: [PATCH 2/2] tools/power/turbostat: Fix division by zero when TDP
calculation fails
> 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
Powered by blists - more mailing lists