debuggers.hg

changeset 16967:128f7bc0a277

x86: Fix HVM hypercall preemption causing guest crash.
Signed-off-by: Yu Zhao <yu.zhao@intel.com>
author Keir Fraser <keir.fraser@citrix.com>
date Tue Jan 29 11:47:42 2008 +0000 (2008-01-29)
parents 7aa2149a3b0e
children 193afcdb85b2
files xen/arch/x86/domain.c
line diff
     1.1 --- a/xen/arch/x86/domain.c	Tue Jan 29 11:45:15 2008 +0000
     1.2 +++ b/xen/arch/x86/domain.c	Tue Jan 29 11:47:42 2008 +0000
     1.3 @@ -1506,7 +1506,12 @@ unsigned long hypercall_create_continuat
     1.4      {
     1.5          regs       = guest_cpu_user_regs();
     1.6          regs->eax  = op;
     1.7 -        regs->eip -= 2;  /* re-execute 'syscall' / 'int 0x82' */
     1.8 +        /*
     1.9 +         * For PV guest, we update EIP to re-execute 'syscall' / 'int 0x82';
    1.10 +         * HVM does not need this since 'vmcall' / 'vmmcall' is fault-like.
    1.11 +         */
    1.12 +        if ( !is_hvm_vcpu(current) )
    1.13 +            regs->eip -= 2;  /* re-execute 'syscall' / 'int 0x82' */
    1.14  
    1.15  #ifdef __x86_64__
    1.16          if ( !is_hvm_vcpu(current) ?