KVM: x86/mmu: Add separate helper for shadow NPT root page role calc
authorSean Christopherson <sean.j.christopherson@intel.com>
Thu, 16 Jul 2020 03:41:15 +0000 (20:41 -0700)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 30 Jul 2020 22:14:34 +0000 (18:14 -0400)
commit59505b55aa0957bcad84e74bb80153d5c77916f6
tree1bbd2018c14ecc836ab23c71131bdbdf24040447
parentf291a358e0d88e3b20431266d8f78fc5eda1aec7
KVM: x86/mmu: Add separate helper for shadow NPT root page role calc

Refactor the shadow NPT role calculation into a separate helper to
better differentiate it from the non-nested shadow MMU, e.g. the NPT
variant is never direct and derives its root level from the TDP level.

Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
Message-Id: <20200716034122.5998-3-sean.j.christopherson@intel.com>
Reviewed-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/mmu/mmu.c