[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20101202011942.GA24787@amt.cnet>
Date: Wed, 1 Dec 2010 23:19:42 -0200
From: Marcelo Tosatti <mtosatti@...hat.com>
To: Xiao Guangrong <xiaoguangrong@...fujitsu.com>
Cc: Avi Kivity <avi@...hat.com>, Gleb Natapov <gleb@...hat.com>,
LKML <linux-kernel@...r.kernel.org>, KVM <kvm@...r.kernel.org>
Subject: Re: [PATCH v3 3/3] KVM: MMU: retry #PF for softmmu
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@...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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists