diff options
| author | Peter Maydell <peter.maydell@linaro.org> | 2017-06-29 13:13:05 +0100 |
|---|---|---|
| committer | Peter Maydell <peter.maydell@linaro.org> | 2017-06-29 13:13:05 +0100 |
| commit | 4fe60423d7f401bd5d4ef461ef53402139f0d698 (patch) | |
| tree | 85f8153981737a140dc597986668bdb2d8a02c76 /include/exec | |
| parent | 464588675455afda2899e20a0b120e4075de50c7 (diff) | |
| parent | 084140bd4989095d39978269fd0f43e398a0015d (diff) | |
| download | focaccia-qemu-4fe60423d7f401bd5d4ef461ef53402139f0d698.tar.gz focaccia-qemu-4fe60423d7f401bd5d4ef461ef53402139f0d698.zip | |
Merge remote-tracking branch 'remotes/juanquintela/tags/migration/20170628' into staging
migration/next for 20170628 # gpg: Signature made Wed 28 Jun 2017 12:16:44 BST # gpg: using RSA key 0xF487EF185872D723 # gpg: Good signature from "Juan Quintela <quintela@redhat.com>" # gpg: aka "Juan Quintela <quintela@trasno.org>" # gpg: WARNING: This key is not certified with a trusted signature! # gpg: There is no indication that the signature belongs to the owner. # Primary key fingerprint: 1899 FF8E DEBF 58CC EE03 4B82 F487 EF18 5872 D723 * remotes/juanquintela/tags/migration/20170628: exec: fix access to ram_list.dirty_memory when sync dirty bitmap migration: add "return-path" capability vmstate: error hint for failed equal checks migration: add comment for TYPE_MIGRATE migration: hmp: dump globals migration: merge enforce_config_section somewhat migration: move skip_section_footers migration: move skip_configuration out migration: move only_migratable to MigrationState migration: move global_state.optional out migration: let MigrationState be a qdev vl: clean up global property registration accel: introduce AccelClass.global_props machine: export register_compat_prop() Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'include/exec')
| -rw-r--r-- | include/exec/ram_addr.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/include/exec/ram_addr.h b/include/exec/ram_addr.h index 73d1bea8b6..c04f4f67f6 100644 --- a/include/exec/ram_addr.h +++ b/include/exec/ram_addr.h @@ -386,8 +386,9 @@ uint64_t cpu_physical_memory_sync_dirty_bitmap(RAMBlock *rb, int k; int nr = BITS_TO_LONGS(length >> TARGET_PAGE_BITS); unsigned long * const *src; - unsigned long idx = (page * BITS_PER_LONG) / DIRTY_MEMORY_BLOCK_SIZE; - unsigned long offset = BIT_WORD((page * BITS_PER_LONG) % + unsigned long word = BIT_WORD((start + rb->offset) >> TARGET_PAGE_BITS); + unsigned long idx = (word * BITS_PER_LONG) / DIRTY_MEMORY_BLOCK_SIZE; + unsigned long offset = BIT_WORD((word * BITS_PER_LONG) % DIRTY_MEMORY_BLOCK_SIZE); rcu_read_lock(); @@ -414,9 +415,11 @@ uint64_t cpu_physical_memory_sync_dirty_bitmap(RAMBlock *rb, rcu_read_unlock(); } else { + ram_addr_t offset = rb->offset; + for (addr = 0; addr < length; addr += TARGET_PAGE_SIZE) { if (cpu_physical_memory_test_and_clear_dirty( - start + addr, + start + addr + offset, TARGET_PAGE_SIZE, DIRTY_MEMORY_MIGRATION)) { *real_dirty_pages += 1; |