]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit - arch/x86/kvm/mmu/mmu.c
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)
commit8123f265248c85603d55f4e97c68576f45eb1e4d
treeb81cdf26af336eda4370c7207a408df1b3ea8caa
parent3bae0459bcd559506a2ca5807040ff722de5b136
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