mirror of
https://github.com/mii443/qemu.git
synced 2025-12-03 11:08:25 +00: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:
7
exec.c
7
exec.c
@@ -1485,11 +1485,8 @@ found:
|
||||
static void notdirty_mem_write(void *opaque, hwaddr ram_addr,
|
||||
uint64_t val, unsigned size)
|
||||
{
|
||||
int dirty_flags;
|
||||
dirty_flags = cpu_physical_memory_get_dirty_flags(ram_addr);
|
||||
if (!cpu_physical_memory_get_dirty_flag(ram_addr, CODE_DIRTY_FLAG)) {
|
||||
tb_invalidate_phys_page_fast(ram_addr, size);
|
||||
dirty_flags = cpu_physical_memory_get_dirty_flags(ram_addr);
|
||||
}
|
||||
switch (size) {
|
||||
case 1:
|
||||
@@ -1504,8 +1501,8 @@ static void notdirty_mem_write(void *opaque, hwaddr ram_addr,
|
||||
default:
|
||||
abort();
|
||||
}
|
||||
dirty_flags |= (0xff & ~CODE_DIRTY_FLAG);
|
||||
cpu_physical_memory_set_dirty_flags(ram_addr, dirty_flags);
|
||||
cpu_physical_memory_set_dirty_flag(ram_addr, MIGRATION_DIRTY_FLAG);
|
||||
cpu_physical_memory_set_dirty_flag(ram_addr, VGA_DIRTY_FLAG);
|
||||
/* we remove the notdirty callback only if the code has been
|
||||
flushed */
|
||||
if (cpu_physical_memory_is_dirty(ram_addr)) {
|
||||
|
||||
Reference in New Issue
Block a user