KVM: Dirty ring support
commitb4420f198dd8eab53cf6062c1871d0e5f5601e86
authorPeter Xu <peterx@redhat.com>
Mon, 17 May 2021 08:23:50 +0000 (17 04:23 -0400)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 26 May 2021 12:49:46 +0000 (26 14:49 +0200)
treeff96a5909b465cc9edec20e9ac27e14d4ab9d3e6
parenta81a592698c5cf3d84486b00c84b7979dfa0a3da
KVM: Dirty ring support

KVM dirty ring is a new interface to pass over dirty bits from kernel to the
userspace.  Instead of using a bitmap for each memory region, the dirty ring
contains an array of dirtied GPAs to fetch (in the form of offset in slots).
For each vcpu there will be one dirty ring that binds to it.

kvm_dirty_ring_reap() is the major function to collect dirty rings.  It can be
called either by a standalone reaper thread that runs in the background,
collecting dirty pages for the whole VM.  It can also be called directly by any
thread that has BQL taken.

Signed-off-by: Peter Xu <peterx@redhat.com>
Message-Id: <20210506160549.130416-11-peterx@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
accel/kvm/kvm-all.c
accel/kvm/trace-events
include/hw/core/cpu.h