From: Kouya Shimura Subject: [PATCH] vmx: correct EIP value of task-state segment Date: Fri, 31 Jul 2009 10:19:18 +0900 Message-ID: <7kab2ld4yx.fsf@pingu.sky.yk.fujitsu.co.jp> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="yoJgJB+Jj8" 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 --yoJgJB+Jj8 Content-Type: text/plain; charset=us-ascii Content-Description: message body text Content-Transfer-Encoding: 7bit Major OSes(Linux, windows, ...) don't seem to use task switching. So this bug is missed. Signed-off-by: Kouya Shimura --yoJgJB+Jj8 Content-Type: text/x-patch Content-Disposition: inline; filename="tss.patch" Content-Transfer-Encoding: 7bit diff -r e6c966b3a4d8 xen/arch/x86/hvm/vmx/vmx.c --- a/xen/arch/x86/hvm/vmx/vmx.c Thu Jul 30 17:56:23 2009 +0100 +++ b/xen/arch/x86/hvm/vmx/vmx.c Fri Jul 31 09:15:16 2009 +0900 @@ -2490,6 +2490,8 @@ asmlinkage void vmx_vmexit_handler(struc if ( (idtv_info & INTR_INFO_VALID_MASK) && (idtv_info & INTR_INFO_DELIVER_CODE_MASK) ) errcode = __vmread(IDT_VECTORING_ERROR_CODE); + inst_len = __get_instruction_length(); /* Safe: See SDM 3B 23.2.4 */ + regs->eip += inst_len; hvm_task_switch((uint16_t)exit_qualification, reasons[(exit_qualification >> 30) & 3], errcode); --yoJgJB+Jj8 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --yoJgJB+Jj8--