ia64/xen-unstable

changeset 9744:7ed6c203efe9

[IA64] xensystem.h

Move all Xen memory space constants into xensystem.h
Cleanup related to the move.

Signed-off-by: Tristan Gingold <tristan.gingold@bull.net>
author awilliam@xenbuild.aw
date Wed Apr 19 10:39:15 2006 -0600 (2006-04-19)
parents dc05c0ce9139
children 19148831ab05
files xen/include/asm-ia64/linux-xen/asm/io.h xen/include/asm-ia64/linux-xen/asm/system.h xen/include/asm-ia64/uaccess.h xen/include/asm-ia64/vmx_uaccess.h xen/include/asm-ia64/xensystem.h
line diff
     1.1 --- a/xen/include/asm-ia64/linux-xen/asm/io.h	Wed Apr 19 10:35:31 2006 -0600
     1.2 +++ b/xen/include/asm-ia64/linux-xen/asm/io.h	Wed Apr 19 10:39:15 2006 -0600
     1.3 @@ -23,9 +23,7 @@
     1.4  #define __SLOW_DOWN_IO	do { } while (0)
     1.5  #define SLOW_DOWN_IO	do { } while (0)
     1.6  
     1.7 -#ifdef XEN
     1.8 -#define __IA64_UNCACHED_OFFSET	0xe800000000000000UL
     1.9 -#else
    1.10 +#ifndef XEN
    1.11  #define __IA64_UNCACHED_OFFSET	0xc000000000000000UL	/* region 6 */
    1.12  #endif
    1.13  
     2.1 --- a/xen/include/asm-ia64/linux-xen/asm/system.h	Wed Apr 19 10:35:31 2006 -0600
     2.2 +++ b/xen/include/asm-ia64/linux-xen/asm/system.h	Wed Apr 19 10:39:15 2006 -0600
     2.3 @@ -20,12 +20,14 @@
     2.4  #include <asm/percpu.h>
     2.5  
     2.6  #define GATE_ADDR		__IA64_UL_CONST(0xa000000000000000)
     2.7 +#ifndef XEN
     2.8  /*
     2.9   * 0xa000000000000000+2*PERCPU_PAGE_SIZE
    2.10   * - 0xa000000000000000+3*PERCPU_PAGE_SIZE remain unmapped (guard page)
    2.11   */
    2.12  #define KERNEL_START		 __IA64_UL_CONST(0xa000000100000000)
    2.13  #define PERCPU_ADDR		(-PERCPU_PAGE_SIZE)
    2.14 +#endif
    2.15  
    2.16  #ifndef __ASSEMBLY__
    2.17  
    2.18 @@ -185,6 +187,7 @@ do {								\
    2.19  	(__ia64_id_flags & IA64_PSR_I) == 0;	\
    2.20  })
    2.21  
    2.22 +#ifndef XEN
    2.23  #ifdef __KERNEL__
    2.24  
    2.25  #ifdef CONFIG_IA32_SUPPORT
    2.26 @@ -285,6 +288,7 @@ void cpu_idle_wait(void);
    2.27  #define arch_align_stack(x) (x)
    2.28  
    2.29  #endif /* __KERNEL__ */
    2.30 +#endif /* XEN */
    2.31  
    2.32  #endif /* __ASSEMBLY__ */
    2.33  
     3.1 --- a/xen/include/asm-ia64/uaccess.h	Wed Apr 19 10:35:31 2006 -0600
     3.2 +++ b/xen/include/asm-ia64/uaccess.h	Wed Apr 19 10:39:15 2006 -0600
     3.3 @@ -42,7 +42,6 @@
     3.4  #include <asm/pgtable.h>
     3.5  #include <asm/io.h>
     3.6  
     3.7 -#define IS_VMM_ADDRESS(addr) ((((addr) >> 60) ^ ((addr) >> 59)) & 1)
     3.8  #define __access_ok(addr) (!IS_VMM_ADDRESS((unsigned long)(addr)))
     3.9  #define access_ok(addr, size) (__access_ok(addr))
    3.10  #define array_access_ok(addr,count,size)( __access_ok(addr))
     4.1 --- a/xen/include/asm-ia64/vmx_uaccess.h	Wed Apr 19 10:35:31 2006 -0600
     4.2 +++ b/xen/include/asm-ia64/vmx_uaccess.h	Wed Apr 19 10:39:15 2006 -0600
     4.3 @@ -40,8 +40,6 @@
     4.4   */
     4.5  asm (".section \"__ex_table\", \"a\"\n\t.previous");
     4.6  
     4.7 -/* VT-i reserves bit 60 for the VMM; guest addresses have bit 60 = bit 59 */
     4.8 -#define IS_VMM_ADDRESS(addr) ((((addr) >> 60) ^ ((addr) >> 59)) & 1)
     4.9  /* For back compatibility */
    4.10  #define __access_ok(addr, size, segment)	1
    4.11  #define access_ok(addr, size, segment)	__access_ok((addr), (size), (segment))
     5.1 --- a/xen/include/asm-ia64/xensystem.h	Wed Apr 19 10:35:31 2006 -0600
     5.2 +++ b/xen/include/asm-ia64/xensystem.h	Wed Apr 19 10:39:15 2006 -0600
     5.3 @@ -13,15 +13,17 @@
     5.4  #include <asm/config.h>
     5.5  #include <linux/kernel.h>
     5.6  
     5.7 -/* Define HV space hierarchy */
     5.8 +/* Define HV space hierarchy.
     5.9 +   VMM memory space is protected by CPL for paravirtualized domains and
    5.10 +   by VA for VTi domains.  VTi imposes VA bit 60 != VA bit 59 for VMM.  */
    5.11  #define XEN_VIRT_SPACE_LOW	 0xe800000000000000
    5.12  #define XEN_VIRT_SPACE_HIGH	 0xf800000000000000	
    5.13  
    5.14 +#define __IA64_UNCACHED_OFFSET	 0xe800000000000000UL
    5.15 +
    5.16  #define XEN_START_ADDR		 0xf000000000000000
    5.17  #define HYPERVISOR_VIRT_START	 0xf000000000000000
    5.18 -#undef KERNEL_START
    5.19  #define KERNEL_START		 0xf000000004000000
    5.20 -#undef PERCPU_ADDR
    5.21  #define SHAREDINFO_ADDR		 0xf100000000000000
    5.22  #define SHARED_ARCHINFO_ADDR	 (SHAREDINFO_ADDR + PAGE_SIZE)
    5.23  #define PERCPU_ADDR		 (SHAREDINFO_ADDR - PERCPU_PAGE_SIZE)
    5.24 @@ -33,13 +35,19 @@
    5.25  #endif
    5.26  #define XEN_END_ADDR		 0xf400000000000000
    5.27  
    5.28 +#define IS_VMM_ADDRESS(addr) ((((addr) >> 60) ^ ((addr) >> 59)) & 1)
    5.29 +
    5.30  #ifndef __ASSEMBLY__
    5.31  
    5.32 -#undef IA64_HAS_EXTRA_STATE
    5.33  #define IA64_HAS_EXTRA_STATE(t) 0
    5.34  
    5.35 -#undef __switch_to
    5.36 -extern struct task_struct *vmx_ia64_switch_to (void *next_task);
    5.37 +struct vcpu;
    5.38 +extern void ia64_save_extra (struct vcpu *v);
    5.39 +extern void ia64_load_extra (struct vcpu *v);
    5.40 +
    5.41 +extern struct vcpu *vmx_ia64_switch_to (struct vcpu *next_task);
    5.42 +extern struct vcpu *ia64_switch_to (struct vcpu *next_task);
    5.43 +
    5.44  #define __switch_to(prev,next,last) do {	\
    5.45         ia64_save_fpu(prev->arch._thread.fph);	\
    5.46         ia64_load_fpu(next->arch._thread.fph);	\
    5.47 @@ -62,7 +70,6 @@ extern struct task_struct *vmx_ia64_swit
    5.48         }                                       \
    5.49  } while (0)
    5.50  
    5.51 -#undef switch_to
    5.52  // FIXME SMP... see system.h, does this need to be different?
    5.53  #define switch_to(prev,next,last)	__switch_to(prev, next, last)
    5.54