kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Gleb Natapov <gleb@redhat.com>
To: Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>
Cc: avi.kivity@gmail.com, mtosatti@redhat.com, pbonzini@redhat.com,
	linux-kernel@vger.kernel.org, kvm@vger.kernel.org
Subject: Re: [PATCH v5 4/8] KVM: x86: use the fast way to invalidate all pages
Date: Thu, 16 May 2013 19:19:03 +0300	[thread overview]
Message-ID: <20130516161903.GH14597@redhat.com> (raw)
In-Reply-To: <1368706673-8530-5-git-send-email-xiaoguangrong@linux.vnet.ibm.com>

On Thu, May 16, 2013 at 08:17:49PM +0800, Xiao Guangrong wrote:
> Replace kvm_mmu_zap_all by kvm_mmu_invalidate_memslot_pages except on
> the path of mmu_notifier->release() which will be fixed in
> the later patch
> 
Why ->release() cannot use kvm_mmu_invalidate_memslot_pages()?

> Signed-off-by: Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>
> ---
>  arch/x86/kvm/x86.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
> index d885418..c2dd732 100644
> --- a/arch/x86/kvm/x86.c
> +++ b/arch/x86/kvm/x86.c
> @@ -5528,7 +5528,7 @@ static int emulator_fix_hypercall(struct x86_emulate_ctxt *ctxt)
>  	 * to ensure that the updated hypercall appears atomically across all
>  	 * VCPUs.
>  	 */
> -	kvm_mmu_zap_all(vcpu->kvm);
> +	kvm_mmu_invalidate_memslot_pages(vcpu->kvm, NULL);
>  
>  	kvm_x86_ops->patch_hypercall(vcpu, instruction);
>  
> @@ -7079,7 +7079,7 @@ void kvm_arch_flush_shadow_all(struct kvm *kvm)
>  void kvm_arch_flush_shadow_memslot(struct kvm *kvm,
>  				   struct kvm_memory_slot *slot)
>  {
> -	kvm_arch_flush_shadow_all(kvm);
> +	kvm_mmu_invalidate_memslot_pages(kvm, slot);
>  }
>  
>  int kvm_arch_vcpu_runnable(struct kvm_vcpu *vcpu)
> -- 
> 1.7.7.6

--
			Gleb.

  reply	other threads:[~2013-05-16 16:19 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-16 12:17 [PATCH v5 0/8] KVM: MMU: fast zap all shadow pages Xiao Guangrong
2013-05-16 12:17 ` [PATCH v5 1/8] KVM: MMU: drop unnecessary kvm_reload_remote_mmus Xiao Guangrong
2013-05-16 12:17 ` [PATCH v5 2/8] KVM: MMU: delete shadow page from hash list in kvm_mmu_prepare_zap_page Xiao Guangrong
2013-05-16 12:17 ` [PATCH v5 3/8] KVM: MMU: fast invalidate all pages Xiao Guangrong
2013-05-16 12:43   ` Gleb Natapov
2013-05-16 13:14     ` Paolo Bonzini
2013-05-16 13:41       ` Gleb Natapov
2013-05-16 13:49         ` Paolo Bonzini
2013-05-16 13:25     ` Xiao Guangrong
2013-05-16 13:43       ` Gleb Natapov
2013-05-16 15:57         ` Gleb Natapov
2013-05-16 18:39           ` Xiao Guangrong
2013-05-16 19:57             ` Gleb Natapov
2013-05-16 16:18   ` Gleb Natapov
2013-05-16 18:40     ` Xiao Guangrong
2013-05-16 12:17 ` [PATCH v5 4/8] KVM: x86: use the fast way to " Xiao Guangrong
2013-05-16 16:19   ` Gleb Natapov [this message]
2013-05-16 18:45     ` Xiao Guangrong
2013-05-16 12:17 ` [PATCH v5 5/8] KVM: MMU: make kvm_mmu_zap_all preemptable Xiao Guangrong
2013-05-16 12:17 ` [PATCH v5 6/8] KVM: MMU: show mmu_valid_gen in shadow page related tracepoints Xiao Guangrong
2013-05-16 12:17 ` [PATCH v5 7/8] KVM: MMU: add tracepoint for kvm_mmu_invalidate_memslot_pages Xiao Guangrong
2013-05-16 12:17 ` [PATCH v5 8/8] KVM: MMU: zap pages in batch Xiao Guangrong
2013-05-16 12:45   ` Paolo Bonzini
2013-05-16 13:31     ` Xiao Guangrong
2013-05-16 12:20 ` [PATCH v5 0/8] KVM: MMU: fast zap all shadow pages Xiao Guangrong
2013-05-16 14:36 ` Takuya Yoshikawa
2013-05-16 18:26   ` 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=20130516161903.GH14597@redhat.com \
    --to=gleb@redhat.com \
    --cc=avi.kivity@gmail.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mtosatti@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=xiaoguangrong@linux.vnet.ibm.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).