[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YiezCBsD7Mj8hLEn@google.com>
Date: Tue, 8 Mar 2022 19:48:24 +0000
From: Sean Christopherson <seanjc@...gle.com>
To: Paolo Bonzini <pbonzini@...hat.com>
Cc: linux-kernel@...r.kernel.org, kvm@...r.kernel.org,
dmatlack@...gle.com
Subject: Re: [PATCH v2 21/25] KVM: x86/mmu: replace shadow_root_level with
root_role.level
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@...hat.com>
> ---
> 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@...gle.com>
Powered by blists - more mailing lists