Linux Power Management development
 help / color / mirror / Atom feed
From: Mario Limonciello <mario.limonciello@amd.com>
To: Jason Andryuk <jason.andryuk@amd.com>, Rong Zhang <i@rong.moe>,
	Borislav Petkov <bp@alien8.de>
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 15:54:28 -0500	[thread overview]
Message-ID: <c4ab14b5-7e33-487a-9fbb-ec57ea3955b2@amd.com> (raw)
In-Reply-To: <61a141cd-c72a-4ee5-8273-ee721aa13f68@amd.com>



On 7/15/26 15:32, Jason Andryuk wrote:
> 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

OK, Rong - please send an updated patch.


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

Thread overview: 7+ 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
2026-07-15 20:54         ` Mario Limonciello [this message]
2026-07-15 22:58         ` Borislav Petkov

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=c4ab14b5-7e33-487a-9fbb-ec57ea3955b2@amd.com \
    --to=mario.limonciello@amd.com \
    --cc=bp@alien8.de \
    --cc=i@rong.moe \
    --cc=jason.andryuk@amd.com \
    --cc=kprateek.nayak@amd.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --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