All of lore.kernel.org
 help / color / mirror / Atom feed
From: Avi Kivity <avi@redhat.com>
To: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com>
Cc: Marcelo Tosatti <mtosatti@redhat.com>,
	LKML <linux-kernel@vger.kernel.org>, KVM <kvm@vger.kernel.org>
Subject: Re: [PATCH v2 4/4] KVM: MMU: cleanup pte write path
Date: Thu, 10 Mar 2011 12:21:54 +0200	[thread overview]
Message-ID: <4D78A642.8020708@redhat.com> (raw)
In-Reply-To: <4D772FB7.8060007@cn.fujitsu.com>

On 03/09/2011 09:43 AM, Xiao Guangrong wrote:
> This patch does:
> - call vcpu->arch.mmu.update_pte directly
> - use gfn_to_pfn_atomic in update_pte path
>
> The suggestion is from Avi.
>
>
>
> -	mmu_guess_page_from_pte_write(vcpu, gpa, gentry);
> +	mmu_seq = vcpu->kvm->mmu_notifier_seq;
> +	smp_rmb();

smp_rmb() should come before, no? but the problem was present in the 
original code, too.

> +
>   	spin_lock(&vcpu->kvm->mmu_lock);
>   	if (atomic_read(&vcpu->kvm->arch.invlpg_counter) != invlpg_counter)
>   		gentry = 0;
> @@ -3365,7 +3345,8 @@ void kvm_mmu_pte_write(struct kvm_vcpu *vcpu, gpa_t gpa,
>   			if (gentry&&
>   			!((sp->role.word ^ vcpu->arch.mmu.base_role.word)
>   			&  mask.word))
> -				mmu_pte_write_new_pte(vcpu, sp, spte,&gentry);
> +				mmu_pte_write_new_pte(vcpu, sp, spte,&gentry,
> +						      mmu_seq);

Okay, we're only iterating over indirect pages, so we won't call 
nonpaging_update_pte().

-- 
error compiling committee.c: too many arguments to function


  reply	other threads:[~2011-03-10 10:22 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-09  7:41 [PATCH v2 1/4] KVM: fix rcu usage in init_rmode_* functions Xiao Guangrong
2011-03-09  7:41 ` [PATCH v2 2/4] KVM: cleanup memslot_id function Xiao Guangrong
2011-03-09  7:43 ` [PATCH v2 3/4] KVM: MMU: introduce a common function to get no-dirty-logged slot Xiao Guangrong
2011-03-09  7:43 ` [PATCH v2 4/4] KVM: MMU: cleanup pte write path Xiao Guangrong
2011-03-10 10:21   ` Avi Kivity [this message]
2011-03-11  3:41     ` Xiao Guangrong
2011-03-10 10:22 ` [PATCH v2 1/4] KVM: fix rcu usage in init_rmode_* functions Avi Kivity

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=4D78A642.8020708@redhat.com \
    --to=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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.