WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH] vmx: correct EIP value of task-state segment

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] vmx: correct EIP value of task-state segment
From: Kouya Shimura <kouya@xxxxxxxxxxxxxx>
Date: Fri, 31 Jul 2009 10:19:18 +0900
Delivery-date: Thu, 30 Jul 2009 18:19:41 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Major OSes(Linux, windows, ...) don't seem to use task switching. 
So this bug is missed.

Signed-off-by: Kouya Shimura <kouya@xxxxxxxxxxxxxx>

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);
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel