qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH v3 7/9] QMP: permit query-hotpluggable-cpus in preco


From: Igor Mammedov
Subject: [Qemu-devel] [PATCH v3 7/9] QMP: permit query-hotpluggable-cpus in preconfig state
Date: Fri, 16 Feb 2018 13:37:19 +0100

it will allow mgmt to query possible CPUs, which depends on
used machine(version)/-smp options, without restarting
QEMU and use results to configure numa mapping or adding
CPUs with device_add* later.

*) device_add is not allowed to run at preconfig in this series
   but later it could be dealt with by injecting -device
   in preconfig state and letting existing -device handling
   to actually plug devices

Signed-off-by: Igor Mammedov <address@hidden>
---
 qapi-schema.json | 6 +++++-
 tests/qmp-test.c | 1 +
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/qapi-schema.json b/qapi-schema.json
index ee1053d..4365dfe 100644
--- a/qapi-schema.json
+++ b/qapi-schema.json
@@ -3167,7 +3167,11 @@
 #    ]}
 #
 ##
-{ 'command': 'query-hotpluggable-cpus', 'returns': ['HotpluggableCPU'] }
+{ 'command': 'query-hotpluggable-cpus', 'returns': ['HotpluggableCPU'],
+  'runstates': [ 'debug', 'inmigrate', 'internal-error', 'io-error', 'paused',
+                 'postmigrate', 'prelaunch', 'finish-migrate', 'restore-vm',
+                 'running', 'save-vm', 'shutdown', 'suspended', 'watchdog',
+                 'guest-panicked', 'colo', 'preconfig' ] }
 
 ##
 # @GuidInfo:
diff --git a/tests/qmp-test.c b/tests/qmp-test.c
index 3adc485..4ab0b7c 100644
--- a/tests/qmp-test.c
+++ b/tests/qmp-test.c
@@ -323,6 +323,7 @@ static void test_qmp_preconfig(void)
     /* preconfig state */
     /* enabled commands, no error expected  */
     g_assert(!is_err(qtest_qmp(qs, "{ 'execute': 'query-commands' }")));
+    g_assert(!is_err(qtest_qmp(qs, "{ 'execute': 
'query-hotpluggable-cpus'}")));
 
     /* forbidden commands, expected error */
     g_assert(is_err(qtest_qmp(qs, "{ 'execute': 'query-cpus' }")));
-- 
2.7.4




reply via email to

[Prev in Thread] Current Thread [Next in Thread]