From b35ebdf076d697bca9ad8715ac76d7b7f3ac1be3 Mon Sep 17 00:00:00 2001 From: Vladimir Sementsov-Ogievskiy Date: Tue, 13 Mar 2018 15:34:01 -0400 Subject: migration: add postcopy migration of dirty bitmaps Postcopy migration of dirty bitmaps. Only named dirty bitmaps are migrated. If destination qemu is already containing a dirty bitmap with the same name as a migrated bitmap (for the same node), then, if their granularities are the same the migration will be done, otherwise the error will be generated. If destination qemu doesn't contain such bitmap it will be created. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Dr. David Alan Gilbert Message-id: 20180313180320.339796-12-vsementsov@virtuozzo.com [Changed '+' to '*' as per list discussion. --js] Signed-off-by: John Snow --- migration/migration.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'migration/migration.c') diff --git a/migration/migration.c b/migration/migration.c index 59b4fe6090..623f373326 100644 --- a/migration/migration.c +++ b/migration/migration.c @@ -157,6 +157,9 @@ MigrationIncomingState *migration_incoming_get_current(void) memset(&mis_current, 0, sizeof(MigrationIncomingState)); qemu_mutex_init(&mis_current.rp_mutex); qemu_event_init(&mis_current.main_thread_load_event, false); + + init_dirty_bitmap_incoming_migration(); + once = true; } return &mis_current; @@ -320,6 +323,8 @@ static void process_incoming_migration_bh(void *opaque) state, we need to obey autostart. Any other state is set with runstate_set. */ + dirty_bitmap_mig_before_vm_start(); + if (!global_state_received() || global_state_get_runstate() == RUN_STATE_RUNNING) { if (autostart) { -- cgit 1.4.1