diff options
| author | Peter Maydell <peter.maydell@linaro.org> | 2017-10-25 15:24:08 +0100 |
|---|---|---|
| committer | Peter Maydell <peter.maydell@linaro.org> | 2017-10-25 15:24:08 +0100 |
| commit | 4e1b31dba8f66e337fbaf0166b7b8c440be78529 (patch) | |
| tree | b51eb1c88a22b232193e54bb3bb083c023340aef /include | |
| parent | 328f6f79e9916deb6e5649499f7439b0262f6f9e (diff) | |
| parent | 87db1a7d89677e3dbc8b3763e417b9376009bdbb (diff) | |
| download | focaccia-qemu-4e1b31dba8f66e337fbaf0166b7b8c440be78529.tar.gz focaccia-qemu-4e1b31dba8f66e337fbaf0166b7b8c440be78529.zip | |
Merge remote-tracking branch 'remotes/juanquintela/tags/migration/20171023' into staging
migration/next for 20171023 # gpg: Signature made Mon 23 Oct 2017 17:05:14 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 * remotes/juanquintela/tags/migration/20171023: (21 commits) migration: Improve migration thread error handling qapi: Fix grammar in x-multifd-page-count descriptions migration: add bitmap for received page migration: introduce qemu_ufd_copy_ioctl helper migration: postcopy_place_page factoring out migration: new ram_init_bitmaps() migration: clean up xbzrle cache init/destroy migration: provide ram_state_cleanup migration: provide ram_state_init() migration: pause-before-switchover for postcopy migration: allow cancel to unpause migrate: HMP migate_continue migration: migrate-continue migration: Wait for semaphore before completing migration migration: Add 'pre-switchover' and 'device' statuses migration: Add 'pause-before-switchover' capability migration: Make cache_init() take an error parameter migration: Move xbzrle cache resize error handling to xbzrle_cache_resize migration: Make cache size elements use the right types migratiom: Remove max_item_age parameter ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'include')
| -rw-r--r-- | include/exec/ram_addr.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/exec/ram_addr.h b/include/exec/ram_addr.h index d017639f7e..6cbc02aa0f 100644 --- a/include/exec/ram_addr.h +++ b/include/exec/ram_addr.h @@ -47,6 +47,8 @@ struct RAMBlock { * of the postcopy phase */ unsigned long *unsentmap; + /* bitmap of already received pages in postcopy */ + unsigned long *receivedmap; }; static inline bool offset_in_ramblock(RAMBlock *b, ram_addr_t offset) @@ -60,6 +62,14 @@ static inline void *ramblock_ptr(RAMBlock *block, ram_addr_t offset) return (char *)block->host + offset; } +static inline unsigned long int ramblock_recv_bitmap_offset(void *host_addr, + RAMBlock *rb) +{ + uint64_t host_addr_offset = + (uint64_t)(uintptr_t)(host_addr - (void *)rb->host); + return host_addr_offset >> TARGET_PAGE_BITS; +} + long qemu_getrampagesize(void); unsigned long last_ram_page(void); RAMBlock *qemu_ram_alloc_from_file(ram_addr_t size, MemoryRegion *mr, |