From patchwork Mon Dec 7 12:42:53 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gerd Hoffmann X-Patchwork-Id: 40491 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 60F7AB6F0E for ; Tue, 8 Dec 2009 00:21:11 +1100 (EST) Received: from localhost ([127.0.0.1]:40178 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NHdWW-00052O-57 for incoming@patchwork.ozlabs.org; Mon, 07 Dec 2009 08:21:08 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NHcwy-0005Sm-GT for qemu-devel@nongnu.org; Mon, 07 Dec 2009 07:44:24 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NHcws-0005Oh-EB for qemu-devel@nongnu.org; Mon, 07 Dec 2009 07:44:23 -0500 Received: from [199.232.76.173] (port=58691 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NHcws-0005OV-8U for qemu-devel@nongnu.org; Mon, 07 Dec 2009 07:44:18 -0500 Received: from mx1.redhat.com ([209.132.183.28]:45951) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NHcwr-0000hl-Iw for qemu-devel@nongnu.org; Mon, 07 Dec 2009 07:44:17 -0500 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id nB7CiGEr028931 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 7 Dec 2009 07:44:16 -0500 Received: from zweiblum.home.kraxel.org (vpn2-8-247.ams2.redhat.com [10.36.8.247]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id nB7CiDxK025778; Mon, 7 Dec 2009 07:44:15 -0500 Received: by zweiblum.home.kraxel.org (Postfix, from userid 500) id D57E47011B; Mon, 7 Dec 2009 13:43:59 +0100 (CET) From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Mon, 7 Dec 2009 13:42:53 +0100 Message-Id: <1260189773-20728-22-git-send-email-kraxel@redhat.com> In-Reply-To: <1260189773-20728-1-git-send-email-kraxel@redhat.com> References: <1260189773-20728-1-git-send-email-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.12 X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. Cc: Gerd Hoffmann , agraf@suse.de, lcapitulino@redhat.com Subject: [Qemu-devel] [FOR 0.12 PATCH v3 21/21] Set default console to virtio on S390x X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org All "normal" system emulation targets in qemu I'm aware of display output on either VGA or serial output. Our S390x virtio machine doesn't have such kind of legacy hardware. So instead we need to default to a virtio console. Signed-off-by: Gerd Hoffmann --- vl.c | 11 ++++++++++- 1 files changed, 10 insertions(+), 1 deletions(-) diff --git a/vl.c b/vl.c index 298ac73..98374c8 100644 --- a/vl.c +++ b/vl.c @@ -268,9 +268,14 @@ uint8_t qemu_uuid[16]; static QEMUBootSetHandler *boot_set_handler; static void *boot_set_opaque; +#ifdef TARGET_S390X +static int default_serial = 0; +static int default_virtcon = 1; +#else static int default_serial = 1; +static int default_virtcon = 0; +#endif static int default_parallel = 1; -static int default_virtcon = 1; static int default_monitor = 1; static int default_vga = 1; static int default_drive = 1; @@ -5638,9 +5643,13 @@ int main(int argc, char **argv, char **envp) add_device_config(DEV_PARALLEL, "null"); if (default_serial && default_monitor) { add_device_config(DEV_SERIAL, "mon:stdio"); + } else if (default_virtcon && default_monitor) { + add_device_config(DEV_VIRTCON, "mon:stdio"); } else { if (default_serial) add_device_config(DEV_SERIAL, "stdio"); + if (default_virtcon) + add_device_config(DEV_VIRTCON, "stdio"); if (default_monitor) monitor_parse("stdio", "readline"); }