@@ -31,6 +31,7 @@ void hmp_info_mice(Monitor *mon, const QDict *qdict);
void hmp_info_migrate(Monitor *mon, const QDict *qdict);
void hmp_info_migrate_capabilities(Monitor *mon, const QDict *qdict);
void hmp_info_migrate_parameters(Monitor *mon, const QDict *qdict);
+void hmp_info_migrationthreads(Monitor *mon, const QDict *qdict);
void hmp_info_cpus(Monitor *mon, const QDict *qdict);
void hmp_info_vnc(Monitor *mon, const QDict *qdict);
void hmp_info_spice(Monitor *mon, const QDict *qdict);
@@ -814,3 +814,28 @@ void loadvm_completion(ReadLineState *rs, int nb_args, const char *str)
vm_completion(rs, str);
}
}
+
+void hmp_info_migrationthreads(Monitor *mon, const QDict *qdict)
+{
+ MigrationThreadInfoList *list;
+ MigrationThreadInfo *entry;
+ Error *err = NULL;
+
+ list = qmp_query_migrationthreads(&err);
+
+ if (!list) {
+ monitor_printf(mon, "No migration threads found\n");
+ return;
+ }
+
+ monitor_printf(mon, "%-16s%s\n", "TID", "Thread Name");
+ while (list) {
+ entry = list->value;
+ monitor_printf(mon, "%-16" PRId64 "%s\n",
+ entry->thread_id, entry->name);
+ list = list->next;
+ }
+
+ qapi_free_MigrationThreadInfoList(list);
+ hmp_handle_error(mon, err);
+}
@@ -512,6 +512,19 @@ SRST
Show current migration parameters.
ERST
+ {
+ .name = "migrationthreads",
+ .args_type = "",
+ .params = "",
+ .help = "show migration threads information",
+ .cmd = hmp_info_migrationthreads,
+ },
+
+SRST
+ ``info migrationthreads``
+ Show migration threads information.
+ERST
+
{
.name = "balloon",
.args_type = "",
The QMP command was added in 671326201d ("migration: Introduce interface query-migrationthreads", v8.0). Add the HMP version of it. Cc: Markus Armbruster <armbru@redhat.com> Cc: Dr. David Alan Gilbert <dave@treblig.org> Signed-off-by: Peter Xu <peterx@redhat.com> --- include/monitor/hmp.h | 1 + migration/migration-hmp-cmds.c | 25 +++++++++++++++++++++++++ hmp-commands-info.hx | 13 +++++++++++++ 3 files changed, 39 insertions(+)