[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 14/29] vl: move semihosting command line fallback to qemu_finish_
From: |
Paolo Bonzini |
Subject: |
[PATCH 14/29] vl: move semihosting command line fallback to qemu_finish_machine_init |
Date: |
Tue, 27 Oct 2020 14:21:29 -0400 |
Move more sane parts of the huge qemu_init function out of it.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
softmmu/vl.c | 12 +++++-------
1 file changed, 5 insertions(+), 7 deletions(-)
diff --git a/softmmu/vl.c b/softmmu/vl.c
index 53d53ef206..bc85318b23 100644
--- a/softmmu/vl.c
+++ b/softmmu/vl.c
@@ -3072,6 +3072,11 @@ static void qemu_finish_machine_init(void)
{
MachineClass *machine_class = MACHINE_GET_CLASS(current_machine);
+ if (semihosting_enabled() && !semihosting_get_argc() &&
current_machine->kernel_filename) {
+ /* fall back to the -kernel/-append */
+ semihosting_arg_fallback(current_machine->kernel_filename,
current_machine->kernel_cmdline);
+ }
+
if (machine_class->default_ram_id && current_machine->ram_size &&
numa_uses_legacy_mem() && !current_machine->ram_memdev_id) {
create_default_memdev(current_machine, mem_path);
@@ -4389,13 +4394,6 @@ void qemu_init(int argc, char **argv, char **envp)
boot_order = machine_class->default_boot_order;
}
- if (semihosting_enabled() && !semihosting_get_argc()) {
- const char *kernel_filename = qemu_opt_get(machine_opts, "kernel");
- const char *kernel_cmdline = qemu_opt_get(machine_opts, "append");
- /* fall back to the -kernel/-append */
- semihosting_arg_fallback(kernel_filename, kernel_cmdline);
- }
-
if (net_init_clients(&err) < 0) {
error_report_err(err);
exit(1);
--
2.26.2
- [PATCH 01/29] trace: remove argument from trace_init_file, (continued)
- [PATCH 01/29] trace: remove argument from trace_init_file, Paolo Bonzini, 2020/10/27
- [PATCH 08/29] vl: move prelaunch part of qemu_init to new functions, Paolo Bonzini, 2020/10/27
- [PATCH 15/29] vl: extract default devices to separate functions, Paolo Bonzini, 2020/10/27
- [PATCH 23/29] vl: move -global check earlier, Paolo Bonzini, 2020/10/27
- [PATCH 16/29] vl: move CHECKPOINT_INIT after preconfig, Paolo Bonzini, 2020/10/27
- [PATCH 20/29] vl: separate qemu_apply_machine_options, Paolo Bonzini, 2020/10/27
- [PATCH 22/29] vl: initialize displays before preconfig loop, Paolo Bonzini, 2020/10/27
- [PATCH 12/29] vl: create "-net nic -net user" default earlier, Paolo Bonzini, 2020/10/27
- [PATCH 21/29] vl: separate qemu_resolve_machine_memdev, Paolo Bonzini, 2020/10/27
- [PATCH 24/29] migration, vl: start migration via qmp_migrate_incoming, Paolo Bonzini, 2020/10/27
- [PATCH 14/29] vl: move semihosting command line fallback to qemu_finish_machine_init,
Paolo Bonzini <=
- [PATCH 29/29] vl: allow -incoming defer with -preconfig, Paolo Bonzini, 2020/10/27
- [PATCH 28/29] vl: remove separate preconfig main_loop, Paolo Bonzini, 2020/10/27
- [PATCH 18/29] vl: separate qemu_create_late_backends, Paolo Bonzini, 2020/10/27
- [PATCH 26/29] hmp: introduce cmd_available, Paolo Bonzini, 2020/10/27
- [PATCH 25/29] vl: start VM via qmp_cont, Paolo Bonzini, 2020/10/27
- [PATCH 17/29] vl: separate qemu_create_early_backends, Paolo Bonzini, 2020/10/27
- [PATCH 19/29] vl: separate qemu_create_machine, Paolo Bonzini, 2020/10/27
- [PATCH 27/29] remove preconfig state, Paolo Bonzini, 2020/10/27