aboutsummaryrefslogtreecommitdiff
path: root/monitor.c
diff options
context:
space:
mode:
authorLiang Li <liang.z.li@intel.com>2015-03-23 16:32:29 +0800
committerJuan Quintela <quintela@redhat.com>2015-05-07 18:31:54 +0200
commit50e9a629c6c92e73260cd3d7c2e3f5bfd84e47e2 (patch)
treed9e762d82bfb0e4de68aaaf011bed75bc91f7fe5 /monitor.c
parent85de83231ecde075c6b25897f2e74cd1767880e3 (diff)
downloadqemu-50e9a629c6c92e73260cd3d7c2e3f5bfd84e47e2.zip
qemu-50e9a629c6c92e73260cd3d7c2e3f5bfd84e47e2.tar.gz
qemu-50e9a629c6c92e73260cd3d7c2e3f5bfd84e47e2.tar.bz2
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.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/monitor.c b/monitor.c
index d831d98..3952d64 100644
--- a/monitor.c
+++ b/monitor.c
@@ -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;