]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: Make dirty ring exclusive to dirty bitmap log
authorPeter Xu <peterx@redhat.com>
Thu, 1 Oct 2020 01:22:24 +0000 (21:22 -0400)
committerPaolo Bonzini <pbonzini@redhat.com>
Sun, 15 Nov 2020 14:49:16 +0000 (09:49 -0500)
commit8f73d46e7236de2981d6457433943aae8ee27cbf
treee7b47dbca1724c1598809f02a94a8cfb8f37502f
parentf3456f6783ecd349687114cd0b47b2bc6db8d464
KVM: Make dirty ring exclusive to dirty bitmap log

There's no good reason to use both the dirty bitmap logging and the
new dirty ring buffer to track dirty bits.  We should be able to even
support both of them at the same time, but it could complicate things
which could actually help little.  Let's simply make it the rule
before we enable dirty ring on any arch, that we don't allow these two
interfaces to be used together.

The big world switch would be KVM_CAP_DIRTY_LOG_RING capability
enablement.  That's where we'll switch from the default dirty logging
way to the dirty ring way.  As long as kvm->dirty_ring_size is setup
correctly, we'll once and for all switch to the dirty ring buffer mode
for the current virtual machine.

Signed-off-by: Peter Xu <peterx@redhat.com>
Message-Id: <20201001012224.5818-1-peterx@redhat.com>
[Change errno from EINVAL to ENXIO. - Paolo]
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Documentation/virt/kvm/api.rst
virt/kvm/kvm_main.c