]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: x86/mmu: replace shadow_root_level with root_role.level
authorPaolo Bonzini <pbonzini@redhat.com>
Thu, 10 Feb 2022 12:41:19 +0000 (07:41 -0500)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 29 Apr 2022 16:49:58 +0000 (12:49 -0400)
commita722a5ffc5f5fce9c10cea4b8a205b278bee1fd5
treefff267720c2d2d254c39d8aeb3f4ce7d64b06941
parentba842bf3b04750552efa5f5d318e568b70d2430d
KVM: x86/mmu: replace shadow_root_level with root_role.level

root_role.level is always the same value as shadow_level:

- it's kvm_mmu_get_tdp_level(vcpu) when going through init_kvm_tdp_mmu

- it's the level argument when going through kvm_init_shadow_ept_mmu

- it's assigned directly from new_role.base.level when going
  through shadow_mmu_init_context

Remove the duplication and get the level directly from the role.

Reviewed-by: Sean Christopherson <seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/include/asm/kvm_host.h
arch/x86/kvm/mmu.h
arch/x86/kvm/mmu/mmu.c
arch/x86/kvm/mmu/tdp_mmu.c
arch/x86/kvm/svm/svm.c
arch/x86/kvm/vmx/vmx.c