linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com>
To: Avi Kivity <avi@redhat.com>
Cc: Marcelo Tosatti <mtosatti@redhat.com>, KVM <kvm@vger.kernel.org>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v3 1/6] KVM: MMU: fix forgot flush tlbs on sync_page path
Date: Fri, 26 Nov 2010 09:37:12 +0800	[thread overview]
Message-ID: <4CEF0F48.8000202@cn.fujitsu.com> (raw)
In-Reply-To: <4CE63CF4.80502@cn.fujitsu.com>

Hi Avi, Marcelo,

What do you think of this patchset? Could you give me some comments please?

Thanks!

On 11/19/2010 05:01 PM, Xiao Guangrong wrote:
> We should flush all tlbs after drop spte on sync_page path since:
> 
> Quote from Avi:
> | sync_page
> | drop_spte
> | kvm_mmu_notifier_invalidate_page
> | kvm_unmap_rmapp
> | spte doesn't exist -> no flush
> | page is freed
> | guest can write into freed page? 
> 
> Signed-off-by: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com>
> ---
>  arch/x86/kvm/paging_tmpl.h |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/x86/kvm/paging_tmpl.h b/arch/x86/kvm/paging_tmpl.h
> index 590bf12..ca0e5e8 100644
> --- a/arch/x86/kvm/paging_tmpl.h
> +++ b/arch/x86/kvm/paging_tmpl.h
> @@ -786,6 +786,7 @@ static int FNAME(sync_page)(struct kvm_vcpu *vcpu, struct kvm_mmu_page *sp,
>  			else
>  				nonpresent = shadow_notrap_nonpresent_pte;
>  			drop_spte(vcpu->kvm, &sp->spt[i], nonpresent);
> +			kvm_flush_remote_tlbs(vcpu->kvm);
>  			continue;
>  		}
>  


  parent reply	other threads:[~2010-11-26  1:32 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-19  9:01 [PATCH v3 1/6] KVM: MMU: fix forgot flush tlbs on sync_page path Xiao Guangrong
2010-11-19  9:02 ` [PATCH v3 2/6] KVM: MMU: don't drop spte if overwrite it from W to RO Xiao Guangrong
2010-11-19  9:03 ` [PATCH v3 3/6] KVM: MMU: rename 'reset_host_protection' to 'host_writable' Xiao Guangrong
2010-11-19  9:04 ` [PATCH v3 4/6] KVM: MMU: remove 'clear_unsync' parameter Xiao Guangrong
2010-11-19  9:04 ` [PATCH v3 5/6] KVM: MMU: abstract invalid guest pte mapping Xiao Guangrong
2010-11-22  9:28   ` Avi Kivity
2010-11-22 10:18     ` Xiao Guangrong
2010-11-22 10:17       ` Avi Kivity
2010-11-23  3:08     ` Xiao Guangrong
2010-11-19  9:05 ` [PATCH v3 6/6] KVM: MMU: delay flush all tlbs on sync_page path Xiao Guangrong
2010-11-19 16:11   ` Marcelo Tosatti
2010-11-22  3:45     ` Xiao Guangrong
2010-11-22 14:19       ` Marcelo Tosatti
2010-11-22 21:46         ` Marcelo Tosatti
2010-11-23  3:13           ` Xiao Guangrong
2010-11-26  1:37 ` Xiao Guangrong [this message]
2010-11-26 14:29   ` [PATCH v3 1/6] KVM: MMU: fix forgot flush " Marcelo Tosatti

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=4CEF0F48.8000202@cn.fujitsu.com \
    --to=xiaoguangrong@cn.fujitsu.com \
    --cc=avi@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;
as well as URLs for NNTP newsgroup(s).