From: Michal Novotny <minovotn@redhat.com>
To: Igor Mammedov <imammedo@redhat.com>
Cc: qemu-devel@nongnu.org, Eduardo Habkost <ehabkost@redhat.com>,
	Luiz Capitulino <lcapitulino@redhat.com>
Subject: Re: [Qemu-devel] [PATCH] New cpu-max field in query-machines QMP command output
Date: Mon, 08 Apr 2013 18:21:10 +0200	[thread overview]
Message-ID: <5162EE76.204@redhat.com> (raw)
In-Reply-To: <20130408181821.669f5f85@thinkpad.mammed.net>
On 04/08/2013 06:18 PM, Igor Mammedov wrote:
> On Mon, 8 Apr 2013 10:02:59 -0400
> Luiz Capitulino <lcapitulino@redhat.com> wrote:
>
>> On Mon,  8 Apr 2013 12:00:35 +0200
>> Michal Novotny <minovotn@redhat.com> wrote:
>>
>>> This alters the query-machines QMP command to output information
>>> about maximum number of CPUs for each machine type with default
>>> value 1 in case the number of max_cpus is not set.
>>>
>>> Signed-off-by: Michal Novotny <minovotn@redhat.com>
>>> ---
>>>  qapi-schema.json | 2 +-
>>>  vl.c             | 1 +
>>>  2 files changed, 2 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/qapi-schema.json b/qapi-schema.json
>>> index db542f6..39cae4b 100644
>>> --- a/qapi-schema.json
>>> +++ b/qapi-schema.json
>>> @@ -2865,7 +2865,7 @@
>>>  ##
>>>  { 'type': 'MachineInfo',
>>>    'data': { 'name': 'str', '*alias': 'str',
>>> -            '*is-default': 'bool' } }
>>> +            '*is-default': 'bool', 'cpu-max': 'int' } }
>> Please, document the new field.
>>
>> Also, how is this affected by the CPU hotplug support?
> It shouldn't affect or be affected by CPU hotplug.
OK, thanks for your feedback Igor. I just sent v2 with new field commented.
Thanks!
Michal
>>>  
>>>  ##
>>>  # @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;
>>
>
-- 
Michal Novotny <minovotn@redhat.com>, RHCE, Red Hat
Virtualization | libvirt-php bindings | php-virt-control.org
     prev parent reply	other threads:[~2013-04-08 16:21 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-08 10:00 [Qemu-devel] [PATCH] New cpu-max field in query-machines QMP command output Michal Novotny
2013-04-08 14:02 ` Luiz Capitulino
2013-04-08 14:13   ` Michal Novotny
2013-04-08 16:18   ` Igor Mammedov
2013-04-08 16:21     ` Michal Novotny [this message]
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=5162EE76.204@redhat.com \
    --to=minovotn@redhat.com \
    --cc=ehabkost@redhat.com \
    --cc=imammedo@redhat.com \
    --cc=lcapitulino@redhat.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).