Browse Source

cli qmp: Mark --preconfig, exit-preconfig experimental

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 <armbru@redhat.com>
Message-Id: <2018070509.26244-3-armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Acked-by: Eduardo Habkost <ehabkost@redhat.com>
Acked-by: Igor Mammedov <imammedo@redhat.com>
[Straightforward conflict with commit 514337c142 resolved]
tags/v3.0.0-rc1
Markus Armbruster 11 months ago
parent
commit
361ac948a5
7 changed files with 18 additions and 17 deletions
  1. 1
    1
      hmp.c
  2. 3
    3
      qapi/misc.json
  3. 5
    4
      qemu-options.hx
  4. 4
    4
      qemu-tech.texi
  5. 1
    1
      qmp.c
  6. 1
    1
      tests/numa-test.c
  7. 3
    3
      tests/qmp-test.c

+ 1
- 1
hmp.c View File

@@ -1076,7 +1076,7 @@ void hmp_exit_preconfig(Monitor *mon, const QDict *qdict)
1076 1076
 {
1077 1077
     Error *err = NULL;
1078 1078
 
1079
-    qmp_exit_preconfig(&err);
1079
+    qmp_x_exit_preconfig(&err);
1080 1080
     hmp_handle_error(mon, &err);
1081 1081
 }
1082 1082
 

+ 3
- 3
qapi/misc.json View File

@@ -1205,7 +1205,7 @@
1205 1205
 { 'command': 'cont' }
1206 1206
 
1207 1207
 ##
1208
-# @exit-preconfig:
1208
+# @x-exit-preconfig:
1209 1209
 #
1210 1210
 # Exit from "preconfig" state
1211 1211
 #
@@ -1221,11 +1221,11 @@
1221 1221
 #
1222 1222
 # Example:
1223 1223
 #
1224
-# -> { "execute": "exit-preconfig" }
1224
+# -> { "execute": "x-exit-preconfig" }
1225 1225
 # <- { "return": {} }
1226 1226
 #
1227 1227
 ##
1228
-{ 'command': 'exit-preconfig', 'allow-preconfig': true }
1228
+{ 'command': 'x-exit-preconfig', 'allow-preconfig': true }
1229 1229
 
1230 1230
 ##
1231 1231
 # @system_wakeup:

+ 5
- 4
qemu-options.hx View File

@@ -3303,16 +3303,17 @@ Run the emulation in single step mode.
3303 3303
 ETEXI
3304 3304
 
3305 3305
 DEF("preconfig", 0, QEMU_OPTION_preconfig, \
3306
-    "--preconfig     pause QEMU before machine is initialized\n",
3306
+    "--preconfig     pause QEMU before machine is initialized (experimental)\n",
3307 3307
     QEMU_ARCH_ALL)
3308 3308
 STEXI
3309 3309
 @item --preconfig
3310 3310
 @findex --preconfig
3311 3311
 Pause QEMU for interactive configuration before the machine is created,
3312 3312
 which allows querying and configuring properties that will affect
3313
-machine initialization. Use the QMP command 'exit-preconfig' to exit
3314
-the preconfig state and move to the next state (ie. run guest if -S
3315
-isn't used or pause the second time if -S is used).
3313
+machine initialization.  Use QMP command 'x-exit-preconfig' to exit
3314
+the preconfig state and move to the next state (i.e. run guest if -S
3315
+isn't used or pause the second time if -S is used).  This option is
3316
+experimental.
3316 3317
 ETEXI
3317 3318
 
3318 3319
 DEF("S", 0, QEMU_OPTION_S, \

+ 4
- 4
qemu-tech.texi View File

@@ -336,9 +336,9 @@ additionally configure the machine (by hotplugging devices) in runtime before
336 336
 allowing VM code to run.
337 337
 
338 338
 However, at the -S pause point, it's impossible to configure options that affect
339
-initial VM creation (like: -smp/-m/-numa ...) or cold plug devices. That's
340
-when the --preconfig command line option should be used. It allows pausing QEMU
341
-before the initial VM creation, in a new preconfig state, where additional
339
+initial VM creation (like: -smp/-m/-numa ...) or cold plug devices. The
340
+experimental --preconfig command line option  allows pausing QEMU
341
+before the initial VM creation, in a ``preconfig'' state, where additional
342 342
 queries and configuration can be performed via QMP before moving on to
343 343
 the resulting configuration startup. In the preconfig state, QEMU only allows
344 344
 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:
348 348
 @item query-qmp-schema
349 349
 @item query-commands
350 350
 @item query-status
351
-@item exit-preconfig
351
+@item x-exit-preconfig
352 352
 @end table
353 353
 
354 354
 @node Bibliography

+ 1
- 1
qmp.c View File

@@ -129,7 +129,7 @@ void qmp_cpu_add(int64_t id, Error **errp)
129 129
     }
130 130
 }
131 131
 
132
-void qmp_exit_preconfig(Error **errp)
132
+void qmp_x_exit_preconfig(Error **errp)
133 133
 {
134 134
     if (!runstate_check(RUN_STATE_PRECONFIG)) {
135 135
         error_setg(errp, "The command is permitted only in '%s' state",

+ 1
- 1
tests/numa-test.c View File

@@ -285,7 +285,7 @@ static void pc_dynamic_cpu_cfg(const void *data)
285 285
         " 'arguments': { 'type': 'cpu', 'node-id': 1, 'socket-id': 0 } }")));
286 286
 
287 287
     /* let machine initialization to complete and run */
288
-    g_assert(!qmp_rsp_is_err(qtest_qmp(qs, "{ 'execute': 'exit-preconfig' }")));
288
+    g_assert(!qmp_rsp_is_err(qtest_qmp(qs, "{ 'execute': 'x-exit-preconfig' }")));
289 289
     qtest_qmp_eventwait(qs, "RESUME");
290 290
 
291 291
     /* check that CPUs are mapped as expected */

+ 3
- 3
tests/qmp-test.c View File

@@ -453,7 +453,7 @@ static void test_qmp_preconfig(void)
453 453
     qobject_unref(rsp);
454 454
 
455 455
     /* exit preconfig state */
456
-    g_assert(!qmp_rsp_is_err(qtest_qmp(qs, "{ 'execute': 'exit-preconfig' }")));
456
+    g_assert(!qmp_rsp_is_err(qtest_qmp(qs, "{ 'execute': 'x-exit-preconfig' }")));
457 457
     qtest_qmp_eventwait(qs, "RESUME");
458 458
 
459 459
     /* check that query-status returns running state */
@@ -463,8 +463,8 @@ static void test_qmp_preconfig(void)
463 463
     g_assert_cmpstr(qdict_get_try_str(ret, "status"), ==, "running");
464 464
     qobject_unref(rsp);
465 465
 
466
-    /* check that exit-preconfig returns error after exiting preconfig */
467
-    g_assert(qmp_rsp_is_err(qtest_qmp(qs, "{ 'execute': 'exit-preconfig' }")));
466
+    /* check that x-exit-preconfig returns error after exiting preconfig */
467
+    g_assert(qmp_rsp_is_err(qtest_qmp(qs, "{ 'execute': 'x-exit-preconfig' }")));
468 468
 
469 469
     /* enabled commands, no error expected  */
470 470
     g_assert(!qmp_rsp_is_err(qtest_qmp(qs, "{ 'execute': 'query-cpus' }")));

Loading…
Cancel
Save