[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 16/16] add cpu-add qmp command and implement CPU
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH 16/16] add cpu-add qmp command and implement CPU hot-add for target-i386 |
Date: |
Mon, 15 Apr 2013 16:20:15 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130402 Thunderbird/17.0.5 |
On 04/15/2013 04:12 PM, Igor Mammedov wrote:
> ... via current_machine->cpu_hot_add() hook called by cpu-set QMP command,
> for x86 target.
>
> cpu-add's "id" argument is a CPU thread number in a range [0..max-cpus - 1)
Off by one. It's either [0..max-cpus) or [0..max-cpus - 1] (they mean
the same thing).
It might be worth including a sample QMP command in the commit message.
>
> Signed-off-by: Igor Mammedov <address@hidden>
> ---
> v5:
> * accept id=[0..max_cpus) range in cpu-add command
This notation is right, unlike the commit message.
Reviewing just the QMP portion:
> +++ b/qapi-schema.json
> @@ -1387,6 +1387,17 @@
> { 'command': 'cpu', 'data': {'index': 'int'} }
>
> ##
> +# @cpu-add
> +#
> +# Adds CPU with specified id
> +#
> +# @id: cpu id of CPU to be created
Here it would be helpful to mention what forms a valid id (your
[0..max-cpus) notation from the commit message, for example).
> +#
> +# Returns: Nothing on success
> +##
> +{ 'command': 'cpu-add', 'data': {'id': 'int'} }
> +
Should be usable from libvirt's perspective, even if hot-plugging more
than one cpu requires more than one QMP call. Do we have a counterpart
QMP call to easily determine which cpu ids can still be hotplugged? If
so, should we mention that in the documentation of this command?
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
- Re: [Qemu-devel] [PATCH 12/16] target-i386: cpu: attach ICC bus to CPU on its creation, (continued)
[Qemu-devel] [PATCH 13/16] target-i386: replace MSI_SPACE_SIZE with APIC_SPACE_SIZE, Igor Mammedov, 2013/04/15
[Qemu-devel] [PATCH 14/16] target-i386: move APIC to ICC bus, Igor Mammedov, 2013/04/15
[Qemu-devel] [PATCH 15/16] target-i386: move IOAPIC to ICC bus, Igor Mammedov, 2013/04/15
[Qemu-devel] [PATCH 16/16] add cpu-add qmp command and implement CPU hot-add for target-i386, Igor Mammedov, 2013/04/15
- Re: [Qemu-devel] [PATCH 16/16] add cpu-add qmp command and implement CPU hot-add for target-i386,
Eric Blake <=
Re: [Qemu-devel] [PATCH 00/16 v4] target-i386: CPU hot-add with cpu-add QMP command, Jan Kiszka, 2013/04/16