From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH 05/27] nVMX: Introduce vmcs12: a VMCS structure for L1 Date: Sun, 17 Oct 2010 15:29:47 +0200 Message-ID: <4CBAFA4B.9090409@redhat.com> References: <1287309814-nyh@il.ibm.com> <201010171006.o9HA68SE029324@rice.haifa.ibm.com> <4CBAED4D.3000301@redhat.com> <20101017131813.GC14069@fermat.math.technion.ac.il> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org, gleb@redhat.com To: "Nadav Har'El" Return-path: Received: from mx1.redhat.com ([209.132.183.28]:3064 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756613Ab0JQN3x (ORCPT ); Sun, 17 Oct 2010 09:29:53 -0400 In-Reply-To: <20101017131813.GC14069@fermat.math.technion.ac.il> Sender: kvm-owner@vger.kernel.org List-ID: On 10/17/2010 03:18 PM, Nadav Har'El wrote: > On Sun, Oct 17, 2010, Avi Kivity wrote about "Re: [PATCH 05/27] nVMX: Introduce vmcs12: a VMCS structure for L1": > > >+ if(to_vmx(vcpu)->nested.current_vmptr != -1ull){ > > > > Missing whitespace after if and before {. > > Sorry about that - I forgot to run checkpatch.pl on this iteration. > I now fixed this, and a bunch of other small style issues. > > > > } > > >@@ -4170,6 +4229,10 @@ static void vmx_free_vcpu(struct kvm_vcp > > > struct vcpu_vmx *vmx = to_vmx(vcpu); > > > > > > free_vpid(vmx); > > >+ if (vmx->nested.vmxon&& to_vmx(vcpu)->nested.current_vmptr != > > >-1ull){ > > >+ kunmap(to_vmx(vcpu)->nested.current_vmcs12_page); > > >+ nested_release_page(to_vmx(vcpu)->nested.current_vmcs12_page); > > >+ } > > > > Duplication - helper? > > Ok, I just moved the kunmap() into nested_release_page() - it was always > called before nested_release_page. I hope that's what you meant by > "duplication". > I meant the 4-line sequence duplicates the preceding hunk. So you could have a function that does it and call it twice. -- error compiling committee.c: too many arguments to function