diff options
| author | Peter Maydell | 2017-08-01 19:03:04 +0200 |
|---|---|---|
| committer | Peter Maydell | 2017-08-01 19:03:04 +0200 |
| commit | 82d3d409b8b650164817ead0cb48298c6973d731 (patch) | |
| tree | 76b2c0412952acc21ac9bf1e54d9899a9092ec8f /include/exec | |
| parent | Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging (diff) | |
| parent | mc146818rtc: implement UIP latching as intended (diff) | |
| download | qemu-82d3d409b8b650164817ead0cb48298c6973d731.tar.gz qemu-82d3d409b8b650164817ead0cb48298c6973d731.tar.xz qemu-82d3d409b8b650164817ead0cb48298c6973d731.zip | |
Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into staging
* Xen fix (Anthony)
* chardev fixes (Anton, Marc-André)
* small dead code removal (Zhongyi)
* documentation (Dan)
* bugfixes (David)
* decrease migration downtime (Jay)
* improved error output (Laurent)
* RTC tests and bugfix (me)
* Bluetooth clang analyzer fix (me)
* KVM CPU hotplug race (Peng Hao)
* Two other patches from Philippe's clang analyzer series
# gpg: Signature made Tue 01 Aug 2017 16:56:21 BST
# gpg: using RSA key 0xBFFBD25F78C7AE83
# gpg: Good signature from "Paolo Bonzini <bonzini@gnu.org>"
# gpg: aka "Paolo Bonzini <pbonzini@redhat.com>"
# Primary key fingerprint: 46F5 9FBD 57D6 12E7 BFD4 E2F7 7E15 100C CD36 69B1
# Subkey fingerprint: F133 3857 4B66 2389 866C 7682 BFFB D25F 78C7 AE83
* remotes/bonzini/tags/for-upstream:
mc146818rtc: implement UIP latching as intended
mc146818rtc: simplify check_update_timer
rtc-test: introduce more update tests
rtc-test: cleanup register_b_set_flag test
hw/scsi/vmw_pvscsi: Convert to realize
hw/scsi/vmw_pvscsi: Remove the dead error handling
migration: optimize the downtime
qemu-options: document existance of versioned machine types
bt: stop the sdp memory allocation craziness
exec: Add lock parameter to qemu_ram_ptr_length
target-i386: kvm_get/put_vcpu_events don't handle sipi_vector
docs: document deprecation policy & deprecated features in appendix
char: don't exit on hmp 'chardev-add help'
char-fd: remove useless chr pointer
accel: cleanup error output
cpu_physical_memory_sync_dirty_bitmap: Fix alignment check
vl.c/exit: pause cpus before closing block devices
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'include/exec')
| -rw-r--r-- | include/exec/ram_addr.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/include/exec/ram_addr.h b/include/exec/ram_addr.h index c04f4f67f6..d017639f7e 100644 --- a/include/exec/ram_addr.h +++ b/include/exec/ram_addr.h @@ -377,19 +377,20 @@ uint64_t cpu_physical_memory_sync_dirty_bitmap(RAMBlock *rb, uint64_t *real_dirty_pages) { ram_addr_t addr; - unsigned long page = BIT_WORD(start >> TARGET_PAGE_BITS); + unsigned long word = BIT_WORD((start + rb->offset) >> 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) { + if (((word * BITS_PER_LONG) << TARGET_PAGE_BITS) == + (start + rb->offset)) { int k; int nr = BITS_TO_LONGS(length >> TARGET_PAGE_BITS); unsigned long * const *src; - 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); + unsigned long page = BIT_WORD(start >> TARGET_PAGE_BITS); rcu_read_lock(); |
