diff mbox series

[v7,09/11] qmp: permit query-hotpluggable-cpus in preconfig state

Message ID 1525423069-61903-10-git-send-email-imammedo@redhat.com
State New
Headers show
Series enable numa configuration before machine_init() from QMP | expand

Commit Message

Igor Mammedov May 4, 2018, 8:37 a.m. UTC
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.

Signed-off-by: Igor Mammedov <imammedo@redhat.com>

PS:
*) 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
---
v7:
  * s/allowed-in-preconfig/allow-preconfig/
---
 qapi/misc.json | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Eduardo Habkost May 16, 2018, 6:24 p.m. UTC | #1
On Fri, May 04, 2018 at 10:37:47AM +0200, Igor Mammedov wrote:
> 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.
> 
> Signed-off-by: Igor Mammedov <imammedo@redhat.com>

Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>

I suggest a follow-up patch adding a test for
query-hotpluggable-cpus on test_qmp_preconfig().
diff mbox series

Patch

diff --git a/qapi/misc.json b/qapi/misc.json
index eb7bc4c..12ae310 100644
--- a/qapi/misc.json
+++ b/qapi/misc.json
@@ -3251,7 +3251,8 @@ 
 #    ]}
 #
 ##
-{ 'command': 'query-hotpluggable-cpus', 'returns': ['HotpluggableCPU'] }
+{ 'command': 'query-hotpluggable-cpus', 'returns': ['HotpluggableCPU'],
+             'allow-preconfig': true }
 
 ##
 # @GuidInfo: