aboutsummaryrefslogtreecommitdiff
path: root/kvm-all.c
diff options
context:
space:
mode:
authorzhanghailiang <zhang.zhanghailiang@huawei.com>2015-04-02 19:26:31 +0000
committerPaolo Bonzini <pbonzini@redhat.com>2015-04-02 15:58:37 +0200
commit4cc856fabae1447d53890e707c70f257a7691174 (patch)
treec82675888017050ea43b23104926b48d5b2bcaad /kvm-all.c
parent0a7cf217d81161e36af2344e911d56d4f9fef9c5 (diff)
kvm-all: Sync dirty-bitmap from kvm before kvm destroy the corresponding dirty_bitmap
Sometimes, we destroy the dirty_bitmap in kvm_memory_slot before any sync action occur, this bit in dirty_bitmap will be missed, and which will lead the corresponding dirty pages to be missed in migration. This usually happens when do migration during VM's Start-up or Reboot. Signed-off-by: zhanghailiang <zhang.zhanghailiang@huawei.com> [Use s->migration_log instead of exec.c's in_migration. - Paolo] Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'kvm-all.c')
-rw-r--r--kvm-all.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kvm-all.c b/kvm-all.c
index 335438adb5..dd44f8c753 100644
--- a/kvm-all.c
+++ b/kvm-all.c
@@ -715,7 +715,7 @@ static void kvm_set_phys_mem(MemoryRegionSection *section, bool add)
old = *mem;
- if (mem->flags & KVM_MEM_LOG_DIRTY_PAGES) {
+ if ((mem->flags & KVM_MEM_LOG_DIRTY_PAGES) || s->migration_log) {
kvm_physical_sync_dirty_bitmap(section);
}