static inline void kvm_arch_vcpu_unblocking(struct kvm_vcpu *vcpu) {}
 static inline void kvm_arch_vcpu_block_finish(struct kvm_vcpu *vcpu) {}
 
+#define __KVM_HAVE_ARCH_FLUSH_REMOTE_TLB
+int kvm_arch_flush_remote_tlb(struct kvm *kvm);
+
 #endif /* __MIPS_KVM_HOST_H__ */
 
 {
        /* Flush whole GPA */
        kvm_mips_flush_gpa_pt(kvm, 0, ~0);
-
-       /* Let implementation do the rest */
-       kvm_mips_callbacks->prepare_flush_shadow(kvm);
        kvm_flush_remote_tlbs(kvm);
 }
 
 
 }
 
+int kvm_arch_flush_remote_tlb(struct kvm *kvm)
+{
+       kvm_mips_callbacks->prepare_flush_shadow(kvm);
+       return 1;
+}
+
 void kvm_arch_flush_remote_tlbs_memslot(struct kvm *kvm,
                                        const struct kvm_memory_slot *memslot)
 {
-       /* Let implementation handle TLB/GVA invalidation */
-       kvm_mips_callbacks->prepare_flush_shadow(kvm);
        kvm_flush_remote_tlbs(kvm);
 }
 
 
                        unsigned flags)
 {
        handle_hva_to_gpa(kvm, start, end, &kvm_unmap_hva_handler, NULL);
-
-       kvm_mips_callbacks->prepare_flush_shadow(kvm);
        kvm_flush_remote_tlbs(kvm);
        return 0;
 }
        int ret;
 
        ret = handle_hva_to_gpa(kvm, hva, end, &kvm_set_spte_handler, &pte);
-       if (ret) {
-               kvm_mips_callbacks->prepare_flush_shadow(kvm);
+       if (ret)
                kvm_flush_remote_tlbs(kvm);
-       }
        return 0;
 }