]> git.baikalelectronics.ru Git - kernel.git/commitdiff
KVM: x86/mmu: Drop a redundant, broken remote TLB flush
authorSean Christopherson <seanjc@google.com>
Fri, 22 Oct 2021 01:00:03 +0000 (18:00 -0700)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 22 Oct 2021 09:51:30 +0000 (05:51 -0400)
A recent commit to fix the calls to kvm_flush_remote_tlbs_with_address()
in kvm_zap_gfn_range() inadvertantly added yet another flush instead of
fixing the existing flush.  Drop the redundant flush, and fix the params
for the existing flush.

Cc: stable@vger.kernel.org
Fixes: c4e1230f4a83 ("KVM: x86/mmu: fix parameters to kvm_flush_remote_tlbs_with_address")
Cc: Maxim Levitsky <mlevitsk@redhat.com>
Cc: Maciej S. Szmigiero <maciej.szmigiero@oracle.com>
Signed-off-by: Sean Christopherson <seanjc@google.com>
Message-Id: <20211022010005.1454978-2-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/mmu/mmu.c

index 28d06180079d3896abcf41751a9c24d587498316..d9f1142b48923e2eea00dfa8a535ff83219214fe 100644 (file)
@@ -5752,13 +5752,11 @@ void kvm_zap_gfn_range(struct kvm *kvm, gfn_t gfn_start, gfn_t gfn_end)
                for (i = 0; i < KVM_ADDRESS_SPACE_NUM; i++)
                        flush = kvm_tdp_mmu_zap_gfn_range(kvm, i, gfn_start,
                                                          gfn_end, flush);
-               if (flush)
-                       kvm_flush_remote_tlbs_with_address(kvm, gfn_start,
-                                                          gfn_end - gfn_start);
        }
 
        if (flush)
-               kvm_flush_remote_tlbs_with_address(kvm, gfn_start, gfn_end);
+               kvm_flush_remote_tlbs_with_address(kvm, gfn_start,
+                                                  gfn_end - gfn_start);
 
        kvm_dec_notifier_count(kvm, gfn_start, gfn_end);