Received: from eggs.gnu.org ([2001:4830:134:3::10]:48280) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bjnN4-00053C-R8 for qemu-devel@nongnu.org; Tue, 13 Sep 2016 09:03:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bjnN2-0004d9-Kv for qemu-devel@nongnu.org; Tue, 13 Sep 2016 09:03:29 -0400 Received: from mx1.redhat.com ([209.132.183.28]:60818) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bjnN2-0004cy-C9 for qemu-devel@nongnu.org; Tue, 13 Sep 2016 09:03:28 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 0BB5290E54 for ; Tue, 13 Sep 2016 13:03:27 +0000 (UTC) From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Date: Tue, 13 Sep 2016 17:01:58 +0400 Message-Id: <20160913130209.695-20-marcandre.lureau@redhat.com> In-Reply-To: <20160913130209.695-1-marcandre.lureau@redhat.com> References: <20160913130209.695-1-marcandre.lureau@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PATCH 19/30] qmp-commands: move 'query-cpus' doc to schema List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: eblake@redhat.com, armbru@redhat.com, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Signed-off-by: Marc-Andr=C3=A9 Lureau --- docs/qmp-commands.txt | 46 ---------------------------------------------= - qapi-schema.json | 26 ++++++++++++++++++++++++++ 2 files changed, 26 insertions(+), 46 deletions(-) diff --git a/docs/qmp-commands.txt b/docs/qmp-commands.txt index c066833..3f44375 100644 --- a/docs/qmp-commands.txt +++ b/docs/qmp-commands.txt @@ -1929,52 +1929,6 @@ Example: ] } =20 -query-cpus ----------- - -Show CPU information. - -Return a json-array. Each CPU is represented by a json-object, which con= tains: - -- "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 --------------- =20 diff --git a/qapi-schema.json b/qapi-schema.json index d9e45dc..c1183d0 100644 --- a/qapi-schema.json +++ b/qapi-schema.json @@ -1248,6 +1248,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'] } =20 --=20 2.10.0