diff mbox

[2/5] kvm tools: Introduce vidmode parmeter

Message ID 20110607194153.843315267@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Cyrill Gorcunov June 7, 2011, 7:41 p.m. UTC
Usually this might be set by loader but since
we're the loader lets allow to specify vesa
mode as well.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
---
 tools/kvm/kvm-run.c |   12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)


--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Pekka Enberg June 7, 2011, 7:53 p.m. UTC | #1
On Tue, 7 Jun 2011, Cyrill Gorcunov wrote:
> Usually this might be set by loader but since
> we're the loader lets allow to specify vesa
> mode as well.
>
> Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>

This patch causes 'make check' to go crazy and print out bunch of these:

Warning: Ignoring MMIO write at 00000000d0031f40 (length 4)
Warning: Ignoring MMIO write at 00000000d0031f44 (length 4)
Warning: Ignoring MMIO write at 00000000d0031f48 (length 4)
Warning: Ignoring MMIO write at 00000000d0031f4c (length 4)
Warning: Ignoring MMIO write at 00000000d0031f50 (length 4)
Warning: Ignoring MMIO write at 00000000d0031f54 (length 4)
Warning: Ignoring MMIO write at 00000000d0031f58 (length 4)
Warning: Ignoring MMIO write at 00000000d0031f5c (length 4)
Warning: Ignoring MMIO write at 00000000d0031f60 (length 4)
Warning: Ignoring MMIO write at 00000000d0031f64 (length 4)
Warning: Ignoring MMIO write at 00000000d0031f68 (length 4)
Warning: Ignoring MMIO write at 00000000d0031f6c (length 4)
Warning: Ignoring MMIO write at 00000000d0031f70 (length 4)
Warning: Ignoring MMIO write at 00000000d0031f74 (length 4)
Warning: Ignoring MMIO write at 00000000d0031f78 (length 4)
Warning: Ignoring MMIO write at 00000000d0031f7c (length 4)

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Cyrill Gorcunov June 7, 2011, 8:03 p.m. UTC | #2
On Tue, Jun 07, 2011 at 10:53:28PM +0300, Pekka Enberg wrote:
> On Tue, 7 Jun 2011, Cyrill Gorcunov wrote:
> >Usually this might be set by loader but since
> >we're the loader lets allow to specify vesa
> >mode as well.
> >
> >Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
> 
> This patch causes 'make check' to go crazy and print out bunch of these:
> 
> Warning: Ignoring MMIO write at 00000000d0031f40 (length 4)
> 

Hmm, weird...

	Cyrill
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Cyrill Gorcunov June 7, 2011, 8:10 p.m. UTC | #3
On Tue, Jun 07, 2011 at 10:53:28PM +0300, Pekka Enberg wrote:
> On Tue, 7 Jun 2011, Cyrill Gorcunov wrote:
> >Usually this might be set by loader but since
> >we're the loader lets allow to specify vesa
> >mode as well.
> >
> >Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
> 
> This patch causes 'make check' to go crazy and print out bunch of these:
>

Pekka, are you sure it's because of _this_ particular patch?

	Cyrill
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

Index: linux-2.6.git/tools/kvm/kvm-run.c
===================================================================
--- linux-2.6.git.orig/tools/kvm/kvm-run.c
+++ linux-2.6.git/tools/kvm/kvm-run.c
@@ -80,6 +80,7 @@  extern int  active_console;
 bool do_debug_print = false;
 
 static int nrcpus;
+static int vidmode = 0x312;
 
 static const char * const run_usage[] = {
 	"kvm run [<options>] [<kernel image>]",
@@ -139,6 +140,10 @@  static const struct option options[] = {
 	OPT_STRING('\0', "tapscript", &script, "Script path",
 			 "Assign a script to process created tap device"),
 
+	OPT_GROUP("BIOS options:"),
+	OPT_INTEGER('\0', "vidmode", &vidmode,
+		    "Video mode"),
+
 	OPT_GROUP("Debug options:"),
 	OPT_BOOLEAN('\0', "debug", &do_debug_print,
 			"Enable debug messages"),
@@ -434,7 +439,6 @@  int kvm_cmd_run(int argc, const char **a
 	struct framebuffer *fb = NULL;
 	unsigned int nr_online_cpus;
 	int exit_code = 0;
-	u16 vidmode = 0;
 	int max_cpus;
 	char *hi;
 	int i;
@@ -541,12 +545,10 @@  int kvm_cmd_run(int argc, const char **a
 
 	memset(real_cmdline, 0, sizeof(real_cmdline));
 	strcpy(real_cmdline, "notsc noapic noacpi pci=conf1");
-	if (vnc || sdl) {
+	if (vnc || sdl)
 		strcat(real_cmdline, " video=vesafb console=tty0");
-		vidmode = 0x312;
-	} else {
+	else
 		strcat(real_cmdline, " console=ttyS0 earlyprintk=serial");
-	}
 	strcat(real_cmdline, " ");
 	if (kernel_cmdline)
 		strlcat(real_cmdline, kernel_cmdline, sizeof(real_cmdline));