ia64/xen-unstable

changeset 2132:2acd7bcbfab4

bitkeeper revision 1.1159.1.18 (41176a55uZUDpX_GZ9o7ntvyBsjOGg)

Merge scramble.cl.cam.ac.uk:/auto/groups/xeno/BK/xeno.bk
into scramble.cl.cam.ac.uk:/local/scratch/kaf24/xeno
author kaf24@scramble.cl.cam.ac.uk
date Mon Aug 09 12:13:09 2004 +0000 (2004-08-09)
parents c61b505b6a52 cbd4d6c22abe
children bf915c915598
files .rootkeys linux-2.4.26-xen-sparse/include/asm-xen/processor.h linux-2.4.26-xen-sparse/include/asm-xen/ptrace.h linux-2.4.26-xen-sparse/include/asm-xen/system.h linux-2.4.26-xen-sparse/mkbuildtree linux-2.6.7-xen-sparse/arch/xen/kernel/evtchn.c linux-2.6.7-xen-sparse/include/asm-xen/asm-i386/ptrace.h linux-2.6.7-xen-sparse/include/asm-xen/asm-i386/system.h linux-2.6.7-xen-sparse/include/asm-xen/evtchn.h
line diff
     1.1 --- a/.rootkeys	Mon Aug 09 10:49:12 2004 +0000
     1.2 +++ b/.rootkeys	Mon Aug 09 12:13:09 2004 +0000
     1.3 @@ -103,7 +103,6 @@ 3e5a4e67uTYU5oEnIDjxuaez8njjqg linux-2.4
     1.4  3e5a4e67X7JyupgdYkgDX19Huj2sAw linux-2.4.26-xen-sparse/include/asm-xen/pgtable-2level.h
     1.5  3e5a4e67gr4NLGtQ5CvSLimMYZlkOA linux-2.4.26-xen-sparse/include/asm-xen/pgtable.h
     1.6  3e5a4e676uK4xErTBDH6XJREn9LSyg linux-2.4.26-xen-sparse/include/asm-xen/processor.h
     1.7 -3e5a4e67AJPjW-zL7p-xWuA6IVeH1g linux-2.4.26-xen-sparse/include/asm-xen/ptrace.h
     1.8  3e5a4e68uJz-xI0IBVMD7xRLQKJDFg linux-2.4.26-xen-sparse/include/asm-xen/segment.h
     1.9  3e5a4e68Nfdh6QcOKUTGCaYkf2LmYA linux-2.4.26-xen-sparse/include/asm-xen/smp.h
    1.10  4062f7e2PzFOUGT0PaE7A0VprTU3JQ linux-2.4.26-xen-sparse/include/asm-xen/synch_bitops.h
    1.11 @@ -222,7 +221,6 @@ 40f5623atCokYc2uCysSJ8jFO8TEsw linux-2.6
    1.12  40f5623aEToIXouJgO-ao5d5pcEt1w linux-2.6.7-xen-sparse/include/asm-xen/asm-i386/pgtable-2level.h
    1.13  40f5623aCCXRPlGpNthVXstGz9ZV3A linux-2.6.7-xen-sparse/include/asm-xen/asm-i386/pgtable.h
    1.14  40f5623aPCkQQfPtJSooGdhcatrvnQ linux-2.6.7-xen-sparse/include/asm-xen/asm-i386/processor.h
    1.15 -40f5623bvhcUmESJrtcII6Bmd61b3w linux-2.6.7-xen-sparse/include/asm-xen/asm-i386/ptrace.h
    1.16  40f5623bzLvxr7WoJIxVf2OH4rCBJg linux-2.6.7-xen-sparse/include/asm-xen/asm-i386/segment.h
    1.17  40f5623bG_LzgG6-qwk292nTc5Wabw linux-2.6.7-xen-sparse/include/asm-xen/asm-i386/setup.h
    1.18  40f5623bgzm_9vwxpzJswlAxg298Gg linux-2.6.7-xen-sparse/include/asm-xen/asm-i386/synch_bitops.h
     2.1 --- a/linux-2.4.26-xen-sparse/include/asm-xen/processor.h	Mon Aug 09 10:49:12 2004 +0000
     2.2 +++ b/linux-2.4.26-xen-sparse/include/asm-xen/processor.h	Mon Aug 09 12:13:09 2004 +0000
     2.3 @@ -7,6 +7,7 @@
     2.4  #ifndef __ASM_I386_PROCESSOR_H
     2.5  #define __ASM_I386_PROCESSOR_H
     2.6  
     2.7 +#include <asm/vm86.h>
     2.8  #include <asm/math_emu.h>
     2.9  #include <asm/segment.h>
    2.10  #include <asm/page.h>
    2.11 @@ -479,6 +480,4 @@ extern inline void prefetchw(const void 
    2.12  
    2.13  #endif
    2.14  
    2.15 -#define TF_MASK 0x100
    2.16 -
    2.17  #endif /* __ASM_I386_PROCESSOR_H */
     3.1 --- a/linux-2.4.26-xen-sparse/include/asm-xen/ptrace.h	Mon Aug 09 10:49:12 2004 +0000
     3.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.3 @@ -1,63 +0,0 @@
     3.4 -#ifndef _I386_PTRACE_H
     3.5 -#define _I386_PTRACE_H
     3.6 -
     3.7 -#define EBX 0
     3.8 -#define ECX 1
     3.9 -#define EDX 2
    3.10 -#define ESI 3
    3.11 -#define EDI 4
    3.12 -#define EBP 5
    3.13 -#define EAX 6
    3.14 -#define DS 7
    3.15 -#define ES 8
    3.16 -#define FS 9
    3.17 -#define GS 10
    3.18 -#define ORIG_EAX 11
    3.19 -#define EIP 12
    3.20 -#define CS  13
    3.21 -#define EFL 14
    3.22 -#define UESP 15
    3.23 -#define SS   16
    3.24 -#define FRAME_SIZE 17
    3.25 -
    3.26 -/* this struct defines the way the registers are stored on the 
    3.27 -   stack during a system call. */
    3.28 -
    3.29 -struct pt_regs {
    3.30 -	long ebx;
    3.31 -	long ecx;
    3.32 -	long edx;
    3.33 -	long esi;
    3.34 -	long edi;
    3.35 -	long ebp;
    3.36 -	long eax;
    3.37 -	int  xds;
    3.38 -	int  xes;
    3.39 -	long orig_eax;
    3.40 -	long eip;
    3.41 -	int  xcs;
    3.42 -	long eflags;
    3.43 -	long esp;
    3.44 -	int  xss;
    3.45 -};
    3.46 -
    3.47 -/* Arbitrarily choose the same ptrace numbers as used by the Sparc code. */
    3.48 -#define PTRACE_GETREGS            12
    3.49 -#define PTRACE_SETREGS            13
    3.50 -#define PTRACE_GETFPREGS          14
    3.51 -#define PTRACE_SETFPREGS          15
    3.52 -#define PTRACE_GETFPXREGS         18
    3.53 -#define PTRACE_SETFPXREGS         19
    3.54 -
    3.55 -#define PTRACE_SETOPTIONS         21
    3.56 -
    3.57 -/* options set using PTRACE_SETOPTIONS */
    3.58 -#define PTRACE_O_TRACESYSGOOD     0x00000001
    3.59 -
    3.60 -#ifdef __KERNEL__
    3.61 -#define user_mode(regs) ((regs) && (2 & (regs)->xcs))
    3.62 -#define instruction_pointer(regs) ((regs) ? (regs)->eip : NULL)
    3.63 -extern void show_regs(struct pt_regs *);
    3.64 -#endif
    3.65 -
    3.66 -#endif
     4.1 --- a/linux-2.4.26-xen-sparse/include/asm-xen/system.h	Mon Aug 09 10:49:12 2004 +0000
     4.2 +++ b/linux-2.4.26-xen-sparse/include/asm-xen/system.h	Mon Aug 09 12:13:09 2004 +0000
     4.3 @@ -323,7 +323,7 @@ do {                                    
     4.4      _shared->vcpu_data[0].evtchn_upcall_mask = 0;                             \
     4.5      barrier(); /* unmask then check (avoid races) */                          \
     4.6      if ( unlikely(_shared->vcpu_data[0].evtchn_upcall_pending) )              \
     4.7 -        evtchn_do_upcall(NULL);                                               \
     4.8 +        force_evtchn_callback();                                              \
     4.9  } while (0)
    4.10  
    4.11  #define __save_flags(x)                                                       \
    4.12 @@ -338,7 +338,7 @@ do {                                    
    4.13      if ( (_shared->vcpu_data[0].evtchn_upcall_mask = x) == 0 ) {              \
    4.14          barrier(); /* unmask then check (avoid races) */                      \
    4.15          if ( unlikely(_shared->vcpu_data[0].evtchn_upcall_pending) )          \
    4.16 -            evtchn_do_upcall(NULL);                                           \
    4.17 +            force_evtchn_callback();                                          \
    4.18      }                                                                         \
    4.19  } while (0)
    4.20  
    4.21 @@ -357,7 +357,7 @@ do {                                    
    4.22      _shared->vcpu_data[0].evtchn_upcall_mask = 0;                             \
    4.23      barrier(); /* unmask then check (avoid races) */                          \
    4.24      if ( unlikely(_shared->vcpu_data[0].evtchn_upcall_pending) )              \
    4.25 -        evtchn_do_upcall(NULL);                                               \
    4.26 +        force_evtchn_callback();                                              \
    4.27  } while (0)
    4.28  
    4.29  #define local_irq_save(x)       __save_and_cli(x)
     5.1 --- a/linux-2.4.26-xen-sparse/mkbuildtree	Mon Aug 09 10:49:12 2004 +0000
     5.2 +++ b/linux-2.4.26-xen-sparse/mkbuildtree	Mon Aug 09 12:13:09 2004 +0000
     5.3 @@ -170,6 +170,7 @@ ln -sf ../asm-i386/parport.h
     5.4  ln -sf ../asm-i386/pgtable-3level.h 
     5.5  ln -sf ../asm-i386/poll.h 
     5.6  ln -sf ../asm-i386/posix_types.h 
     5.7 +ln -sf ../asm-i386/ptrace.h 
     5.8  ln -sf ../asm-i386/resource.h 
     5.9  ln -sf ../asm-i386/rwlock.h 
    5.10  ln -sf ../asm-i386/rwsem.h 
    5.11 @@ -202,6 +203,7 @@ ln -sf ../asm-i386/ucontext.h
    5.12  ln -sf ../asm-i386/unaligned.h
    5.13  ln -sf ../asm-i386/unistd.h 
    5.14  ln -sf ../asm-i386/user.h 
    5.15 +ln -sf ../asm-i386/vm86.h 
    5.16  ln -sf ../../${LINUX_26}/include/asm-xen/ctrl_if.h
    5.17  ln -sf ../../${LINUX_26}/include/asm-xen/evtchn.h
    5.18  ln -sf ../../${LINUX_26}/include/asm-xen/hypervisor.h
     6.1 --- a/linux-2.6.7-xen-sparse/arch/xen/kernel/evtchn.c	Mon Aug 09 10:49:12 2004 +0000
     6.2 +++ b/linux-2.6.7-xen-sparse/arch/xen/kernel/evtchn.c	Mon Aug 09 12:13:09 2004 +0000
     6.3 @@ -46,6 +46,16 @@ extern asmlinkage unsigned int do_IRQ(in
     6.4  
     6.5  #define VALID_EVTCHN(_chn) ((_chn) != -1)
     6.6  
     6.7 +/*
     6.8 + * Force a proper event-channel callback from Xen after clearing the
     6.9 + * callback mask. We do this in a very simple manner, by making a call
    6.10 + * down into Xen. The pending flag will be checked by Xen on return.
    6.11 + */
    6.12 +void force_evtchn_callback(void)
    6.13 +{
    6.14 +    (void)HYPERVISOR_xen_version(0);
    6.15 +}
    6.16 +
    6.17  void evtchn_do_upcall(struct pt_regs *regs)
    6.18  {
    6.19      unsigned long  l1, l2;
     7.1 --- a/linux-2.6.7-xen-sparse/include/asm-xen/asm-i386/ptrace.h	Mon Aug 09 10:49:12 2004 +0000
     7.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     7.3 @@ -1,62 +0,0 @@
     7.4 -#ifndef _I386_PTRACE_H
     7.5 -#define _I386_PTRACE_H
     7.6 -
     7.7 -#define EBX 0
     7.8 -#define ECX 1
     7.9 -#define EDX 2
    7.10 -#define ESI 3
    7.11 -#define EDI 4
    7.12 -#define EBP 5
    7.13 -#define EAX 6
    7.14 -#define DS 7
    7.15 -#define ES 8
    7.16 -#define FS 9
    7.17 -#define GS 10
    7.18 -#define ORIG_EAX 11
    7.19 -#define EIP 12
    7.20 -#define CS  13
    7.21 -#define EFL 14
    7.22 -#define UESP 15
    7.23 -#define SS   16
    7.24 -#define FRAME_SIZE 17
    7.25 -
    7.26 -/* this struct defines the way the registers are stored on the 
    7.27 -   stack during a system call. */
    7.28 -
    7.29 -struct pt_regs {
    7.30 -	long ebx;
    7.31 -	long ecx;
    7.32 -	long edx;
    7.33 -	long esi;
    7.34 -	long edi;
    7.35 -	long ebp;
    7.36 -	long eax;
    7.37 -	int  xds;
    7.38 -	int  xes;
    7.39 -	long orig_eax;
    7.40 -	long eip;
    7.41 -	int  xcs;
    7.42 -	long eflags;
    7.43 -	long esp;
    7.44 -	int  xss;
    7.45 -};
    7.46 -
    7.47 -/* Arbitrarily choose the same ptrace numbers as used by the Sparc code. */
    7.48 -#define PTRACE_GETREGS            12
    7.49 -#define PTRACE_SETREGS            13
    7.50 -#define PTRACE_GETFPREGS          14
    7.51 -#define PTRACE_SETFPREGS          15
    7.52 -#define PTRACE_GETFPXREGS         18
    7.53 -#define PTRACE_SETFPXREGS         19
    7.54 -
    7.55 -#define PTRACE_OLDSETOPTIONS         21
    7.56 -
    7.57 -#define PTRACE_GET_THREAD_AREA    25
    7.58 -#define PTRACE_SET_THREAD_AREA    26
    7.59 -
    7.60 -#ifdef __KERNEL__
    7.61 -#define user_mode(regs) ((regs) && ((VM_MASK & (regs)->eflags) || (2 & (regs)->xcs)))
    7.62 -#define instruction_pointer(regs) ((regs)->eip)
    7.63 -#endif
    7.64 -
    7.65 -#endif
     8.1 --- a/linux-2.6.7-xen-sparse/include/asm-xen/asm-i386/system.h	Mon Aug 09 10:49:12 2004 +0000
     8.2 +++ b/linux-2.6.7-xen-sparse/include/asm-xen/asm-i386/system.h	Mon Aug 09 12:13:09 2004 +0000
     8.3 @@ -458,7 +458,7 @@ do {                                    
     8.4      _shared->vcpu_data[0].evtchn_upcall_mask = 0;                             \
     8.5      barrier(); /* unmask then check (avoid races) */                          \
     8.6      if ( unlikely(_shared->vcpu_data[0].evtchn_upcall_pending) )              \
     8.7 -        evtchn_do_upcall(NULL);                                               \
     8.8 +        force_evtchn_callback();                                              \
     8.9  } while (0)
    8.10  
    8.11  #define __save_flags(x)                                                       \
    8.12 @@ -473,7 +473,7 @@ do {                                    
    8.13      if ( (_shared->vcpu_data[0].evtchn_upcall_mask = (x)) == 0 ) {            \
    8.14          barrier(); /* unmask then check (avoid races) */                      \
    8.15          if ( unlikely(_shared->vcpu_data[0].evtchn_upcall_pending) )          \
    8.16 -            evtchn_do_upcall(NULL);                                           \
    8.17 +            force_evtchn_callback();                                          \
    8.18      }                                                                         \
    8.19  } while (0)
    8.20  
    8.21 @@ -494,7 +494,7 @@ do {                                    
    8.22      _shared->vcpu_data[0].evtchn_upcall_mask = 0;                             \
    8.23      barrier(); /* unmask then check (avoid races) */                          \
    8.24      if ( unlikely(_shared->vcpu_data[0].evtchn_upcall_pending) )              \
    8.25 -        evtchn_do_upcall(NULL);                                               \
    8.26 +        force_evtchn_callback();                                              \
    8.27  } while (0)
    8.28  
    8.29  #define local_irq_save(x)	__save_and_cli(x)
     9.1 --- a/linux-2.6.7-xen-sparse/include/asm-xen/evtchn.h	Mon Aug 09 10:49:12 2004 +0000
     9.2 +++ b/linux-2.6.7-xen-sparse/include/asm-xen/evtchn.h	Mon Aug 09 12:13:09 2004 +0000
     9.3 @@ -20,6 +20,9 @@
     9.4   * LOW-LEVEL DEFINITIONS
     9.5   */
     9.6  
     9.7 +/* Force a proper event-channel callback from Xen. */
     9.8 +void force_evtchn_callback(void);
     9.9 +
    9.10  /* Entry point for notifications into Linux subsystems. */
    9.11  void evtchn_do_upcall(struct pt_regs *regs);
    9.12  
    9.13 @@ -47,7 +50,7 @@ static inline void unmask_evtchn(int por
    9.14      {
    9.15          s->vcpu_data[0].evtchn_upcall_pending = 1;
    9.16          if ( !s->vcpu_data[0].evtchn_upcall_mask )
    9.17 -            evtchn_do_upcall(NULL);
    9.18 +            force_evtchn_callback();
    9.19      }
    9.20  }
    9.21