kvm: Support KVM_CLEAR_DIRTY_LOG
commitff4aa11419242c835b03d274f08f797c129ed7ba
authorPeter Xu <peterx@redhat.com>
Mon, 3 Jun 2019 06:50:55 +0000 (3 14:50 +0800)
committerJuan Quintela <quintela@redhat.com>
Mon, 15 Jul 2019 13:39:03 +0000 (15 15:39 +0200)
treefc35cacb00d555ea0fbd6c4be6abfa296638783c
parent36adac493410a68b7fad2f28a6cf0bdc3d4afabf
kvm: Support KVM_CLEAR_DIRTY_LOG

Firstly detect the interface using KVM_CAP_MANUAL_DIRTY_LOG_PROTECT2
and mark it.  When failed to enable the new feature we'll fall back to
the old sync.

Provide the log_clear() hook for the memory listeners for both address
spaces of KVM (normal system memory, and SMM) and deliever the clear
message to kernel.

Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Peter Xu <peterx@redhat.com>
Message-Id: <20190603065056.25211-11-peterx@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
accel/kvm/kvm-all.c
accel/kvm/trace-events