From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mukesh Rathor Subject: keeping track of Intel vmcs Date: Tue, 15 Mar 2011 19:58:15 -0700 Message-ID: <20110315195815.17f9f0d1@mantra.us.oracle.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: "Xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org Hi, I always wonder about intel vmcs info tracking when i have to look at it. Following data structs are used to keep track of it: static DEFINE_PER_CPU(struct foreign_vmcs, foreign_vmcs) v->arch.hvm_vmx.active_cpu; v->arch.hvm_vmx.launched; v->arch.hvm_vmx.active_list; static DEFINE_PER_CPU(struct vmcs_struct *, current_vmcs); It appears to me that it could be lot simpler. All we need to worry about is if a cpu needs to be launched or resumed. The rest can be concluded from existing information. For example, current_vmcs and foreign_vmcs seems redundant. If current == v, then we can conclude current_vmcs is current, and forieng vmcs is not current! It seems all we need is unsetting launched in vmpclear. Can someone from Intel tell me what am I missing? thanks Mukesh