diff options
author | Peter Xu <peterx@redhat.com> | 2020-03-05 18:57:08 +0300 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2020-03-16 19:58:56 +0300 |
commit | 3ac40c404c60f20dd07920810b1195125f193e1e (patch) | |
tree | 22544299f4b5cfd643a838641be49ab2d774f134 /Documentation/virt/kvm/locking.rst | |
parent | 78f2145c4d937a4770f365d6f5dc6eb825658d10 (diff) | |
download | linux-3ac40c404c60f20dd07920810b1195125f193e1e.tar.xz |
KVM: Documentation: Update fast page fault for indirect sp
Clarify locking.rst to mention early that we're not enabling fast page
fault for indirect sps. The previous wording is confusing, in that it
seems the proposed solution has been already implemented but it has not.
Signed-off-by: Peter Xu <peterx@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'Documentation/virt/kvm/locking.rst')
-rw-r--r-- | Documentation/virt/kvm/locking.rst | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/Documentation/virt/kvm/locking.rst b/Documentation/virt/kvm/locking.rst index c02291beac3f..b21a34c34a21 100644 --- a/Documentation/virt/kvm/locking.rst +++ b/Documentation/virt/kvm/locking.rst @@ -96,19 +96,18 @@ will happen: We dirty-log for gfn1, that means gfn2 is lost in dirty-bitmap. For direct sp, we can easily avoid it since the spte of direct sp is fixed -to gfn. For indirect sp, before we do cmpxchg, we call gfn_to_pfn_atomic() -to pin gfn to pfn, because after gfn_to_pfn_atomic(): +to gfn. For indirect sp, we disabled fast page fault for simplicity. + +A solution for indirect sp could be to pin the gfn, for example via +kvm_vcpu_gfn_to_pfn_atomic, before the cmpxchg. After the pinning: - We have held the refcount of pfn that means the pfn can not be freed and be reused for another gfn. -- The pfn is writable that means it can not be shared between different gfns +- The pfn is writable and therefore it cannot be shared between different gfns by KSM. Then, we can ensure the dirty bitmaps is correctly set for a gfn. -Currently, to simplify the whole things, we disable fast page fault for -indirect shadow page. - 2) Dirty bit tracking In the origin code, the spte can be fast updated (non-atomically) if the |