]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: x86/mmu: Fix and unconditionally enable WARNs to detect PAE leaks
authorSean Christopherson <seanjc@google.com>
Fri, 5 Mar 2021 01:10:52 +0000 (17:10 -0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Mon, 15 Mar 2021 08:42:20 +0000 (04:42 -0400)
commit389a69510f6fa86b858d5079e063b88faf3030d0
treeace7bff23f74ddee77b08dc27bef5be48d99cc6d
parent5e0a64d77b9f552e7a0526a32af78743f44ceeec
KVM: x86/mmu: Fix and unconditionally enable WARNs to detect PAE leaks

Exempt NULL PAE roots from the check to detect leaks, since
kvm_mmu_free_roots() doesn't set them back to INVALID_PAGE.  Stop hiding
the WARNs to detect PAE root leaks behind MMU_WARN_ON, the hidden WARNs
obviously didn't do their job given the hilarious number of bugs that
could lead to PAE roots being leaked, not to mention the above false
positive.

Opportunistically delete a warning on root_hpa being valid, there's
nothing special about 4/5-level shadow pages that warrants a WARN.

Signed-off-by: Sean Christopherson <seanjc@google.com>
Message-Id: <20210305011101.3597423-9-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/mmu/mmu.c