mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 16:23:55 -06:00
migration: Add hmp interface to set and query parameters
Add the hmp interface to tune and query the parameters used in live migration. Signed-off-by: Liang Li <liang.z.li@intel.com> Signed-off-by: Yang Zhang <yang.z.zhang@intel.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
This commit is contained in:
parent
85de83231e
commit
50e9a629c6
4 changed files with 111 additions and 0 deletions
25
monitor.c
25
monitor.c
|
@ -2858,6 +2858,13 @@ static mon_cmd_t info_cmds[] = {
|
|||
.help = "show current migration capabilities",
|
||||
.mhandler.cmd = hmp_info_migrate_capabilities,
|
||||
},
|
||||
{
|
||||
.name = "migrate_parameters",
|
||||
.args_type = "",
|
||||
.params = "",
|
||||
.help = "show current migration parameters",
|
||||
.mhandler.cmd = hmp_info_migrate_parameters,
|
||||
},
|
||||
{
|
||||
.name = "migrate_cache_size",
|
||||
.args_type = "",
|
||||
|
@ -4540,6 +4547,24 @@ void migrate_set_capability_completion(ReadLineState *rs, int nb_args,
|
|||
}
|
||||
}
|
||||
|
||||
void migrate_set_parameter_completion(ReadLineState *rs, int nb_args,
|
||||
const char *str)
|
||||
{
|
||||
size_t len;
|
||||
|
||||
len = strlen(str);
|
||||
readline_set_completion_index(rs, len);
|
||||
if (nb_args == 2) {
|
||||
int i;
|
||||
for (i = 0; i < MIGRATION_PARAMETER_MAX; i++) {
|
||||
const char *name = MigrationParameter_lookup[i];
|
||||
if (!strncmp(str, name, len)) {
|
||||
readline_add_completion(rs, name);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void host_net_add_completion(ReadLineState *rs, int nb_args, const char *str)
|
||||
{
|
||||
int i;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue