lkml.org 
[lkml]   [2021]   [Jun]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 10/54] KVM: x86/mmu: Replace EPT shadow page shenanigans with simpler check
From
Date
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

\
 
 \ /
  Last update: 2021-06-23 18:43    [W:1.254 / U:0.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site