From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gleb Natapov Subject: Re: [PATCH 2/3] KVM: MMU: Use kvm_mmu_sync_roots() in kvm_mmu_load() Date: Sun, 12 May 2013 14:53:20 +0300 Message-ID: <20130512115319.GJ10830@redhat.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=us-ascii Cc: pbonzini@redhat.com, mtosatti@redhat.com, kvm@vger.kernel.org To: Takuya Yoshikawa Return-path: Received: from mx1.redhat.com ([209.132.183.28]:4859 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751112Ab3ELLxZ (ORCPT ); Sun, 12 May 2013 07:53:25 -0400 Content-Disposition: inline In-Reply-To: <20130509154512.117fbfd9.yoshikawa_takuya_b1@lab.ntt.co.jp> Sender: kvm-owner@vger.kernel.org List-ID: On Thu, May 09, 2013 at 03:45:12PM +0900, 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(-) > Applied, thanks. > 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); > if (r) > goto out; > /* set_cr3() should ensure TLB has been flushed */ > -- > 1.7.5.4 -- Gleb.