Linux Power Management development
 help / color / mirror / Atom feed
From: Jason Andryuk <jason.andryuk@amd.com>
To: Rong Zhang <i@rong.moe>, Borislav Petkov <bp@alien8.de>,
	Mario Limonciello <mario.limonciello@amd.com>
Cc: Huang Rui <ray.huang@amd.com>, Perry Yuan <perry.yuan@amd.com>,
	"K Prateek Nayak" <kprateek.nayak@amd.com>,
	<linux-pm@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	"Rafael J. Wysocki" <rafael@kernel.org>,
	Viresh Kumar <viresh.kumar@linaro.org>
Subject: Re: [PATCH] cpufreq/amd-pstate: Bail out early in virtual machines and don't warn
Date: Wed, 15 Jul 2026 16:32:53 -0400	[thread overview]
Message-ID: <61a141cd-c72a-4ee5-8273-ee721aa13f68@amd.com> (raw)
In-Reply-To: <ecc292377a145741f47ff2422b72fa95e57a725b.camel@rong.moe>

On 2026-07-15 15:21, Rong Zhang wrote:
> Hi Borislav,
> 
> Thanks for reviewing the patch.
> 
> On Wed, 2026-07-15 at 11:04 -0700, Borislav Petkov wrote:
>> On Wed, Jul 15, 2026 at 12:46:24PM -0500, Mario Limonciello wrote:
>>> Conceptually this makes sense to me, but I would like some comments from
>>> others if this is the right way forward.
>>>
>>> Jason, Boris,
>>>
>>> comments please?
>>
>> We don't care if someone "passes-through a relatively new CPUID" - I am not
>> sure what that means -
>>
> 
> Sorry, typo here. I meant CPU model.
> 
> I usually boot a KVM with `qemu-system-x86_64 -accel kvm -cpu host
> <other_args...>' to test various patches. These messages is a bit
> disturbing to me as they are KERN_WARNING messages.
> 
> FYI, my device is Zen 5 based and always triggers both messages.
> 
> I can also reproduce both messages with `-cpu EPYC-Genoa' and `-cpu
> EPYC-Turin'. It's just due to how amd_cppc_supported() is implemented.
> 
>> but we won't patch the upstream kernel just because it
>> dumped an error message in the guest.
> 
> Well, the reason why I decided to send this is not only about how noisy
> it is, but also about the correctness.
> 
> The first messages says:
> 
>     The CPPC feature is supported but currently disabled by the BIOS.
>     Please enable it if your BIOS has the CPPC option.
> 
> The CPPC feature is neither supported in a KVM nor disabled by the VM's
> BIOS.
> 
> IIUC, it's disabled by kvm_cpu_cap_init(CPUID_8000_0008_EBX, ...), so
> the upstream kernel both disables it as a hypervisor and warns about it
> as a guest. What a paradox!
> 
> At least the first message is nonsense in this case and the paradox
> should really be fixed. If you prefer preserving the second message
> ("the _CPC object is not present in SBIOS or ACPI disabled") as an
> informative hint anyway, how about moving the virtualization check into
> amd_cppc_supported() to only mute the first one? ;-)

I think changing amd_cppc_supported() to return false for 
X86_FEATURE_HYPERVISOR makes sense and can remove the message.  The 
heuristic there doesn't seem relevant when virtualized.

With Xen, the Xen hypervisor itself controls CPPC.  dom0 
(xen_initial_domain()) doesn't need the amd-pstate driver.

Regards,
Jason

  reply	other threads:[~2026-07-15 20:48 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-15 17:41 [PATCH] cpufreq/amd-pstate: Bail out early in virtual machines and don't warn Rong Zhang
2026-07-15 17:46 ` Mario Limonciello
2026-07-15 18:04   ` Borislav Petkov
2026-07-15 19:21     ` Rong Zhang
2026-07-15 20:32       ` Jason Andryuk [this message]
2026-07-15 20:54         ` Mario Limonciello
2026-07-15 22:58         ` Borislav Petkov
2026-07-16 17:44       ` Michael Kelley
2026-07-16 18:00 ` K Prateek Nayak
2026-07-16 18:29   ` Rong Zhang
2026-07-16 18:58     ` Michael Kelley

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=61a141cd-c72a-4ee5-8273-ee721aa13f68@amd.com \
    --to=jason.andryuk@amd.com \
    --cc=bp@alien8.de \
    --cc=i@rong.moe \
    --cc=kprateek.nayak@amd.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=mario.limonciello@amd.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