@@ -174,33 +174,6 @@
##
{ 'command': 'cont' }
-##
-# @x-exit-preconfig:
-#
-# Exit from "preconfig" state
-#
-# This command makes QEMU exit the preconfig state and proceed with
-# VM initialization using configuration data provided on the command line
-# and via the QMP monitor during the preconfig state. The command is only
-# available during the preconfig state (i.e. when the --preconfig command
-# line option was in use).
-#
-# Features:
-# @unstable: This command is experimental.
-#
-# Since 3.0
-#
-# Returns: nothing
-#
-# Example:
-#
-# -> { "execute": "x-exit-preconfig" }
-# <- { "return": {} }
-#
-##
-{ 'command': 'x-exit-preconfig', 'allow-preconfig': true,
- 'features': [ 'unstable' ] }
-
##
# @human-monitor-command:
#
@@ -931,14 +931,6 @@ void hmp_system_powerdown(Monitor *mon, const QDict *qdict)
qmp_system_powerdown(NULL);
}
-void hmp_exit_preconfig(Monitor *mon, const QDict *qdict)
-{
- Error *err = NULL;
-
- qmp_x_exit_preconfig(&err);
- hmp_handle_error(mon, err);
-}
-
void hmp_cpu(Monitor *mon, const QDict *qdict)
{
int64_t cpu_index;
@@ -134,7 +134,6 @@ static const char *accelerators;
static ram_addr_t maxram_size;
static uint64_t ram_slots;
static int display_remote;
-static bool preconfig_requested;
static ram_addr_t ram_size;
static DisplayOptions dpy;
@@ -945,34 +944,6 @@ static void qemu_machine_creation_done(void)
}
}
-void qmp_x_exit_preconfig(Error **errp)
-{
- if (phase_check(PHASE_MACHINE_INITIALIZED)) {
- error_setg(errp, "The command is permitted only before machine initialization");
- return;
- }
-
- qemu_init_board();
- qemu_machine_creation_done();
-
- if (replay_mode != REPLAY_MODE_NONE) {
- replay_vmstate_init();
- }
-
- if (incoming) {
- Error *local_err = NULL;
- if (strcmp(incoming, "defer") != 0) {
- qmp_migrate_incoming(incoming, &local_err);
- if (local_err) {
- error_reportf_err(local_err, "-incoming %s: ", incoming);
- exit(1);
- }
- }
- } else if (autostart) {
- qmp_cont(NULL);
- }
-}
-
void qemu_init(int argc, char **argv, char **envp)
{
MachineClass *machine_class;
@@ -1103,9 +1074,26 @@ void qemu_init(int argc, char **argv, char **envp)
exit(0);
}
- if (!preconfig_requested) {
- qmp_x_exit_preconfig(&error_fatal);
+ qemu_init_board();
+ qemu_machine_creation_done();
+
+ if (replay_mode != REPLAY_MODE_NONE) {
+ replay_vmstate_init();
}
+
+ if (incoming) {
+ Error *local_err = NULL;
+ if (strcmp(incoming, "defer") != 0) {
+ qmp_migrate_incoming(incoming, &local_err);
+ if (local_err) {
+ error_reportf_err(local_err, "-incoming %s: ", incoming);
+ exit(1);
+ }
+ }
+ } else if (autostart) {
+ qmp_cont(NULL);
+ }
+
qemu_init_displays();
accel_setup_post(current_machine);
os_setup_post();
@@ -53,24 +53,6 @@ SRST
Quit the emulator.
ERST
- {
- .name = "exit_preconfig",
- .args_type = "",
- .params = "",
- .help = "exit the preconfig state",
- .cmd = hmp_exit_preconfig,
- .flags = "p",
- },
-
-SRST
-``exit_preconfig``
- This command makes QEMU exit the preconfig state and proceed with
- VM initialization using configuration data provided on the command line
- and via the QMP monitor during the preconfig state. The command is only
- available during the preconfig state (i.e. when the --preconfig command
- line option was in use).
-ERST
-
{
.name = "block_resize",
.args_type = "device:B,size:o",
The startup code is split between qemu_init() and qmp_x_exit_preconfig(). Cutting off the CLI leaves the QMP command useless. Drop it, and inline the startup code back into qemu_init(). I'm going to provide more general replacement shortly. Signed-off-by: Markus Armbruster <armbru@redhat.com> --- qapi/misc.json | 27 ------------------------- monitor/hmp-cmds.c | 8 -------- softmmu/vl.c | 50 ++++++++++++++++++---------------------------- hmp-commands.hx | 18 ----------------- 4 files changed, 19 insertions(+), 84 deletions(-)