diff options
author | Hou Wenlong <houwenlong93@linux.alibaba.com> | 2021-11-17 17:20:40 +0800 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2021-11-18 07:05:58 -0500 |
commit | 8ed716ca7dc91f058be0ba644a3048667a20db13 (patch) | |
tree | 86e5284c834cabf471efcf7331c3ae77c8e2780c /arch | |
parent | c7785d85b6c6cc9f3d0f1a8cab128f4062b30abb (diff) | |
download | linux-stable-8ed716ca7dc91f058be0ba644a3048667a20db13.tar.gz linux-stable-8ed716ca7dc91f058be0ba644a3048667a20db13.tar.bz2 linux-stable-8ed716ca7dc91f058be0ba644a3048667a20db13.zip |
KVM: x86/mmu: Pass parameter flush as false in kvm_tdp_mmu_zap_collapsible_sptes()
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: e2209710ccc5d ("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>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/kvm/mmu/mmu.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86/kvm/mmu/mmu.c b/arch/x86/kvm/mmu/mmu.c index 0a8436ea0090..0c839ee1282c 100644 --- a/arch/x86/kvm/mmu/mmu.c +++ b/arch/x86/kvm/mmu/mmu.c @@ -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); |