Messages in this thread Patch in this message |  | | From | Wanpeng Li <> | Subject | [PATCH 1/2] kvm: mmu: fix catch transparent huge page backing | Date | Tue, 14 Apr 2015 13:51:29 +0800 |
| |
PageTransCompound() can't guarantee the page is a transparent huge page since it returns true for both transparent huge and hugetlbfs pages.
This patch fixes it by checking the page is also !hugetlbfs page.
Signed-off-by: Wanpeng Li <wanpeng.li@linux.intel.com> --- arch/x86/kvm/mmu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c index 146f295..2a0d77e 100644 --- a/arch/x86/kvm/mmu.c +++ b/arch/x86/kvm/mmu.c @@ -4487,7 +4487,8 @@ static bool kvm_mmu_zap_collapsible_spte(struct kvm *kvm, */ if (sp->role.direct && !kvm_is_reserved_pfn(pfn) && - PageTransCompound(pfn_to_page(pfn))) { + !PageHuge(pfn_to_page(pfn)) && + PageTransHuge(pfn_to_page(pfn))) { drop_spte(kvm, sptep); sptep = rmap_get_first(*rmapp, &iter); need_tlb_flush = 1; -- 1.9.1
|  |