summaryrefslogtreecommitdiffstats
path: root/memory.c
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2015-03-23 11:56:01 +0100
committerPaolo Bonzini <pbonzini@redhat.com>2015-06-05 17:09:59 +0200
commit58d2707e8713ef17b89b8b4c9ce586c76655a385 (patch)
treee0ce5162d9d34b8b97afe99666be13ee265c6620 /memory.c
parentfc377bcf617a48233a99a9fe0a26247c38b5cb76 (diff)
downloadhqemu-58d2707e8713ef17b89b8b4c9ce586c76655a385.zip
hqemu-58d2707e8713ef17b89b8b4c9ce586c76655a385.tar.gz
exec: pass client mask to cpu_physical_memory_set_dirty_range
This cuts in half the cost of bitmap operations (which will become more expensive when made atomic) during migration on non-VRAM regions. Reviewed-by: Fam Zheng <famz@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'memory.c')
-rw-r--r--memory.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/memory.c b/memory.c
index b7ca987..418cac7 100644
--- a/memory.c
+++ b/memory.c
@@ -1461,7 +1461,8 @@ void memory_region_set_dirty(MemoryRegion *mr, hwaddr addr,
hwaddr size)
{
assert(mr->terminates);
- cpu_physical_memory_set_dirty_range(mr->ram_addr + addr, size);
+ cpu_physical_memory_set_dirty_range(mr->ram_addr + addr, size,
+ memory_region_get_dirty_log_mask(mr));
}
bool memory_region_test_and_clear_dirty(MemoryRegion *mr, hwaddr addr,
OpenPOWER on IntegriCloud