Skip to content

Commit

Permalink
vl: revert behaviour for -display none
Browse files Browse the repository at this point in the history
Commit 1bec1cc ("ui/console: allow to override the default VC") changed
the behaviour of the "-display none" option, so that it now creates a
QEMU monitor on the terminal. "-display none" should not be tangled up
with whether we create a monitor or a serial terminal; it should purely
and only disable the graphical window. Changing its behaviour like this
breaks command lines which, for example, use semihosting for their
output and don't want a graphical window, as they now get a monitor they
never asked for.

It also breaks the command line we document for Xen in
docs/system/i386/xen.html:

 $ ./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'

When qemu is compiled without PIXMAN, by default the serials aren't
muxed with the monitor anymore on stdio. The serials are redirected to
"null" instead, and the monitor isn't set up.

Fixes: commit 1bec1cc ("ui/console: allow to override the default VC")
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Tested-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Tested-by: David Woodhouse <dwmw@amazon.co.uk>
Reviewed-by: David Woodhouse <dwmw@amazon.co.uk>
  • Loading branch information
elmarco committed Nov 21, 2023
1 parent af9264d commit 6956264
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion system/vl.c
Original file line number Diff line number Diff line change
Expand Up @@ -1391,7 +1391,7 @@ static void qemu_create_default_devices(void)
}
}

if (nographic || (!vc && !is_daemonized() && isatty(STDOUT_FILENO))) {
if (nographic) {
if (default_parallel) {
add_device_config(DEV_PARALLEL, "null");
}
Expand Down

0 comments on commit 6956264

Please sign in to comment.