KVM: PPC: Remove unused kvm_unmap_hva callback
authorPaul Mackerras <paulus@ozlabs.org>
Thu, 22 Feb 2018 04:16:54 +0000 (15:16 +1100)
committerPaul Mackerras <paulus@ozlabs.org>
Sun, 18 Mar 2018 23:08:29 +0000 (10:08 +1100)
Since commit fb1522e099f0 ("KVM: update to new mmu_notifier semantic
v2", 2017-08-31), the MMU notifier code in KVM no longer calls the
kvm_unmap_hva callback.  This removes the PPC implementations of
kvm_unmap_hva().

Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
arch/powerpc/include/asm/kvm_host.h
arch/powerpc/include/asm/kvm_ppc.h
arch/powerpc/kvm/book3s.c
arch/powerpc/kvm/book3s.h
arch/powerpc/kvm/book3s_64_mmu_hv.c
arch/powerpc/kvm/book3s_64_vio_hv.c
arch/powerpc/kvm/book3s_hv.c
arch/powerpc/kvm/book3s_pr.c
arch/powerpc/kvm/e500_mmu_host.c
arch/powerpc/kvm/trace_pr.h

index 1f53b562726fd9130880b1297284d9204990507b..6b69d79993812a4f508fe50212b4a35b12148712 100644 (file)
@@ -60,7 +60,6 @@
 
 #define KVM_ARCH_WANT_MMU_NOTIFIER
 
-extern int kvm_unmap_hva(struct kvm *kvm, unsigned long hva);
 extern int kvm_unmap_hva_range(struct kvm *kvm,
                               unsigned long start, unsigned long end);
 extern int kvm_age_hva(struct kvm *kvm, unsigned long start, unsigned long end);
index 7765a800ddaea08bd660ca1a00f21a228461a4a1..23cfaef9544ebefa286b0f2e5a302be16cac93df 100644 (file)
@@ -295,7 +295,6 @@ struct kvmppc_ops {
                                     const struct kvm_userspace_memory_region *mem,
                                     const struct kvm_memory_slot *old,
                                     const struct kvm_memory_slot *new);
-       int (*unmap_hva)(struct kvm *kvm, unsigned long hva);
        int (*unmap_hva_range)(struct kvm *kvm, unsigned long start,
                           unsigned long end);
        int (*age_hva)(struct kvm *kvm, unsigned long start, unsigned long end);
index 234531d1bee1e24052e23c100b3856d6c55fd590..97d4a112648fd6540948fc1564f1a77d698f65bc 100644 (file)
@@ -819,12 +819,6 @@ void kvmppc_core_commit_memory_region(struct kvm *kvm,
        kvm->arch.kvm_ops->commit_memory_region(kvm, mem, old, new);
 }
 
-int kvm_unmap_hva(struct kvm *kvm, unsigned long hva)
-{
-       return kvm->arch.kvm_ops->unmap_hva(kvm, hva);
-}
-EXPORT_SYMBOL_GPL(kvm_unmap_hva);
-
 int kvm_unmap_hva_range(struct kvm *kvm, unsigned long start, unsigned long end)
 {
        return kvm->arch.kvm_ops->unmap_hva_range(kvm, start, end);
index d2b3ec088b8cd7f02a7c5852904335c64a256599..4ad5e287b8bc68f1267cfc163a1c07793e530b4e 100644 (file)
@@ -14,7 +14,6 @@
 
 extern void kvmppc_core_flush_memslot_hv(struct kvm *kvm,
                                         struct kvm_memory_slot *memslot);
-extern int kvm_unmap_hva_hv(struct kvm *kvm, unsigned long hva);
 extern int kvm_unmap_hva_range_hv(struct kvm *kvm, unsigned long start,
                                  unsigned long end);
 extern int kvm_age_hva_hv(struct kvm *kvm, unsigned long start,
index ef243fed2f2b6b8f566dd931a501aa24e8ba8661..a670fa5fbe5056ca7e8cd20e0973fc4c56e0e07f 100644 (file)
@@ -877,15 +877,6 @@ static int kvm_unmap_rmapp(struct kvm *kvm, struct kvm_memory_slot *memslot,
        return 0;
 }
 
-int kvm_unmap_hva_hv(struct kvm *kvm, unsigned long hva)
-{
-       hva_handler_fn handler;
-
-       handler = kvm_is_radix(kvm) ? kvm_unmap_radix : kvm_unmap_rmapp;
-       kvm_handle_hva(kvm, hva, handler);
-       return 0;
-}
-
 int kvm_unmap_hva_range_hv(struct kvm *kvm, unsigned long start, unsigned long end)
 {
        hva_handler_fn handler;
index c32e9bfe75b1abbf6b27a574f91bf5b3fcaf5e66..6651f736a0b1e449e4be6384169e1ced35eff89f 100644 (file)
@@ -450,7 +450,7 @@ long kvmppc_rm_h_put_tce_indirect(struct kvm_vcpu *vcpu,
 
                /*
                 * Synchronize with the MMU notifier callbacks in
-                * book3s_64_mmu_hv.c (kvm_unmap_hva_hv etc.).
+                * book3s_64_mmu_hv.c (kvm_unmap_hva_range_hv etc.).
                 * While we have the rmap lock, code running on other CPUs
                 * cannot finish unmapping the host real page that backs
                 * this guest real page, so we are OK to access the host
index 9cb9448163c4bf7021822d6632fb6c94452187ed..4863ab81f6632c30443723940dff20619257fdcf 100644 (file)
@@ -4351,7 +4351,6 @@ static struct kvmppc_ops kvm_ops_hv = {
        .flush_memslot  = kvmppc_core_flush_memslot_hv,
        .prepare_memory_region = kvmppc_core_prepare_memory_region_hv,
        .commit_memory_region  = kvmppc_core_commit_memory_region_hv,
-       .unmap_hva = kvm_unmap_hva_hv,
        .unmap_hva_range = kvm_unmap_hva_range_hv,
        .age_hva  = kvm_age_hva_hv,
        .test_age_hva = kvm_test_age_hva_hv,
index 3ae752314b3491c53e210f87ef88fbe69e98b516..d3f304d06adfcb27dfd87b890b2fde37152d877d 100644 (file)
@@ -277,15 +277,6 @@ static void do_kvm_unmap_hva(struct kvm *kvm, unsigned long start,
        }
 }
 
-static int kvm_unmap_hva_pr(struct kvm *kvm, unsigned long hva)
-{
-       trace_kvm_unmap_hva(hva);
-
-       do_kvm_unmap_hva(kvm, hva, hva + PAGE_SIZE);
-
-       return 0;
-}
-
 static int kvm_unmap_hva_range_pr(struct kvm *kvm, unsigned long start,
                                  unsigned long end)
 {
@@ -1773,7 +1764,6 @@ static struct kvmppc_ops kvm_ops_pr = {
        .flush_memslot = kvmppc_core_flush_memslot_pr,
        .prepare_memory_region = kvmppc_core_prepare_memory_region_pr,
        .commit_memory_region = kvmppc_core_commit_memory_region_pr,
-       .unmap_hva = kvm_unmap_hva_pr,
        .unmap_hva_range = kvm_unmap_hva_range_pr,
        .age_hva  = kvm_age_hva_pr,
        .test_age_hva = kvm_test_age_hva_pr,
index 423b21393bc9c10f026d2ecade35447f10ec6b4a..c878b4ffb86fe6c284aa3f6b4cb8f8de630eb72a 100644 (file)
@@ -724,7 +724,7 @@ int kvmppc_load_last_inst(struct kvm_vcpu *vcpu, enum instruction_type type,
 
 /************* MMU Notifiers *************/
 
-int kvm_unmap_hva(struct kvm *kvm, unsigned long hva)
+static int kvm_unmap_hva(struct kvm *kvm, unsigned long hva)
 {
        trace_kvm_unmap_hva(hva);
 
index 85785a370c0ea54e1d27c90ca8325d173cb2dde9..2f9a8829552b946ee8a308a2e069ab6a5c9bb1ba 100644 (file)
@@ -254,21 +254,6 @@ TRACE_EVENT(kvm_exit,
                )
 );
 
-TRACE_EVENT(kvm_unmap_hva,
-       TP_PROTO(unsigned long hva),
-       TP_ARGS(hva),
-
-       TP_STRUCT__entry(
-               __field(        unsigned long,  hva             )
-       ),
-
-       TP_fast_assign(
-               __entry->hva            = hva;
-       ),
-
-       TP_printk("unmap hva 0x%lx\n", __entry->hva)
-);
-
 #endif /* _TRACE_KVM_H */
 
 /* This part must be outside protection */