aboutsummaryrefslogtreecommitdiff
path: root/qmp-commands.hx
diff options
context:
space:
mode:
authorMichal Novotny <minovotn@redhat.com>2013-03-25 17:31:33 +0100
committerLuiz Capitulino <lcapitulino@redhat.com>2013-03-25 16:21:33 -0400
commit4d700430a20b3d53b7b15bc5f6666f7e570e3f2c (patch)
treed9d0ecd5f3ba50c8d2c93a259c2fd02b6df2beab /qmp-commands.hx
parente5ecec7bad7b679aa11ab788424bc0e1705be15b (diff)
New QMP command query-cpu-max and HMP command cpu_max
These commands return the maximum number of CPUs supported by the currently running emulator instance, as defined in its QEMUMachine struct. Signed-off-by: Michal Novotny <minovotn@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Diffstat (limited to 'qmp-commands.hx')
-rw-r--r--qmp-commands.hx22
1 files changed, 22 insertions, 0 deletions
diff --git a/qmp-commands.hx b/qmp-commands.hx
index 3aa6bd1bd9..2051fcb49c 100644
--- a/qmp-commands.hx
+++ b/qmp-commands.hx
@@ -385,6 +385,28 @@ Note: CPUs' indexes are obtained with the 'query-cpus' command.
EQMP
{
+ .name = "query-cpu-max",
+ .args_type = "",
+ .mhandler.cmd_new = qmp_marshal_input_query_cpu_max,
+ },
+
+SQMP
+query-cpu-max
+-------------
+
+Get the maximum CPUs supported by the machine being currently
+emulated.
+
+Returns json-int.
+
+Example:
+
+-> { "execute": "query-cpu-max" }
+<- { "return": 255 }
+
+EQMP
+
+ {
.name = "memsave",
.args_type = "val:l,size:i,filename:s,cpu:i?",
.mhandler.cmd_new = qmp_marshal_input_memsave,