]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
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>
Fri, 8 Apr 2022 12:06:42 +0000 (14:06 +0200)
commit1623434d4773341ef4a8247ff17377da1e1cc6cf
treee076e56a7e92d76f4629f4367f862f7d6e38aa7d
parentf8a4f764ded680e225901938dff78a2ecba60290
KVM: x86/mmu: Use common TDP MMU zap helper for MMU notifier unmap hook

commit 83b83a02073ec8d18c77a9bbe0881d710f7a9d32 upstream.

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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/x86/kvm/mmu/tdp_mmu.c