Skip to content

Commit 5a27984

Browse files
sean-jcbonzini
authored andcommitted
KVM: x86: Clean up documentation for KVM_X86_QUIRK_SLOT_ZAP_ALL
Massage the documentation for KVM_X86_QUIRK_SLOT_ZAP_ALL to call out that it applies to moved memslots as well as deleted memslots, to avoid KVM's "fast zap" terminology (which has no meaning for userspace), and to reword the documented targeted zap behavior to specifically say that KVM _may_ zap a subset of all SPTEs. As evidenced by the fix to zap non-leafs SPTEs with gPTEs, formally documenting KVM's exact internal behavior is risky and unnecessary. Signed-off-by: Sean Christopherson <[email protected]> Message-ID: <[email protected]> Signed-off-by: Paolo Bonzini <[email protected]>
1 parent 28cf497 commit 5a27984

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

Documentation/virt/kvm/api.rst

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8098,13 +8098,15 @@ KVM_X86_QUIRK_MWAIT_NEVER_UD_FAULTS By default, KVM emulates MONITOR/MWAIT (if
80988098
KVM_X86_QUIRK_MISC_ENABLE_NO_MWAIT is
80998099
disabled.
81008100

8101-
KVM_X86_QUIRK_SLOT_ZAP_ALL By default, KVM invalidates all SPTEs in
8102-
fast way for memslot deletion when VM type
8103-
is KVM_X86_DEFAULT_VM.
8104-
When this quirk is disabled or when VM type
8105-
is other than KVM_X86_DEFAULT_VM, KVM zaps
8106-
only leaf SPTEs that are within the range of
8107-
the memslot being deleted.
8101+
KVM_X86_QUIRK_SLOT_ZAP_ALL By default, for KVM_X86_DEFAULT_VM VMs, KVM
8102+
invalidates all SPTEs in all memslots and
8103+
address spaces when a memslot is deleted or
8104+
moved. When this quirk is disabled (or the
8105+
VM type isn't KVM_X86_DEFAULT_VM), KVM only
8106+
ensures the backing memory of the deleted
8107+
or moved memslot isn't reachable, i.e KVM
8108+
_may_ invalidate only SPTEs related to the
8109+
memslot.
81088110
=================================== ============================================
81098111

81108112
7.32 KVM_CAP_MAX_VCPU_ID

0 commit comments

Comments
 (0)