[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 17/20] semihosting: fix order of initialization functions
From: |
Paolo Bonzini |
Subject: |
[PULL 17/20] semihosting: fix order of initialization functions |
Date: |
Wed, 4 Nov 2020 10:01:50 -0500 |
qemu_semihosting_console_init uses semihosting.chardev which is set
by qemu_semihosting_connect_chardevs. Thus qemu_semihosting_connect_chardevs
has to be called first.
Both have to be called after processing -serial and friends though, so
that the semihosting console can connect to a multiplexer as in
"-serial mon:stdio -semihosting-config chardev=serial0"
Suggested-by: Alex Bennée <alex.bennee@linaro.org>
Fixes: 619985e937 ("semihosting: defer connect_chardevs a little more to use
serialx", 2020-07-27)
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
softmmu/vl.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/softmmu/vl.c b/softmmu/vl.c
index a537a0377f..a71164494e 100644
--- a/softmmu/vl.c
+++ b/softmmu/vl.c
@@ -4284,9 +4284,6 @@ void qemu_init(int argc, char **argv, char **envp)
qemu_opts_foreach(qemu_find_opts("mon"),
mon_init_func, NULL, &error_fatal);
- /* connect semihosting console input if requested */
- qemu_semihosting_console_init();
-
if (foreach_device_config(DEV_SERIAL, serial_parse) < 0)
exit(1);
if (foreach_device_config(DEV_PARALLEL, parallel_parse) < 0)
@@ -4296,6 +4293,7 @@ void qemu_init(int argc, char **argv, char **envp)
/* now chardevs have been created we may have semihosting to connect */
qemu_semihosting_connect_chardevs();
+ qemu_semihosting_console_init();
/* If no default VGA is requested, the default is "none". */
if (default_vga) {
--
2.26.2
- [PULL 10/20] tests/qtest/libqos/ahci.c: Avoid NULL dereference in ahci_exec(), (continued)
- [PULL 10/20] tests/qtest/libqos/ahci.c: Avoid NULL dereference in ahci_exec(), Paolo Bonzini, 2020/11/04
- [PULL 06/20] qtest: add a reproducer for LP#1878642, Paolo Bonzini, 2020/11/04
- [PULL 12/20] configure: fix gio_libs reference, Paolo Bonzini, 2020/11/04
- [PULL 04/20] scripts/oss-fuzz: rename bin/qemu-fuzz-i386, Paolo Bonzini, 2020/11/04
- [PULL 16/20] fuzz: fuzz offsets within pio/mmio regions, Paolo Bonzini, 2020/11/04
- [PULL 08/20] meson: vhost-user-gpu/virtiofsd: use absolute path, Paolo Bonzini, 2020/11/04
- [PULL 05/20] hw/isa/lpc_ich9: Ignore reserved/invalid SCI IRQ, Paolo Bonzini, 2020/11/04
- [PULL 15/20] fuzz: check the MR in the DMA callback, Paolo Bonzini, 2020/11/04
- [PULL 11/20] meson: fix warning for bad sphinx-build, Paolo Bonzini, 2020/11/04
- [PULL 14/20] fuzz: fix writing DMA patterns, Paolo Bonzini, 2020/11/04
- [PULL 17/20] semihosting: fix order of initialization functions,
Paolo Bonzini <=
- [PULL 13/20] tests/qtest: Fix potential NULL pointer dereference in qos_build_main_args(), Paolo Bonzini, 2020/11/04
- [PULL 18/20] qapi, qemu-options: make all parsing visitors parse boolean options the same, Paolo Bonzini, 2020/11/04
- [PULL 20/20] qtest: escape device name in device-introspect-test, Paolo Bonzini, 2020/11/04
- [PULL 19/20] ivshmem-test: do not use short-form boolean option, Paolo Bonzini, 2020/11/04