From 4f08cabe9e6efe8a50abc30cfa59e8470ad434d7 Mon Sep 17 00:00:00 2001 From: Juan Quintela Date: Tue, 8 Oct 2013 12:01:01 +0200 Subject: memory: make cpu_physical_memory_is_dirty return bool Signed-off-by: Juan Quintela Reviewed-by: Eric Blake Reviewed-by: Orit Wasserman --- include/exec/memory-internal.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'include/exec') 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, -- cgit v1.1