1
0
Fork 0
alistair23-linux/Documentation/virtual/kvm
Paolo Bonzini 2a31b9db15 kvm: introduce manual dirty log reprotect
There are two problems with KVM_GET_DIRTY_LOG.  First, and less important,
it can take kvm->mmu_lock for an extended period of time.  Second, its user
can actually see many false positives in some cases.  The latter is due
to a benign race like this:

  1. KVM_GET_DIRTY_LOG returns a set of dirty pages and write protects
     them.
  2. The guest modifies the pages, causing them to be marked ditry.
  3. Userspace actually copies the pages.
  4. KVM_GET_DIRTY_LOG returns those pages as dirty again, even though
     they were not written to since (3).

This is especially a problem for large guests, where the time between
(1) and (3) can be substantial.  This patch introduces a new
capability which, when enabled, makes KVM_GET_DIRTY_LOG not
write-protect the pages it returns.  Instead, userspace has to
explicitly clear the dirty log bits just before using the content
of the page.  The new KVM_CLEAR_DIRTY_LOG ioctl can also operate on a
64-page granularity rather than requiring to sync a full memslot;
this way, the mmu_lock is taken for small amounts of time, and
only a small amount of time will pass between write protection
of pages and the sending of their content.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2018-12-14 12:34:19 +01:00
..
arm arm/arm64: KVM: Add PSCI version selection API 2018-04-20 16:32:23 +01:00
devices KVM: arm/arm64: vgic: Update documentation of the GIC devices wrt IIDR 2018-07-21 16:02:30 +01:00
amd-memory-encryption.rst KVM: Define SEV key management command id 2017-12-04 13:21:53 -06:00
api.txt kvm: introduce manual dirty log reprotect 2018-12-14 12:34:19 +01:00
cpuid.txt KVM: X86: Implement "send IPI" hypercall 2018-08-06 17:59:20 +02:00
halt-polling.txt KVM: Add halt polling documentation 2016-11-28 11:48:47 +11:00
hypercalls.txt KVM: X86: Implement "send IPI" hypercall 2018-08-06 17:59:20 +02:00
locking.txt kvm: x86: mmu: Update documentation for fast page fault mechanism 2017-01-09 14:46:12 +01:00
mmu.txt KVM: docs: mmu: KVM support exposing SLAT to guests 2018-06-01 19:18:27 +02:00
msr.txt KVM: x86: fix backward migration with async_PF 2018-02-24 01:43:48 +01:00
nested-vmx.txt KVM: docs: nVMX: Remove known limitations as they do not exist now 2018-06-01 19:18:28 +02:00
ppc-pv.txt Doc:kvm: Fix typo in Doc/virtual/kvm 2015-10-11 15:35:23 -06:00
review-checklist.txt docs: fix locations of several documents that got moved 2016-10-24 08:12:35 -02:00
s390-diag.txt KVM: s390: add documentation for diag 501 2014-04-22 13:24:51 +02:00
timekeeping.txt KVM: doc: Fix typo in doc/virtual/kvm 2013-12-31 17:24:54 -02:00
vcpu-requests.rst KVM: Add documentation for VCPU requests 2017-06-04 16:53:00 +02:00