ia64/xen-unstable

changeset 10523:1e2ea40078f2

[HVM][VMX] Propagate debug exception to guest if no external debugger is enabled.
Signed-off-by: George Dunlap <dunlapg@umich.edu>
author kaf24@firebug.cl.cam.ac.uk
date Tue Jun 27 09:33:35 2006 +0100 (2006-06-27)
parents 9ec0b4f10b4f
children 4105520841b3
files xen/arch/x86/hvm/vmx/vmx.c
line diff
     1.1 --- a/xen/arch/x86/hvm/vmx/vmx.c	Sat Jun 24 23:44:18 2006 +0100
     1.2 +++ b/xen/arch/x86/hvm/vmx/vmx.c	Tue Jun 27 09:33:35 2006 +0100
     1.3 @@ -2080,10 +2080,19 @@ asmlinkage void vmx_vmexit_handler(struc
     1.4          {
     1.5              void store_cpu_user_regs(struct cpu_user_regs *regs);
     1.6  
     1.7 -            store_cpu_user_regs(&regs);
     1.8 -            __vm_clear_bit(GUEST_PENDING_DBG_EXCEPTIONS, PENDING_DEBUG_EXC_BS);
     1.9 -
    1.10 -            domain_pause_for_debugger();
    1.11 +            if ( test_bit(_DOMF_debugging, &v->domain->domain_flags) )
    1.12 +            {
    1.13 +                store_cpu_user_regs(&regs);
    1.14 +                domain_pause_for_debugger();
    1.15 +                __vm_clear_bit(GUEST_PENDING_DBG_EXCEPTIONS,
    1.16 +                               PENDING_DEBUG_EXC_BS);
    1.17 +            }
    1.18 +            else
    1.19 +            {
    1.20 +                vmx_reflect_exception(v);
    1.21 +                __vm_clear_bit(GUEST_PENDING_DBG_EXCEPTIONS,
    1.22 +                               PENDING_DEBUG_EXC_BS);
    1.23 +            }
    1.24  
    1.25              break;
    1.26          }