summaryrefslogtreecommitdiff
path: root/exec.c
diff options
context:
space:
mode:
authorJuan Quintela <quintela@redhat.com>2013-10-08 12:44:04 +0200
committerJuan Quintela <quintela@redhat.com>2014-01-13 14:04:54 +0100
commit52159192919469b424b54c167312e53d5a62d233 (patch)
treee66a6935d02a1707173a9ea0850e60cf11edb4b9 /exec.c
parent75218e7f2b7f052c6f44489afaf45b3ea4369f45 (diff)
downloadqemu-52159192919469b424b54c167312e53d5a62d233.tar.gz
qemu-52159192919469b424b54c167312e53d5a62d233.tar.bz2
qemu-52159192919469b424b54c167312e53d5a62d233.zip
memory: cpu_physical_memory_mask_dirty_range() always clears a single flag
Document it 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 'exec.c')
-rw-r--r--exec.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/exec.c b/exec.c
index f21596040d..82aca4ad37 100644
--- a/exec.c
+++ b/exec.c
@@ -738,7 +738,7 @@ static void tlb_reset_dirty_range_all(ram_addr_t start, ram_addr_t end,
/* Note: start and end must be within the same ram block. */
void cpu_physical_memory_reset_dirty(ram_addr_t start, ram_addr_t end,
- int dirty_flags)
+ unsigned client)
{
uintptr_t length;
@@ -748,7 +748,7 @@ void cpu_physical_memory_reset_dirty(ram_addr_t start, ram_addr_t end,
length = end - start;
if (length == 0)
return;
- cpu_physical_memory_mask_dirty_range(start, length, dirty_flags);
+ cpu_physical_memory_mask_dirty_range(start, length, client);
if (tcg_enabled()) {
tlb_reset_dirty_range_all(start, end, length);
@@ -1485,7 +1485,7 @@ found:
static void notdirty_mem_write(void *opaque, hwaddr ram_addr,
uint64_t val, unsigned size)
{
- if (!cpu_physical_memory_get_dirty_flag(ram_addr, CODE_DIRTY_FLAG)) {
+ if (!cpu_physical_memory_get_dirty_flag(ram_addr, DIRTY_MEMORY_CODE)) {
tb_invalidate_phys_page_fast(ram_addr, size);
}
switch (size) {
@@ -1501,8 +1501,8 @@ static void notdirty_mem_write(void *opaque, hwaddr ram_addr,
default:
abort();
}
- cpu_physical_memory_set_dirty_flag(ram_addr, MIGRATION_DIRTY_FLAG);
- cpu_physical_memory_set_dirty_flag(ram_addr, VGA_DIRTY_FLAG);
+ cpu_physical_memory_set_dirty_flag(ram_addr, DIRTY_MEMORY_MIGRATION);
+ cpu_physical_memory_set_dirty_flag(ram_addr, DIRTY_MEMORY_VGA);
/* we remove the notdirty callback only if the code has been
flushed */
if (cpu_physical_memory_is_dirty(ram_addr)) {
@@ -1912,8 +1912,8 @@ static void invalidate_and_set_dirty(hwaddr addr,
/* invalidate code */
tb_invalidate_phys_page_range(addr, addr + length, 0);
/* set dirty bit */
- cpu_physical_memory_set_dirty_flag(addr, VGA_DIRTY_FLAG);
- cpu_physical_memory_set_dirty_flag(addr, MIGRATION_DIRTY_FLAG);
+ cpu_physical_memory_set_dirty_flag(addr, DIRTY_MEMORY_VGA);
+ cpu_physical_memory_set_dirty_flag(addr, DIRTY_MEMORY_MIGRATION);
}
xen_modified_memory(addr, length);
}
@@ -2528,8 +2528,9 @@ void stl_phys_notdirty(hwaddr addr, uint32_t val)
/* invalidate code */
tb_invalidate_phys_page_range(addr1, addr1 + 4, 0);
/* set dirty bit */
- cpu_physical_memory_set_dirty_flag(addr1, MIGRATION_DIRTY_FLAG);
- cpu_physical_memory_set_dirty_flag(addr1, VGA_DIRTY_FLAG);
+ cpu_physical_memory_set_dirty_flag(addr1,
+ DIRTY_MEMORY_MIGRATION);
+ cpu_physical_memory_set_dirty_flag(addr1, DIRTY_MEMORY_VGA);
}
}
}