[FOR,0.12,v3,21/21] Set default console to virtio on S390x

Submitted by Gerd Hoffmann on Dec. 7, 2009, 12:42 p.m.

Details

Message ID 1260189773-20728-22-git-send-email-kraxel@redhat.com
State New
Headers show

Commit Message

Gerd Hoffmann Dec. 7, 2009, 12:42 p.m.
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 <kraxel@redhat.com>
---
 vl.c |   11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletions(-)

Patch hide | download patch | download mbox

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");
         }