diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2017-03-16 15:32:07 +0000 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2017-03-16 15:32:08 +0000 |
commit | c5e737e5fbb8e48f9371764cc156ed15f4047a00 (patch) | |
tree | e228bd7044d11f00442ab20258b5dababf9b8565 /include | |
parent | 094a9a7cd677237a07b4e4f1e8a39a5af38d0cbe (diff) | |
parent | 8679638b0e231f97ad3456c681bf569ca7f7f6d5 (diff) | |
download | qemu-c5e737e5fbb8e48f9371764cc156ed15f4047a00.zip qemu-c5e737e5fbb8e48f9371764cc156ed15f4047a00.tar.gz qemu-c5e737e5fbb8e48f9371764cc156ed15f4047a00.tar.bz2 |
Merge remote-tracking branch 'remotes/juanquintela/tags/migration/20170316' into staging
migration/next for 20170316
# gpg: Signature made Thu 16 Mar 2017 08:21:51 GMT
# 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
* remotes/juanquintela/tags/migration/20170316:
postcopy: Check for shared memory
RAMBlocks: qemu_ram_is_shared
vmstate: fix failed iotests case 68 and 91
migration/block: Avoid invoking blk_drain too frequently
migration: use "" as the default for tls-creds/hostname
Change the method to calculate dirty-pages-rate
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/exec/cpu-common.h | 1 | ||||
-rw-r--r-- | include/exec/ram_addr.h | 5 |
2 files changed, 5 insertions, 1 deletions
diff --git a/include/exec/cpu-common.h b/include/exec/cpu-common.h index b62f0d8..4d45a72 100644 --- a/include/exec/cpu-common.h +++ b/include/exec/cpu-common.h @@ -69,6 +69,7 @@ RAMBlock *qemu_ram_block_from_host(void *ptr, bool round_offset, void qemu_ram_set_idstr(RAMBlock *block, const char *name, DeviceState *dev); void qemu_ram_unset_idstr(RAMBlock *block); const char *qemu_ram_get_idstr(RAMBlock *rb); +bool qemu_ram_is_shared(RAMBlock *rb); size_t qemu_ram_pagesize(RAMBlock *block); size_t qemu_ram_pagesize_largest(void); diff --git a/include/exec/ram_addr.h b/include/exec/ram_addr.h index cd432e7..b05dc84 100644 --- a/include/exec/ram_addr.h +++ b/include/exec/ram_addr.h @@ -355,7 +355,8 @@ 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, ram_addr_t start, - ram_addr_t length) + ram_addr_t length, + int64_t *real_dirty_pages) { ram_addr_t addr; unsigned long page = BIT_WORD(start >> TARGET_PAGE_BITS); @@ -379,6 +380,7 @@ uint64_t cpu_physical_memory_sync_dirty_bitmap(unsigned long *dest, if (src[idx][offset]) { unsigned long bits = atomic_xchg(&src[idx][offset], 0); unsigned long new_dirty; + *real_dirty_pages += ctpopl(bits); new_dirty = ~dest[k]; dest[k] |= bits; new_dirty &= bits; @@ -398,6 +400,7 @@ uint64_t cpu_physical_memory_sync_dirty_bitmap(unsigned long *dest, start + addr, TARGET_PAGE_SIZE, DIRTY_MEMORY_MIGRATION)) { + *real_dirty_pages += 1; long k = (start + addr) >> TARGET_PAGE_BITS; if (!test_and_set_bit(k, dest)) { num_dirty++; |