aboutsummaryrefslogtreecommitdiff
path: root/migration/migration-hmp-cmds.c
diff options
context:
space:
mode:
authorSteve Sistare <steven.sistare@oracle.com>2023-10-25 12:44:24 -0700
committerJuan Quintela <quintela@redhat.com>2023-11-01 16:13:58 +0100
commiteea1e5c9d6fac211cf3fe2d3d7f3be2bf767d421 (patch)
tree0729072bb9fb9ea22f428fa0faca8a9dee050f86 /migration/migration-hmp-cmds.c
parent3e5f3bcdc281fed483b5bbe72050b63d4b41abf5 (diff)
migration: mode parameter
Create a mode migration parameter that can be used to select alternate migration algorithms. The default mode is normal, representing the current migration algorithm, and does not need to be explicitly set. No functional change until a new mode is added, except that the mode is shown by the 'info migrate' command. Signed-off-by: Steve Sistare <steven.sistare@oracle.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com> Message-ID: <1698263069-406971-2-git-send-email-steven.sistare@oracle.com>
Diffstat (limited to 'migration/migration-hmp-cmds.c')
-rw-r--r--migration/migration-hmp-cmds.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/migration/migration-hmp-cmds.c b/migration/migration-hmp-cmds.c
index dfe98da355..a170440991 100644
--- a/migration/migration-hmp-cmds.c
+++ b/migration/migration-hmp-cmds.c
@@ -387,6 +387,11 @@ void hmp_info_migrate_parameters(Monitor *mon, const QDict *qdict)
monitor_printf(mon, "%s: %" PRIu64 " MB/s\n",
MigrationParameter_str(MIGRATION_PARAMETER_VCPU_DIRTY_LIMIT),
params->vcpu_dirty_limit);
+
+ assert(params->has_mode);
+ monitor_printf(mon, "%s: %s\n",
+ MigrationParameter_str(MIGRATION_PARAMETER_MODE),
+ qapi_enum_lookup(&MigMode_lookup, params->mode));
}
qapi_free_MigrationParameters(params);
@@ -661,6 +666,10 @@ void hmp_migrate_set_parameter(Monitor *mon, const QDict *qdict)
p->has_vcpu_dirty_limit = true;
visit_type_size(v, param, &p->vcpu_dirty_limit, &err);
break;
+ case MIGRATION_PARAMETER_MODE:
+ p->has_mode = true;
+ visit_type_MigMode(v, param, &p->mode, &err);
+ break;
default:
assert(0);
}