]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: x86/mmu: Open code leaf invalidation from mmu_notifier
authorSean Christopherson <seanjc@google.com>
Sat, 16 Sep 2023 00:39:14 +0000 (17:39 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 6 Oct 2023 12:57:00 +0000 (14:57 +0200)
commitcd41db6cb2851478db60689e2133cfc41b555fc4
treed6143e0a35b754a83d3c778c4f04a540ea378186
parent733d7a5451fc648e3383162e1f7ae00d80ccd6d5
KVM: x86/mmu: Open code leaf invalidation from mmu_notifier

commit 50107e8b2a8a59d8cec7e8454e27c1f8e365acdb upstream.

The mmu_notifier path is a bit of a special snowflake, e.g. it zaps only a
single address space (because it's per-slot), and can't always yield.
Because of this, it calls kvm_tdp_mmu_zap_leafs() in ways that no one
else does.

Iterate manually over the leafs in response to an mmu_notifier
invalidation, instead of invoking kvm_tdp_mmu_zap_leafs().  Drop the
@can_yield param from kvm_tdp_mmu_zap_leafs() as its sole remaining
caller unconditionally passes "true".

Cc: stable@vger.kernel.org
Signed-off-by: Sean Christopherson <seanjc@google.com>
Message-Id: <20230916003916.2545000-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/mmu.c
arch/x86/kvm/mmu/tdp_mmu.c
arch/x86/kvm/mmu/tdp_mmu.h