ia64/xen-unstable

changeset 4969:cde4f9db384e

bitkeeper revision 1.1441 (428af44dQBVBR-lJOrBaoNhpMx9hXg)

x86/64 fixes.
Signed-off-by: Jun Nakajima <jun.nakajima@intel.com>
Signed-off-by: Scott Parish <srparish@us.ibm.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
author kaf24@firebug.cl.cam.ac.uk
date Wed May 18 07:52:45 2005 +0000 (2005-05-18)
parents 6866a8788b06
children 08efa4acf7bf
files xen/arch/x86/x86_64/entry.S xen/include/asm-x86/x86_64/current.h
line diff
     1.1 --- a/xen/arch/x86/x86_64/entry.S	Tue May 17 22:29:19 2005 +0000
     1.2 +++ b/xen/arch/x86/x86_64/entry.S	Wed May 18 07:52:45 2005 +0000
     1.3 @@ -314,10 +314,10 @@ FLT4:   movq  %rax,16(%rsi)             
     1.4          movq  EDOMAIN_vcpu_info(%rbx),%rax
     1.5          pushq VCPUINFO_upcall_mask(%rax)
     1.6          testb $TBF_INTERRUPT,%cl
     1.7 -        setnz VCPUINFO_upcall_mask(%eax)# TBF_INTERRUPT -> clear upcall mask
     1.8 +        setnz VCPUINFO_upcall_mask(%rax)# TBF_INTERRUPT -> clear upcall mask
     1.9          popq  %rax
    1.10          shll  $16,%eax                  # Bits 16-23: saved_upcall_mask
    1.11 -        movw  UREGS_cs+8(%esp),%ax      # Bits  0-15: CS
    1.12 +        movw  UREGS_cs+8(%rsp),%ax      # Bits  0-15: CS
    1.13  FLT5:   movq  %rax,8(%rsi)              # CS/saved_upcall_mask
    1.14          movq  UREGS_rip+8(%rsp),%rax
    1.15  FLT6:   movq  %rax,(%rsi)               # RIP
     2.1 --- a/xen/include/asm-x86/x86_64/current.h	Tue May 17 22:29:19 2005 +0000
     2.2 +++ b/xen/include/asm-x86/x86_64/current.h	Wed May 18 07:52:45 2005 +0000
     2.3 @@ -5,7 +5,7 @@
     2.4  struct domain;
     2.5  
     2.6  #define STACK_RESERVED \
     2.7 -    (sizeof(struct cpu_user_regs) + sizeof(struct domain *))
     2.8 +    (sizeof(struct cpu_user_regs) + sizeof(struct domain *) + 8)
     2.9  
    2.10  static inline struct exec_domain *get_current(void)
    2.11  {
    2.12 @@ -34,15 +34,17 @@ static inline struct cpu_user_regs *gues
    2.13  
    2.14  /*
    2.15   * Get the bottom-of-stack, as stored in the per-CPU TSS. This is actually
    2.16 - * 40 bytes before the real bottom of the stack to allow space for:
    2.17 - *  domain pointer, DS, ES, FS, GS
    2.18 + * 48 bytes before the real bottom of the stack to allow space for:
    2.19 + * domain pointer, padding, DS, ES, FS, GS. The padding is required to
    2.20 + * have the stack pointer 16-byte aligned: the amount we subtract from
    2.21 + * STACK_SIZE *must* be a multiple of 16.
    2.22   */
    2.23  static inline unsigned long get_stack_bottom(void)
    2.24  {
    2.25      unsigned long p;
    2.26      __asm__( "andq %%rsp,%0; addq %2,%0"
    2.27  	    : "=r" (p)
    2.28 -	    : "0" (~(STACK_SIZE-1)), "i" (STACK_SIZE-40) );
    2.29 +	    : "0" (~(STACK_SIZE-1)), "i" (STACK_SIZE-48) );
    2.30      return p;
    2.31  }
    2.32