aboutsummaryrefslogtreecommitdiff
path: root/migration
diff options
context:
space:
mode:
authorDaniel P. Berrangé <berrange@redhat.com>2021-02-19 18:40:12 +0000
committerDaniel P. Berrangé <berrange@redhat.com>2021-03-18 09:22:55 +0000
commitcbde7be900d2a2279cbc4becb91d1ddd6a014def (patch)
treede317c2edbeb20ac706cdf0a6861dc5770936eae /migration
parent8becb36063fb14df1e3ae4916215667e2cb65fa2 (diff)
migrate: remove QMP/HMP commands for speed, downtime and cache size
The generic 'migrate_set_parameters' command handle all types of param. Only the QMP commands were documented in the deprecations page, but the rationale for deprecating applies equally to HMP, and the replacements exist. Furthermore the HMP commands are just shims to the QMP commands, so removing the latter breaks the former unless they get re-implemented. Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Diffstat (limited to 'migration')
-rw-r--r--migration/migration.c45
-rw-r--r--migration/ram.c2
2 files changed, 1 insertions, 46 deletions
diff --git a/migration/migration.c b/migration/migration.c
index 36768391b6..ca8b97baa5 100644
--- a/migration/migration.c
+++ b/migration/migration.c
@@ -2316,51 +2316,6 @@ void qmp_migrate_continue(MigrationStatus state, Error **errp)
qemu_sem_post(&s->pause_sem);
}
-void qmp_migrate_set_cache_size(int64_t value, Error **errp)
-{
- MigrateSetParameters p = {
- .has_xbzrle_cache_size = true,
- .xbzrle_cache_size = value,
- };
-
- qmp_migrate_set_parameters(&p, errp);
-}
-
-uint64_t qmp_query_migrate_cache_size(Error **errp)
-{
- return migrate_xbzrle_cache_size();
-}
-
-void qmp_migrate_set_speed(int64_t value, Error **errp)
-{
- MigrateSetParameters p = {
- .has_max_bandwidth = true,
- .max_bandwidth = value,
- };
-
- qmp_migrate_set_parameters(&p, errp);
-}
-
-void qmp_migrate_set_downtime(double value, Error **errp)
-{
- if (value < 0 || value > MAX_MIGRATE_DOWNTIME_SECONDS) {
- error_setg(errp, QERR_INVALID_PARAMETER_VALUE,
- "downtime_limit",
- "an integer in the range of 0 to "
- stringify(MAX_MIGRATE_DOWNTIME_SECONDS)" seconds");
- return;
- }
-
- value *= 1000; /* Convert to milliseconds */
-
- MigrateSetParameters p = {
- .has_downtime_limit = true,
- .downtime_limit = (int64_t)value,
- };
-
- qmp_migrate_set_parameters(&p, errp);
-}
-
bool migrate_release_ram(void)
{
MigrationState *s;
diff --git a/migration/ram.c b/migration/ram.c
index 52537f14ac..40e78952ad 100644
--- a/migration/ram.c
+++ b/migration/ram.c
@@ -121,7 +121,7 @@ static void XBZRLE_cache_unlock(void)
/**
* xbzrle_cache_resize: resize the xbzrle cache
*
- * This function is called from qmp_migrate_set_cache_size in main
+ * This function is called from migrate_params_apply in main
* thread, possibly while a migration is in progress. A running
* migration may be using the cache and might finish during this call,
* hence changes to the cache are protected by XBZRLE.lock().