@@ -27,7 +27,6 @@ bool migration_in_colo_state(void);
/* loadvm */
int migration_incoming_enable_colo(void);
void migration_incoming_disable_colo(void);
-bool migration_incoming_colo_enabled(void);
bool migration_incoming_in_colo_state(void);
COLOMode get_colo_mode(void);
@@ -927,7 +927,7 @@ int coroutine_fn colo_incoming_co(void)
assert(qemu_mutex_iothread_locked());
- if (!migration_incoming_colo_enabled()) {
+ if (!migrate_colo()) {
return 0;
}
@@ -379,11 +379,6 @@ int migrate_send_rp_req_pages(MigrationIncomingState *mis,
}
static bool migration_colo_enabled;
-bool migration_incoming_colo_enabled(void)
-{
- return migration_colo_enabled;
-}
-
void migration_incoming_disable_colo(void)
{
ram_block_discard_disable(false);
@@ -484,7 +479,7 @@ static void process_incoming_migration_bh(void *opaque)
} else {
runstate_set(RUN_STATE_PAUSED);
}
- } else if (migration_incoming_colo_enabled()) {
+ } else if (migrate_colo()) {
migration_incoming_disable_colo();
vm_start();
} else {
@@ -3892,7 +3892,7 @@ static int ram_load_precopy(QEMUFile *f)
* speed of the migration, but it obviously reduce the downtime of
* back-up all SVM'S memory in COLO preparing stage.
*/
- if (migration_incoming_colo_enabled()) {
+ if (migrate_colo()) {
if (migration_incoming_in_colo_state()) {
/* In COLO stage, put all pages into cache temporarily */
host = colo_cache_from_block_offset(block, addr, true);
Signed-off-by: Lukas Straub <lukasstraub2@web.de> --- include/migration/colo.h | 1 - migration/colo.c | 2 +- migration/migration.c | 7 +------ migration/ram.c | 2 +- 4 files changed, 3 insertions(+), 9 deletions(-)