Commit decf6333 authored by Xiao Guangrong's avatar Xiao Guangrong Committed by Paolo Bonzini

KVM: MMU: fix comment in kvm_mmu_zap_collapsible_spte

Soft mmu uses direct shadow page to fill guest large mapping with small
pages if huge mapping is disallowed on host. So zapping direct shadow
page works well both for soft mmu and hard mmu, it's just less widely
applicable.

Fix the comment to reflect this.
Signed-off-by: default avatarXiao Guangrong <guangrong.xiao@linux.intel.com>
Message-Id: <552C91BA.1010703@linux.intel.com>
[Fix comment wording further. - Paolo]
Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
parent 13000523
...@@ -4481,9 +4481,11 @@ static bool kvm_mmu_zap_collapsible_spte(struct kvm *kvm, ...@@ -4481,9 +4481,11 @@ static bool kvm_mmu_zap_collapsible_spte(struct kvm *kvm,
pfn = spte_to_pfn(*sptep); pfn = spte_to_pfn(*sptep);
/* /*
* Only EPT supported for now; otherwise, one would need to * We cannot do huge page mapping for indirect shadow pages,
* find out efficiently whether the guest page tables are * which are found on the last rmap (level = 1) when not using
* also using huge pages. * tdp; such shadow pages are synced with the page table in
* the guest, and the guest page table is using 4K page size
* mapping if the indirect sp has level = 1.
*/ */
if (sp->role.direct && if (sp->role.direct &&
!kvm_is_reserved_pfn(pfn) && !kvm_is_reserved_pfn(pfn) &&
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment