diff options
author | Stefan Hajnoczi <stefanha@redhat.com> | 2017-05-05 16:52:12 +0100 |
---|---|---|
committer | Stefan Hajnoczi <stefanha@redhat.com> | 2017-05-05 16:52:35 +0100 |
commit | 4aee86c60a53a3478d9799a4464cf0bc08071148 (patch) | |
tree | a8fa7c5aba4aa18e52fd8182cce9cc5872df1fa3 /include/exec/ram_addr.h | |
parent | bc56fd3a23c94302937ed023d33e17a2de1a1b2a (diff) | |
parent | 1db9d8e501fc99fa2201f228627952aee6cfc349 (diff) | |
download | qemu-4aee86c60a53a3478d9799a4464cf0bc08071148.tar.gz |
Merge remote-tracking branch 'quintela/tags/migration/20170504' into staging
migration/next for 20170504
# gpg: Signature made Thu 04 May 2017 10:35:41 AM BST
# gpg: using RSA key 0xF487EF185872D723
# gpg: Good signature from "Juan Quintela <quintela@redhat.com>"
# gpg: aka "Juan Quintela <quintela@trasno.org>"
# Primary key fingerprint: 1899 FF8E DEBF 58CC EE03 4B82 F487 EF18 5872 D723
* quintela/tags/migration/20170504:
migration: Extra tracing
migration: Move postcopy-ram.h to migration/
monitor: Move hmp_info_snapshots from savevm.c to hmp.c
monitor: Move hmp_delvm from savevm.c to hmp.c
monitor: Move hmp_savevm from savevm.c to hmp.c
monitor: Move hmp_loadvm from monitor.c to hmp.c
monitor: Remove monitor parameter from save_vmstate
migration: to_dst_file at that point is NULL
migration: setup bi-directional I/O channel for exec: protocol
ram: Split dirty bitmap by RAMBlock
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'include/exec/ram_addr.h')
-rw-r--r-- | include/exec/ram_addr.h | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/include/exec/ram_addr.h b/include/exec/ram_addr.h index dbe2f08d47..140efa840c 100644 --- a/include/exec/ram_addr.h +++ b/include/exec/ram_addr.h @@ -39,6 +39,14 @@ struct RAMBlock { QLIST_HEAD(, RAMBlockNotifier) ramblock_notifiers; int fd; size_t page_size; + /* dirty bitmap used during migration */ + unsigned long *bmap; + /* bitmap of pages that haven't been sent even once + * only maintained and used in postcopy at the moment + * where it's used to send the dirtymap at the start + * of the postcopy phase + */ + unsigned long *unsentmap; }; static inline bool offset_in_ramblock(RAMBlock *b, ram_addr_t offset) @@ -360,16 +368,15 @@ static inline void cpu_physical_memory_clear_dirty_range(ram_addr_t start, static inline -uint64_t cpu_physical_memory_sync_dirty_bitmap(unsigned long *dest, - RAMBlock *rb, +uint64_t cpu_physical_memory_sync_dirty_bitmap(RAMBlock *rb, ram_addr_t start, ram_addr_t length, uint64_t *real_dirty_pages) { ram_addr_t addr; - start = rb->offset + start; unsigned long page = BIT_WORD(start >> TARGET_PAGE_BITS); uint64_t num_dirty = 0; + unsigned long *dest = rb->bmap; /* start address is aligned at the start of a word? */ if (((page * BITS_PER_LONG) << TARGET_PAGE_BITS) == start) { |