On Mon, Feb 21, 2022, Paolo Bonzini wrote: > 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. > > Signed-off-by: Paolo Bonzini <pbonzini@xxxxxxxxxx> > --- > arch/x86/include/asm/kvm_host.h | 1 - > arch/x86/kvm/mmu.h | 2 +- > arch/x86/kvm/mmu/mmu.c | 33 ++++++++++++++------------------- > arch/x86/kvm/mmu/tdp_mmu.c | 2 +- > arch/x86/kvm/svm/svm.c | 2 +- > arch/x86/kvm/vmx/vmx.c | 2 +- > 6 files changed, 18 insertions(+), 24 deletions(-) Yay! That's a lot less churn than I expected. Reviewed-by: Sean Christopherson <seanjc@xxxxxxxxxx>