On Sun, Jul 14, 2019 at 10:51:19PM +0800, Ivan Ren wrote: > Reproduce the problem: > migrate > migrate_cancel > migrate > > Error happen for memory migration
Can mention "this mostly revert 0315851938 but with comments kept" when merge... > > The reason as follows: > 1. qemu start, ram_list.dirty_memory[DIRTY_MEMORY_MIGRATION] all set to > 1 by a series of cpu_physical_memory_set_dirty_range > 2. migration start:ram_init_bitmaps > - memory_global_dirty_log_start: begin log diry > - memory_global_dirty_log_sync: sync dirty bitmap to > ram_list.dirty_memory[DIRTY_MEMORY_MIGRATION] > - migration_bitmap_sync_range: sync ram_list. > dirty_memory[DIRTY_MEMORY_MIGRATION] to RAMBlock.bmap > and ram_list.dirty_memory[DIRTY_MEMORY_MIGRATION] is set to zero > 3. migration data... > 4. migrate_cancel, will stop log dirty > 5. migration start:ram_init_bitmaps > - memory_global_dirty_log_start: begin log diry > - memory_global_dirty_log_sync: sync dirty bitmap to > ram_list.dirty_memory[DIRTY_MEMORY_MIGRATION] > - migration_bitmap_sync_range: sync ram_list. > dirty_memory[DIRTY_MEMORY_MIGRATION] to RAMBlock.bmap > and ram_list.dirty_memory[DIRTY_MEMORY_MIGRATION] is set to zero > > Here RAMBlock.bmap only have new logged dirty pages, don't contain > the whole guest pages. Fixes: 03158519384f158 > > Signed-off-by: Ivan Ren <ivan...@tencent.com> Reviewed-by: Peter Xu <pet...@redhat.com> I think this is a bit severe and should be rc2 material. Dave/Juan? Thanks, -- Peter Xu