aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hmp-commands.hx2
-rw-r--r--hmp.c13
-rw-r--r--hmp.h1
-rw-r--r--monitor.c7
4 files changed, 23 insertions, 0 deletions
diff --git a/hmp-commands.hx b/hmp-commands.hx
index d6e81e4df3..286dcc75aa 100644
--- a/hmp-commands.hx
+++ b/hmp-commands.hx
@@ -1809,6 +1809,8 @@ show the TPM device
show the memory devices
@item info skeys
Display the value of a storage key (s390 only)
+@item info iothreads
+show iothreads
@end table
ETEXI
diff --git a/hmp.c b/hmp.c
index dcc66f159a..3f807b75f1 100644
--- a/hmp.c
+++ b/hmp.c
@@ -1963,6 +1963,19 @@ void hmp_info_memory_devices(Monitor *mon, const QDict *qdict)
qapi_free_MemoryDeviceInfoList(info_list);
}
+void hmp_info_iothreads(Monitor *mon, const QDict *qdict)
+{
+ IOThreadInfoList *info_list = qmp_query_iothreads(NULL);
+ IOThreadInfoList *info;
+
+ for (info = info_list; info; info = info->next) {
+ monitor_printf(mon, "%s: thread_id=%" PRId64 "\n",
+ info->value->id, info->value->thread_id);
+ }
+
+ qapi_free_IOThreadInfoList(info_list);
+}
+
void hmp_qom_list(Monitor *mon, const QDict *qdict)
{
const char *path = qdict_get_try_str(qdict, "path");
diff --git a/hmp.h b/hmp.h
index b8f5d33642..81656c3d82 100644
--- a/hmp.h
+++ b/hmp.h
@@ -39,6 +39,7 @@ void hmp_info_balloon(Monitor *mon, const QDict *qdict);
void hmp_info_pci(Monitor *mon, const QDict *qdict);
void hmp_info_block_jobs(Monitor *mon, const QDict *qdict);
void hmp_info_tpm(Monitor *mon, const QDict *qdict);
+void hmp_info_iothreads(Monitor *mon, const QDict *qdict);
void hmp_quit(Monitor *mon, const QDict *qdict);
void hmp_stop(Monitor *mon, const QDict *qdict);
void hmp_system_reset(Monitor *mon, const QDict *qdict);
diff --git a/monitor.c b/monitor.c
index b1f2a29793..5455ab9de0 100644
--- a/monitor.c
+++ b/monitor.c
@@ -2854,6 +2854,13 @@ static mon_cmd_t info_cmds[] = {
.mhandler.cmd = hmp_info_memory_devices,
},
{
+ .name = "iothreads",
+ .args_type = "",
+ .params = "",
+ .help = "show iothreads",
+ .mhandler.cmd = hmp_info_iothreads,
+ },
+ {
.name = "rocker",
.args_type = "name:s",
.params = "name",