* [Qemu-devel] [PATCH] New cpu-max field in query-machines QMP command output
@ 2013-04-08 10:00 Michal Novotny
2013-04-08 14:02 ` Luiz Capitulino
0 siblings, 1 reply; 5+ messages in thread
From: Michal Novotny @ 2013-04-08 10:00 UTC (permalink / raw)
To: qemu-devel; +Cc: Michal Novotny, lcapitulino
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' } }
##
# @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] 5+ messages in thread
* Re: [Qemu-devel] [PATCH] New cpu-max field in query-machines QMP command output
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
0 siblings, 2 replies; 5+ messages in thread
From: Luiz Capitulino @ 2013-04-08 14:02 UTC (permalink / raw)
To: Michal Novotny; +Cc: Igor Mammedov, qemu-devel, Eduardo Habkost
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?
>
> ##
> # @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;
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [PATCH] New cpu-max field in query-machines QMP command output
2013-04-08 14:02 ` Luiz Capitulino
@ 2013-04-08 14:13 ` Michal Novotny
2013-04-08 16:18 ` Igor Mammedov
1 sibling, 0 replies; 5+ messages in thread
From: Michal Novotny @ 2013-04-08 14:13 UTC (permalink / raw)
To: Luiz Capitulino; +Cc: Igor Mammedov, qemu-devel, Eduardo Habkost
Just for clarification why I did this: Some of the libvirt guys would
like the functionality to know number of CPUs supported per machine
type. This usually doesn't matter on x86 architectures however it
matters on ARM, for example, because highbank machine type supports up
to 4 CPUs however integratorcp (default) supports only one.
The migration between qemu and qemu with this patch was working fine
with no regression so basically I need just the statement about CPU
hotplug and I'm ready to send v2 of the patch (just having new field
commented).
Michal
On 04/08/2013 04:02 PM, Luiz Capitulino 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?
>
>>
>> ##
>> # @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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [PATCH] New cpu-max field in query-machines QMP command output
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
1 sibling, 1 reply; 5+ messages in thread
From: Igor Mammedov @ 2013-04-08 16:18 UTC (permalink / raw)
To: Luiz Capitulino; +Cc: Michal Novotny, qemu-devel, Eduardo Habkost
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.
>
> >
> > ##
> > # @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;
>
>
--
Regards,
Igor
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [PATCH] New cpu-max field in query-machines QMP command output
2013-04-08 16:18 ` Igor Mammedov
@ 2013-04-08 16:21 ` Michal Novotny
0 siblings, 0 replies; 5+ messages in thread
From: Michal Novotny @ 2013-04-08 16:21 UTC (permalink / raw)
To: Igor Mammedov; +Cc: qemu-devel, Eduardo Habkost, Luiz Capitulino
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
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2013-04-08 20:37 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 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).