From mboxrd@z Thu Jan 1 00:00:00 1970 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 From: Gerd Hoffmann 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> Subject: [Qemu-devel] [FOR 0.12 PATCH v3 21/21] Set default console to virtio on S390x List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Gerd Hoffmann , agraf@suse.de, lcapitulino@redhat.com 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"); } -- 1.6.5.2