提交 4cc856fa 编写于 作者: Z zhanghailiang 提交者: Paolo Bonzini

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: Nzhanghailiang <zhang.zhanghailiang@huawei.com>
[Use s->migration_log instead of exec.c's in_migration. - Paolo]
Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
上级 0a7cf217
......@@ -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);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册