diff options
author | Juan Quintela <quintela@redhat.com> | 2013-10-08 16:14:39 +0200 |
---|---|---|
committer | Juan Quintela <quintela@redhat.com> | 2014-01-13 14:04:54 +0100 |
commit | 1ab4c8ceaa5ec55af9bb25e88e46d461a8550280 (patch) | |
tree | 7ea5e847c02536ef92297e3f28b2d9c0bd6c8426 /exec.c | |
parent | 164590a60fd685399da259ac41b338d9a0b9d6c0 (diff) | |
download | qemu-1ab4c8ceaa5ec55af9bb25e88e46d461a8550280.tar.gz qemu-1ab4c8ceaa5ec55af9bb25e88e46d461a8550280.tar.bz2 qemu-1ab4c8ceaa5ec55af9bb25e88e46d461a8550280.zip |
memory: split dirty bitmap into three
After all the previous patches, spliting the bitmap gets direct.
Note: For some reason, I have to move DIRTY_MEMORY_* definitions to
the beginning of memory.h to make compilation work.
Signed-off-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Orit Wasserman <owasserm@redhat.com>
Diffstat (limited to 'exec.c')
-rw-r--r-- | exec.c | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -1277,9 +1277,12 @@ ram_addr_t qemu_ram_alloc_from_ptr(ram_addr_t size, void *host, new_ram_size = last_ram_offset() >> TARGET_PAGE_BITS; if (new_ram_size > old_ram_size) { - ram_list.phys_dirty = g_realloc(ram_list.phys_dirty, new_ram_size); - memset(ram_list.phys_dirty + (new_block->offset >> TARGET_PAGE_BITS), - 0, size >> TARGET_PAGE_BITS); + int i; + for (i = 0; i < DIRTY_MEMORY_NUM; i++) { + ram_list.dirty_memory[i] = + bitmap_zero_extend(ram_list.dirty_memory[i], + old_ram_size, new_ram_size); + } } cpu_physical_memory_set_dirty_range(new_block->offset, size); |