ia64/xen-unstable

changeset 6610:7557c46a9edf

We need to be more precise and restore the %eip.

Signed-Off-By: Leendert van Doorn <leendert@watson.ibm.com>
author kaf24@firebug.cl.cam.ac.uk
date Fri Sep 02 17:53:34 2005 +0000 (2005-09-02)
parents 151da8f5d5f2
children ed474440decd
files xen/arch/x86/vmx.c
line diff
     1.1 --- a/xen/arch/x86/vmx.c	Fri Sep 02 17:53:04 2005 +0000
     1.2 +++ b/xen/arch/x86/vmx.c	Fri Sep 02 17:53:34 2005 +0000
     1.3 @@ -1559,15 +1559,18 @@ asmlinkage void vmx_vmexit_handler(struc
     1.4  
     1.5      __vmread(IDT_VECTORING_INFO_FIELD, &idtv_info_field);
     1.6      if (idtv_info_field & INTR_INFO_VALID_MASK) {
     1.7 -	if ((idtv_info_field & 0x0700) != 0x400) { /* exclude soft ints */
     1.8 -            __vmwrite(VM_ENTRY_INTR_INFO_FIELD, idtv_info_field);
     1.9 +	__vmwrite(VM_ENTRY_INTR_INFO_FIELD, idtv_info_field);
    1.10 +
    1.11 +	__vmread(VM_EXIT_INSTRUCTION_LEN, &inst_len);
    1.12 +	if (inst_len >= 1 && inst_len <= 15) 
    1.13 +	    __vmwrite(VM_ENTRY_INSTRUCTION_LEN, inst_len);
    1.14  
    1.15 -	    if (idtv_info_field & 0x800) { /* valid error code */
    1.16 -		unsigned long error_code;
    1.17 -		__vmread(VM_EXIT_INTR_ERROR_CODE, &error_code);
    1.18 -		__vmwrite(VM_ENTRY_EXCEPTION_ERROR_CODE, error_code);
    1.19 -	    } 
    1.20 -	}
    1.21 +	if (idtv_info_field & 0x800) { /* valid error code */
    1.22 +	    unsigned long error_code;
    1.23 +	    __vmread(IDT_VECTORING_ERROR_CODE, &error_code);
    1.24 +	    __vmwrite(VM_ENTRY_EXCEPTION_ERROR_CODE, error_code);
    1.25 +	} 
    1.26 +
    1.27          VMX_DBG_LOG(DBG_LEVEL_1, "idtv_info_field=%x", idtv_info_field);
    1.28      }
    1.29