aboutsummaryrefslogtreecommitdiff
path: root/memory.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 /memory.c
parent75218e7f2b7f052c6f44489afaf45b3ea4369f45 (diff)
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 'memory.c')
-rw-r--r--memory.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/memory.c b/memory.c
index fb52e1cdb2..a490cbd667 100644
--- a/memory.c
+++ b/memory.c
@@ -1174,8 +1174,7 @@ bool memory_region_get_dirty(MemoryRegion *mr, hwaddr addr,
hwaddr size, unsigned client)
{
assert(mr->terminates);
- return cpu_physical_memory_get_dirty(mr->ram_addr + addr, size,
- 1 << client);
+ return cpu_physical_memory_get_dirty(mr->ram_addr + addr, size, client);
}
void memory_region_set_dirty(MemoryRegion *mr, hwaddr addr,
@@ -1190,12 +1189,11 @@ bool memory_region_test_and_clear_dirty(MemoryRegion *mr, hwaddr addr,
{
bool ret;
assert(mr->terminates);
- ret = cpu_physical_memory_get_dirty(mr->ram_addr + addr, size,
- 1 << client);
+ ret = cpu_physical_memory_get_dirty(mr->ram_addr + addr, size, client);
if (ret) {
cpu_physical_memory_reset_dirty(mr->ram_addr + addr,
mr->ram_addr + addr + size,
- 1 << client);
+ client);
}
return ret;
}
@@ -1243,7 +1241,7 @@ void memory_region_reset_dirty(MemoryRegion *mr, hwaddr addr,
assert(mr->terminates);
cpu_physical_memory_reset_dirty(mr->ram_addr + addr,
mr->ram_addr + addr + size,
- 1 << client);
+ client);
}
void *memory_region_get_ram_ptr(MemoryRegion *mr)