From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sheng Yang Subject: Re: [PATCH] KVM: Discard unnecessary kvm_mmu_flush_tlb() in kvm_mmu_load() Date: Mon, 13 Jul 2009 19:42:56 +0800 Message-ID: <200907131942.57330.sheng@linux.intel.com> References: <1247130042-32290-1-git-send-email-sheng@linux.intel.com> Mime-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Cc: Avi Kivity , Marcelo Tosatti To: kvm@vger.kernel.org Return-path: Received: from mga06.intel.com ([134.134.136.21]:63742 "EHLO orsmga101.jf.intel.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1755451AbZGMLm7 (ORCPT ); Mon, 13 Jul 2009 07:42:59 -0400 In-Reply-To: <1247130042-32290-1-git-send-email-sheng@linux.intel.com> Content-Disposition: inline Sender: kvm-owner@vger.kernel.org List-ID: On Thursday 09 July 2009 17:00:42 Sheng Yang wrote: > set_cr3() should already cover the TLB flushing. > Comments? -- regards Yang, Sheng > 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; > }