diff options
author | Peter Xu | 2021-05-06 18:05:46 +0200 |
---|---|---|
committer | Paolo Bonzini | 2021-05-26 14:49:45 +0200 |
commit | 563d32ba9bb92df6170a53826a174e59ae73412f (patch) | |
tree | a3f18056a423091f40179d118bdf28de6398c8b9 /accel/kvm/kvm-all.c | |
parent | KVM: Simplify dirty log sync in kvm_set_phys_mem (diff) | |
download | qemu-563d32ba9bb92df6170a53826a174e59ae73412f.tar.gz qemu-563d32ba9bb92df6170a53826a174e59ae73412f.tar.xz qemu-563d32ba9bb92df6170a53826a174e59ae73412f.zip |
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/kvm/kvm-all.c')
-rw-r--r-- | accel/kvm/kvm-all.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/accel/kvm/kvm-all.c b/accel/kvm/kvm-all.c index 0ba6d48120..df9fbf59a6 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; } /* |