diff options
author | Anshuman Khandual <anshuman.khandual@arm.com> | 2019-03-12 14:25:45 +0100 |
---|---|---|
committer | Will Deacon <will.deacon@arm.com> | 2019-04-09 12:21:50 +0200 |
commit | 14b94d07572619af896c6d2d83b1196c4041fe19 (patch) | |
tree | 73494f1e7c6ca1a5790a3a7ef1b5dffd913ea3a5 /virt | |
parent | arm64: mm: don't call page table ctors for init_mm (diff) | |
download | linux-14b94d07572619af896c6d2d83b1196c4041fe19.tar.xz linux-14b94d07572619af896c6d2d83b1196c4041fe19.zip |
KVM: ARM: Remove pgtable page standard functions from stage-2 page tables
ARM64 standard pgtable functions are going to use pgtable_page_[ctor|dtor]
or pgtable_pmd_page_[ctor|dtor] constructs. At present KVM guest stage-2
PUD|PMD|PTE level page tabe pages are allocated with __get_free_page()
via mmu_memory_cache_alloc() but released with standard pud|pmd_free() or
pte_free_kernel(). These will fail once they start calling into pgtable_
[pmd]_page_dtor() for pages which never originally went through respective
constructor functions. Hence convert all stage-2 page table page release
functions to call buddy directly while freeing pages.
Reviewed-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Acked-by: Yu Zhao <yuzhao@google.com>
Acked-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Diffstat (limited to 'virt')
-rw-r--r-- | virt/kvm/arm/mmu.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/virt/kvm/arm/mmu.c b/virt/kvm/arm/mmu.c index 27c958306449..ad90ea3e5558 100644 --- a/virt/kvm/arm/mmu.c +++ b/virt/kvm/arm/mmu.c @@ -189,7 +189,7 @@ static void clear_stage2_pmd_entry(struct kvm *kvm, pmd_t *pmd, phys_addr_t addr VM_BUG_ON(pmd_thp_or_huge(*pmd)); pmd_clear(pmd); kvm_tlb_flush_vmid_ipa(kvm, addr); - pte_free_kernel(NULL, pte_table); + free_page((unsigned long)pte_table); put_page(virt_to_page(pmd)); } |