qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 8.2 bugfix] vl: disable default serial when xen-console is enabled
@ 2023-11-09 11:37 David Woodhouse
  0 siblings, 0 replies; only message in thread
From: David Woodhouse @ 2023-11-09 11:37 UTC (permalink / raw)
  To: Marc-André Lureau, qemu-devel
  Cc: Gerd Hoffmann, Paolo Bonzini, Thomas Huth, stefanha

[-- Attachment #1: Type: text/plain, Size: 1700 bytes --]

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 #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5965 bytes --]

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2023-11-09 11:38 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-09 11:37 [PATCH 8.2 bugfix] vl: disable default serial when xen-console is enabled David Woodhouse

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).