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 <[email protected]> > --- > 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
