diff --git a/exec.c b/exec.c index a42a0b5b78410ba5574e44a78b7bdc0d2067183e..929db5cf0a498022a5ff6f4bdfaabeb98e682ee1 100644 --- a/exec.c +++ b/exec.c @@ -2550,6 +2550,8 @@ 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), + 0, size >> TARGET_PAGE_BITS); cpu_physical_memory_set_dirty_range(new_block->offset, size, 0xff); if (kvm_enabled())