From dc3dd0d2bed6edf3b60041f31200c674348168e9 Mon Sep 17 00:00:00 2001 From: Stefan Hajnoczi Date: Thu, 27 Feb 2014 11:48:42 +0100 Subject: qmp: add query-iothreads command The "query-iothreads" command returns a list of information about iothreads. See the patch for API documentation. Reviewed-by: Eric Blake Signed-off-by: Stefan Hajnoczi --- qmp-commands.hx | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) (limited to 'qmp-commands.hx') diff --git a/qmp-commands.hx b/qmp-commands.hx index d982cd62b9..a22621fd44 100644 --- a/qmp-commands.hx +++ b/qmp-commands.hx @@ -2326,6 +2326,45 @@ EQMP .mhandler.cmd_new = qmp_marshal_input_query_cpus, }, +SQMP +query-iothreads +--------------- + +Returns a list of information about each iothread. + +Note this list excludes the QEMU main loop thread, which is not declared +using the -object iothread command-line option. It is always the main thread +of the process. + +Return a json-array. Each iothread is represented by a json-object, which contains: + +- "id": name of iothread (json-str) +- "thread-id": ID of the underlying host thread (json-int) + +Example: + +-> { "execute": "query-iothreads" } +<- { + "return":[ + { + "id":"iothread0", + "thread-id":3134 + }, + { + "id":"iothread1", + "thread-id":3135 + } + ] + } + +EQMP + + { + .name = "query-iothreads", + .args_type = "", + .mhandler.cmd_new = qmp_marshal_input_query_iothreads, + }, + SQMP query-pci --------- -- cgit v1.2.1