mirror of
https://github.com/mii443/qemu.git
synced 2025-12-07 21:18:22 +00:00
postcopy: Transmit ram size summary word
Replace the host page-size in the 'advise' command by a pagesize
summary bitmap; if the VM is just using normal RAM then
this will be exactly the same as before, however if they're using
huge pages they'll be different, and thus:
a) Migration from/to old qemu's that don't understand huge pages
will fail early.
b) Migrations with different size RAMBlocks will also fail early.
This catches it very early; earlier than the detailed per-block
check in the next patch.
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Reviewed-by: Laurent Vivier <lvivier@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Message-Id: <20170224182844.32452-2-dgilbert@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
This commit is contained in:
@@ -600,6 +600,23 @@ static void migration_bitmap_sync_init(void)
|
||||
iterations_prev = 0;
|
||||
}
|
||||
|
||||
/* Returns a summary bitmap of the page sizes of all RAMBlocks;
|
||||
* for VMs with just normal pages this is equivalent to the
|
||||
* host page size. If it's got some huge pages then it's the OR
|
||||
* of all the different page sizes.
|
||||
*/
|
||||
uint64_t ram_pagesize_summary(void)
|
||||
{
|
||||
RAMBlock *block;
|
||||
uint64_t summary = 0;
|
||||
|
||||
QLIST_FOREACH_RCU(block, &ram_list.blocks, next) {
|
||||
summary |= block->page_size;
|
||||
}
|
||||
|
||||
return summary;
|
||||
}
|
||||
|
||||
static void migration_bitmap_sync(void)
|
||||
{
|
||||
RAMBlock *block;
|
||||
|
||||
Reference in New Issue
Block a user