ia64/xen-unstable

changeset 4120:3236c27b9832

bitkeeper revision 1.1236.25.14 (42338ac2o4mi66zj6XSPc2Z66lgEaQ)

Various cleanups.
Signed-off-by: Christian Limpach <chris@xensource.com>
author cl349@firebug.cl.cam.ac.uk
date Sun Mar 13 00:35:14 2005 +0000 (2005-03-13)
parents ef90e028e868
children c04324140af0 d4fa637dbd23
files tools/libxc/xc_ptrace.c xen/Rules.mk xen/arch/x86/traps.c xen/common/domain.c
line diff
     1.1 --- a/tools/libxc/xc_ptrace.c	Sun Mar 13 00:16:16 2005 +0000
     1.2 +++ b/tools/libxc/xc_ptrace.c	Sun Mar 13 00:35:14 2005 +0000
     1.3 @@ -49,63 +49,63 @@ char * ptrace_names[] = {
     1.4  };
     1.5  
     1.6  struct gdb_regs {
     1.7 -        long ebx; /* 0 */
     1.8 -        long ecx; /* 4 */
     1.9 -        long edx; /* 8 */
    1.10 -        long esi; /* 12 */
    1.11 -        long edi; /* 16 */
    1.12 -        long ebp; /* 20 */
    1.13 -        long eax; /* 24 */ 
    1.14 -        int  xds; /* 28 */
    1.15 -        int  xes; /* 32 */
    1.16 -	int  xfs; /* 36 */
    1.17 -	int  xgs; /* 40 */
    1.18 -	long orig_eax; /* 44 */
    1.19 -        long eip;    /* 48 */
    1.20 -        int  xcs;    /* 52 */
    1.21 -        long eflags; /* 56 */
    1.22 -        long esp;    /* 60 */     
    1.23 -	int  xss;    /* 64 */
    1.24 +    long ebx; /* 0 */
    1.25 +    long ecx; /* 4 */
    1.26 +    long edx; /* 8 */
    1.27 +    long esi; /* 12 */
    1.28 +    long edi; /* 16 */
    1.29 +    long ebp; /* 20 */
    1.30 +    long eax; /* 24 */ 
    1.31 +    int  xds; /* 28 */
    1.32 +    int  xes; /* 32 */
    1.33 +    int  xfs; /* 36 */
    1.34 +    int  xgs; /* 40 */
    1.35 +    long orig_eax; /* 44 */
    1.36 +    long eip;    /* 48 */
    1.37 +    int  xcs;    /* 52 */
    1.38 +    long eflags; /* 56 */
    1.39 +    long esp;    /* 60 */     
    1.40 +    int  xss;    /* 64 */
    1.41  };
    1.42  #define printval(x) printf("%s = %lx\n", #x, (long)x);
    1.43  #define SET_PT_REGS(pt, xc) \
    1.44  { \
    1.45 -pt.ebx = xc.ebx; \
    1.46 -pt.ecx = xc.ecx; \
    1.47 -pt.edx = xc.edx; \
    1.48 -pt.esi = xc.esi; \
    1.49 -pt.edi = xc.edi; \
    1.50 -pt.ebp = xc.ebp; \
    1.51 -pt.eax = xc.eax; \
    1.52 -pt.eip = xc.eip; \
    1.53 -pt.xcs = xc.cs; \
    1.54 -pt.eflags = xc.eflags; \
    1.55 -pt.esp = xc.esp; \
    1.56 -pt.xss = xc.ss; \
    1.57 -pt.xes = xc.es; \
    1.58 -pt.xds = xc.ds; \
    1.59 -pt.xfs = xc.fs; \
    1.60 -pt.xgs = xc.gs; \
    1.61 +    pt.ebx = xc.ebx; \
    1.62 +    pt.ecx = xc.ecx; \
    1.63 +    pt.edx = xc.edx; \
    1.64 +    pt.esi = xc.esi; \
    1.65 +    pt.edi = xc.edi; \
    1.66 +    pt.ebp = xc.ebp; \
    1.67 +    pt.eax = xc.eax; \
    1.68 +    pt.eip = xc.eip; \
    1.69 +    pt.xcs = xc.cs; \
    1.70 +    pt.eflags = xc.eflags; \
    1.71 +    pt.esp = xc.esp; \
    1.72 +    pt.xss = xc.ss; \
    1.73 +    pt.xes = xc.es; \
    1.74 +    pt.xds = xc.ds; \
    1.75 +    pt.xfs = xc.fs; \
    1.76 +    pt.xgs = xc.gs; \
    1.77  }
    1.78  
    1.79  #define SET_XC_REGS(pt, xc) \
    1.80  { \
    1.81 -xc.ebx = pt->ebx; \
    1.82 -xc.ecx = pt->ecx; \
    1.83 -xc.edx = pt->edx; \
    1.84 -xc.esi = pt->esi; \
    1.85 -xc.edi = pt->edi; \
    1.86 -xc.ebp = pt->ebp; \
    1.87 -xc.eax = pt->eax; \
    1.88 -xc.eip = pt->eip; \
    1.89 -xc.cs = pt->xcs; \
    1.90 -xc.eflags = pt->eflags; \
    1.91 -xc.esp = pt->esp; \
    1.92 -xc.ss = pt->xss; \
    1.93 -xc.es = pt->xes; \
    1.94 -xc.ds = pt->xds; \
    1.95 -xc.fs = pt->xfs; \
    1.96 -xc.gs = pt->xgs; \
    1.97 +    xc.ebx = pt->ebx; \
    1.98 +    xc.ecx = pt->ecx; \
    1.99 +    xc.edx = pt->edx; \
   1.100 +    xc.esi = pt->esi; \
   1.101 +    xc.edi = pt->edi; \
   1.102 +    xc.ebp = pt->ebp; \
   1.103 +    xc.eax = pt->eax; \
   1.104 +    xc.eip = pt->eip; \
   1.105 +    xc.cs = pt->xcs; \
   1.106 +    xc.eflags = pt->eflags; \
   1.107 +    xc.esp = pt->esp; \
   1.108 +    xc.ss = pt->xss; \
   1.109 +    xc.es = pt->xes; \
   1.110 +    xc.ds = pt->xds; \
   1.111 +    xc.fs = pt->xfs; \
   1.112 +    xc.gs = pt->xgs; \
   1.113  }
   1.114  
   1.115  
     2.1 --- a/xen/Rules.mk	Sun Mar 13 00:16:16 2005 +0000
     2.2 +++ b/xen/Rules.mk	Sun Mar 13 00:35:14 2005 +0000
     2.3 @@ -1,10 +1,10 @@
     2.4  
     2.5  verbose     ?= n
     2.6  debug       ?= n
     2.7 -debugger    ?= n
     2.8  perfc       ?= n
     2.9  trace       ?= n
    2.10  optimize    ?= y
    2.11 +domu_debug  ?= n
    2.12  crash_debug ?= n
    2.13  
    2.14  # Currently supported architectures: x86_32, x86_64
    2.15 @@ -55,8 +55,8 @@ else
    2.16  CFLAGS += -DVERBOSE
    2.17  endif
    2.18  
    2.19 -ifeq ($(debugger),y)
    2.20 -CFLAGS += -DXEN_UDB
    2.21 +ifeq ($(domu_debug),y)
    2.22 +CFLAGS += -DDOMU_DEBUG
    2.23  endif
    2.24  
    2.25  ifeq ($(crash_debug),y)
     3.1 --- a/xen/arch/x86/traps.c	Sun Mar 13 00:16:16 2005 +0000
     3.2 +++ b/xen/arch/x86/traps.c	Sun Mar 13 00:35:14 2005 +0000
     3.3 @@ -223,7 +223,7 @@ asmlinkage int do_int3(struct xen_regs *
     3.4          show_registers(regs);
     3.5          panic("CPU%d FATAL TRAP: vector = 3 (Int3)\n", smp_processor_id());
     3.6      } 
     3.7 -#ifdef XEN_UDB
     3.8 +#ifdef DOMU_DEBUG
     3.9      else if ( KERNEL_MODE(ed, regs) && ed->domain->id != 0 ) 
    3.10      {
    3.11          if ( !test_and_set_bit(EDF_CTRLPAUSE, &ed->ed_flags) ) {
    3.12 @@ -234,7 +234,7 @@ asmlinkage int do_int3(struct xen_regs *
    3.13          
    3.14          return 0;
    3.15      }
    3.16 -#endif /* XEN_UDB */
    3.17 +#endif /* DOMU_DEBUG */
    3.18      ti = current->arch.traps + 3;
    3.19      tb->flags = TBF_EXCEPTION;
    3.20      tb->cs    = ti->cs;
    3.21 @@ -924,7 +924,7 @@ asmlinkage int do_debug(struct xen_regs 
    3.22           */
    3.23          goto out;
    3.24      } 
    3.25 -#ifdef XEN_UDB
    3.26 +#ifdef DOMU_DEBUG
    3.27      else if ( KERNEL_MODE(ed, regs) && ed->domain->id != 0 ) 
    3.28      {
    3.29          regs->eflags &= ~EF_TF;
    3.30 @@ -936,7 +936,7 @@ asmlinkage int do_debug(struct xen_regs 
    3.31  
    3.32          goto out;
    3.33      }    
    3.34 -#endif /* XEN_UDB */
    3.35 +#endif /* DOMU_DEBUG */
    3.36      /* Save debug status register where guest OS can peek at it */
    3.37      ed->arch.debugreg[6] = condition;
    3.38  
     4.1 --- a/xen/common/domain.c	Sun Mar 13 00:16:16 2005 +0000
     4.2 +++ b/xen/common/domain.c	Sun Mar 13 00:35:14 2005 +0000
     4.3 @@ -267,7 +267,7 @@ int set_info_guest(struct domain *p, dom
     4.4      unsigned long vcpu = setdomaininfo->exec_domain;
     4.5      struct exec_domain *ed; 
     4.6  
     4.7 -    if ( (vcpu >= MAX_VIRT_CPUS) || ((ed = p->exec_domain[vcpu]) != NULL) )
     4.8 +    if ( (vcpu >= MAX_VIRT_CPUS) || ((ed = p->exec_domain[vcpu]) == NULL) )
     4.9          return -EINVAL;
    4.10      
    4.11      if (test_bit(DF_CONSTRUCTED, &p->d_flags) &&