Skip to content

Commit 9af3e08

Browse files
willdeaconMarc Zyngier
authored andcommitted
KVM: arm64: Remove kvm_mmu_free_memory_caches()
kvm_mmu_free_memory_caches() is only called by kvm_arch_vcpu_destroy(), so inline the implementation and get rid of the extra function. Signed-off-by: Will Deacon <will@kernel.org> Signed-off-by: Marc Zyngier <maz@kernel.org> Reviewed-by: Gavin Shan <gshan@redhat.com> Cc: Marc Zyngier <maz@kernel.org> Cc: Quentin Perret <qperret@google.com> Link: https://lore.kernel.org/r/20200911132529.19844-2-will@kernel.org
1 parent f4d51df commit 9af3e08

3 files changed

Lines changed: 1 addition & 8 deletions

File tree

‎arch/arm64/include/asm/kvm_mmu.h‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,8 +141,6 @@ int kvm_phys_addr_ioremap(struct kvm *kvm, phys_addr_t guest_ipa,
141141

142142
int kvm_handle_guest_abort(struct kvm_vcpu *vcpu);
143143

144-
void kvm_mmu_free_memory_caches(struct kvm_vcpu *vcpu);
145-
146144
phys_addr_t kvm_mmu_get_httbr(void);
147145
phys_addr_t kvm_get_idmap_vector(void);
148146
int kvm_mmu_init(void);

‎arch/arm64/kvm/arm.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ void kvm_arch_vcpu_destroy(struct kvm_vcpu *vcpu)
283283
if (vcpu->arch.has_run_once && unlikely(!irqchip_in_kernel(vcpu->kvm)))
284284
static_branch_dec(&userspace_irqchip_in_use);
285285

286-
kvm_mmu_free_memory_caches(vcpu);
286+
kvm_mmu_free_memory_cache(&vcpu->arch.mmu_page_cache);
287287
kvm_timer_vcpu_terminate(vcpu);
288288
kvm_pmu_vcpu_destroy(vcpu);
289289

‎arch/arm64/kvm/mmu.c‎

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2324,11 +2324,6 @@ int kvm_test_age_hva(struct kvm *kvm, unsigned long hva)
23242324
kvm_test_age_hva_handler, NULL);
23252325
}
23262326

2327-
void kvm_mmu_free_memory_caches(struct kvm_vcpu *vcpu)
2328-
{
2329-
kvm_mmu_free_memory_cache(&vcpu->arch.mmu_page_cache);
2330-
}
2331-
23322327
phys_addr_t kvm_mmu_get_httbr(void)
23332328
{
23342329
if (__kvm_cpu_uses_extended_idmap())

0 commit comments

Comments
 (0)