migration: Introduce interface query-migrationthreads

Introduce interface query-migrationthreads. The interface is used
to query information about migration threads and returns with
migration thread's name and its id.
Introduce threadinfo.c to manage threads with migration.

Signed-off-by: Jiang Jiacheng <jiangjiacheng@huawei.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
This commit is contained in:
Jiang Jiacheng 2023-02-03 15:35:18 +08:00 committed by Juan Quintela
parent ebfc578715
commit 671326201d
4 changed files with 109 additions and 0 deletions

View file

@ -1958,6 +1958,35 @@
{ 'command': 'query-vcpu-dirty-limit',
'returns': [ 'DirtyLimitInfo' ] }
##
# @MigrationThreadInfo:
#
# Information about migrationthreads
#
# @name: the name of migration thread
#
# @thread-id: ID of the underlying host thread
#
# Since: 7.2
##
{ 'struct': 'MigrationThreadInfo',
'data': {'name': 'str',
'thread-id': 'int'} }
##
# @query-migrationthreads:
#
# Returns information of migration threads
#
# data: migration thread name
#
# returns: information about migration threads
#
# Since: 7.2
##
{ 'command': 'query-migrationthreads',
'returns': ['MigrationThreadInfo'] }
##
# @snapshot-save:
#