KVM: PPC: Kill kvmppc_ops::mmu_destroy() and kvmppc_mmu_destroy()
authorGreg Kurz <groug@kaod.org>
Wed, 18 Mar 2020 17:43:42 +0000 (18:43 +0100)
committerPaul Mackerras <paulus@ozlabs.org>
Thu, 19 Mar 2020 05:43:07 +0000 (16:43 +1100)
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>
arch/powerpc/include/asm/kvm_ppc.h
arch/powerpc/kvm/book3s.c
arch/powerpc/kvm/book3s_hv.c
arch/powerpc/kvm/book3s_pr.c
arch/powerpc/kvm/booke.c
arch/powerpc/kvm/booke.h
arch/powerpc/kvm/e500.c
arch/powerpc/kvm/e500_mmu.c
arch/powerpc/kvm/e500mc.c

index 0b80e34..e716862 100644 (file)
@@ -107,7 +107,6 @@ extern void kvmppc_mmu_map(struct kvm_vcpu *vcpu, u64 gvaddr, gpa_t gpaddr,
                            unsigned int gtlb_idx);
 extern void kvmppc_mmu_priv_switch(struct kvm_vcpu *vcpu, int usermode);
 extern void kvmppc_mmu_switch_pid(struct kvm_vcpu *vcpu, u32 pid);
-extern void kvmppc_mmu_destroy(struct kvm_vcpu *vcpu);
 extern int kvmppc_mmu_dtlb_index(struct kvm_vcpu *vcpu, gva_t eaddr);
 extern int kvmppc_mmu_itlb_index(struct kvm_vcpu *vcpu, gva_t eaddr);
 extern gpa_t kvmppc_mmu_xlate(struct kvm_vcpu *vcpu, unsigned int gtlb_index,
@@ -288,7 +287,6 @@ struct kvmppc_ops {
        int (*age_hva)(struct kvm *kvm, unsigned long start, unsigned long end);
        int (*test_age_hva)(struct kvm *kvm, unsigned long hva);
        void (*set_spte_hva)(struct kvm *kvm, unsigned long hva, pte_t pte);
-       void (*mmu_destroy)(struct kvm_vcpu *vcpu);
        void (*free_memslot)(struct kvm_memory_slot *slot);
        int (*init_vm)(struct kvm *kvm);
        void (*destroy_vm)(struct kvm *kvm);
index 0adaf47..5690a1f 100644 (file)
@@ -858,11 +858,6 @@ int kvm_set_spte_hva(struct kvm *kvm, unsigned long hva, pte_t pte)
        return 0;
 }
 
-void kvmppc_mmu_destroy(struct kvm_vcpu *vcpu)
-{
-       vcpu->kvm->arch.kvm_ops->mmu_destroy(vcpu);
-}
-
 int kvmppc_core_init_vm(struct kvm *kvm)
 {
 
index 18675bd..85e75b1 100644 (file)
@@ -4555,11 +4555,6 @@ void kvmppc_update_lpcr(struct kvm *kvm, unsigned long lpcr, unsigned long mask)
        }
 }
 
