ia64/xen-unstable

changeset 8660:860fa26845c2

Change domain_crash to say where it was called from.

Signed-off-by: Steven Smith, sos22@cam.ac.uk
author sos22@douglas.cl.cam.ac.uk
date Wed Jan 25 17:14:19 2006 +0100 (2006-01-25)
parents 806dfeb03d92
children 43c294aea9ec
files xen/arch/x86/x86_32/entry.S xen/common/domain.c xen/include/xen/sched.h
line diff
     1.1 --- a/xen/arch/x86/x86_32/entry.S	Wed Jan 25 11:12:34 2006 +0100
     1.2 +++ b/xen/arch/x86/x86_32/entry.S	Wed Jan 25 17:14:19 2006 +0100
     1.3 @@ -477,6 +477,14 @@ nvm86_3:/* Rewrite our stack frame and r
     1.4          .long FLT24,domain_crash_synchronous , FLT25,domain_crash_synchronous
     1.5  .previous
     1.6  
     1.7 +domain_crash_synchronous_string:
     1.8 +	.asciz "domain_crash_sync from entry.S %lx\n"
     1.9 +	
    1.10 +domain_crash_synchronous:
    1.11 +	pushl $domain_crash_synchronous_string
    1.12 +	call printf
    1.13 +	jmp __domain_crash_synchronous
    1.14 +	
    1.15          ALIGN
    1.16  process_guest_exception_and_events:
    1.17          leal VCPU_trap_bounce(%ebx),%edx
     2.1 --- a/xen/common/domain.c	Wed Jan 25 11:12:34 2006 +0100
     2.2 +++ b/xen/common/domain.c	Wed Jan 25 17:14:19 2006 +0100
     2.3 @@ -139,7 +139,7 @@ void domain_kill(struct domain *d)
     2.4  }
     2.5  
     2.6  
     2.7 -void domain_crash(struct domain *d)
     2.8 +void __domain_crash(struct domain *d)
     2.9  {
    2.10      if ( d == current->domain )
    2.11      {
    2.12 @@ -157,9 +157,9 @@ void domain_crash(struct domain *d)
    2.13  }
    2.14  
    2.15  
    2.16 -void domain_crash_synchronous(void)
    2.17 +void __domain_crash_synchronous(void)
    2.18  {
    2.19 -    domain_crash(current->domain);
    2.20 +    __domain_crash(current->domain);
    2.21      for ( ; ; )
    2.22          do_softirq();
    2.23  }
     3.1 --- a/xen/include/xen/sched.h	Wed Jan 25 11:12:34 2006 +0100
     3.2 +++ b/xen/include/xen/sched.h	Wed Jan 25 17:14:19 2006 +0100
     3.3 @@ -238,13 +238,21 @@ extern void domain_pause_for_debugger(vo
     3.4   * caller is the specified domain. The domain is not synchronously descheduled
     3.5   * from any processor.
     3.6   */
     3.7 -extern void domain_crash(struct domain *d);
     3.8 +extern void __domain_crash(struct domain *d);
     3.9 +#define domain_crash(d) do {                                              \
    3.10 +    printf("domain_crash called from %s:%d\n", __FILE__, __LINE__);       \
    3.11 +    __domain_crash(d);                                                    \
    3.12 +} while (0)
    3.13  
    3.14  /*
    3.15   * Mark current domain as crashed and synchronously deschedule from the local
    3.16   * processor. This function never returns.
    3.17   */
    3.18 -extern void domain_crash_synchronous(void) __attribute__((noreturn));
    3.19 +extern void __domain_crash_synchronous(void) __attribute__((noreturn));
    3.20 +#define domain_crash_synchronous() do {                                   \
    3.21 +    printf("domain_crash_sync called from %s:%d\n", __FILE__, __LINE__);  \
    3.22 +    __domain_crash_synchronous();                                         \
    3.23 +} while (0)
    3.24  
    3.25  void new_thread(struct vcpu *d,
    3.26                  unsigned long start_pc,