KVM: x86/mmu: Use common TDP MMU zap helper for MMU notifier unmap hook
authorSean Christopherson <seanjc@google.com>
Wed, 15 Dec 2021 01:15:54 +0000 (01:15 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 12 Jul 2022 14:34:58 +0000 (16:34 +0200)
commit1e9d6854951a67d2df992b4d7b5a7e904cea4d3f
tree192b8723a2e739e6bac36c003c32ef8a3db6397b
parenteabbe74e7de5ee1841764e8937d3812bc4843eb5
KVM: x86/mmu: Use common TDP MMU zap helper for MMU notifier unmap hook

[ Upstream commit 83b83a02073ec8d18c77a9bbe0881d710f7a9d32 ]

Use the common TDP MMU zap helper when handling an MMU notifier unmap
event, the two flows are semantically identical.  Consolidate the code in
preparation for a future bug fix, as both kvm_tdp_mmu_unmap_gfn_range()
and __kvm_tdp_mmu_zap_gfn_range() are guilty of not zapping SPTEs in
invalid roots.

No functional change intended.

Cc: stable@vger.kernel.org
Signed-off-by: Sean Christopherson <seanjc@google.com>
Message-Id: <20211215011557.399940-2-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/x86/kvm/mmu/tdp_mmu.c