-static void kvmppc_mmu_destroy_hv(struct kvm_vcpu *vcpu)
-{
-       return;
-}
-
 void kvmppc_setup_partition_table(struct kvm *kvm)
 {
        unsigned long dw0, dw1;
@@ -5523,7 +5518,6 @@ static struct kvmppc_ops kvm_ops_hv = {
        .age_hva  = kvm_age_hva_hv,
        .test_age_hva = kvm_test_age_hva_hv,
        .set_spte_hva = kvm_set_spte_hva_hv,
-       .mmu_destroy  = kvmppc_mmu_destroy_hv,
        .free_memslot = kvmppc_core_free_memslot_hv,
        .init_vm =  kvmppc_core_init_vm_hv,
        .destroy_vm = kvmppc_core_destroy_vm_hv,
index ec042e0..a0f6813 100644 (file)
@@ -2087,7 +2087,6 @@ static struct kvmppc_ops kvm_ops_pr = {
        .age_hva  = kvm_age_hva_pr,
        .test_age_hva = kvm_test_age_hva_pr,
        .set_spte_hva = kvm_set_spte_hva_pr,
-       .mmu_destroy  = kvmppc_mmu_destroy_pr,
        .free_memslot = kvmppc_core_free_memslot_pr,
        .init_vm = kvmppc_core_init_vm_pr,
        .destroy_vm = kvmppc_core_destroy_vm_pr,
index 10e2d76..6c18ea8 100644 (file)
@@ -2073,11 +2073,6 @@ void kvmppc_booke_vcpu_put(struct kvm_vcpu *vcpu)
        kvmppc_clear_dbsr();
 }
 
-void kvmppc_mmu_destroy(struct kvm_vcpu *vcpu)
-{
-       vcpu->kvm->arch.kvm_ops->mmu_destroy(vcpu);
-}
-
 int kvmppc_core_init_vm(struct kvm *kvm)
 {
        return kvm->arch.kvm_ops->init_vm(kvm);
index 9d3169f..65b4d33 100644 (file)
@@ -94,7 +94,6 @@ enum int_class {
 
 void kvmppc_set_pending_interrupt(struct kvm_vcpu *vcpu, enum int_class type);
 
-extern void kvmppc_mmu_destroy_e500(struct kvm_vcpu *vcpu);
 extern int kvmppc_core_emulate_op_e500(struct kvm_run *run,
                                       struct kvm_vcpu *vcpu,
                                       unsigned int inst, int *advance);
@@ -102,7 +101,6 @@ extern int kvmppc_core_emulate_mtspr_e500(struct kvm_vcpu *vcpu, int sprn,
                                          ulong spr_val);
 extern int kvmppc_core_emulate_mfspr_e500(struct kvm_vcpu *vcpu, int sprn,
                                          ulong *spr_val);
-extern void kvmppc_mmu_destroy_e500(struct kvm_vcpu *vcpu);
 extern int kvmppc_core_emulate_op_e500(struct kvm_run *run,
                                       struct kvm_vcpu *vcpu,
                                       unsigned int inst, int *advance);
index f2b4fea..7e8b690 100644 (file)
@@ -490,7 +490,6 @@ static struct kvmppc_ops kvm_ops_e500 = {
        .vcpu_put    = kvmppc_core_vcpu_put_e500,
        .vcpu_create = kvmppc_core_vcpu_create_e500,
        .vcpu_free   = kvmppc_core_vcpu_free_e500,
-       .mmu_destroy  = kvmppc_mmu_destroy_e500,
        .init_vm = kvmppc_core_init_vm_e500,
        .destroy_vm = kvmppc_core_destroy_vm_e500,
        .emulate_op = kvmppc_core_emulate_op_e500,
index 2d910b8..e131fbe 100644 (file)
@@ -533,10 +533,6 @@ gpa_t kvmppc_mmu_xlate(struct kvm_vcpu *vcpu, unsigned int index,
        return get_tlb_raddr(gtlbe) | (eaddr & pgmask);
 }
 
-void kvmppc_mmu_destroy_e500(struct kvm_vcpu *vcpu)
-{
-}
-
 /*****************************************/
 
 static void free_gtlb(struct kvmppc_vcpu_e500 *vcpu_e500)
index e6b06cb..1c189b5 100644 (file)
@@ -376,7 +376,6 @@ static struct kvmppc_ops kvm_ops_e500mc = {
        .vcpu_put    = kvmppc_core_vcpu_put_e500mc,
        .vcpu_create = kvmppc_core_vcpu_create_e500mc,
        .vcpu_free   = kvmppc_core_vcpu_free_e500mc,
-       .mmu_destroy  = kvmppc_mmu_destroy_e500,
        .init_vm = kvmppc_core_init_vm_e500mc,
        .destroy_vm = kvmppc_core_destroy_vm_e500mc,
        .emulate_op = kvmppc_core_emulate_op_e500,