summaryrefslogtreecommitdiffstats
path: root/exec.c
diff options
context:
space:
mode:
authorJuan Quintela <quintela@redhat.com>2012-06-22 13:14:17 +0200
committerJuan Quintela <quintela@redhat.com>2012-06-29 13:31:07 +0200
commit1720aeee72888f80b974c33b6eb39922a0bea992 (patch)
tree7a5fad830699aa5cc8650f46c29770a222000787 /exec.c
parent4508bd9ed8053cef0a1a849bf2f1896a5dd86580 (diff)
downloadhqemu-1720aeee72888f80b974c33b6eb39922a0bea992.zip
hqemu-1720aeee72888f80b974c33b6eb39922a0bea992.tar.gz
dirty bitmap: abstract its use
Always use accessors to read/set the dirty bitmap. Signed-off-by: Juan Quintela <quintela@redhat.com>
Diffstat (limited to 'exec.c')
-rw-r--r--exec.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/exec.c b/exec.c
index a68b65c..dd4833d 100644
--- a/exec.c
+++ b/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);
OpenPOWER on IntegriCloud