qemu/system
Peter Maydell d2019a9d0c system/vl.c: Fix handling of '-serial none -serial something'
Currently if the user passes multiple -serial options on the command
line, we mostly treat those as applying to the different serial
devices in order, so that for example
 -serial stdio -serial file:filename
will connect the first serial port to stdio and the second to the
named file.

The exception to this is the '-serial none' serial device type.  This
means "don't allocate this serial device", but a bug means that
following -serial options are not correctly handled, so that
 -serial none -serial stdio
has the unexpected effect that stdio is connected to the first serial
port, not the second.

This is a very long-standing bug that dates back at least as far as
commit 998bbd74b9 from 2009.

Make the 'none' serial type move forward in the indexing of serial
devices like all the other serial types, so that any subsequent
-serial options are correctly handled.

Note that if your commandline mistakenly had a '-serial none' that
was being overridden by a following '-serial something' option, you
should delete the unnecessary '-serial none'.  This will give you the
same behaviour as before, on QEMU versions both with and without this
bug fix.

Cc: qemu-stable@nongnu.org
Reported-by: Bohdan Kostiv <bohdan.kostiv@tii.ae>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20240122163607.459769-2-peter.maydell@linaro.org
Fixes: 998bbd74b9 ("default devices: core code & serial lines")
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2024-02-02 13:51:57 +00:00
..
arch_init.c
async-teardown.c
balloon.c balloon: Fix a misleading error message 2023-11-17 10:07:52 +01:00
bootdevice.c
cpu-throttle.c qemu/main-loop: rename qemu_cond_wait_iothread() to qemu_cond_wait_bql() 2024-01-08 10:45:43 -05:00
cpu-timers.c system/cpu-timers: Introduce ICountMode enumerator 2024-01-19 12:28:59 +01:00
cpus.c qemu/main-loop: rename qemu_cond_wait_iothread() to qemu_cond_wait_bql() 2024-01-08 10:45:43 -05:00
datadir.c
device_tree.c
dirtylimit.c system/cpus: rename qemu_mutex_lock_iothread() to bql_lock() 2024-01-08 10:45:43 -05:00
dma-helpers.c scsi: assert that callbacks run in the correct AioContext 2023-12-21 22:49:27 +01:00
globals.c
ioport.c
main.c softmmu: pass the main loop status to gdb "Wxx" packet 2023-10-12 12:33:24 +10:00
memory_mapping.c memory: follow Error API guidelines 2023-10-19 23:13:27 +02:00
memory.c system/cpus: rename qemu_mutex_lock_iothread() to bql_lock() 2024-01-08 10:45:43 -05:00
meson.build configure, meson: rename targetos to host_os 2023-12-31 09:11:29 +01:00
physmem.c target: Make qemu_target_page_mask() available for *-user 2024-01-29 21:04:10 +10:00
qdev-monitor.c Add virtio-sound-pci device 2023-11-07 03:39:10 -05:00
qemu-seccomp.c
qtest.c system/qtest: Include missing 'hw/core/cpu.h' header 2023-12-20 10:29:23 +01:00
rtc.c
runstate-action.c
runstate-hmp-cmds.c
runstate.c qapi: Remove deprecated 'singlestep' member of StatusInfo 2024-01-19 11:38:32 +01:00
tpm-hmp-cmds.c
tpm.c
trace-events
trace.h
vl.c system/vl.c: Fix handling of '-serial none -serial something' 2024-02-02 13:51:57 +00:00
watchpoint.c system/watchpoint: Move TCG specific code to accel/tcg/ 2024-01-19 12:28:59 +01:00