qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] New cpu-max field in query-machines QMP command


From: Michal Novotny
Subject: Re: [Qemu-devel] [PATCH] New cpu-max field in query-machines QMP command output
Date: Mon, 08 Apr 2013 16:13:46 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130311 Thunderbird/17.0.4

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 <address@hidden> 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 <address@hidden>
>> ---
>>  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 <address@hidden>, RHCE, Red Hat
Virtualization | libvirt-php bindings | php-virt-control.org




reply via email to

[Prev in Thread] Current Thread [Next in Thread]