Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

KVM: PPC: Kill kvmppc_ops::mmu_destroy() and kvmppc_mmu_destroy()

These are only used by HV KVM and BookE, and in both cases they are
nops.

Signed-off-by: Greg Kurz <groug@kaod.org>
Signed-off-by: Paul Mackerras <paulus@ozlabs.org>

authored by

Greg Kurz and committed by
Paul Mackerras
6fef0c6b 3f1268dd

-27
-2
arch/powerpc/include/asm/kvm_ppc.h
··· 107 107 unsigned int gtlb_idx); 108 108 extern void kvmppc_mmu_priv_switch(struct kvm_vcpu *vcpu, int usermode); 109 109 extern void kvmppc_mmu_switch_pid(struct kvm_vcpu *vcpu, u32 pid); 110 - extern void kvmppc_mmu_destroy(struct kvm_vcpu *vcpu); 111 110 extern int kvmppc_mmu_dtlb_index(struct kvm_vcpu *vcpu, gva_t eaddr); 112 111 extern int kvmppc_mmu_itlb_index(struct kvm_vcpu *vcpu, gva_t eaddr); 113 112 extern gpa_t kvmppc_mmu_xlate(struct kvm_vcpu *vcpu, unsigned int gtlb_index, ··· 287 288 int (*age_hva)(struct kvm *kvm, unsigned long start, unsigned long end); 288 289 int (*test_age_hva)(struct kvm *kvm, unsigned long hva); 289 290 void (*set_spte_hva)(struct kvm *kvm, unsigned long hva, pte_t pte); 290 - void (*mmu_destroy)(struct kvm_vcpu *vcpu); 291 291 void (*free_memslot)(struct kvm_memory_slot *slot); 292 292 int (*init_vm)(struct kvm *kvm); 293 293 void (*destroy_vm)(struct kvm *kvm);
-5
arch/powerpc/kvm/book3s.c
··· 858 858 return 0; 859 859 } 860 860 861 - void kvmppc_mmu_destroy(struct kvm_vcpu *vcpu) 862 - { 863 - vcpu->kvm->arch.kvm_ops->mmu_destroy(vcpu); 864 - } 865 - 866 861 int kvmppc_core_init_vm(struct kvm *kvm) 867 862 { 868 863
-6
arch/powerpc/kvm/book3s_hv.c
··· 4555 4555 } 4556 4556 } 4557 4557 4558 - static void kvmppc_mmu_destroy_hv(struct kvm_vcpu *vcpu) 4559 - { 4560 - return; 4561 - } 4562 - 4563 4558 void kvmppc_setup_partition_table(struct kvm *kvm) 4564 4559 { 4565 4560 unsigned long dw0, dw1; ··· 5518 5523 .age_hva = kvm_age_hva_hv, 5519 5524 .test_age_hva = kvm_test_age_hva_hv, 5520 5525 .set_spte_hva = kvm_set_spte_hva_hv, 5521 - .mmu_destroy = kvmppc_mmu_destroy_hv, 5522 5526 .free_memslot = kvmppc_core_free_memslot_hv, 5523 5527 .init_vm = kvmppc_core_init_vm_hv, 5524 5528 .destroy_vm = kvmppc_core_destroy_vm_hv,
-1
arch/powerpc/kvm/book3s_pr.c
··· 2087 2087 .age_hva = kvm_age_hva_pr, 2088 2088 .test_age_hva = kvm_test_age_hva_pr, 2089 2089 .set_spte_hva = kvm_set_spte_hva_pr, 2090 - .mmu_destroy = kvmppc_mmu_destroy_pr, 2091 2090 .free_memslot = kvmppc_core_free_memslot_pr, 2092 2091 .init_vm = kvmppc_core_init_vm_pr, 2093 2092 .destroy_vm = kvmppc_core_destroy_vm_pr,
-5
arch/powerpc/kvm/booke.c
··· 2073 2073 kvmppc_clear_dbsr(); 2074 2074 } 2075 2075 2076 - void kvmppc_mmu_destroy(struct kvm_vcpu *vcpu) 2077 - { 2078 - vcpu->kvm->arch.kvm_ops->mmu_destroy(vcpu); 2079 - } 2080 - 2081 2076 int kvmppc_core_init_vm(struct kvm *kvm) 2082 2077 { 2083 2078 return kvm->arch.kvm_ops->init_vm(kvm);
-2
arch/powerpc/kvm/booke.h
··· 94 94 95 95 void kvmppc_set_pending_interrupt(struct kvm_vcpu *vcpu, enum int_class type); 96 96 97 - extern void kvmppc_mmu_destroy_e500(struct kvm_vcpu *vcpu); 98 97 extern int kvmppc_core_emulate_op_e500(struct kvm_run *run, 99 98 struct kvm_vcpu *vcpu, 100 99 unsigned int inst, int *advance); ··· 101 102 ulong spr_val); 102 103 extern int kvmppc_core_emulate_mfspr_e500(struct kvm_vcpu *vcpu, int sprn, 103 104 ulong *spr_val); 104 - extern void kvmppc_mmu_destroy_e500(struct kvm_vcpu *vcpu); 105 105 extern int kvmppc_core_emulate_op_e500(struct kvm_run *run, 106 106 struct kvm_vcpu *vcpu, 107 107 unsigned int inst, int *advance);
-1
arch/powerpc/kvm/e500.c
··· 490 490 .vcpu_put = kvmppc_core_vcpu_put_e500, 491 491 .vcpu_create = kvmppc_core_vcpu_create_e500, 492 492 .vcpu_free = kvmppc_core_vcpu_free_e500, 493 - .mmu_destroy = kvmppc_mmu_destroy_e500, 494 493 .init_vm = kvmppc_core_init_vm_e500, 495 494 .destroy_vm = kvmppc_core_destroy_vm_e500, 496 495 .emulate_op = kvmppc_core_emulate_op_e500,
-4
arch/powerpc/kvm/e500_mmu.c
··· 533 533 return get_tlb_raddr(gtlbe) | (eaddr & pgmask); 534 534 } 535 535 536 - void kvmppc_mmu_destroy_e500(struct kvm_vcpu *vcpu) 537 - { 538 - } 539 - 540 536 /*****************************************/ 541 537 542 538 static void free_gtlb(struct kvmppc_vcpu_e500 *vcpu_e500)
-1
arch/powerpc/kvm/e500mc.c
··· 376 376 .vcpu_put = kvmppc_core_vcpu_put_e500mc, 377 377 .vcpu_create = kvmppc_core_vcpu_create_e500mc, 378 378 .vcpu_free = kvmppc_core_vcpu_free_e500mc, 379 - .mmu_destroy = kvmppc_mmu_destroy_e500, 380 379 .init_vm = kvmppc_core_init_vm_e500mc, 381 380 .destroy_vm = kvmppc_core_destroy_vm_e500mc, 382 381 .emulate_op = kvmppc_core_emulate_op_e500,