ia64/xen-unstable

changeset 2401:47ded9cd9bee

bitkeeper revision 1.1159.1.116 (4136eaf6cqxiMCoqUAA4adob6WI8jA)

Merge xenbk@gandalf:/var/bk/xeno-unstable.bk
into wray-m-3.hpl.hp.com:/home/mjw/repos-bk/xeno-unstable.bk
author mjw@wray-m-3.hpl.hp.com
date Thu Sep 02 09:37:07 2004 +0000 (2004-09-02)
parents 2f8e399738c1 5cbfcff33f6b
children d61d24fa60a4
files BitKeeper/etc/logging_ok xen/arch/x86/i8259.c xen/include/asm-x86/system.h xen/include/asm-x86/x86_64/uaccess.h xen/include/hypervisor-ifs/arch-x86_64.h
line diff
     1.1 --- a/BitKeeper/etc/logging_ok	Thu Sep 02 09:35:35 2004 +0000
     1.2 +++ b/BitKeeper/etc/logging_ok	Thu Sep 02 09:37:07 2004 +0000
     1.3 @@ -21,6 +21,7 @@ jws22@gauntlet.cl.cam.ac.uk
     1.4  jws@cairnwell.research
     1.5  kaf24@freefall.cl.cam.ac.uk
     1.6  kaf24@labyrinth.cl.cam.ac.uk
     1.7 +kaf24@penguin.local
     1.8  kaf24@plym.cl.cam.ac.uk
     1.9  kaf24@scramble.cl.cam.ac.uk
    1.10  kaf24@striker.cl.cam.ac.uk
     2.1 --- a/xen/arch/x86/i8259.c	Thu Sep 02 09:35:35 2004 +0000
     2.2 +++ b/xen/arch/x86/i8259.c	Thu Sep 02 09:37:07 2004 +0000
     2.3 @@ -100,7 +100,7 @@ BUILD_SMP_INTERRUPT(spurious_interrupt,S
     2.4  	IRQ(x,8), IRQ(x,9), IRQ(x,a), IRQ(x,b), \
     2.5  	IRQ(x,c), IRQ(x,d), IRQ(x,e), IRQ(x,f)
     2.6  
     2.7 -    void (*interrupt[NR_IRQS])(void) = {
     2.8 +    void *interrupt[NR_IRQS] = {
     2.9  	IRQLIST_16(0x0),
    2.10  
    2.11  #ifdef CONFIG_X86_IO_APIC
     3.1 --- a/xen/include/asm-x86/system.h	Thu Sep 02 09:35:35 2004 +0000
     3.2 +++ b/xen/include/asm-x86/system.h	Thu Sep 02 09:37:07 2004 +0000
     3.3 @@ -123,6 +123,7 @@ static always_inline unsigned long __cmp
     3.4   * If no fault occurs then _o is updated to the value we saw at _p. If this
     3.5   * is the same as the initial value of _o then _n is written to location _p.
     3.6   */
     3.7 +#ifdef __i386__
     3.8  #define __cmpxchg_user(_p,_o,_n,_isuff,_oppre,_regtype)                 \
     3.9      __asm__ __volatile__ (                                              \
    3.10          "1: " LOCK_PREFIX "cmpxchg"_isuff" %"_oppre"2,%3\n"             \
    3.11 @@ -138,7 +139,6 @@ static always_inline unsigned long __cmp
    3.12          : "=a" (_o), "=r" (_rc)                                         \
    3.13          : _regtype (_n), "m" (*__xg((volatile void *)_p)), "0" (_o), "1" (0) \
    3.14          : "memory");
    3.15 -#ifdef __i386__
    3.16  #define cmpxchg_user(_p,_o,_n)                                          \
    3.17  ({                                                                      \
    3.18      int _rc;                                                            \
    3.19 @@ -156,6 +156,21 @@ static always_inline unsigned long __cmp
    3.20      _rc;                                                                \
    3.21  })
    3.22  #else
    3.23 +#define __cmpxchg_user(_p,_o,_n,_isuff,_oppre,_regtype)                 \
    3.24 +    __asm__ __volatile__ (                                              \
    3.25 +        "1: " LOCK_PREFIX "cmpxchg"_isuff" %"_oppre"2,%3\n"             \
    3.26 +        "2:\n"                                                          \
    3.27 +        ".section .fixup,\"ax\"\n"                                      \
    3.28 +        "3:     movl $1,%1\n"                                           \
    3.29 +        "       jmp 2b\n"                                               \
    3.30 +        ".previous\n"                                                   \
    3.31 +        ".section __ex_table,\"a\"\n"                                   \
    3.32 +        "       .align 8\n"                                             \
    3.33 +        "       .quad 1b,3b\n"                                          \
    3.34 +        ".previous"                                                     \
    3.35 +        : "=a" (_o), "=r" (_rc)                                         \
    3.36 +        : _regtype (_n), "m" (*__xg((volatile void *)_p)), "0" (_o), "1" (0) \
    3.37 +        : "memory");
    3.38  #define cmpxchg_user(_p,_o,_n)                                          \
    3.39  ({                                                                      \
    3.40      int _rc;                                                            \
     4.1 --- a/xen/include/asm-x86/x86_64/uaccess.h	Thu Sep 02 09:35:35 2004 +0000
     4.2 +++ b/xen/include/asm-x86/x86_64/uaccess.h	Thu Sep 02 09:37:07 2004 +0000
     4.3 @@ -4,36 +4,22 @@
     4.4  /*
     4.5   * User space memory access functions
     4.6   */
     4.7 -#include <linux/config.h>
     4.8 -#include <linux/compiler.h>
     4.9 -#include <linux/errno.h>
    4.10 -#include <linux/sched.h>
    4.11 -#include <linux/prefetch.h>
    4.12 +#include <xen/config.h>
    4.13 +#include <xen/compiler.h>
    4.14 +#include <xen/errno.h>
    4.15 +#include <xen/sched.h>
    4.16 +#include <xen/prefetch.h>
    4.17  #include <asm/page.h>
    4.18  
    4.19 +/* No user-pointer checking. */
    4.20 +#define __user
    4.21 +#define __force
    4.22 +#define __chk_user_ptr(_p) ((void)0)
    4.23 +
    4.24  #define VERIFY_READ 0
    4.25  #define VERIFY_WRITE 1
    4.26  
    4.27 -/*
    4.28 - * The fs value determines whether argument validity checking should be
    4.29 - * performed or not.  If get_fs() == USER_DS, checking is performed, with
    4.30 - * get_fs() == KERNEL_DS, checking is bypassed.
    4.31 - *
    4.32 - * For historical reasons, these macros are grossly misnamed.
    4.33 - */
    4.34 -
    4.35 -#define MAKE_MM_SEG(s)	((mm_segment_t) { (s) })
    4.36 -
    4.37 -#define KERNEL_DS	MAKE_MM_SEG(0xFFFFFFFFFFFFFFFFUL)
    4.38 -#define USER_DS		MAKE_MM_SEG(PAGE_OFFSET)
    4.39 -
    4.40 -#define get_ds()	(KERNEL_DS)
    4.41 -#define get_fs()	(current_thread_info()->addr_limit)
    4.42 -#define set_fs(x)	(current_thread_info()->addr_limit = (x))
    4.43 -
    4.44 -#define segment_eq(a,b)	((a).seg == (b).seg)
    4.45 -
    4.46 -#define __addr_ok(addr) (!((unsigned long)(addr) & (current_thread_info()->addr_limit.seg)))
    4.47 +#define __addr_ok(addr) ((unsigned long)(addr) < HYPERVISOR_VIRT_START)
    4.48  
    4.49  /*
    4.50   * Uhhuh, this needs 65-bit arithmetic. We have a carry..
    4.51 @@ -44,7 +30,7 @@
    4.52  	asm("# range_ok\n\r" \
    4.53  		"addq %3,%1 ; sbbq %0,%0 ; cmpq %1,%4 ; sbbq $0,%0"  \
    4.54  		:"=&r" (flag), "=r" (sum) \
    4.55 -		:"1" (addr),"g" ((long)(size)),"g" (current_thread_info()->addr_limit.seg)); \
    4.56 +		:"1" (addr),"g" ((long)(size)),"r" (HYPERVISOR_VIRT_START)); \
    4.57  	flag; })
    4.58  
    4.59  #define access_ok(type, addr, size) (__range_not_ok(addr,size) == 0)
     5.1 --- a/xen/include/hypervisor-ifs/arch-x86_64.h	Thu Sep 02 09:35:35 2004 +0000
     5.2 +++ b/xen/include/hypervisor-ifs/arch-x86_64.h	Thu Sep 02 09:37:07 2004 +0000
     5.3 @@ -123,6 +123,12 @@ typedef struct {
     5.4      unsigned long failsafe_callback_eip;
     5.5  } PACKED full_execution_context_t;
     5.6  
     5.7 +typedef struct {
     5.8 +    u64 mfn_to_pfn_start;      /* MFN of start of m2p table */
     5.9 +    u64 pfn_to_mfn_frame_list; /* MFN of a table of MFNs that 
    5.10 +				  make up p2m table */
    5.11 +} PACKED arch_shared_info_t;
    5.12 +
    5.13  #endif /* !__ASSEMBLY__ */
    5.14  
    5.15  #endif /* __HYPERVISOR_IF_H__ */