]> www.infradead.org Git - users/jedix/linux-maple.git/commit
KVM: x86/mmu: Stop processing TDP MMU roots for test_age if young SPTE found
authorSean Christopherson <seanjc@google.com>
Fri, 11 Oct 2024 02:10:46 +0000 (19:10 -0700)
committerSean Christopherson <seanjc@google.com>
Wed, 30 Oct 2024 22:23:30 +0000 (15:23 -0700)
commit51192ebdd145f4808f440de5cbc6426afcaa0564
tree14a163d5dc58944ceb0d770a3a78be8b9f6e108c
parent526e609f05676c21aeed6c04115ae777c40081ec
KVM: x86/mmu: Stop processing TDP MMU roots for test_age if young SPTE found

Return immediately if a young SPTE is found when testing, but not updating,
SPTEs.  The return value is a boolean, i.e. whether there is one young SPTE
or fifty is irrelevant (ignoring the fact that it's impossible for there to
be fifty SPTEs, as KVM has a hard limit on the number of valid TDP MMU
roots).

Link: https://lore.kernel.org/r/20241011021051.1557902-15-seanjc@google.com
[sean: use guard(rcu)(), as suggested by Paolo]
Signed-off-by: Sean Christopherson <seanjc@google.com>
arch/x86/kvm/mmu/tdp_mmu.c