qemu-e2k/migration
Ivan Ren 40c4d4a835 migration: always initial RAMBlock.bmap to 1 for new migration
Reproduce the problem:
migrate
migrate_cancel
migrate

Error happen for memory migration

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.

Signed-off-by: Ivan Ren <ivanren@tencent.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
Message-Id: <1563115879-2715-1-git-send-email-ivanren@tencent.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
2019-07-15 15:47:47 +02:00
..
block-dirty-bitmap.c migration/dirty-bitmaps: change bitmap enumeration method 2019-05-28 19:33:31 -04:00
block.c block: Add BlockBackend.ctx 2019-06-04 15:22:22 +02:00
block.h migration: disable auto-converge during bulk block migration 2017-09-27 11:27:14 +01:00
channel.c migration: fix the multifd code when receiving less channels 2019-01-23 15:02:07 +00:00
channel.h migration: Route errors down through migration_channel_connect 2018-02-06 10:55:12 +00:00
colo-failover.c migration/colo.c: Remove redundant input parameter 2019-05-14 17:33:35 +01:00
colo.c migration/colo.c: Add missed filter notify for Xen COLO. 2019-07-02 10:21:07 +08:00
exec.c migration: unify incoming processing 2018-07-10 12:48:53 +01:00
exec.h migration: Export exec.c functions in its own file 2017-06-01 18:49:22 +02:00
fd.c migration: Fix fd protocol for incoming defer 2019-06-05 12:43:55 +02:00
fd.h migration: Fix fd protocol for incoming defer 2019-06-05 12:43:55 +02:00
global_state.c migration: Use strnlen() for fixed-size string 2019-01-17 21:10:57 -05:00
Makefile.objs COLO: Remove colo_state migration struct 2018-10-19 11:15:03 +08:00
migration.c migration: Split log_clear() into smaller chunks 2019-07-15 15:39:03 +02:00
migration.h migration: Split log_clear() into smaller chunks 2019-07-15 15:39:03 +02:00
page_cache.c Include qemu-common.h exactly where needed 2019-06-12 13:20:20 +02:00
page_cache.h migration: Make cache_init() take an error parameter 2017-10-23 18:03:25 +02:00
postcopy-ram.c general: Replace global smp variables with smp machine properties 2019-07-05 17:07:36 -03:00
postcopy-ram.h postcopy: drop ram_pages parameter from postcopy_ram_incoming_init() 2018-06-27 13:28:31 +02:00
qemu-file-channel.c migration: invoke qio_channel_yield only when qemu_in_coroutine() 2018-08-22 12:13:59 +02:00
qemu-file-channel.h migration: Export qemu-file-channel.c functions in its own file 2017-05-18 19:20:50 +02:00
qemu-file.c Include qemu-common.h exactly where needed 2019-06-12 13:20:20 +02:00
qemu-file.h slirp: use libslirp migration code 2019-03-07 12:46:31 +01:00
qjson.c qobject: Replace qobject_incref/QINCREF qobject_decref/QDECREF 2018-05-04 08:27:53 +02:00
qjson.h typedefs: add QJSON 2018-06-15 14:40:56 +01:00
ram.c migration: always initial RAMBlock.bmap to 1 for new migration 2019-07-15 15:47:47 +02:00
ram.h Include qemu-common.h exactly where needed 2019-06-12 13:20:20 +02:00
rdma.c migration: move port_attr inside CONFIG_LINUX 2019-07-04 19:23:07 +01:00
rdma.h migration: Export rdma.c functions in its own file 2017-06-01 18:49:23 +02:00
savevm.c migration/postcopy: remove redundant cpu_synchronize_all_post_init 2019-07-15 15:45:59 +02:00
savevm.h savevm: split the process of different stages for loadvm/savevm 2018-10-19 11:15:03 +08:00
socket.c Include qemu-common.h exactly where needed 2019-06-12 13:20:20 +02:00
socket.h migration: Export functions to create send channels 2018-05-15 20:24:27 +02:00
tls.c migration: add support for a "tls-authz" migration parameter 2019-03-25 18:13:47 +01:00
tls.h migration: Export tls.c functions in its own file 2017-06-01 18:49:23 +02:00
trace-events migration: Split log_clear() into smaller chunks 2019-07-15 15:39:03 +02:00
vmstate-types.c Include qemu-common.h exactly where needed 2019-06-12 13:20:20 +02:00
vmstate.c Include qemu-common.h exactly where needed 2019-06-12 13:20:20 +02:00
xbzrle.c migration: Create migration/xbzrle.h 2017-05-18 18:04:54 +02:00
xbzrle.h migration: Create migration/xbzrle.h 2017-05-18 18:04:54 +02:00