From mboxrd@z Thu Jan 1 00:00:00 1970 From: Razvan Cojocaru Subject: Should hvm_hw_cpu's sysenter_eip always be zero after xc_domain_hvm_getcontext_partial()? Date: Fri, 31 Jul 2015 18:00:42 +0300 Message-ID: <55BB8D9A.2070705@bitdefender.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.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: "xen-devel@lists.xen.org" List-Id: xen-devel@lists.xenproject.org Hello, It has become apparent that after a succesful xc_domain_hvm_getcontext_partial( ..., HVM_SAVE_CODE(CPU), ...) call, the sysenter_eip member of struct hvm_hw_cpu is always zero. Looking in the code, the only two __vmwrite(GUEST_SYSENTER_EIP, ...) calls occur in xen/arch/x86/hvm/vmx/vmx.c. One is in vmx_msr_write_intercept(), but adding a printk() just after produces no output after starting and stopping a guest. The other is in vmx_vmcs_restore(), which seems to dutifully restore the never-set value of zero after a save. So this doesn't seem to be actually initialized anywhere. Could somebody please recommend the best place to initialize it, and the best value to initialize it with? Or maybe you could point out what I'm missing, if that's the case? Thanks, Razvan