From: Asias He Date: Fri, 8 Apr 2011 14:12:53 +0000 (+0800) Subject: kvm tools: Introduce --enable-virtio-console option X-Git-Tag: next-20110824~3^2~481 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=924e9295f37afb4a8a00be65aac6ee2c95e23a24;p=karo-tx-linux.git kvm tools: Introduce --enable-virtio-console option This option enables virtio console and disables serial console. At this time, the virtio and serial console can not work simultaneously. Becasue we can not put both console's output to user at the same time. However, once we redirect the virtio console to a pipe or socket. We can use both console simultaneously. Signed-off-by: Asias He Signed-off-by: Pekka Enberg --- diff --git a/tools/kvm/main.c b/tools/kvm/main.c index 90906d29307a..5bcefde3e96e 100644 --- a/tools/kvm/main.c +++ b/tools/kvm/main.c @@ -17,11 +17,12 @@ #include extern bool ioport_debug; +extern int active_console; static void usage(char *argv[]) { fprintf(stderr, " usage: %s " - "[--single-step] [--ioport-debug] " + "[--single-step] [--ioport-debug] [--enable-virtio-console] " "[--kvm-dev=] [--mem=] [--params=] " "[--initrd=] [--kernel=] [--image=]\n", argv[0]); @@ -85,6 +86,9 @@ int main(int argc, char *argv[]) } else if (option_matches(argv[i], "--single-step")) { single_step = true; continue; + } else if (option_matches(argv[i], "--enable-virtio-console")) { + active_console = CONSOLE_VIRTIO; + continue; } else if (option_matches(argv[i], "--mem=")) { unsigned long val = atol(&argv[i][6]) << 20; if (val < ram_size)