public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com>
To: Avi Kivity <avi@redhat.com>
Cc: Marcelo Tosatti <mtosatti@redhat.com>,
	Gleb Natapov <gleb@redhat.com>,
	LKML <linux-kernel@vger.kernel.org>, KVM <kvm@vger.kernel.org>
Subject: Re: [PATCH v4 3/3] KVM: MMU: retry #PF for softmmu
Date: Mon, 06 Dec 2010 18:22:59 +0800	[thread overview]
Message-ID: <4CFCB983.6020503@cn.fujitsu.com> (raw)
In-Reply-To: <4CFCB150.40202@redhat.com>

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.


  reply	other threads:[~2010-12-06 10:18 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-02  9:44 [PATCH v4 1/3] KVM: MMU: rename 'no_apf' to 'prefault' Xiao Guangrong
2010-12-02  9:45 ` [PATCH v4 2/3] KVM: MMU: fix accessed bit set on prefault path Xiao Guangrong
2010-12-02  9:46 ` [PATCH v4 3/3] KVM: MMU: retry #PF for softmmu Xiao Guangrong
2010-12-06  9:48   ` Avi Kivity
2010-12-06 10:22     ` Xiao Guangrong [this message]
2010-12-06 13:17       ` Avi Kivity
2010-12-02  9:51 ` Xiao Guangrong
2010-12-03 20:30 ` [PATCH v4 1/3] KVM: MMU: rename 'no_apf' to 'prefault' Marcelo Tosatti
2010-12-06  9:32   ` Gleb Natapov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4CFCB983.6020503@cn.fujitsu.com \
    --to=xiaoguangrong@cn.fujitsu.com \
    --cc=avi@redhat.com \
    --cc=gleb@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mtosatti@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox