]> Git Repo - qemu.git/commitdiff
cli qmp: Mark --preconfig, exit-preconfig experimental
authorMarkus Armbruster <[email protected]>
Thu, 5 Jul 2018 09:14:02 +0000 (11:14 +0200)
committerMarkus Armbruster <[email protected]>
Mon, 16 Jul 2018 13:38:19 +0000 (15:38 +0200)
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]

hmp.c
qapi/misc.json
qemu-options.hx
qemu-tech.texi
qmp.c
tests/numa-test.c
tests/qmp-test.c

diff --git a/hmp.c b/hmp.c
index 4555b503ac4bc8f950e3dd07862d2c552bea1bc6..2aafb50e8e95546ad7732f5e159ad71ddf2f09b8 100644 (file)
--- a/hmp.c
+++ b/hmp.c
@@ -1076,7 +1076,7 @@ void hmp_exit_preconfig(Monitor *mon, const QDict *qdict)
 {
     Error *err = NULL;
 
-    qmp_exit_preconfig(&err);
+    qmp_x_exit_preconfig(&err);
     hmp_handle_error(mon, &err);
 }
 
index f1860418e8915b01d78baca60c5b029b28bca91b..d450cfef21bd9e3613979ea740206e71676d988c 100644 (file)
 { 'command': 'cont' }
 
 ##
-# @exit-preconfig:
+# @x-exit-preconfig:
 #
 # Exit from "preconfig" state
 #
 #
 # Example:
 #
-# -> { "execute": "exit-preconfig" }
+# -> { "execute": "x-exit-preconfig" }
 # <- { "return": {} }
 #
 ##
-{ 'command': 'exit-preconfig', 'allow-preconfig': true }
+{ 'command': 'x-exit-preconfig', 'allow-preconfig': true }
 
 ##
 # @system_wakeup:
index 654e69cc3bf8c9deda1b061f493138c53e8577b6..371c4271a47b52bfff63bffdf8a6029702523909 100644 (file)
@@ -3303,16 +3303,17 @@ Run the emulation in single step mode.
 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
-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, \
index f843341ffafab7c411354765acaa36de31a03b16..7c3d1f05e132f79760b49b682b8eebb533e81010 100644 (file)
@@ -336,9 +336,9 @@ additionally configure the machine (by hotplugging devices) in runtime before
 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
@@ -348,7 +348,7 @@ depend on an initialized machine, including but not limited to:
 @item query-qmp-schema
 @item query-commands
 @item query-status
-@item exit-preconfig
+@item x-exit-preconfig
 @end table
 
 @node Bibliography
diff --git a/qmp.c b/qmp.c
index 5170403e5df148bebcf5e32e511241c616f3d45d..e7c0a2fd60de4c0d6cec767b1c7edf0111e83be7 100644 (file)
--- a/qmp.c
+++ b/qmp.c
@@ -129,7 +129,7 @@ void qmp_cpu_add(int64_t id, Error **errp)
     }
 }
 
-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",
index b7a6ef8815a90cabe910a4a049134620c4e2f357..893f826acb1651901515a797630ca01de466645d 100644 (file)
@@ -285,7 +285,7 @@ static void pc_dynamic_cpu_cfg(const void *data)
         " '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 */
index ceaf4a67899213c1bd9e1ce65b1c907218553de8..b9774084f8f425ba5d08b37401338d9755e321dc 100644 (file)
@@ -453,7 +453,7 @@ static void test_qmp_preconfig(void)
     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 */
@@ -463,8 +463,8 @@ static void test_qmp_preconfig(void)
     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' }")));
This page took 0.039585 seconds and 4 git commands to generate.