* [PATCH] KVM: Only display message about bios support disabled once
@ 2022-05-26 21:30 Mario Limonciello
2022-05-27 16:08 ` Sean Christopherson
0 siblings, 1 reply; 3+ messages in thread
From: Mario Limonciello @ 2022-05-26 21:30 UTC (permalink / raw)
To: mario.limonciello, Paolo Bonzini, Sean Christopherson,
Vitaly Kuznetsov, Wanpeng Li, Jim Mattson, Joerg Roedel,
Thomas Gleixner, Ingo Molnar, Borislav Petkov, Dave Hansen,
maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT),
H. Peter Anvin,
open list:KERNEL VIRTUAL MACHINE FOR X86 (KVM/x86),
open list:X86 ARCHITECTURE (32-BIT AND 64-BIT)
On an OEM laptop I see the following message 10 times in my dmesg:
"kvm: support for 'kvm_amd' disabled by bios"
This might be useful the first time, but there really isn't a point
to showing the error 9 more times. The BIOS still has it disabled.
Change the message to only display one time.
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
---
arch/x86/kvm/x86.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index 4790f0d7d40b..80a8ea13f09a 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -8887,7 +8887,7 @@ int kvm_arch_init(void *opaque)
goto out;
}
if (ops->disabled_by_bios()) {
- pr_err_ratelimited("kvm: support for '%s' disabled by bios\n",
+ pr_err_once("kvm: support for '%s' disabled by bios\n",
ops->runtime_ops->name);
r = -EOPNOTSUPP;
goto out;
--
2.34.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] KVM: Only display message about bios support disabled once
2022-05-26 21:30 [PATCH] KVM: Only display message about bios support disabled once Mario Limonciello
@ 2022-05-27 16:08 ` Sean Christopherson
2022-06-01 1:57 ` Mario Limonciello
0 siblings, 1 reply; 3+ messages in thread
From: Sean Christopherson @ 2022-05-27 16:08 UTC (permalink / raw)
To: Mario Limonciello
Cc: Paolo Bonzini, Vitaly Kuznetsov, Wanpeng Li, Jim Mattson,
Joerg Roedel, Thomas Gleixner, Ingo Molnar, Borislav Petkov,
Dave Hansen, maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT),
H. Peter Anvin,
open list:KERNEL VIRTUAL MACHINE FOR X86 (KVM/x86),
open list:X86 ARCHITECTURE (32-BIT AND 64-BIT)
On Thu, May 26, 2022, Mario Limonciello wrote:
> On an OEM laptop I see the following message 10 times in my dmesg:
> "kvm: support for 'kvm_amd' disabled by bios"
>
> This might be useful the first time, but there really isn't a point
> to showing the error 9 more times. The BIOS still has it disabled.
> Change the message to only display one time.
NAK, this has been discussed multiple times in the past[1][2], there are edge cases
where logging multiple messages is desirable. Even using a ratelimited printk is
essentially a workaround for a systemd bug[3], which I'm guessing is the cuplrit here.
[1] https://lore.kernel.org/all/20190826182320.9089-1-tony.luck@intel.com
[2] https://lore.kernel.org/all/20200214143035.607115-1-e.velu@criteo.com
[3] https://github.com/systemd/systemd/issues/14906
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] KVM: Only display message about bios support disabled once
2022-05-27 16:08 ` Sean Christopherson
@ 2022-06-01 1:57 ` Mario Limonciello
0 siblings, 0 replies; 3+ messages in thread
From: Mario Limonciello @ 2022-06-01 1:57 UTC (permalink / raw)
To: Sean Christopherson
Cc: Paolo Bonzini, Vitaly Kuznetsov, Wanpeng Li, Jim Mattson,
Joerg Roedel, Thomas Gleixner, Ingo Molnar, Borislav Petkov,
Dave Hansen, maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT),
H. Peter Anvin,
open list:KERNEL VIRTUAL MACHINE FOR X86 (KVM/x86),
open list:X86 ARCHITECTURE (32-BIT AND 64-BIT)
On 5/27/22 11:08, Sean Christopherson wrote:
> On Thu, May 26, 2022, Mario Limonciello wrote:
>> On an OEM laptop I see the following message 10 times in my dmesg:
>> "kvm: support for 'kvm_amd' disabled by bios"
>>
>> This might be useful the first time, but there really isn't a point
>> to showing the error 9 more times. The BIOS still has it disabled.
>> Change the message to only display one time.
>
> NAK, this has been discussed multiple times in the past[1][2], there are edge cases
> where logging multiple messages is desirable. Even using a ratelimited printk is
> essentially a workaround for a systemd bug[3], which I'm guessing is the cuplrit here.
>
> [1] https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flore.kernel.org%2Fall%2F20190826182320.9089-1-tony.luck%40intel.com&data=05%7C01%7Cmario.limonciello%40amd.com%7C2e1eed66ff8a412cec0508da3ffb1c1b%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637892645000687319%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=X3Hs2QwXLsgAEEQkP7WMniywwoCn065sVh8DFagYzLE%3D&reserved=0
> [2] https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flore.kernel.org%2Fall%2F20200214143035.607115-1-e.velu%40criteo.com&data=05%7C01%7Cmario.limonciello%40amd.com%7C2e1eed66ff8a412cec0508da3ffb1c1b%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637892645000687319%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=EMe2b9Mu7Pc9Z%2FcBmTPZaChUaDlQD%2FKGwK%2BYM%2Fd1VUY%3D&reserved=0
> [3] https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fsystemd%2Fsystemd%2Fissues%2F14906&data=05%7C01%7Cmario.limonciello%40amd.com%7C2e1eed66ff8a412cec0508da3ffb1c1b%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637892645000687319%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=8fMPC1Opl85BmqqoPJ4ASI6Y58h%2BuTM5oFDS76bqPv0%3D&reserved=0
Sean,
Appreciate the pointer at those earlier threads and the userspace issue.
Yes; it's certainly caused by systemd. I can reproduce another 10
entries just like the last link via `udevadm trigger --type=devices
--action=add`. I'm on a more modern version of systemd (249.11) so even
though it was claimed to be fixed previously it resurfaced. I'll leave
a comment with systemd accordingly.
Thanks,
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-06-01 1:57 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-26 21:30 [PATCH] KVM: Only display message about bios support disabled once Mario Limonciello
2022-05-27 16:08 ` Sean Christopherson
2022-06-01 1:57 ` Mario Limonciello
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).