RE: [PATCH] cpufreq/amd-pstate: Bail out early in virtual machines and don't warn

From: Michael Kelley

Date: Thu Jul 16 2026 - 14:58:27 EST


From: Rong Zhang <i@xxxxxxxx> Sent: Thursday, July 16, 2026 11:29 AM
>
> Hi K Prateek,
>
> Thanks for reviewing this.
>

[snip]

>
> As Jason said:
>
> With Xen, the Xen hypervisor itself controls CPPC. dom0
> (xen_initial_domain()) doesn't need the amd-pstate driver.
>
> I think we don't need to worry about Xen.
>
> @Michael, if you have the time, could you test if Hyper-V exposes
> X86_FEATURE_HW_PSTATE (i.e., 0x80000007/edx bit 7)?

I checked a VM running on Hyper-V on an AMD Zen 2 (EPYC 7452),
and another on a Zen 4 (EPYC 9V74) processor. Neither has
X86_FEATURE_HW_PSTATE set. There are other variations that
could affect what a guest on Hyper-V sees, but these spot tests
are sufficient evidence that this flag does what we want for
Hyper-V guests.

Michael