public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Marcelo Tosatti <mtosatti@redhat.com>
To: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com>
Cc: Avi Kivity <avi@redhat.com>, Gleb Natapov <gleb@redhat.com>,
	LKML <linux-kernel@vger.kernel.org>, KVM <kvm@vger.kernel.org>
Subject: Re: [PATCH v3 3/3] KVM: MMU: retry #PF for softmmu
Date: Wed, 1 Dec 2010 23:19:42 -0200	[thread overview]
Message-ID: <20101202011942.GA24787@amt.cnet> (raw)
In-Reply-To: <4CF4C5E0.2020301@cn.fujitsu.com>

On Tue, Nov 30, 2010 at 05:37:36PM +0800, Xiao Guangrong wrote:
> Retry #PF for softmmu only when the current vcpu has the same root shadow page
> as the time when #PF occurs. it means they have same paging environment
> 
> Signed-off-by: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com>
> ---
>  arch/x86/include/asm/kvm_host.h |    5 +++++
>  arch/x86/kvm/mmu.c              |   33 ++++++++++++++++++++++++++++++++-
>  arch/x86/kvm/paging_tmpl.h      |   34 +++++++++++++++++++++++-----------
>  arch/x86/kvm/x86.c              |   13 ++++++++++++-
>  virt/kvm/async_pf.c             |    1 +
>  5 files changed, 73 insertions(+), 13 deletions(-)
> 
> diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h
> index 209da89..5acbcab 100644
> --- a/arch/x86/include/asm/kvm_host.h
> +++ b/arch/x86/include/asm/kvm_host.h
> @@ -191,6 +191,7 @@ union kvm_mmu_page_role {
>  struct kvm_mmu_page {
>  	struct list_head link;
>  	struct hlist_node hash_link;
> +	struct kref apfs_counter;
>  
>  	/*
>  	 * The following two entries are used to key the shadow page in the
> @@ -602,6 +603,7 @@ struct kvm_x86_ops {
>  struct kvm_arch_async_pf {
>  	u32 token;
>  	gfn_t gfn;
> +	struct kvm_mmu_page *root_sp;
>  	bool direct_map;
>  };

Can't you just compare cr3 value? Its harmless to instantiate an spte
for an unused translation.



  reply	other threads:[~2010-12-02  2:50 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-30  9:34 [PATCH v3 1/3] KVM: MMU: rename 'no_apf' to 'prefault' Xiao Guangrong
2010-11-30  9:36 ` [PATCH v3 2/3] KVM: MMU: fix accessed bit set on prefault path Xiao Guangrong
2010-11-30 13:29   ` Gleb Natapov
2010-11-30 16:52     ` Xiao Guangrong
2010-11-30 17:50       ` Gleb Natapov
2010-11-30 18:15         ` Xiao Guangrong
2010-11-30 18:38           ` Gleb Natapov
2010-11-30 19:11             ` Xiao Guangrong
2010-11-30 19:20               ` Gleb Natapov
2010-12-01  2:20                 ` Xiao Guangrong
2010-12-01 20:42                   ` Marcelo Tosatti
2010-11-30  9:37 ` [PATCH v3 3/3] KVM: MMU: retry #PF for softmmu Xiao Guangrong
2010-12-02  1:19   ` Marcelo Tosatti [this message]
2010-12-02  3:44     ` 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=20101202011942.GA24787@amt.cnet \
    --to=mtosatti@redhat.com \
    --cc=avi@redhat.com \
    --cc=gleb@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --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