linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] kvm: x86: Print "disabled by bios" only once per host
@ 2020-02-14 14:30 Erwan Velu
  2020-02-14 17:05 ` Sean Christopherson
                   ` (2 more replies)
  0 siblings, 3 replies; 14+ messages in thread
From: Erwan Velu @ 2020-02-14 14:30 UTC (permalink / raw)
  Cc: Erwan Velu, Paolo Bonzini, Sean Christopherson, Vitaly Kuznetsov,
	Wanpeng Li, Jim Mattson, Joerg Roedel, Thomas Gleixner,
	Ingo Molnar, Borislav Petkov, H. Peter Anvin, x86, kvm,
	linux-kernel

The current behavior is to print a "disabled by bios" message per CPU thread.
As modern CPUs can have up to 64 cores, 128 on a dual socket, and turns this
printk to be a pretty noisy by showing up to 256 times the same line in a row.

This patch offer to only print the message once per host considering the BIOS will
disabled the feature for all sockets/cores at once and not on a per core basis.

Signed-off-by: Erwan Velu <e.velu@criteo.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 fbabb2f06273..8f0d7a09d453 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -7300,7 +7300,7 @@ int kvm_arch_init(void *opaque)
 		goto out;
 	}
 	if (ops->disabled_by_bios()) {
-		printk(KERN_ERR "kvm: disabled by bios\n");
+		printk_once(KERN_ERR "kvm: disabled by bios\n");
 		r = -EOPNOTSUPP;
 		goto out;
 	}
-- 
2.24.1


^ permalink raw reply related	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2020-02-28 10:37 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-14 14:30 [PATCH] kvm: x86: Print "disabled by bios" only once per host Erwan Velu
2020-02-14 17:05 ` Sean Christopherson
2020-02-18 16:28   ` Erwan Velu
2020-02-18 18:48     ` Sean Christopherson
2020-02-19 11:19       ` Erwan Velu
2020-02-19 11:32         ` Erwan Velu
2020-02-19 17:42           ` Erwan Velu
2020-02-19 16:18         ` Sean Christopherson
2020-02-19 16:53           ` Erwan Velu
2020-02-19 17:51             ` Paolo Bonzini
2020-02-19 21:52               ` Erwan Velu
2020-02-14 17:43 ` Jim Mattson
2020-02-27 18:00 ` [PATCH v2] kvm: x86: Limit the number of "kvm: disabled by bios" messages Erwan Velu
2020-02-28 10:37   ` Paolo Bonzini

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).