From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Nadav Har'El" Subject: Re: [PATCH 07/30] nVMX: Introduce vmcs02: VMCS used to run L2 Date: Mon, 16 May 2011 21:32:53 +0300 Message-ID: <20110516183253.GA12015@fermat.math.technion.ac.il> References: <1304842511-nyh@il.ibm.com> <201105080818.p488IllC017945@rice.haifa.ibm.com> <20110516153015.GC3814@amt.cnet> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: kvm@vger.kernel.org, gleb@redhat.com, avi@redhat.com To: Marcelo Tosatti Return-path: Received: from mailgw12.technion.ac.il ([132.68.225.12]:40936 "EHLO mailgw12.technion.ac.il" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750882Ab1EPSdH (ORCPT ); Mon, 16 May 2011 14:33:07 -0400 Content-Disposition: inline In-Reply-To: <20110516153015.GC3814@amt.cnet> Sender: kvm-owner@vger.kernel.org List-ID: On Mon, May 16, 2011, Marcelo Tosatti wrote about "Re: [PATCH 07/30] nVMX: Introduce vmcs02: VMCS used to run L2": > > +static void __nested_free_saved_vmcs(void *arg) > > +{ > > + struct saved_vmcs *saved_vmcs = arg; > > + > > + vmcs_clear(saved_vmcs->vmcs); > > + if (per_cpu(current_vmcs, saved_vmcs->cpu) == saved_vmcs->vmcs) > > + per_cpu(current_vmcs, saved_vmcs->cpu) = NULL; > > +} > > Should use raw_smp_processor_id instead of saved_vmcs->cpu. Hi, __nested_free_saved_vmcs is designed to be called only on the when saved_vmcs->cpu is equal to the current CPU. E.g., it is called as: if (saved_vmcs->cpu != -1) smp_call_function_single(saved_vmcs->cpu, __nested_free_saved_vmcs, saved_vmcs, 1); So the current code should be just as correct. The similar __vcpu_clear has an obscure case where (vmx->vcpu.cpu != cpu), but in this new function, there isn't. -- Nadav Har'El | Monday, May 16 2011, 13 Iyyar 5771 nyh@math.technion.ac.il |----------------------------------------- Phone +972-523-790466, ICQ 13349191 |Creativity consists of coming up with http://nadav.harel.org.il |many ideas, not just that one great idea.