From: David Woodhouse <dwmw2@infradead.org>
To: "Marc-André Lureau" <marcandre.lureau@redhat.com>,
	qemu-devel <qemu-devel@nongnu.org>
Cc: Gerd Hoffmann <kraxel@redhat.com>,
	Paolo Bonzini <pbonzini@redhat.com>,
	 Thomas Huth <thuth@redhat.com>, stefanha <stefanha@gmail.com>
Subject: [PATCH 8.2 bugfix] vl: disable default serial when xen-console is enabled
Date: Thu, 09 Nov 2023 11:37:31 +0000	[thread overview]
Message-ID: <44fb0420a60dc4e4ca2666a676a0055a1a5f1b51.camel@infradead.org> (raw)
[-- 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 --]
                 reply	other threads:[~2023-11-09 11:38 UTC|newest]
Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox
  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):
  git send-email \
    --in-reply-to=44fb0420a60dc4e4ca2666a676a0055a1a5f1b51.camel@infradead.org \
    --to=dwmw2@infradead.org \
    --cc=kraxel@redhat.com \
    --cc=marcandre.lureau@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@gmail.com \
    --cc=thuth@redhat.com \
    /path/to/YOUR_REPLY
  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
  Be sure your reply has a Subject: header at the top and a blank line
  before the message body.
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).