lkml.org 
[lkml]   [2010]   [Nov]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 2/6] KVM: MMU: don't drop spte if overwrite it from W to RO
On 11/17/2010 11:57 PM, Avi Kivity wrote:

>>> set_pte:
>>> update_spte(sptep, spte);
>>> + /*
>>> + * If we overwrite a writable spte with a read-only one we
>>> + * should flush remote TLBs. Otherwise rmap_write_protect
>>> + * will find a read-only spte, even though the writable spte
>>> + * might be cached on a CPU's TLB.
>>> + */
>>> + if (is_writable_pte(entry)&& !is_writable_pte(*sptep))
>>> + kvm_flush_remote_tlbs(vcpu->kvm);
>> There is no need to flush on sync_page path since the guest is
>> responsible for it.
>>
>
> If we don't, the next rmap_write_protect() will incorrectly decide that
> there's no need to flush tlbs.
>

Maybe it's not a problem if guest can flush all tlbs after overwrite it?
Marcelo, what's your comment about this?


\
 
 \ /
  Last update: 2010-11-18 08:11    [W:0.082 / U:0.600 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site