aboutsummaryrefslogtreecommitdiff
path: root/softmmu
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2020-11-30 13:44:49 -0500
committerPaolo Bonzini <pbonzini@redhat.com>2020-12-15 12:51:51 -0500
commit5a1ee6077b89ee9a803aaf8d1c98004701f63684 (patch)
treeff3c0d5a2fc247b49974c38e2ccd9a1902a08b3f /softmmu
parentf66dc8737c94a0ab57a252a280e5e83d6d630c67 (diff)
chardev: do not use machine_init_done
machine_init_done is not the right flag to check when preconfig is taken into account; for example "./qemu-system-x86_64 -serial mon:stdio -preconfig" does not print the QEMU monitor header until after exit_preconfig. Add back a custom bool for mux character devices. This partially undoes commit c7278b4355 ("chardev: introduce chr_machine_done hook", 2018-03-12), but it keeps the cleaner logic using a function pointer in ChardevClass. Reviewed-by: Igor Mammedov <imammedo@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'softmmu')
-rw-r--r--softmmu/vl.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/softmmu/vl.c b/softmmu/vl.c
index d8af26c281..8e18c52f6e 100644
--- a/softmmu/vl.c
+++ b/softmmu/vl.c
@@ -3462,6 +3462,8 @@ void qemu_init(int argc, char **argv, char **envp)
qemu_create_machine(select_machine());
+ suspend_mux_open();
+
qemu_disable_default_devices();
qemu_create_default_devices();
qemu_create_early_backends();
@@ -3525,4 +3527,5 @@ void qemu_init(int argc, char **argv, char **envp)
}
accel_setup_post(current_machine);
os_setup_post();
+ resume_mux_open();
}