[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <64d774e4-affa-b96e-5116-66756dc160dd@redhat.com>
Date: Fri, 11 Jun 2021 18:49:25 +0200
From: Paolo Bonzini <pbonzini@...hat.com>
To: Sean Christopherson <seanjc@...gle.com>
Cc: Vitaly Kuznetsov <vkuznets@...hat.com>,
Wanpeng Li <wanpengli@...cent.com>,
Jim Mattson <jmattson@...gle.com>,
Joerg Roedel <joro@...tes.org>, kvm@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] KVM: x86/mmu: Calculate and check "full" mmu_role for
nested MMU
On 11/06/21 18:45, Sean Christopherson wrote:
>> Along which path though? I would have naively expected those to be driven
>> only by the context->root_level.
> The functional code is driven by context->root_level, but if KVM doesn't include
> the level in the mmu_role then it will fail to update context->root_level when
> L2 changes from 32-bit PAE to 64-bit. If all the CR0/CR4/EFER bits remain the
> same, only the level will differ. Without this patch, role.level is always '0'
> for the nested MMU.
>
Yes the problem is the
if (new_role.as_u64 == g_context->mmu_role.as_u64)
return;
and the patch lets you preserve the optimization instead of dropping it.
I was wondering if I was missing something else because of the "when
walking the guest page tables" remark.
Paolo
Powered by blists - more mailing lists