KVM: x86/mmu: Get nested MMU's root level from the MMU's role
authorSean Christopherson <seanjc@google.com>
Tue, 22 Jun 2021 17:57:24 +0000 (10:57 -0700)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 24 Jun 2021 22:00:44 +0000 (18:00 -0400)
commit5472fcd4c6c8026565644f31490cfddfdafb9519
treecd3ac29871c3b42c75634eddbc0687bbd67f6e6f
parenta4c93252fed1517362d2ce43c6a5fd50a1152ed6
KVM: x86/mmu: Get nested MMU's root level from the MMU's role

Initialize the MMU's (guest) root_level using its mmu_role instead of
redoing the calculations.  The role_regs used to calculate the mmu_role
are initialized from the vCPU, i.e. this should be a complete nop.

No functional change intended.

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