]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
KVM: x86/mmu: Only check gfn age in shadow MMU if indirect_shadow_pages > 0
authorJames Houghton <jthoughton@google.com>
Tue, 4 Feb 2025 00:40:34 +0000 (00:40 +0000)
committerSean Christopherson <seanjc@google.com>
Fri, 14 Feb 2025 15:17:28 +0000 (07:17 -0800)
commit8c403cf23119356245a8d69a4c0966f350b3c6a3
tree8c26ef2c90e082e772af0df73b33956579348160
parente25c2332346fbd4814d5c9d3d25ba3d0f9646e06
KVM: x86/mmu: Only check gfn age in shadow MMU if indirect_shadow_pages > 0

When aging SPTEs and the TDP MMU is enabled, process the shadow MMU if and
only if the VM has at least one shadow page, as opposed to checking if the
VM has rmaps.  Checking for rmaps will effectively yield a false positive
if the VM ran nested TDP VMs in the past, but is not currently doing so.

Signed-off-by: James Houghton <jthoughton@google.com>
Acked-by: Yu Zhao <yuzhao@google.com>
Link: https://lore.kernel.org/r/20250204004038.1680123-8-jthoughton@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
arch/x86/kvm/mmu/mmu.c