On Tue, 27 Oct 2020 14:21:15 -0400 Paolo Bonzini <pbonz...@redhat.com> wrote:
> The main improvements with respect to v1 are: series no longer applies to master what commit if was based on? > > - further extraction of various phases of command line processing and VM > creation to separate function; > > - removing the preconfig main_loop: the VM is effectively always starting > as if -preconfig was specified, it just executes automatically if not > requested. This enables "-incoming defer" to be specified together > with "-preconfig". > > I have other patches with which I could configure the VM like > > $ qemu -vnc :0 -monitor stdio -preconfig > ... in theory blockdev-add and other backend creation would go here... > (qemu) x-create-onboard-devices > (qemu) device_add virtio-mouse-pci > (qemu) cont > > Here, x-create-onboard-devices creates enough of the machine to make > it possible to issue device_add monitor commands equivalent to > the -device command line. > > However, I'm not posting that part because the above is not the > final state of the QMP interface. The final QMP interface would have > three commands (machine-set, accel-set, machine-set-memory) that > bring the VM through successive phases of initialization corresponding > roughly to qemu_apply_machine_options (-smp, -boot, -M, -cpu?), > configure_accelerators (-accel) and qemu_finish_machine_init (-m, -M memdev); > after these three steps, one of migrate-incoming, cont, loadvm or > finish-machine-init (the latter of which is equivalent to -S on the > command line) leaves preconfig mode. For more information see > https://wiki.qemu.org/User:Paolo_Bonzini/Machine_init_sequence#Basic_phases. > > Based-on: <20201026143028.3034018-1-pbonz...@redhat.com> > > Paolo Bonzini (29): > trace: remove argument from trace_init_file > semihosting: fix order of initialization functions > vl: extract validation of -smp to machine.c > vl: remove bogus check > vl: split various early command line options to a separate function > vl: move various initialization routines out of qemu_init > vl: extract qemu_init_subsystems > vl: move prelaunch part of qemu_init to new functions > vl: extract various command line validation snippets to a new function > vl: preconfig and loadvm are mutually exclusive > vl: extract various command line desugaring snippets to a new function > vl: create "-net nic -net user" default earlier > vl: load plugins as late as possible > vl: move semihosting command line fallback to qemu_finish_machine_init > vl: extract default devices to separate functions > vl: move CHECKPOINT_INIT after preconfig > vl: separate qemu_create_early_backends > vl: separate qemu_create_late_backends > vl: separate qemu_create_machine > vl: separate qemu_apply_machine_options > vl: separate qemu_resolve_machine_memdev > vl: initialize displays before preconfig loop > vl: move -global check earlier > migration, vl: start migration via qmp_migrate_incoming > vl: start VM via qmp_cont > hmp: introduce cmd_available > remove preconfig state > vl: remove separate preconfig main_loop > vl: allow -incoming defer with -preconfig > > bsd-user/main.c | 6 +- > hw/core/machine-qmp-cmds.c | 5 +- > hw/core/machine.c | 27 + > include/hw/boards.h | 1 + > include/hw/qdev-core.h | 8 - > include/migration/misc.h | 1 - > include/qapi/qmp/dispatch.h | 1 + > include/sysemu/runstate.h | 1 - > linux-user/main.c | 6 +- > migration/migration.c | 37 +- > monitor/hmp.c | 23 +- > monitor/qmp-cmds.c | 10 - > qapi/qmp-dispatch.c | 5 +- > qapi/run-state.json | 5 +- > qemu-img.c | 6 +- > qemu-io.c | 6 +- > qemu-nbd.c | 6 +- > scsi/qemu-pr-helper.c | 6 +- > softmmu/qdev-monitor.c | 18 +- > softmmu/vl.c | 1796 +++++++++++++------------- > storage-daemon/qemu-storage-daemon.c | 9 +- > stubs/meson.build | 1 + > stubs/qmp-command-available.c | 7 + > trace/control.c | 10 +- > trace/control.h | 12 +- > 25 files changed, 1021 insertions(+), 992 deletions(-) > create mode 100644 stubs/qmp-command-available.c >