From: "Nadav Har'El" Subject: Re: [PATCH 07/31] nVMX: Introduce vmcs02: VMCS used to run L2 Date: Sun, 22 May 2011 11:29:49 +0300 Message-ID: <20110522082949.GA1116@fermat.math.technion.ac.il> References: <1305575004-nyh@il.ibm.com> <201105161947.p4GJlUJb001735@rice.haifa.ibm.com> <625BA99ED14B2D499DC4E29D8138F1505C9BEEFE29@shsmsx502.ccr.corp.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: "kvm@vger.kernel.org" , "gleb@redhat.com" , "avi@redhat.com" To: "Tian, Kevin" Return-path: Received: from mailgw12.technion.ac.il ([132.68.225.12]:39639 "EHLO mailgw12.technion.ac.il" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751625Ab1EVI3y (ORCPT ); Sun, 22 May 2011 04:29:54 -0400 Content-Disposition: inline In-Reply-To: <625BA99ED14B2D499DC4E29D8138F1505C9BEEFE29@shsmsx502.ccr.corp.intel.com> Sender: kvm-owner@vger.kernel.org List-ID: Hi, On Fri, May 20, 2011, Tian, Kevin wrote about "RE: [PATCH 07/31] nVMX: Introduce vmcs02: VMCS used to run L2": > Possibly we can maintain the vmcs02 pool along with L1 VMCLEAR ops, which > is similar to the hardware behavior regarding to cleared and launched state. If you set VMCS02_POOL_SIZE to a large size, and L1, like typical hypervisors, only keeps around a few VMCSs (and VMCLEARs the ones it will not use again), then we'll only have a few vmcs02: handle_vmclear() removes from the pool the vmcs02 that L1 explicitly told us it won't need again. > > +struct saved_vmcs { > > + struct vmcs *vmcs; > > + int cpu; > > + int launched; > > +}; > > "saved" looks a bit misleading here. It's simply a list of all active vmcs02 tracked > by kvm, isn't it? I have rewritten this part of the code, based on Avi's and Marcelo's requests, and the new name for this structure is "loaded_vmcs", i.e., a structure describing where a VMCS was loaded. > > +/* Used to remember the last vmcs02 used for some recently used vmcs12s > > */ > > +struct vmcs02_list { > > + struct list_head list; > > + gpa_t vmcs12_addr; > > uniform the name 'vmptr' as nested_vmx strucure: Ok. Changing all the mentions of "vmcs12_addr" to vmptr. -- Nadav Har'El | Sunday, May 22 2011, 18 Iyyar 5771 nyh@math.technion.ac.il |----------------------------------------- Phone +972-523-790466, ICQ 13349191 |"A witty saying proves nothing." -- http://nadav.harel.org.il |Voltaire