From 924e9295f37afb4a8a00be65aac6ee2c95e23a24 Mon Sep 17 00:00:00 2001 From: Asias He Date: Fri, 8 Apr 2011 22:12:53 +0800 Subject: [PATCH] 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 --- tools/kvm/main.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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) -- 2.39.5