From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH] KVM: Discard unnecessary kvm_mmu_flush_tlb() in kvm_mmu_load() Date: Mon, 13 Jul 2009 15:23:58 +0300 Message-ID: <4A5B275E.5070009@redhat.com> References: <1247130042-32290-1-git-send-email-sheng@linux.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org To: Sheng Yang Return-path: Received: from mx2.redhat.com ([66.187.237.31]:44798 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755721AbZGMMU6 (ORCPT ); Mon, 13 Jul 2009 08:20:58 -0400 In-Reply-To: <1247130042-32290-1-git-send-email-sheng@linux.intel.com> Sender: kvm-owner@vger.kernel.org List-ID: On 07/09/2009 12:00 PM, 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; > } > Maybe we should drop the flushes in vmx/svm instead? -- error compiling committee.c: too many arguments to function