qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Luiz Capitulino <lcapitulino@redhat.com>
To: qemu-devel@nongnu.org
Cc: aliguori@us.ibm.com
Subject: [Qemu-devel] [PULL 1/3] New cpu-max field in query-machines QMP command output
Date: Fri, 12 Apr 2013 09:58:21 -0400	[thread overview]
Message-ID: <1365775103-18737-2-git-send-email-lcapitulino@redhat.com> (raw)
In-Reply-To: <1365775103-18737-1-git-send-email-lcapitulino@redhat.com>

From: Michal Novotny <minovotn@redhat.com>

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>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
---
 qapi-schema.json | 5 ++++-
 vl.c             | 1 +
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/qapi-schema.json b/qapi-schema.json
index db542f6..66808c2 100644
--- a/qapi-schema.json
+++ b/qapi-schema.json
@@ -2861,11 +2861,14 @@
 #
 # @default: #optional whether the machine is default
 #
+# @cpu-max: maximum number of CPUs supported by the machine type
+#           (since 1.5.0)
+#
 # 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 d694a90..6547b5f 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.8.1.4

  reply	other threads:[~2013-04-12 13:58 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-12 13:58 [Qemu-devel] [PULL 0/3] QMP queue Luiz Capitulino
2013-04-12 13:58 ` Luiz Capitulino [this message]
2013-04-12 13:58 ` [Qemu-devel] [PULL 2/3] Revert "New QMP command query-cpu-max and HMP command cpu_max" Luiz Capitulino
2013-04-12 13:58 ` [Qemu-devel] [PULL 3/3] qapi: use valid JSON in schema Luiz Capitulino

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=1365775103-18737-2-git-send-email-lcapitulino@redhat.com \
    --to=lcapitulino@redhat.com \
    --cc=aliguori@us.ibm.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).