aboutsummaryrefslogtreecommitdiff
path: root/migration/options.c
diff options
context:
space:
mode:
authorJuan Quintela <quintela@redhat.com>2023-03-02 01:17:23 +0100
committerJuan Quintela <quintela@redhat.com>2023-04-24 15:01:46 +0200
commit2682c4eea72c621dfd0fb0151cbd758e81d1bdff (patch)
treeddfcf28747f889a371e7a2b1750d282b187c9463 /migration/options.c
parent24155bd0520035d5148c0af5b925932c4d8064a8 (diff)
downloadqemu-2682c4eea72c621dfd0fb0151cbd758e81d1bdff.zip
qemu-2682c4eea72c621dfd0fb0151cbd758e81d1bdff.tar.gz
qemu-2682c4eea72c621dfd0fb0151cbd758e81d1bdff.tar.bz2
migration: Move migrate_announce_params() to option.c
Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Fabiano Rosas <farosas@suse.de> --- Fix extra whitespace (fabiano)
Diffstat (limited to 'migration/options.c')
-rw-r--r--migration/options.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/migration/options.c b/migration/options.c
index 2cb04fb..418aafa 100644
--- a/migration/options.c
+++ b/migration/options.c
@@ -16,6 +16,7 @@
#include "qapi/qapi-commands-migration.h"
#include "qapi/qmp/qerror.h"
#include "sysemu/runstate.h"
+#include "migration/misc.h"
#include "migration.h"
#include "ram.h"
#include "options.h"
@@ -589,3 +590,19 @@ uint64_t migrate_xbzrle_cache_size(void)
return s->parameters.xbzrle_cache_size;
}
+
+/* parameters helpers */
+
+AnnounceParameters *migrate_announce_params(void)
+{
+ static AnnounceParameters ap;
+
+ MigrationState *s = migrate_get_current();
+
+ ap.initial = s->parameters.announce_initial;
+ ap.max = s->parameters.announce_max;
+ ap.rounds = s->parameters.announce_rounds;
+ ap.step = s->parameters.announce_step;
+
+ return &ap;
+}