public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Gleb Natapov <gleb@redhat.com>
To: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com>
Cc: Avi Kivity <avi@redhat.com>,
	Marcelo Tosatti <mtosatti@redhat.com>,
	LKML <linux-kernel@vger.kernel.org>, KVM <kvm@vger.kernel.org>
Subject: Re: [PATCH v2 5/5] KVM: MMU: retry #PF for softmmu
Date: Mon, 15 Nov 2010 11:56:51 +0200	[thread overview]
Message-ID: <20101115095651.GI7948@redhat.com> (raw)
In-Reply-To: <4CE1038D.9020403@cn.fujitsu.com>

On Mon, Nov 15, 2010 at 05:55:25PM +0800, Xiao Guangrong wrote:
> On 11/15/2010 05:30 PM, Avi Kivity wrote:
> 
> >> Yeah, this 'retry' is unnecessary if the process is killed, but this
> >> case is infrequent, the most case is the process keeps running and try
> >> to access the fault address later.
> > 
> > The problem is that if we retry in this case, we install an incorrect spte?
> > 
> 
> ......
> 
> >> can avoid if the page mapping have been fixed.
> > 
> > The guest may have changed page directories or other levels.
> > 
> 
> ......
> 
> >> >  Or another thread may have mmap()ed something else over the
> >> >  same address.
> >>
> >> The mmap virtual address is also visible for other threads since the
> >> threads
> >> have the same page table, so i think this case is the same as above?
> > 
> > Again, don't we install the wrong spte in this case?
> > 
> 
> I think it doesn't corrupts spte since we will walk guest page table again
> and map it to shadow pages when we retry #PF.
But if the page is not mapped by new process we can inject #PF into a
guest.

--
			Gleb.

  reply	other threads:[~2010-11-15  9:56 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-12  6:46 [PATCH v2 1/5] KVM: MMU: fix missing post sync audit Xiao Guangrong
2010-11-12  6:47 ` [PATCH v2 2/5] KVM: MMU: clear apfs if page state is changed Xiao Guangrong
2010-11-12  6:49 ` [PATCH v2 3/5] KVM: MMU: support apf for nonpaing guest Xiao Guangrong
2010-11-12  6:49 ` [PATCH v2 4/5] KVM: MMU: fix apf prefault if nested guest is enabled Xiao Guangrong
2010-11-12  6:50 ` [PATCH v2 5/5] KVM: MMU: retry #PF for softmmu Xiao Guangrong
2010-11-14 10:46   ` Avi Kivity
2010-11-15  5:25     ` Xiao Guangrong
2010-11-15  9:30       ` Avi Kivity
2010-11-15  9:55         ` Xiao Guangrong
2010-11-15  9:56           ` Gleb Natapov [this message]
2010-11-15  9:59           ` Avi Kivity
2010-11-15 10:12             ` Xiao Guangrong

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=20101115095651.GI7948@redhat.com \
    --to=gleb@redhat.com \
    --cc=avi@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mtosatti@redhat.com \
    --cc=xiaoguangrong@cn.fujitsu.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