Re: [PATCH v3] cpufreq/amd-pstate: Bail out early if !X86_FEATURE_HW_PSTATE
From: K Prateek Nayak
Date: Tue Jul 21 2026 - 01:16:53 EST
Hello Rong,
On 7/21/2026 12:17 AM, Rong Zhang wrote:
> When booting a VM that simulates or passes-through a relatively new CPU
> model, these warning messages are printed to kmsg:
>
> amd_pstate: The CPPC feature is supported but currently disabled by the BIOS.
> Please enable it if your BIOS has the CPPC option.
> amd_pstate: the _CPC object is not present in SBIOS or ACPI disabled
>
> Technically the check is not wrong and acts as a safetynet that prevents
> the driver from being registered incorrectly, but the warning messages
> are noisy and incorrect, as the CPPC feature is neither supported in a
> VM nor disabled by the VM's BIOS.
>
> The CPPC feature is disabled by the hypervisor as it makes no sense to
> expose them to guests. It creates a paradox that the same kernel both
> disables CPPC as a hypervisor (KVM) and warns about it being disabled
> as a guest.
>
> X86_FEATURE_HW_PSTATE indicates if the processor supports frequency
> scaling or not. It is disabled on virtualized platforms (namely, KVM and
> Hyper-V have been reported to do so) and is always set on physical
> platforms that support frequency scaling.
>
> Check for X86_FEATURE_HW_PSTATE as a prerequisite and bail out early if
> it's unsupported. A debug message is also added to help debug driver
> loading issues.
>
> Fixes: cb817ec6673b ("cpufreq: amd-pstate: show CPPC debug message if CPPC is not supported")
> Reviewed-by: Michael Kelley <mhklinux@xxxxxxxxxxx>
> Tested-by: Michael Kelley <mhklinux@xxxxxxxxxxx>
> Signed-off-by: Rong Zhang <i@xxxxxxxx>
Thank you for your patience! Feel free to include:
Reviewed-by: K Prateek Nayak <kprateek.nayak@xxxxxxx>
Tested-by: K Prateek Nayak <kprateek.nayak@xxxxxxx>
--
Thanks and Regards,
Prateek