From: Cyrill Gorcunov <gorcunov@gmail.com>
To: Pekka Enberg <penberg@kernel.org>
Cc: asias.hejun@gmail.com, mingo@elte.hu, levinsasha928@gmail.com,
prasadjoshi124@gmail.com, kvm@vger.kernel.org
Subject: Re: [patch 2/5] kvm tools: Introduce vidmode parmeter
Date: Wed, 8 Jun 2011 00:22:18 +0400 [thread overview]
Message-ID: <20110607202218.GZ1754@sun> (raw)
In-Reply-To: <20110607201030.GY1754@sun>
On Wed, Jun 08, 2011 at 12:10:30AM +0400, Cyrill Gorcunov wrote:
> 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
This one should do the trick, cant say I like it, we probably need some
default values from options parser, ie to extend it.
Cyrill
---
kvm tools: Introduce vidmode parmeter v2
Usually this might be set by loader but since
we're the loader lets allow to specify vesa
mode as well.
v2: Pekka spotted the default value was being compromised,
so revert it back and set only if specified.
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
---
tools/kvm/kvm-run.c | 20 ++++++++++++++++----
1 file changed, 16 insertions(+), 4 deletions(-)
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 = -1;
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;
@@ -539,14 +543,22 @@ int kvm_cmd_run(int argc, const char **a
kvm->nrcpus = nrcpus;
+ /*
+ * vidmode should be either specified
+ * either set by default
+ */
+ if (vnc || sdl) {
+ if (vidmode == -1)
+ vidmode = 0x312;
+ } else
+ vidmode = 0;
+
memset(real_cmdline, 0, sizeof(real_cmdline));
strcpy(real_cmdline, "notsc noapic noacpi pci=conf1");
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));
next prev parent reply other threads:[~2011-06-07 20:22 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-07 19:41 [patch 0/5] kvm tools: A few fixes Cyrill Gorcunov
2011-06-07 19:41 ` [patch 1/5] kvm tools: Options parser to handle hex numbers Cyrill Gorcunov
2011-06-07 19:41 ` [patch 2/5] kvm tools: Introduce vidmode parmeter Cyrill Gorcunov
2011-06-07 19:53 ` Pekka Enberg
2011-06-07 20:03 ` Cyrill Gorcunov
2011-06-07 20:10 ` Cyrill Gorcunov
2011-06-07 20:22 ` Cyrill Gorcunov [this message]
2011-06-07 19:41 ` [patch 3/5] kvm tools: Delete dangling cursor from int10 Cyrill Gorcunov
2011-06-07 19:41 ` [patch 4/5] kvm tools: Get rid of spaces in ld script Cyrill Gorcunov
2011-06-07 19:41 ` [patch 5/5] kvm tools: Reform bios make fules Cyrill Gorcunov
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=20110607202218.GZ1754@sun \
--to=gorcunov@gmail.com \
--cc=asias.hejun@gmail.com \
--cc=kvm@vger.kernel.org \
--cc=levinsasha928@gmail.com \
--cc=mingo@elte.hu \
--cc=penberg@kernel.org \
--cc=prasadjoshi124@gmail.com \
/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