qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v2] New cpu-max field in query-machines QMP command output
@ 2013-04-08 16:41 Michal Novotny
  2013-04-08 16:35 ` [Qemu-devel] Fwd: " Michal Novotny
  2013-04-08 17:14 ` [Qemu-devel] " Eric Blake
  0 siblings, 2 replies; 10+ messages in thread
From: Michal Novotny @ 2013-04-08 16:41 UTC (permalink / raw)
  To: qemu-devel; +Cc: Michal Novotny

Alter the query-machines QMP command to output information about
maximum number of CPUs for each machine type with default value
set to 1 in case the number of max_cpus is not set.

Signed-off-by: Michal Novotny <minovotn@redhat.com>
---
 qapi-schema.json | 4 +++-
 vl.c             | 1 +
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/qapi-schema.json b/qapi-schema.json
index db542f6..689ca8d 100644
--- a/qapi-schema.json
+++ b/qapi-schema.json
@@ -2861,11 +2861,13 @@
 #
 # @default: #optional whether the machine is default
 #
+# @cpu-max: maximum number of CPUs supported by the machine type
+#
 # Since: 1.2.0
 ##
 { 'type': 'MachineInfo',
   'data': { 'name': 'str', '*alias': 'str',
-            '*is-default': 'bool' } }
+            '*is-default': 'bool', 'cpu-max': 'int' } }
 
 ##
 # @query-machines:
diff --git a/vl.c b/vl.c
index a8bba04..c05b3d3 100644
--- a/vl.c
+++ b/vl.c
@@ -1617,6 +1617,7 @@ MachineInfoList *qmp_query_machines(Error **errp)
         }
 
         info->name = g_strdup(m->name);
+        info->cpu_max = !m->max_cpus ? 1 : m->max_cpus;
 
         entry = g_malloc0(sizeof(*entry));
         entry->value = info;
-- 
1.7.11.7

^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2013-04-09 14:00 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-08 16:41 [Qemu-devel] [PATCH v2] New cpu-max field in query-machines QMP command output Michal Novotny
2013-04-08 16:35 ` [Qemu-devel] Fwd: " Michal Novotny
2013-04-08 17:14 ` [Qemu-devel] " Eric Blake
2013-04-09 13:06   ` Luiz Capitulino
2013-04-09 13:09     ` Michal Novotny
2013-04-09 13:15       ` Luiz Capitulino
2013-04-09 13:32         ` Michal Novotny
2013-04-09 13:42           ` Luiz Capitulino
2013-04-09 13:59             ` Michal Novotny
2013-04-09 13:15     ` Peter Krempa

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).