[libvirt] [PATCH 2/4] QMP: add cpu-add command

Peter Krempa pkrempa at redhat.com
Tue Apr 30 13:53:56 UTC 2013


On 04/30/13 15:46, Eduardo Habkost wrote:
> (CCing libvir-list)
>
> On Tue, Apr 30, 2013 at 08:34:01AM +0200, Igor Mammedov wrote:
>> Adds "cpu-add id=xxx" QMP command.
>>
>> cpu-add's "id" argument is a CPU number in a range [0..max-cpus)
>>
>> Example QMP command:
>>   -> { "execute": "cpu-add", "arguments": { "id": 2 } }
>>   <- { "return": {} }
>>
>> Signed-off-by: Igor Mammedov <imammedo at redhat.com>
>> Acked-by: Luiz Capitulino <lcapitulino at redhat.com>
>> Reviewed-by: Eric Blake <eblake at redhat.com>
>
> The only way to find out if CPU hotplug is really available on a given
> machine-type is by actually trying to run cpu-add, right? Is this
> sufficient for libvirt requirements?
>
>


As long as the command fails when it's not supported it's okay.

(cpu_set HMP command does not fail when offlining a cpu even if it isn't 
supported and that's real pain to use)

Peter





More information about the libvir-list mailing list