diff options
author | Marc-André Lureau <marcandre.lureau@redhat.com> | 2016-06-23 10:56:56 +0200 |
---|---|---|
committer | Markus Armbruster <armbru@redhat.com> | 2017-01-16 09:15:26 +0100 |
commit | 5c5bee64187269d9ae6deb122626920a963b0f2f (patch) | |
tree | 72c6e6c55b3ebcbac719805d9957c054e6d6d8d7 | |
parent | 60639df5c2368aea848bc9963e57603adf21e1c1 (diff) | |
download | qemu-5c5bee64187269d9ae6deb122626920a963b0f2f.zip qemu-5c5bee64187269d9ae6deb122626920a963b0f2f.tar.gz qemu-5c5bee64187269d9ae6deb122626920a963b0f2f.tar.bz2 |
qmp-commands: move 'query-cpus' doc to schema
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
-rw-r--r-- | docs/qmp-commands.txt | 46 | ||||
-rw-r--r-- | qapi-schema.json | 26 |
2 files changed, 26 insertions, 46 deletions
diff --git a/docs/qmp-commands.txt b/docs/qmp-commands.txt index 693ede6..e0d827a 100644 --- a/docs/qmp-commands.txt +++ b/docs/qmp-commands.txt @@ -1945,52 +1945,6 @@ Example: ] } -query-cpus ----------- - -Show CPU information. - -Return a json-array. Each CPU is represented by a json-object, which contains: - -- "CPU": CPU index (json-int) -- "current": true if this is the current CPU, false otherwise (json-bool) -- "halted": true if the cpu is halted, false otherwise (json-bool) -- "qom_path": path to the CPU object in the QOM tree (json-str) -- "arch": architecture of the cpu, which determines what additional - keys will be present (json-str) -- Current program counter. The key's name depends on the architecture: - "pc": i386/x86_64 (json-int) - "nip": PPC (json-int) - "pc" and "npc": sparc (json-int) - "PC": mips (json-int) -- "thread_id": ID of the underlying host thread (json-int) - -Example: - --> { "execute": "query-cpus" } -<- { - "return":[ - { - "CPU":0, - "current":true, - "halted":false, - "qom_path":"/machine/unattached/device[0]", - "arch":"x86", - "pc":3227107138, - "thread_id":3134 - }, - { - "CPU":1, - "current":false, - "halted":true, - "qom_path":"/machine/unattached/device[2]", - "arch":"x86", - "pc":7108165, - "thread_id":3135 - } - ] - } - query-iothreads --------------- diff --git a/qapi-schema.json b/qapi-schema.json index 02ae26a..bf1788d 100644 --- a/qapi-schema.json +++ b/qapi-schema.json @@ -1331,6 +1331,32 @@ # Returns: a list of @CpuInfo for each virtual CPU # # Since: 0.14.0 +# +# Example: +# +# -> { "execute": "query-cpus" } +# <- { "return": [ +# { +# "CPU":0, +# "current":true, +# "halted":false, +# "qom_path":"/machine/unattached/device[0]", +# "arch":"x86", +# "pc":3227107138, +# "thread_id":3134 +# }, +# { +# "CPU":1, +# "current":false, +# "halted":true, +# "qom_path":"/machine/unattached/device[2]", +# "arch":"x86", +# "pc":7108165, +# "thread_id":3135 +# } +# ] +# } +# ## { 'command': 'query-cpus', 'returns': ['CpuInfo'] } |