]> git.baikalelectronics.ru Git - kernel.git/commitdiff
KVM: x86/mmu: Pass parameter flush as false in kvm_tdp_mmu_zap_collapsible_sptes()
authorHou Wenlong <houwenlong93@linux.alibaba.com>
Wed, 17 Nov 2021 09:20:40 +0000 (17:20 +0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 18 Nov 2021 12:05:58 +0000 (07:05 -0500)
Since tlb flush has been done for legacy MMU before
kvm_tdp_mmu_zap_collapsible_sptes(), so the parameter flush
should be false for kvm_tdp_mmu_zap_collapsible_sptes().

Fixes: 08763ffdb3a23 ("KVM: x86/mmu: Skip rmap operations if rmaps not allocated")
Signed-off-by: Hou Wenlong <houwenlong93@linux.alibaba.com>
Message-Id: <21453a1d2533afb6e59fb6c729af89e771ff2e76.1637140154.git.houwenlong93@linux.alibaba.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/mmu/mmu.c

index 0a8436ea0090724b770e9d0b65695e46a67ca794..0c839ee1282c10d956105ab6bd452dfbef3d221e 100644 (file)
@@ -5854,7 +5854,7 @@ restart:
 void kvm_mmu_zap_collapsible_sptes(struct kvm *kvm,
                                   const struct kvm_memory_slot *slot)
 {
-       bool flush = false;
+       bool flush;
 
        if (kvm_memslots_have_rmaps(kvm)) {
                write_lock(&kvm->mmu_lock);
@@ -5871,7 +5871,7 @@ void kvm_mmu_zap_collapsible_sptes(struct kvm *kvm,
 
        if (is_tdp_mmu_enabled(kvm)) {
                read_lock(&kvm->mmu_lock);
-               flush = kvm_tdp_mmu_zap_collapsible_sptes(kvm, slot, flush);
+               flush = kvm_tdp_mmu_zap_collapsible_sptes(kvm, slot, false);
                if (flush)
                        kvm_arch_flush_remote_tlbs_memslot(kvm, slot);
                read_unlock(&kvm->mmu_lock);