qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 8.2 bugfix] vl: disable default serial when xen-console is enable


From: David Woodhouse
Subject: [PATCH 8.2 bugfix] vl: disable default serial when xen-console is enabled
Date: Thu, 09 Nov 2023 11:37:31 +0000
User-agent: Evolution 3.44.4-0ubuntu2

From: David Woodhouse <dwmw@amazon.co.uk>

If a Xen console is configured on the command line, do not add a default
serial port.

Fixes: 1bec1cc0da4 ("ui/console: allow to override the default VC")
Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
---
(Bonus points for adding a Xen console by default for Xen guests
instead of a serial port, but I'll look at that for 8.3.)

Without this, the example command lines in the documentation at
https://qemu-project.gitlab.io/qemu/system/i386/xen.html fail:

 $ ./qemu-system-x86_64 --accel kvm,xen-version=0x40011,kernel-irqchip=split \
    -display none -chardev stdio,mux=on,id=char0,signal=off -mon char0 \
    -device xen-console,chardev=char0  -drive file=${GUEST_IMAGE},if=xen
qemu-system-x86_64: cannot use stdio by multiple character devices
qemu-system-x86_64: could not connect serial device to character backend 'stdio'

Maybe that Fixes: tag is a little harsh; I think the two pull requests
were outstanding at the same time... but mine was pulled first :)

 system/vl.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/system/vl.c b/system/vl.c
index 5af7ced2a1..8109231834 100644
--- a/system/vl.c
+++ b/system/vl.c
@@ -198,6 +198,7 @@ static const struct {
     const char *driver;
     int *flag;
 } default_list[] = {
+    { .driver = "xen-console",          .flag = &default_serial    },
     { .driver = "isa-serial",           .flag = &default_serial    },
     { .driver = "isa-parallel",         .flag = &default_parallel  },
     { .driver = "isa-fdc",              .flag = &default_floppy    },
-- 
2.34.1


Attachment: smime.p7s
Description: S/MIME cryptographic signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]