diff options
author | Marc Zyngier <maz@kernel.org> | 2021-07-26 16:35:51 +0100 |
---|---|---|
committer | Marc Zyngier <maz@kernel.org> | 2021-08-02 14:05:58 +0100 |
commit | 0fe49630101b3ce23bd21a2788440ac719ec868a (patch) | |
tree | 824906e39c67bc85fd5dc3f3edb3530bf56e0e85 | |
parent | 205d76ff0684a0b4fe3ff3a283d143a47439d191 (diff) |
KVM: arm64: Use get_page() instead of kvm_get_pfn()
When mapping a THP, we are guaranteed that the page isn't reserved,
and we can safely avoid the kvm_is_reserved_pfn() call.
Replace kvm_get_pfn() with get_page(pfn_to_page()).
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20210726153552.1535838-6-maz@kernel.org
-rw-r--r-- | arch/arm64/kvm/mmu.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm64/kvm/mmu.c b/arch/arm64/kvm/mmu.c index 116a2910a4a4..6e002d30a478 100644 --- a/arch/arm64/kvm/mmu.c +++ b/arch/arm64/kvm/mmu.c @@ -840,7 +840,7 @@ transparent_hugepage_adjust(struct kvm *kvm, struct kvm_memory_slot *memslot, *ipap &= PMD_MASK; kvm_release_pfn_clean(pfn); pfn &= ~(PTRS_PER_PMD - 1); - kvm_get_pfn(pfn); + get_page(pfn_to_page(pfn)); *pfnp = pfn; return PMD_SIZE; |