From patchwork Thu Jul 9 09:00:42 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sheng Yang X-Patchwork-Id: 34786 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n6990n7G002162 for ; Thu, 9 Jul 2009 09:00:49 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758224AbZGIJAZ (ORCPT ); Thu, 9 Jul 2009 05:00:25 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1758575AbZGIJAZ (ORCPT ); Thu, 9 Jul 2009 05:00:25 -0400 Received: from mga01.intel.com ([192.55.52.88]:2387 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757140AbZGIJAY (ORCPT ); Thu, 9 Jul 2009 05:00:24 -0400 Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga101.fm.intel.com with ESMTP; 09 Jul 2009 01:45:39 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.42,372,1243839600"; d="scan'208";a="706302141" Received: from syang10-desktop.sh.intel.com (HELO syang10-desktop) ([10.239.13.29]) by fmsmga001.fm.intel.com with ESMTP; 09 Jul 2009 02:03:41 -0700 Received: from yasker by syang10-desktop with local (Exim 4.69) (envelope-from ) id 1MOpUg-0008PB-7C; Thu, 09 Jul 2009 17:00:42 +0800 From: Sheng Yang To: Avi Kivity Cc: kvm@vger.kernel.org, Sheng Yang Subject: [PATCH] KVM: Discard unnecessary kvm_mmu_flush_tlb() in kvm_mmu_load() Date: Thu, 9 Jul 2009 17:00:42 +0800 Message-Id: <1247130042-32290-1-git-send-email-sheng@linux.intel.com> X-Mailer: git-send-email 1.6.0.4 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org 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; }