From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marcelo Tosatti Subject: Re: [PATCH] KVM: Discard unnecessary kvm_mmu_flush_tlb() in kvm_mmu_load() Date: Wed, 15 Jul 2009 16:04:50 -0300 Message-ID: <20090715190450.GA8665@amt.cnet> References: <1247130042-32290-1-git-send-email-sheng@linux.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Avi Kivity , kvm@vger.kernel.org To: Sheng Yang Return-path: Received: from mx2.redhat.com ([66.187.237.31]:59021 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932223AbZGOTF2 (ORCPT ); Wed, 15 Jul 2009 15:05:28 -0400 Content-Disposition: inline In-Reply-To: <1247130042-32290-1-git-send-email-sheng@linux.intel.com> Sender: kvm-owner@vger.kernel.org List-ID: On Thu, Jul 09, 2009 at 05:00:42PM +0800, Sheng Yang wrote: > set_cr3() should already cover the TLB flushing. > > Signed-off-by: Sheng Yang > --- > arch/x86/kvm/mmu.c | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c > index 231d880..501c11e 100644 > --- a/arch/x86/kvm/mmu.c > +++ b/arch/x86/kvm/mmu.c > @@ -2349,8 +2349,8 @@ int kvm_mmu_load(struct kvm_vcpu *vcpu) > spin_unlock(&vcpu->kvm->mmu_lock); > if (r) > goto out; > + /* set_cr3() should ensure TLB has been flushed */ > kvm_x86_ops->set_cr3(vcpu, vcpu->arch.mmu.root_hpa); > - kvm_mmu_flush_tlb(vcpu); > out: > return r; > } > -- > 1.5.4.5 Applied, thanks.