aboutsummaryrefslogtreecommitdiff
path: root/include/exec
diff options
context:
space:
mode:
authorJuan Quintela <quintela@redhat.com>2013-10-08 12:01:01 +0200
committerJuan Quintela <quintela@redhat.com>2014-01-13 14:04:53 +0100
commit4f08cabe9e6efe8a50abc30cfa59e8470ad434d7 (patch)
tree1976f9015bd35c14b5eb2134429a8fdc3ff6fdd4 /include/exec
parent7e5609a85e3f35965af5e4c7b1480254642cf2dd (diff)
downloadqemu-4f08cabe9e6efe8a50abc30cfa59e8470ad434d7.zip
qemu-4f08cabe9e6efe8a50abc30cfa59e8470ad434d7.tar.gz
qemu-4f08cabe9e6efe8a50abc30cfa59e8470ad434d7.tar.bz2
memory: make cpu_physical_memory_is_dirty return bool
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 'include/exec')
-rw-r--r--include/exec/memory-internal.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/include/exec/memory-internal.h b/include/exec/memory-internal.h
index 136198c..0b25c3f 100644
--- a/include/exec/memory-internal.h
+++ b/include/exec/memory-internal.h
@@ -56,9 +56,13 @@ static inline bool cpu_physical_memory_get_dirty_flag(ram_addr_t addr,
}
/* read dirty bit (return 0 or 1) */
-static inline int cpu_physical_memory_is_dirty(ram_addr_t addr)
+static inline bool cpu_physical_memory_is_dirty(ram_addr_t addr)
{
- return cpu_physical_memory_get_dirty_flags(addr) == 0xff;
+ bool vga = cpu_physical_memory_get_dirty_flag(addr, VGA_DIRTY_FLAG);
+ bool code = cpu_physical_memory_get_dirty_flag(addr, CODE_DIRTY_FLAG);
+ bool migration =
+ cpu_physical_memory_get_dirty_flag(addr, MIGRATION_DIRTY_FLAG);
+ return vga && code && migration;
}
static inline int cpu_physical_memory_get_dirty(ram_addr_t start,