diff options
author | Igor Mammedov <imammedo@redhat.com> | 2016-06-22 11:11:42 +0200 |
---|---|---|
committer | Eduardo Habkost <ehabkost@redhat.com> | 2016-07-20 12:02:19 -0300 |
commit | 4d952914a03548b863c3c0af191d7e2af482f09e (patch) | |
tree | fbfc706cca566ead000051e525bd8965a3a72fcc /qmp-commands.hx | |
parent | edd1211194cd71afd78daf148c46801937ec11f5 (diff) |
pc: Implement query-hotpluggable-cpus callback
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}
}
]}
Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Diffstat (limited to 'qmp-commands.hx')
-rw-r--r-- | qmp-commands.hx | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/qmp-commands.hx b/qmp-commands.hx index 496d73c275..c8d360ad36 100644 --- a/qmp-commands.hx +++ b/qmp-commands.hx @@ -5026,3 +5026,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} + } + ]} |