From: Michal Privoznik <mprivozn@redhat.com>
To: qemu-devel@nongnu.org
Subject: [PATCH] qmp: Stabilize preconfig
Date: Mon, 25 Oct 2021 13:08:05 +0200 [thread overview]
Message-ID: <b31f442d28920447690a6b8cee865bdbacde1283.1635160056.git.mprivozn@redhat.com> (raw)
The -preconfig option and exit-preconfig command are around for
quite some time now. However, they are still marked as unstable.
This is suboptimal because it may block some upper layer in
consuming it. In this specific case - Libvirt avoids using
experimental features.
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
---
docs/system/managed-startup.rst | 2 +-
monitor/hmp-cmds.c | 2 +-
qapi/misc.json | 6 +++---
qemu-options.hx | 5 ++---
softmmu/vl.c | 4 ++--
tests/qtest/numa-test.c | 8 ++++----
tests/qtest/qmp-test.c | 6 +++---
7 files changed, 16 insertions(+), 17 deletions(-)
diff --git a/docs/system/managed-startup.rst b/docs/system/managed-startup.rst
index 9bcf98ea79..f3291b867b 100644
--- a/docs/system/managed-startup.rst
+++ b/docs/system/managed-startup.rst
@@ -32,4 +32,4 @@ machine, including but not limited to:
- ``query-qmp-schema``
- ``query-commands``
- ``query-status``
-- ``x-exit-preconfig``
+- ``exit-preconfig``
diff --git a/monitor/hmp-cmds.c b/monitor/hmp-cmds.c
index bcaa41350e..5ccb823b97 100644
--- a/monitor/hmp-cmds.c
+++ b/monitor/hmp-cmds.c
@@ -1001,7 +1001,7 @@ void hmp_exit_preconfig(Monitor *mon, const QDict *qdict)
{
Error *err = NULL;
- qmp_x_exit_preconfig(&err);
+ qmp_exit_preconfig(&err);
hmp_handle_error(mon, err);
}
diff --git a/qapi/misc.json b/qapi/misc.json
index 5c2ca3b556..0f75d60996 100644
--- a/qapi/misc.json
+++ b/qapi/misc.json
@@ -175,7 +175,7 @@
{ 'command': 'cont' }
##
-# @x-exit-preconfig:
+# @exit-preconfig:
#
# Exit from "preconfig" state
#
@@ -191,11 +191,11 @@
#
# Example:
#
-# -> { "execute": "x-exit-preconfig" }
+# -> { "execute": "exit-preconfig" }
# <- { "return": {} }
#
##
-{ 'command': 'x-exit-preconfig', 'allow-preconfig': true }
+{ 'command': 'exit-preconfig', 'allow-preconfig': true }
##
# @human-monitor-command:
diff --git a/qemu-options.hx b/qemu-options.hx
index 5f375bbfa6..d27778869b 100644
--- a/qemu-options.hx
+++ b/qemu-options.hx
@@ -3936,10 +3936,9 @@ SRST
``--preconfig``
Pause QEMU for interactive configuration before the machine is
created, which allows querying and configuring properties that will
- affect machine initialization. Use QMP command 'x-exit-preconfig' to
+ affect machine initialization. Use QMP command '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.
+ if -S isn't used or pause the second time if -S is used).
ERST
DEF("S", 0, QEMU_OPTION_S, \
diff --git a/softmmu/vl.c b/softmmu/vl.c
index af0c4cbd99..09a9ec06f9 100644
--- a/softmmu/vl.c
+++ b/softmmu/vl.c
@@ -2730,7 +2730,7 @@ static void qemu_machine_creation_done(void)
}
}
-void qmp_x_exit_preconfig(Error **errp)
+void qmp_exit_preconfig(Error **errp)
{
if (phase_check(PHASE_MACHINE_INITIALIZED)) {
error_setg(errp, "The command is permitted only before machine initialization");
@@ -3770,7 +3770,7 @@ void qemu_init(int argc, char **argv, char **envp)
}
if (!preconfig_requested) {
- qmp_x_exit_preconfig(&error_fatal);
+ qmp_exit_preconfig(&error_fatal);
}
qemu_init_displays();
accel_setup_post(current_machine);
diff --git a/tests/qtest/numa-test.c b/tests/qtest/numa-test.c
index 90bf68a5b3..bea95b1832 100644
--- a/tests/qtest/numa-test.c
+++ b/tests/qtest/numa-test.c
@@ -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': 'x-exit-preconfig' }")));
+ g_assert(!qmp_rsp_is_err(qtest_qmp(qs, "{ 'execute': 'exit-preconfig' }")));
qtest_qmp_eventwait(qs, "RESUME");
/* check that CPUs are mapped as expected */
@@ -443,7 +443,7 @@ static void pc_hmat_build_cfg(const void *data)
/* let machine initialization to complete and run */
g_assert_false(qmp_rsp_is_err(qtest_qmp(qs,
- "{ 'execute': 'x-exit-preconfig' }")));
+ "{ 'execute': 'exit-preconfig' }")));
qtest_qmp_eventwait(qs, "RESUME");
qtest_quit(qs);
@@ -482,7 +482,7 @@ static void pc_hmat_off_cfg(const void *data)
/* let machine initialization to complete and run */
g_assert_false(qmp_rsp_is_err(qtest_qmp(qs,
- "{ 'execute': 'x-exit-preconfig' }")));
+ "{ 'execute': 'exit-preconfig' }")));
qtest_qmp_eventwait(qs, "RESUME");
qtest_quit(qs);
@@ -533,7 +533,7 @@ static void pc_hmat_erange_cfg(const void *data)
/* let machine initialization to complete and run */
g_assert_false(qmp_rsp_is_err(qtest_qmp(qs,
- "{ 'execute': 'x-exit-preconfig' }")));
+ "{ 'execute': 'exit-preconfig' }")));
qtest_qmp_eventwait(qs, "RESUME");
qtest_quit(qs);
diff --git a/tests/qtest/qmp-test.c b/tests/qtest/qmp-test.c
index cd27fae3de..f0aaa94d8a 100644
--- a/tests/qtest/qmp-test.c
+++ b/tests/qtest/qmp-test.c
@@ -299,7 +299,7 @@ static void test_qmp_preconfig(void)
qobject_unref(rsp);
/* exit preconfig state */
- g_assert(!qmp_rsp_is_err(qtest_qmp(qs, "{ 'execute': 'x-exit-preconfig' }")));
+ g_assert(!qmp_rsp_is_err(qtest_qmp(qs, "{ 'execute': 'exit-preconfig' }")));
qtest_qmp_eventwait(qs, "RESUME");
/* check that query-status returns running state */
@@ -309,8 +309,8 @@ static void test_qmp_preconfig(void)
g_assert_cmpstr(qdict_get_try_str(ret, "status"), ==, "running");
qobject_unref(rsp);
- /* check that x-exit-preconfig returns error after exiting preconfig */
- g_assert(qmp_rsp_is_err(qtest_qmp(qs, "{ 'execute': 'x-exit-preconfig' }")));
+ /* check that exit-preconfig returns error after exiting preconfig */
+ g_assert(qmp_rsp_is_err(qtest_qmp(qs, "{ 'execute': 'exit-preconfig' }")));
/* enabled commands, no error expected */
g_assert(!qmp_rsp_is_err(qtest_qmp(qs, "{ 'execute': 'query-cpus-fast' }")));
--
2.32.0
next reply other threads:[~2021-10-25 11:11 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-25 11:08 Michal Privoznik [this message]
2021-10-25 12:19 ` [PATCH] qmp: Stabilize preconfig Markus Armbruster
2021-10-25 17:01 ` Paolo Bonzini
2021-11-01 14:37 ` Michal Prívozník
2021-11-01 14:57 ` Daniel P. Berrangé
2021-11-03 8:02 ` Markus Armbruster
2021-11-03 9:27 ` Daniel P. Berrangé
2021-11-10 12:54 ` Michal Prívozník
2021-11-10 13:23 ` Damien Hedde
2021-11-10 21:56 ` Paolo Bonzini
2021-11-11 6:11 ` Markus Armbruster
2021-11-11 8:15 ` Paolo Bonzini
2021-11-11 14:37 ` Markus Armbruster
2021-11-11 19:22 ` Paolo Bonzini
2021-11-12 11:48 ` Markus Armbruster
2021-11-12 22:18 ` Paolo Bonzini
2021-11-13 7:52 ` Markus Armbruster
2021-11-15 12:37 ` Paolo Bonzini
2021-11-15 15:40 ` Markus Armbruster
2021-11-16 6:50 ` Paolo Bonzini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b31f442d28920447690a6b8cee865bdbacde1283.1635160056.git.mprivozn@redhat.com \
--to=mprivozn@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).