aboutsummaryrefslogtreecommitdiff
path: root/accel
diff options
context:
space:
mode:
authorPeter Xu <peterx@redhat.com>2021-05-06 12:05:46 -0400
committerPaolo Bonzini <pbonzini@redhat.com>2021-05-26 14:49:45 +0200
commit563d32ba9bb92df6170a53826a174e59ae73412f (patch)
treea3f18056a423091f40179d118bdf28de6398c8b9 /accel
parent29b7e8be76a142f6715e20bc13dc61ded1b8d2a7 (diff)
downloadqemu-563d32ba9bb92df6170a53826a174e59ae73412f.zip
qemu-563d32ba9bb92df6170a53826a174e59ae73412f.tar.gz
qemu-563d32ba9bb92df6170a53826a174e59ae73412f.tar.bz2
KVM: Cache kvm slot dirty bitmap size
Cache it too because we'll reference it more frequently in the future. Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Signed-off-by: Peter Xu <peterx@redhat.com> Message-Id: <20210506160549.130416-8-peterx@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'accel')
-rw-r--r--accel/kvm/kvm-all.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/accel/kvm/kvm-all.c b/accel/kvm/kvm-all.c
index 0ba6d48..df9fbf5 100644
--- a/accel/kvm/kvm-all.c
+++ b/accel/kvm/kvm-all.c
@@ -610,6 +610,7 @@ static void kvm_slot_init_dirty_bitmap(KVMSlot *mem)
hwaddr bitmap_size = ALIGN(mem->memory_size / qemu_real_host_page_size,
/*HOST_LONG_BITS*/ 64) / 8;
mem->dirty_bmap = g_malloc0(bitmap_size);
+ mem->dirty_bmap_size = bitmap_size;
}
/*