]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
KVM: x86/mmu: Skip tlb flush if it has been done in zap_gfn_range()
authorHou Wenlong <houwenlong93@linux.alibaba.com>
Wed, 17 Nov 2021 09:20:39 +0000 (17:20 +0800)
committerPaolo Pisati <paolo.pisati@canonical.com>
Thu, 9 Dec 2021 10:10:44 +0000 (11:10 +0100)
commitdb17764f09c232e432e36a43c5aa326f89c7f871
tree1533d763718d01bb5959dc31d09a0dde6da12c91
parent1bff225f0a729a00c7047659e7fe7b83c640a6b1
KVM: x86/mmu: Skip tlb flush if it has been done in zap_gfn_range()

BugLink: https://bugs.launchpad.net/bugs/1953731
[ Upstream commit c7785d85b6c6cc9f3d0f1a8cab128f4062b30abb ]

If the parameter flush is set, zap_gfn_range() would flush remote tlb
when yield, then tlb flush is not needed outside. So use the return
value of zap_gfn_range() directly instead of OR on it in
kvm_unmap_gfn_range() and kvm_tdp_mmu_unmap_gfn_range().

Fixes: 3039bcc744980 ("KVM: Move x86's MMU notifier memslot walkers to generic code")
Signed-off-by: Hou Wenlong <houwenlong93@linux.alibaba.com>
Message-Id: <5e16546e228877a4d974f8c0e448a93d52c7a5a9.1637140154.git.houwenlong93@linux.alibaba.com>
Reviewed-by: Sean Christopherson <seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
arch/x86/kvm/mmu/mmu.c
arch/x86/kvm/mmu/tdp_mmu.c