lkml.org 
[lkml]   [2014]   [Aug]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/5] KVM: vmx: fix ept reserved bits for 1-GByte page
Il 19/08/2014 04:17, Wanpeng Li ha scritto:
>>> >> - if (level == 1 || (level == 2 && (spte & (1ULL << 7)))) {
>>> >> + if (level == 1 || ((level == 3 || level == 2)
>>> >> + && (spte & (1ULL << 7)))) {
>> >
>> >This condition can be simplified by checking the return value of ept_rsvd_mask.
>> >If it includes 0x38, this is a large page.

Oops, a "not" was missing. If it includes 0x38, this is _not_ a large
page (it is a page directory / page directory pointer / PML4).

>> Otherwise it is a leaf page and
>> you can go down the "if".
> As you know, 5:3 bits which used for EPT MT are not reserved bits, so
> I fail to understand why check the return value of ept_rsvd_mask and
> it's a large page if includes 0x38. Could you eplain in more details? ;-)

A non-leaf page will always have 0x38 in the ept_rsvd_mask. A leaf page
will never have 0x38 in the ept_rsvd_mask.

Paolo


\
 
 \ /
  Last update: 2014-08-19 08:21    [W:0.089 / U:0.072 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site