OSDN Git Service

exec: use accessor function to know if memory is dirty
authorJuan Quintela <quintela@redhat.com>
Tue, 8 Oct 2013 09:50:04 +0000 (11:50 +0200)
committerJuan Quintela <quintela@redhat.com>
Mon, 13 Jan 2014 13:04:53 +0000 (14:04 +0100)
Signed-off-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Orit Wasserman <owasserm@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
exec.c

diff --git a/exec.c b/exec.c
index 7e49e8e..c42a2f9 100644 (file)
--- a/exec.c
+++ b/exec.c
@@ -1508,7 +1508,7 @@ static void notdirty_mem_write(void *opaque, hwaddr ram_addr,
     cpu_physical_memory_set_dirty_flags(ram_addr, dirty_flags);
     /* we remove the notdirty callback only if the code has been
        flushed */
-    if (dirty_flags == 0xff) {
+    if (cpu_physical_memory_is_dirty(ram_addr)) {
         CPUArchState *env = current_cpu->env_ptr;
         tlb_set_dirty(env, env->mem_io_vaddr);
     }