From: K Prateek Nayak <kprateek.nayak@amd.com>
To: Rong Zhang <i@rong.moe>, Huang Rui <ray.huang@amd.com>,
Mario Limonciello <mario.limonciello@amd.com>,
Perry Yuan <perry.yuan@amd.com>,
"Rafael J. Wysocki" <rafael@kernel.org>,
Viresh Kumar <viresh.kumar@linaro.org>,
Borislav Petkov <bp@alien8.de>,
Jason Andryuk <jason.andryuk@amd.com>
Cc: Michael Kelley <mhklinux@outlook.com>, <linux-pm@vger.kernel.org>,
<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2] cpufreq/amd-pstate: Bail out early if !X86_FEATURE_HW_PSTATE
Date: Mon, 20 Jul 2026 10:44:49 +0530 [thread overview]
Message-ID: <09c77f74-bde1-42e1-acaf-77afd32c7379@amd.com> (raw)
In-Reply-To: <20260718-amd-pstate-vm-v2-1-6ed5f3b2c89e@rong.moe>
Hello Rong,
On 7/18/2026 8:45 PM, 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.
This is message is printed from amd_cppc_supported() ...
> amd_pstate: the _CPC object is not present in SBIOS or ACPI disabled
>
[..snip..]
> diff --git a/drivers/cpufreq/amd-pstate.c b/drivers/cpufreq/amd-pstate.c
> index a74a4cf99d22..877b4b30ecd0 100644
> --- a/drivers/cpufreq/amd-pstate.c
> +++ b/drivers/cpufreq/amd-pstate.c
> @@ -2228,6 +2228,13 @@ static int __init amd_pstate_init(void)
> if (boot_cpu_data.x86_vendor != X86_VENDOR_AMD)
> return -ENODEV;
>
> + /*
> + * Do not continue on the following checks and emit bogus warning
> + * messages if the platform doesn't support frequency scaling at all.
> + */
> + if (!cpu_feature_enabled(X86_FEATURE_HW_PSTATE))
> + return -ENODEV;
... so why add this check in amd_pstate_init()?
I personally prefer having the check in amd_cppc_supported() and
returning false from there with a pr_debug_once() saying processor does
not support frequency scaling.
> +
> /* show debug message only if CPPC is not supported */
> if (!amd_cppc_supported())
> return -EOPNOTSUPP;
>
> ---
> base-commit: 94515f3a7d4256a5062176b7d6ed0471938cd51a
> change-id: 1cc24037-amd-pstate-vm-d6ab4c959bd3
>
> Thanks,
> Rong
>
--
Thanks and Regards,
Prateek
next prev parent reply other threads:[~2026-07-20 5:15 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-18 15:15 [PATCH v2] cpufreq/amd-pstate: Bail out early if !X86_FEATURE_HW_PSTATE Rong Zhang
2026-07-19 15:03 ` mhklkml
2026-07-20 5:14 ` K Prateek Nayak [this message]
2026-07-20 15:37 ` Mario Limonciello
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=09c77f74-bde1-42e1-acaf-77afd32c7379@amd.com \
--to=kprateek.nayak@amd.com \
--cc=bp@alien8.de \
--cc=i@rong.moe \
--cc=jason.andryuk@amd.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=mario.limonciello@amd.com \
--cc=mhklinux@outlook.com \
--cc=perry.yuan@amd.com \
--cc=rafael@kernel.org \
--cc=ray.huang@amd.com \
--cc=viresh.kumar@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox