lkml.org 
[lkml]   [2010]   [Dec]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v4 3/3] KVM: MMU: retry #PF for softmmu
Hi Avi,

On 12/06/2010 05:48 PM, Avi Kivity wrote:
> On 12/02/2010 11:46 AM, Xiao Guangrong wrote:
>> Retry #PF for softmmu only when the current vcpu has the same cr3 as
>> the time
>> when #PF occurs
>>
>> Changelog:
>> Just compare cr3 value since It's harmless to instantiate an spte
>> for an
>> unused translation from Marcelo's comment
>>
>
> It's not harmless. We could be in a different process, so we have to
> re-fetch the gpte. Or we could have switched from one nested guest to
> another.
>

But it does this in this patch: re-walk guest page table and fixes guest's
shadow page (not use any info when apf is occurred)

>> if (!eperm&& !rsvd_fault&& !(pte& PT_ACCESSED_MASK)) {
>> + /*
>> + * Don't set gpte accessed bit if it's on
>> + * speculative path.
>> + */
>> + if (prefault)
>> + goto error;
>
> It's actually legal to set the accessed bit on speculative access.
>

Oh, you are right, thanks for your reminder.



\
 
 \ /
  Last update: 2010-12-06 11:21    [W:0.046 / U:1.600 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site