KVM: x86/mmu: Add a helper to calculate root from role_regs
authorSean Christopherson <seanjc@google.com>
Tue, 22 Jun 2021 17:57:29 +0000 (10:57 -0700)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 24 Jun 2021 22:00:45 +0000 (18:00 -0400)
commitf4bd6f73763a91a0c6fc39974d57034e19f25494
treee521ceb655f9b275ad3eb3f5d9fa2a54337f0aeb
parent533f9a4b387bf79c722faf0a760a09129d9627f9
KVM: x86/mmu: Add a helper to calculate root from role_regs

Add a helper to calculate the level for non-EPT page tables from the
MMU's role_regs.

No functional change intended.

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