lkml.org 
[lkml]   [2010]   [Dec]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/2] KVM: MMU: don't make direct sp read-only if !map_writable
On 12/13/2010 06:32 PM, Avi Kivity wrote:
> On 12/13/2010 12:31 PM, Xiao Guangrong wrote:
>> Currently, if the page is not allowed to write, then it can drop
>> ACC_WRITE_MASK in pte_access, and the direct sp's access is:
>> gw->pt_access& gw->pte_access
>> so, it also removes the write access in the direct sp.
>>
>> There is a problem: if the access of those pages which map thought the
>> same
>> mapping in guest is different in host, it causes host switch direct sp
>> very
>> frequently.
>
> I just sent a patch to fix this in a different way, please review it.
>

Your patch is good for me, please ignore this one :-)

Umm, do we need move "access &= ~ACC_WRITE_MASK" into set_spte() then
can remove the same code in the caller?


\
 
 \ /
  Last update: 2010-12-14 02:51    [W:0.074 / U:0.044 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site