Committing to the current --preconfig / exit-preconfig interface
before it has seen any use is premature. Mark both as experimental,
the former in documentation, the latter by renaming it to
x-exit-preconfig.
See the previous commit for more detailed rationale.
Signed-off-by: Markus Armbruster <[email protected]>
Message-Id: <
20180705091402[email protected]>
Reviewed-by: Eric Blake <[email protected]>
Acked-by: Eduardo Habkost <[email protected]>
Acked-by: Igor Mammedov <[email protected]>
[Straightforward conflict with commit
514337c142f resolved]
- qmp_exit_preconfig(&err);
+ qmp_x_exit_preconfig(&err);
hmp_handle_error(mon, &err);
}
hmp_handle_error(mon, &err);
}
#
# Exit from "preconfig" state
#
#
# Exit from "preconfig" state
#
-# -> { "execute": "exit-preconfig" }
+# -> { "execute": "x-exit-preconfig" }
# <- { "return": {} }
#
##
# <- { "return": {} }
#
##
-{ 'command': 'exit-preconfig', 'allow-preconfig': true }
+{ 'command': 'x-exit-preconfig', 'allow-preconfig': true }
ETEXI
DEF("preconfig", 0, QEMU_OPTION_preconfig, \
ETEXI
DEF("preconfig", 0, QEMU_OPTION_preconfig, \
- "--preconfig pause QEMU before machine is initialized\n",
+ "--preconfig pause QEMU before machine is initialized (experimental)\n",
QEMU_ARCH_ALL)
STEXI
@item --preconfig
@findex --preconfig
Pause QEMU for interactive configuration before the machine is created,
which allows querying and configuring properties that will affect
QEMU_ARCH_ALL)
STEXI
@item --preconfig
@findex --preconfig
Pause QEMU for interactive configuration before the machine is created,
which allows querying and configuring properties that will affect
-machine initialization. Use the QMP command 'exit-preconfig' to exit
-the preconfig state and move to the next state (ie. run guest if -S
-isn't used or pause the second time if -S is used).
+machine initialization. Use QMP command 'x-exit-preconfig' to exit
+the preconfig state and move to the next state (i.e. run guest if -S
+isn't used or pause the second time if -S is used). This option is
+experimental.
ETEXI
DEF("S", 0, QEMU_OPTION_S, \
ETEXI
DEF("S", 0, QEMU_OPTION_S, \
allowing VM code to run.
However, at the -S pause point, it's impossible to configure options that affect
allowing VM code to run.
However, at the -S pause point, it's impossible to configure options that affect
-initial VM creation (like: -smp/-m/-numa ...) or cold plug devices. That's
-when the --preconfig command line option should be used. It allows pausing QEMU
-before the initial VM creation, in a new preconfig state, where additional
+initial VM creation (like: -smp/-m/-numa ...) or cold plug devices. The
+experimental --preconfig command line option allows pausing QEMU
+before the initial VM creation, in a ``preconfig'' state, where additional
queries and configuration can be performed via QMP before moving on to
the resulting configuration startup. In the preconfig state, QEMU only allows
a limited set of commands over the QMP monitor, where the commands do not
queries and configuration can be performed via QMP before moving on to
the resulting configuration startup. In the preconfig state, QEMU only allows
a limited set of commands over the QMP monitor, where the commands do not
@item query-qmp-schema
@item query-commands
@item query-status
@item query-qmp-schema
@item query-commands
@item query-status
@end table
@node Bibliography
@end table
@node Bibliography
-void qmp_exit_preconfig(Error **errp)
+void qmp_x_exit_preconfig(Error **errp)
{
if (!runstate_check(RUN_STATE_PRECONFIG)) {
error_setg(errp, "The command is permitted only in '%s' state",
{
if (!runstate_check(RUN_STATE_PRECONFIG)) {
error_setg(errp, "The command is permitted only in '%s' state",
" 'arguments': { 'type': 'cpu', 'node-id': 1, 'socket-id': 0 } }")));
/* let machine initialization to complete and run */
" 'arguments': { 'type': 'cpu', 'node-id': 1, 'socket-id': 0 } }")));
/* let machine initialization to complete and run */
- g_assert(!qmp_rsp_is_err(qtest_qmp(qs, "{ 'execute': 'exit-preconfig' }")));
+ g_assert(!qmp_rsp_is_err(qtest_qmp(qs, "{ 'execute': 'x-exit-preconfig' }")));
qtest_qmp_eventwait(qs, "RESUME");
/* check that CPUs are mapped as expected */
qtest_qmp_eventwait(qs, "RESUME");
/* check that CPUs are mapped as expected */
qobject_unref(rsp);
/* exit preconfig state */
qobject_unref(rsp);
/* exit preconfig state */
- g_assert(!qmp_rsp_is_err(qtest_qmp(qs, "{ 'execute': 'exit-preconfig' }")));
+ g_assert(!qmp_rsp_is_err(qtest_qmp(qs, "{ 'execute': 'x-exit-preconfig' }")));
qtest_qmp_eventwait(qs, "RESUME");
/* check that query-status returns running state */
qtest_qmp_eventwait(qs, "RESUME");
/* check that query-status returns running state */
g_assert_cmpstr(qdict_get_try_str(ret, "status"), ==, "running");
qobject_unref(rsp);
g_assert_cmpstr(qdict_get_try_str(ret, "status"), ==, "running");
qobject_unref(rsp);
- /* check that exit-preconfig returns error after exiting preconfig */
- g_assert(qmp_rsp_is_err(qtest_qmp(qs, "{ 'execute': 'exit-preconfig' }")));
+ /* check that x-exit-preconfig returns error after exiting preconfig */
+ g_assert(qmp_rsp_is_err(qtest_qmp(qs, "{ 'execute': 'x-exit-preconfig' }")));
/* enabled commands, no error expected */
g_assert(!qmp_rsp_is_err(qtest_qmp(qs, "{ 'execute': 'query-cpus' }")));
/* enabled commands, no error expected */
g_assert(!qmp_rsp_is_err(qtest_qmp(qs, "{ 'execute': 'query-cpus' }")));