[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <130fe0c3-bd86-18b6-056a-94bdd7072837@redhat.com>
Date: Wed, 9 Mar 2022 16:40:35 +0100
From: Paolo Bonzini <pbonzini@...hat.com>
To: Sean Christopherson <seanjc@...gle.com>
Cc: linux-kernel@...r.kernel.org, kvm@...r.kernel.org,
dmatlack@...gle.com
Subject: Re: [PATCH v2 08/25] KVM: x86/mmu: split cpu_mode from mmu_role
On 3/9/22 16:38, Sean Christopherson wrote:
> Can we instead tweak that patch to make it and kvm_calc_shadow_npt_root_page_role() be
>
> static union kvm_mmu_role
> kvm_calc_shadow_mmu_root_page_role(struct kvm_vcpu *vcpu,
> union kvm_mmu_role cpu_role)
> {
> union kvm_mmu_role root_role = cpu_role;
>
> if (!cpu_role.ext.efer_lma)
> root_role.base.level = PT32E_ROOT_LEVEL;
> else if (cpu_role.ext.cr4_la57)
> root_role.base.level = PT64_ROOT_5LEVEL;
> else
> root_role.base.level = PT64_ROOT_4LEVEL;
>
> return root_role;
> }
Yep, figured the same in the meanwhile.
Paolo
Powered by blists - more mailing lists