diff options
author | Juan Quintela <quintela@redhat.com> | 2017-03-21 09:35:04 +0100 |
---|---|---|
committer | Juan Quintela <quintela@redhat.com> | 2017-04-21 12:25:39 +0200 |
commit | 15440dd5a08a6b10538b9e62c6d95ac8a838d78a (patch) | |
tree | ff6658ce48e43827adbee6214e959273bffeccf1 /migration | |
parent | 030ce1f8612215fcbe9d353dfeaeb2937f8e3f94 (diff) |
ram: Pass RAMBlock to bitmap_sync
We change the meaning of start to be the offset from the beggining of
the block.
Signed-off-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Diffstat (limited to 'migration')
-rw-r--r-- | migration/ram.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/migration/ram.c b/migration/ram.c index fe01e7ba26..3f3842a38b 100644 --- a/migration/ram.c +++ b/migration/ram.c @@ -646,13 +646,13 @@ static inline bool migration_bitmap_clear_dirty(RAMState *rs, ram_addr_t addr) return ret; } -static void migration_bitmap_sync_range(RAMState *rs, ram_addr_t start, - ram_addr_t length) +static void migration_bitmap_sync_range(RAMState *rs, RAMBlock *rb, + ram_addr_t start, ram_addr_t length) { unsigned long *bitmap; bitmap = atomic_rcu_read(&rs->ram_bitmap)->bmap; rs->migration_dirty_pages += - cpu_physical_memory_sync_dirty_bitmap(bitmap, start, length, + cpu_physical_memory_sync_dirty_bitmap(bitmap, rb, start, length, &rs->num_dirty_pages_period); } @@ -699,7 +699,7 @@ static void migration_bitmap_sync(RAMState *rs) qemu_mutex_lock(&rs->bitmap_mutex); rcu_read_lock(); QLIST_FOREACH_RCU(block, &ram_list.blocks, next) { - migration_bitmap_sync_range(rs, block->offset, block->used_length); + migration_bitmap_sync_range(rs, block, 0, block->used_length); } rcu_read_unlock(); qemu_mutex_unlock(&rs->bitmap_mutex); |