From mboxrd@z Thu Jan 1 00:00:00 1970 From: Xiao Guangrong Subject: Re: [PATCH 3/3] KVM: MMU: Consolidate common code in mmu_free_roots() Date: Thu, 09 May 2013 18:11:31 +0800 Message-ID: <518B7653.60009@linux.vnet.ibm.com> References: <20130509154350.15b956c4.yoshikawa_takuya_b1@lab.ntt.co.jp> <20130509154602.da528c3b.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 e23smtp04.au.ibm.com ([202.81.31.146]:43056 "EHLO e23smtp04.au.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753046Ab3EIKLm (ORCPT ); Thu, 9 May 2013 06:11:42 -0400 Received: from /spool/local by e23smtp04.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 9 May 2013 19:59:10 +1000 Received: from d23relay04.au.ibm.com (d23relay04.au.ibm.com [9.190.234.120]) by d23dlp03.au.ibm.com (Postfix) with ESMTP id 176683578019 for ; Thu, 9 May 2013 20:11:36 +1000 (EST) Received: from d23av01.au.ibm.com (d23av01.au.ibm.com [9.190.234.96]) by d23relay04.au.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id r499vhml6946956 for ; Thu, 9 May 2013 19:57:43 +1000 Received: from d23av01.au.ibm.com (loopback [127.0.0.1]) by d23av01.au.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id r49ABZij031264 for ; Thu, 9 May 2013 20:11:35 +1000 In-Reply-To: <20130509154602.da528c3b.yoshikawa_takuya_b1@lab.ntt.co.jp> Sender: kvm-owner@vger.kernel.org List-ID: On 05/09/2013 02:46 PM, Takuya Yoshikawa wrote: > By making the last three statements common to both if/else cases, the > symmetry between the locking and unlocking becomes clearer. One note > here is that VCPU's root_hpa does not need to be protected by mmu_lock. > > Signed-off-by: Takuya Yoshikawa > --- > arch/x86/kvm/mmu.c | 39 +++++++++++++++++++-------------------- > 1 files changed, 19 insertions(+), 20 deletions(-) DO NOT think it makes any thing better.