[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 13/36] vl: move semihosting command line fallback to qemu_ini
From: |
Igor Mammedov |
Subject: |
Re: [PATCH 13/36] vl: move semihosting command line fallback to qemu_init_board |
Date: |
Thu, 26 Nov 2020 18:10:36 +0100 |
On Mon, 23 Nov 2020 09:14:12 -0500
Paolo Bonzini <pbonzini@redhat.com> wrote:
> 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 ab08a0290c..5d68cf828c 100644
> --- a/softmmu/vl.c
> +++ b/softmmu/vl.c
> @@ -3070,6 +3070,11 @@ static void qemu_init_board(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);
> + }
it doesn't seem to depend on anything that warrants calling it this late.
> 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);
> @@ -4385,13 +4390,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);
> - }
Can we move this hunk as is to somewhere around qemu_maybe_daemonize() time?
> if (net_init_clients(&err) < 0) {
> error_report_err(err);
> exit(1);
- [PATCH 09/36] vl: extract various command line desugaring snippets to a new function, (continued)
- [PATCH 09/36] vl: extract various command line desugaring snippets to a new function, Paolo Bonzini, 2020/11/23
- [PATCH 11/36] vl: create "-net nic -net user" default earlier, Paolo Bonzini, 2020/11/23
- [PATCH 12/36] vl: load plugins as late as possible, Paolo Bonzini, 2020/11/23
- [PATCH 15/36] vl: move CHECKPOINT_INIT after preconfig, Paolo Bonzini, 2020/11/23
- [PATCH 10/36] qemu-option: restrict qemu_opts_set to merge-lists QemuOpts, Paolo Bonzini, 2020/11/23
- [PATCH 14/36] vl: extract default devices to separate functions, Paolo Bonzini, 2020/11/23
- [PATCH 13/36] vl: move semihosting command line fallback to qemu_init_board, Paolo Bonzini, 2020/11/23
- Re: [PATCH 13/36] vl: move semihosting command line fallback to qemu_init_board,
Igor Mammedov <=
- Re: [PATCH 13/36] vl: move semihosting command line fallback to qemu_init_board, Paolo Bonzini, 2020/11/27
- Re: [PATCH 13/36] vl: move semihosting command line fallback to qemu_init_board, Igor Mammedov, 2020/11/27
- Re: [PATCH 13/36] vl: move semihosting command line fallback to qemu_init_board, Paolo Bonzini, 2020/11/27
- Re: [PATCH 13/36] vl: move semihosting command line fallback to qemu_init_board, Igor Mammedov, 2020/11/27
- Re: [PATCH 13/36] vl: move semihosting command line fallback to qemu_init_board, Paolo Bonzini, 2020/11/27
[PATCH 08/36] vl: preconfig and loadvm are mutually exclusive, Paolo Bonzini, 2020/11/23
[PATCH 17/36] vl: separate qemu_create_late_backends, Paolo Bonzini, 2020/11/23
[PATCH 22/36] vl: move -global check earlier, Paolo Bonzini, 2020/11/23
[PATCH 18/36] vl: separate qemu_create_machine, Paolo Bonzini, 2020/11/23