kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH kvmtool] Skip a few messages by default: command line args; flat binary; earlyprintk.
@ 2015-09-29 16:59 Dimitri John Ledkov
  2015-09-30 16:11 ` Andre Przywara
  0 siblings, 1 reply; 4+ messages in thread
From: Dimitri John Ledkov @ 2015-09-29 16:59 UTC (permalink / raw)
  To: kvm; +Cc: Will Deacon, Andre Przywara

The partial command line args & earlyprintk=serial are still enabled
in the debug mode. Warning that a flat binary kernel image is attemped
to be loaded is completely dropped. These are not that informative,
once one is past intial debugging, and only polute the console.

Signed-off-by: Dimitri John Ledkov <dimitri.j.ledkov@intel.com>
---
 builtin-run.c | 10 ++++++----
 kvm.c         |  1 -
 x86/kvm.c     |  8 ++++++--
 3 files changed, 12 insertions(+), 7 deletions(-)

diff --git a/builtin-run.c b/builtin-run.c
index e0c8732..8edbf88 100644
--- a/builtin-run.c
+++ b/builtin-run.c
@@ -613,10 +613,12 @@ static struct kvm *kvm_cmd_run_init(int argc, const char **argv)
 
 	kvm->cfg.real_cmdline = real_cmdline;
 
-	printf("  # %s run -k %s -m %Lu -c %d --name %s\n", KVM_BINARY_NAME,
-		kvm->cfg.kernel_filename,
-		(unsigned long long)kvm->cfg.ram_size / 1024 / 1024,
-		kvm->cfg.nrcpus, kvm->cfg.guest_name);
+	if (do_debug_print) {
+		printf("  # %s run -k %s -m %Lu -c %d --name %s\n", KVM_BINARY_NAME,
+		       kvm->cfg.kernel_filename,
+		       (unsigned long long)kvm->cfg.ram_size / 1024 / 1024,
+		       kvm->cfg.nrcpus, kvm->cfg.guest_name);
+	}
 
 	if (init_list__init(kvm) < 0)
 		die ("Initialisation failed");
diff --git a/kvm.c b/kvm.c
index 10ed230..1081072 100644
--- a/kvm.c
+++ b/kvm.c
@@ -378,7 +378,6 @@ bool kvm__load_kernel(struct kvm *kvm, const char *kernel_filename,
 	if (ret)
 		goto found_kernel;
 
-	pr_warning("%s is not a bzImage. Trying to load it as a flat binary...", kernel_filename);
 #endif
 
 	ret = load_elf_binary(kvm, fd_kernel, fd_initrd, kernel_cmdline);
diff --git a/x86/kvm.c b/x86/kvm.c
index 512ad67..4a5fa41 100644
--- a/x86/kvm.c
+++ b/x86/kvm.c
@@ -124,8 +124,12 @@ void kvm__arch_set_cmdline(char *cmdline, bool video)
 				"i8042.dumbkbd=1 i8042.nopnp=1");
 	if (video)
 		strcat(cmdline, " video=vesafb console=tty0");
-	else
-		strcat(cmdline, " console=ttyS0 earlyprintk=serial i8042.noaux=1");
+	else {
+		strcat(cmdline, " console=ttyS0 i8042.noaux=1");
+		if (do_debug_print) {
+			strcat(cmdline, " earlyprintk=serial");
+		}
+	}
 }
 
 /* Architecture-specific KVM init */
-- 
2.1.4


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

end of thread, other threads:[~2015-10-06 16:16 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-29 16:59 [PATCH kvmtool] Skip a few messages by default: command line args; flat binary; earlyprintk Dimitri John Ledkov
2015-09-30 16:11 ` Andre Przywara
2015-10-06  9:21   ` Dimitri John Ledkov
2015-10-06 16:16   ` Will Deacon

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