From: Asias He Subject: [PATCH 6/6] kvm tools: introduce --enable-virtio-console option Date: Fri, 8 Apr 2011 22:12:53 +0800 Message-ID: <1302271973-7604-6-git-send-email-asias.hejun@gmail.com> References: <1302271973-7604-1-git-send-email-asias.hejun@gmail.com> Cc: kvm@vger.kernel.org, Ingo Molnar , Asias He To: Pekka Enberg , Cyrill Gorcunov Return-path: Received: from mail-iy0-f174.google.com ([209.85.210.174]:40472 "EHLO mail-iy0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752339Ab1DGOOa (ORCPT ); Thu, 7 Apr 2011 10:14:30 -0400 Received: by mail-iy0-f174.google.com with SMTP id 14so2503015iyb.19 for ; Thu, 07 Apr 2011 07:14:29 -0700 (PDT) In-Reply-To: <1302271973-7604-1-git-send-email-asias.hejun@gmail.com> Sender: kvm-owner@vger.kernel.org List-ID: 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 --- tools/kvm/main.c | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/tools/kvm/main.c b/tools/kvm/main.c index 90906d2..5bcefde 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) -- 1.7.4.1