[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v3 08/19] pc: implement query-hotpluggable-cpus
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH v3 08/19] pc: implement query-hotpluggable-cpus callback |
Date: |
Tue, 12 Jul 2016 08:14:58 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 |
On 07/06/2016 12:20 AM, Igor Mammedov wrote:
> it returns a list of present/possible to hotplug CPU
> objects with a list of properties to use with
> device_add.
>
> in PC case returned list would looks like:
> -> { "execute": "query-hotpluggable-cpus" }
> <- {"return": [
> {
> "type": "qemu64-x86_64-cpu", "vcpus-count": 1,
> "props": {"core-id": 0, "socket-id": 1, "thread-id": 0}
> },
> {
> "qom-path": "/machine/unattached/device[0]",
> "type": "qemu64-x86_64-cpu", "vcpus-count": 1,
> "props": {"core-id": 0, "socket-id": 0, "thread-id": 0}
> }
> ]}
>
Matches the schema.
> Signed-off-by: Igor Mammedov <address@hidden>
> ---
> v2:
> - add -id suffix to socket/core/thread properties to match fixed schema
> ---
> hw/i386/pc.c | 45 +++++++++++++++++++++++++++++++++++++++++++++
> qmp-commands.hx | 15 +++++++++++++++
> 2 files changed, 60 insertions(+)
>
> +++ b/qmp-commands.hx
> @@ -4983,3 +4983,18 @@ Example for pseries machine type started with
> { "props": { "core-id": 0 }, "type": "POWER8-spapr-cpu-core",
> "vcpus-count": 1, "qom-path": "/machine/unattached/device[0]"}
> ]}'
> +
> +Example for pc machine type started with
> +-smp 1,maxcpus=2:
> + -> { "execute": "query-hotpluggable-cpus" }
> + <- {"return": [
> + {
> + "type": "qemu64-x86_64-cpu", "vcpus-count": 1,
> + "props": {"core-id": 0, "socket-id": 1, "thread-id": 0}
> + },
> + {
> + "qom-path": "/machine/unattached/device[0]",
> + "type": "qemu64-x86_64-cpu", "vcpus-count": 1,
> + "props": {"core-id": 0, "socket-id": 0, "thread-id": 0}
> + }
> + ]}
I didn't review the full patch, but the interface change looks okay.
--
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 v3 04/19] pc: cpu: consolidate apic-id validity checks in pc_cpu_pre_plug(), (continued)
- [Qemu-devel] [PATCH v3 05/19] target-i386: cpu: replace custom apic-id setter/getter with static property, Igor Mammedov, 2016/07/06
- [Qemu-devel] [PATCH v3 06/19] target-i386: add socket/core/thread properties to X86CPU, Igor Mammedov, 2016/07/06
- [Qemu-devel] [PATCH v3 07/19] pc: set APIC ID based on socket/core/thread ids if it's not been set yet, Igor Mammedov, 2016/07/06
- [Qemu-devel] [PATCH v3 08/19] pc: implement query-hotpluggable-cpus callback, Igor Mammedov, 2016/07/06
- [Qemu-devel] [PATCH v3 09/19] pc: delay setting number of boot CPUs to machine_done time, Igor Mammedov, 2016/07/06
- Re: [Qemu-devel] [PATCH v3 09/19] pc: delay setting number of boot CPUs to machine_done time, Eduardo Habkost, 2016/07/12
- Re: [Qemu-devel] [PATCH v3 09/19] pc: delay setting number of boot CPUs to machine_done time, Igor Mammedov, 2016/07/13
- Re: [Qemu-devel] [PATCH v3 09/19] pc: delay setting number of boot CPUs to machine_done time, Eduardo Habkost, 2016/07/13
[Qemu-devel] [PATCH v3 10/19] pc: register created initial and hotpluged CPUs in one place pc_cpu_plug(), Igor Mammedov, 2016/07/06