KVM: x86/mmu: do not recompute root level from kvm_mmu_role_regs
authorPaolo Bonzini <pbonzini@redhat.com>
Thu, 10 Feb 2022 12:32:40 +0000 (07:32 -0500)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 29 Apr 2022 16:49:53 +0000 (12:49 -0400)
commit60f3cb60a59d3f155d7b5b7f8339754b2aba8815
treef335565260f658bb4e0443527252ce4a1d4bfb04
parente5ed0fb01004f93ddf8a0c632cbc8a3f1ea5b518
KVM: x86/mmu: do not recompute root level from kvm_mmu_role_regs

The root_level can be found in the cpu_role (in fact the field
is superfluous and could be removed, but one thing at a time).
Since there is only one usage left of role_regs_to_root_level,
inline it into kvm_calc_cpu_role.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/mmu/mmu.c