mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 23:33:54 -06:00
dirty bitmap: abstract its use
Always use accessors to read/set the dirty bitmap. Signed-off-by: Juan Quintela <quintela@redhat.com>
This commit is contained in:
parent
4508bd9ed8
commit
1720aeee72
2 changed files with 23 additions and 24 deletions
3
exec.c
3
exec.c
|
@ -2565,8 +2565,7 @@ ram_addr_t qemu_ram_alloc_from_ptr(ram_addr_t size, void *host,
|
|||
|
||||
ram_list.phys_dirty = g_realloc(ram_list.phys_dirty,
|
||||
last_ram_offset() >> TARGET_PAGE_BITS);
|
||||
memset(ram_list.phys_dirty + (new_block->offset >> TARGET_PAGE_BITS),
|
||||
0xff, size >> TARGET_PAGE_BITS);
|
||||
cpu_physical_memory_set_dirty_range(new_block->offset, size, 0xff);
|
||||
|
||||
if (kvm_enabled())
|
||||
kvm_setup_guest_memory(new_block->host, size);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue