mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-09-09 00:07:57 -06:00
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>
This commit is contained in:
parent
7e5609a85e
commit
4f08cabe9e
2 changed files with 8 additions and 7 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue