[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2f983feb-0afa-ce3d-5065-bd27d3a6a948@redhat.com>
Date: Wed, 9 Mar 2022 11:33:21 +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 19/25] KVM: x86/mmu: simplify and/or inline computation
of shadow MMU roles
On 3/8/22 20:35, Sean Christopherson wrote:
>> + root_role = cpu_mode.base;
>> + root_role.level = max_t(u32, root_role.level, PT32E_ROOT_LEVEL);
> Heh, we have different definitions of "simpler". Can we split the difference
> and do?
>
> /* KVM uses PAE paging whenever the guest isn't using 64-bit paging. */
> if (!____is_efer_lma(regs))
> root_role.level = PT32E_ROOT_LEVEL;
>
It's not that easy until the very end (when cpu_mode is set in
kvm_mmu_init_walker), but I'll make sure to switch to is_efer_lma once
it is possible.
Paolo
Powered by blists - more mailing lists