diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2021-04-02 12:44:56 +0300 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2021-04-17 15:31:05 +0300 |
commit | 566a0beef52c83f13b67aef02b2bc0aa63c0e0d6 (patch) | |
tree | 7dc2f804a74501b36a838c648e785773cb4a25ed /arch/mips/kvm/mmu.c | |
parent | 5194552fb1ffb4248c8db3f7286aa4ac7ae3163b (diff) | |
download | linux-566a0beef52c83f13b67aef02b2bc0aa63c0e0d6.tar.xz |
KVM: MIPS: let generic code call prepare_flush_shadow
Since all calls to kvm_flush_remote_tlbs must be preceded by
kvm_mips_callbacks->prepare_flush_shadow, repurpose
kvm_arch_flush_remote_tlb to invoke it. This makes it possible
to use the TLB flushing mechanism provided by the generic MMU
notifier code.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/mips/kvm/mmu.c')
-rw-r--r-- | arch/mips/kvm/mmu.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/arch/mips/kvm/mmu.c b/arch/mips/kvm/mmu.c index 7e055e5dfd3c..2cedf908d744 100644 --- a/arch/mips/kvm/mmu.c +++ b/arch/mips/kvm/mmu.c @@ -490,8 +490,6 @@ int kvm_unmap_hva_range(struct kvm *kvm, unsigned long start, unsigned long end, 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; } @@ -533,10 +531,8 @@ int kvm_set_spte_hva(struct kvm *kvm, unsigned long hva, pte_t pte) 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; } |