]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: x86/mmu: Allocate pae_root and lm_root pages in dedicated helper
authorSean Christopherson <seanjc@google.com>
Fri, 5 Mar 2021 01:10:49 +0000 (17:10 -0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Mon, 15 Mar 2021 08:42:17 +0000 (04:42 -0400)
commit3dd1547f38eeaca8da0c15b2d8e20c4ae59e6f3c
tree06031b22a011c7be6001761e4320c260c600f0d3
parent331ab27752f1357bae3d55c4ac0b5f89c6a37fcb
KVM: x86/mmu: Allocate pae_root and lm_root pages in dedicated helper

Move the on-demand allocation of the pae_root and lm_root pages, used by
nested NPT for 32-bit L1s, into a separate helper.  This will allow a
future patch to hold mmu_lock while allocating the non-special roots so
that make_mmu_pages_available() can be checked once at the start of root
allocation, and thus avoid having to deal with failure in the middle of
root allocation.

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