summary refs log tree commit diff stats
path: root/util/qemu-config.c
diff options
context:
space:
mode:
authorPeter Xu <peterx@redhat.com>2021-05-06 12:05:44 -0400
committerPaolo Bonzini <pbonzini@redhat.com>2021-05-26 14:49:45 +0200
commit2c20b27eed517f9624b008222bb486f1df0ae079 (patch)
tree39f7feb332201f9642c1c7739958bb2075bb437f /util/qemu-config.c
parente65e5f50db0a54a69cc62c2118d010244bf133ac (diff)
downloadfocaccia-qemu-2c20b27eed517f9624b008222bb486f1df0ae079.tar.gz
focaccia-qemu-2c20b27eed517f9624b008222bb486f1df0ae079.zip
KVM: Provide helper to sync dirty bitmap from slot to ramblock
kvm_physical_sync_dirty_bitmap() calculates the ramblock offset in an
awkward way from the MemoryRegionSection that passed in from the
caller.  The truth is for each KVMSlot the ramblock offset never
change for the lifecycle.  Cache the ramblock offset for each KVMSlot
into the structure when the KVMSlot is created.

With that, we can further simplify kvm_physical_sync_dirty_bitmap()
with a helper to sync KVMSlot dirty bitmap to the ramblock dirty
bitmap of a specific KVMSlot.

Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Peter Xu <peterx@redhat.com>
Message-Id: <20210506160549.130416-6-peterx@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'util/qemu-config.c')
0 files changed, 0 insertions, 0 deletions