]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: x86/mmu: Add a helper to consolidate root sp allocation
authorSean Christopherson <sean.j.christopherson@intel.com>
Tue, 28 Apr 2020 02:37:14 +0000 (19:37 -0700)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 15 May 2020 16:26:12 +0000 (12:26 -0400)
commitd99c78ac78c3af31f876fe90f82cac46ff2ba11a
treeb81cdf26af336eda4370c7207a408df1b3ea8caa
parent284fa61f0e85e2d3203a627fca48671f0245ef7f
KVM: x86/mmu: Add a helper to consolidate root sp allocation

Add a helper, mmu_alloc_root(), to consolidate the allocation of a root
shadow page, which has the same basic mechanics for all flavors of TDP
and shadow paging.

Note, __pa(sp->spt) doesn't need to be protected by mmu_lock, sp->spt
points at a kernel page.

No functional change intended.

Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
Message-Id: <20200428023714.31923-1-sean.j.christopherson@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/mmu/mmu.c