From 43c9804c2b433687b6ed31288be50d91d881c74a Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Fri, 1 Apr 2016 10:05:59 +0100 Subject: [PATCH] launch: Only use sgabios when verbose is enabled. The sgabios option ROM is slow. Only use it when we're debugging. Thanks: Paolo Bonzini. (cherry picked from commit 6c99a17dc56ab0479b439dece549c89960b21ccc) --- src/launch-direct.c | 3 ++- src/launch-libvirt.c | 8 +++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/launch-direct.c b/src/launch-direct.c index 92b45fd..1081445 100644 --- a/src/launch-direct.c +++ b/src/launch-direct.c @@ -591,7 +591,8 @@ launch_direct (guestfs_h *g, void *datav, const char *arg) ADD_CMDLINE ("-serial"); ADD_CMDLINE ("stdio"); - if (qemu_supports_device (g, data, "Serial Graphics Adapter")) { + if (g->verbose && + qemu_supports_device (g, data, "Serial Graphics Adapter")) { /* Use sgabios instead of vgabios. This means we'll see BIOS * messages on the serial port, and also works around this bug * in qemu 1.1.0: diff --git a/src/launch-libvirt.c b/src/launch-libvirt.c index 3df1833..f9edac0 100644 --- a/src/launch-libvirt.c +++ b/src/launch-libvirt.c @@ -1219,9 +1219,11 @@ construct_libvirt_xml_boot (guestfs_h *g, } end_element (); #if defined(__i386__) || defined(__x86_64__) - start_element ("bios") { - attribute ("useserial", "yes"); - } end_element (); + if (g->verbose) { + start_element ("bios") { + attribute ("useserial", "yes"); + } end_element (); + } #endif } end_element (); -- 1.8.3.1