diff options
author | Liang Li <liang.z.li@intel.com> | 2015-03-23 16:32:29 +0800 |
---|---|---|
committer | Juan Quintela <quintela@redhat.com> | 2015-05-07 18:31:54 +0200 |
commit | 50e9a629c6c92e73260cd3d7c2e3f5bfd84e47e2 (patch) | |
tree | d9e762d82bfb0e4de68aaaf011bed75bc91f7fe5 /monitor.c | |
parent | 85de83231ecde075c6b25897f2e74cd1767880e3 (diff) |
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>
Diffstat (limited to 'monitor.c')
-rw-r--r-- | monitor.c | 25 |
1 files changed, 25 insertions, 0 deletions
@@ -2859,6 +2859,13 @@ static mon_cmd_t info_cmds[] = { .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 = "", .params = "", @@ -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; |