[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <df77b8e9-b2bb-b085-0789-909a8b9d44c3@redhat.com>
Date: Wed, 23 Jun 2021 18:41:17 +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,
Yu Zhang <yu.c.zhang@...ux.intel.com>,
Maxim Levitsky <mlevitsk@...hat.com>
Subject: Re: [PATCH 10/54] KVM: x86/mmu: Replace EPT shadow page shenanigans
with simpler check
On 23/06/21 18:17, Sean Christopherson wrote:
>> What the commit message doesn't say is, did we miss this
>> opportunity all along, or has there been a change since commit
>> 47c42e6b4192 ("KVM: x86: fix handling of role.cr4_pae and rename it
>> to 'gpte_size'", 2019-03-28) that allows this?
>
> The code was wrong from the initial "unsync" commit. The 4-byte vs.
> 8-byte check papered over the real bug, which was that the roles were
> not checked for compabitility. I suspect that the bug only
> manisfested as an observable problem when the GPTE sizes mismatched,
> thus the PAE check was added.
I meant that we really never needed is_ept_sp, and you could have used
the simpler check already at the time you introduced gpte_is_8_bytes.
But anyway I think we're in agreement.
Paolo
Powered by blists - more mailing lists