From mboxrd@z Thu Jan 1 00:00:00 1970 From: Xiao Guangrong Subject: Re: [PATCH 2/3] KVM: MMU: Use kvm_mmu_sync_roots() in kvm_mmu_load() Date: Thu, 09 May 2013 18:18:45 +0800 Message-ID: <518B7805.7040702@linux.vnet.ibm.com> References: <20130509154350.15b956c4.yoshikawa_takuya_b1@lab.ntt.co.jp> <20130509154512.117fbfd9.yoshikawa_takuya_b1@lab.ntt.co.jp> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: gleb@redhat.com, pbonzini@redhat.com, mtosatti@redhat.com, kvm@vger.kernel.org To: Takuya Yoshikawa Return-path: Received: from e28smtp03.in.ibm.com ([122.248.162.3]:37559 "EHLO e28smtp03.in.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753531Ab3EIKS6 (ORCPT ); Thu, 9 May 2013 06:18:58 -0400 Received: from /spool/local by e28smtp03.in.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 9 May 2013 15:44:12 +0530 Received: from d28relay03.in.ibm.com (d28relay03.in.ibm.com [9.184.220.60]) by d28dlp02.in.ibm.com (Postfix) with ESMTP id 1888A394004F for ; Thu, 9 May 2013 15:48:50 +0530 (IST) Received: from d28av02.in.ibm.com (d28av02.in.ibm.com [9.184.220.64]) by d28relay03.in.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id r49AIfSs5636550 for ; Thu, 9 May 2013 15:48:41 +0530 Received: from d28av02.in.ibm.com (loopback [127.0.0.1]) by d28av02.in.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id r49AIlqD014465 for ; Thu, 9 May 2013 20:18:48 +1000 In-Reply-To: <20130509154512.117fbfd9.yoshikawa_takuya_b1@lab.ntt.co.jp> Sender: kvm-owner@vger.kernel.org List-ID: On 05/09/2013 02:45 PM, Takuya Yoshikawa wrote: > No need to open-code this function. > > Signed-off-by: Takuya Yoshikawa > --- > arch/x86/kvm/mmu.c | 4 +--- > 1 files changed, 1 insertions(+), 3 deletions(-) > > diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c > index 08119a8..d01f340 100644 > --- a/arch/x86/kvm/mmu.c > +++ b/arch/x86/kvm/mmu.c > @@ -3761,9 +3761,7 @@ int kvm_mmu_load(struct kvm_vcpu *vcpu) > if (r) > goto out; > r = mmu_alloc_roots(vcpu); > - spin_lock(&vcpu->kvm->mmu_lock); > - mmu_sync_roots(vcpu); > - spin_unlock(&vcpu->kvm->mmu_lock); > + kvm_mmu_sync_roots(vcpu); Reviewed-by: Xiao Guangrong