ia64/xen-unstable

changeset 11847:5d2ce349f9f4

[SOLARIS] Don't build ptrace code on Solaris.
Signed-off-by: Keir Fraser <keir@xensource.com>
author kfraser@localhost.localdomain
date Tue Oct 17 17:59:32 2006 +0100 (2006-10-17)
parents 3b27623dd319
children 479b17f312b0
files Config.mk config/ia64.mk config/powerpc64.mk config/x86_32.mk config/x86_64.mk tools/Rules.mk tools/debugger/gdb/gdb-6.2.1-xen-sparse/gdb/gdbserver/linux-xen-low.c tools/libxc/Makefile tools/libxc/xc_private.h tools/libxc/xc_ptrace.c tools/libxc/xc_ptrace.h tools/libxc/xc_ptrace_core.c tools/libxc/xenctrl.h tools/libxc/xg_private.h
line diff
     1.1 --- a/Config.mk	Tue Oct 17 17:29:19 2006 +0100
     1.2 +++ b/Config.mk	Tue Oct 17 17:59:32 2006 +0100
     1.3 @@ -9,6 +9,8 @@ XEN_TARGET_ARCH     ?= $(XEN_COMPILE_ARC
     1.4  XEN_TARGET_X86_PAE  ?= n
     1.5  XEN_OS              ?= $(shell uname -s)
     1.6  
     1.7 +CONFIG_$(XEN_OS) := y
     1.8 +
     1.9  # Tools to run on system hosting the build
    1.10  HOSTCC     = gcc
    1.11  HOSTCFLAGS = -Wall -Werror -Wstrict-prototypes -O2 -fomit-frame-pointer
     2.1 --- a/config/ia64.mk	Tue Oct 17 17:29:19 2006 +0100
     2.2 +++ b/config/ia64.mk	Tue Oct 17 17:59:32 2006 +0100
     2.3 @@ -1,4 +1,6 @@
     2.4  CONFIG_IA64 := y
     2.5 +CONFIG_IA64_$(XEN_OS) := y
     2.6 +
     2.7  CONFIG_IOEMU := y
     2.8  CONFIG_XCUTILS := y
     2.9  
     3.1 --- a/config/powerpc64.mk	Tue Oct 17 17:29:19 2006 +0100
     3.2 +++ b/config/powerpc64.mk	Tue Oct 17 17:59:32 2006 +0100
     3.3 @@ -1,4 +1,5 @@
     3.4  CONFIG_POWERPC := y
     3.5 +CONFIG_POWERPC_$(XEN_OS) := y
     3.6  
     3.7  CFLAGS += -DELFSIZE=64
     3.8  LIBDIR := lib
     4.1 --- a/config/x86_32.mk	Tue Oct 17 17:29:19 2006 +0100
     4.2 +++ b/config/x86_32.mk	Tue Oct 17 17:59:32 2006 +0100
     4.3 @@ -1,4 +1,6 @@
     4.4  CONFIG_X86 := y
     4.5 +CONFIG_X86_$(XEN_OS) := y
     4.6 +
     4.7  CONFIG_HVM := y
     4.8  CONFIG_MIGRATE := y
     4.9  CONFIG_XCUTILS := y
     5.1 --- a/config/x86_64.mk	Tue Oct 17 17:29:19 2006 +0100
     5.2 +++ b/config/x86_64.mk	Tue Oct 17 17:59:32 2006 +0100
     5.3 @@ -1,4 +1,6 @@
     5.4  CONFIG_X86 := y
     5.5 +CONFIG_X86_$(XEN_OS) := y
     5.6 +
     5.7  CONFIG_HVM := y
     5.8  CONFIG_MIGRATE := y
     5.9  CONFIG_XCUTILS := y
     6.1 --- a/tools/Rules.mk	Tue Oct 17 17:29:19 2006 +0100
     6.2 +++ b/tools/Rules.mk	Tue Oct 17 17:59:32 2006 +0100
     6.3 @@ -5,8 +5,6 @@ all:
     6.4  
     6.5  include $(XEN_ROOT)/Config.mk
     6.6  
     6.7 -CONFIG_$(shell uname -s) := y
     6.8 -
     6.9  XEN_XC             = $(XEN_ROOT)/tools/python/xen/lowlevel/xc
    6.10  XEN_LIBXC          = $(XEN_ROOT)/tools/libxc
    6.11  XEN_XENSTORE       = $(XEN_ROOT)/tools/xenstore
     7.1 --- a/tools/debugger/gdb/gdb-6.2.1-xen-sparse/gdb/gdbserver/linux-xen-low.c	Tue Oct 17 17:29:19 2006 +0100
     7.2 +++ b/tools/debugger/gdb/gdb-6.2.1-xen-sparse/gdb/gdbserver/linux-xen-low.c	Tue Oct 17 17:59:32 2006 +0100
     7.3 @@ -36,8 +36,6 @@
     7.4  #include <unistd.h>
     7.5  #include <errno.h>
     7.6  #include <xenctrl.h>
     7.7 -#include <thread_db.h>
     7.8 -#include <xc_ptrace.h>
     7.9  
    7.10  #define TRACE_ENTER /* printf("enter %s\n", __FUNCTION__) */
    7.11  
     8.1 --- a/tools/libxc/Makefile	Tue Oct 17 17:29:19 2006 +0100
     8.2 +++ b/tools/libxc/Makefile	Tue Oct 17 17:59:32 2006 +0100
     8.3 @@ -15,8 +15,9 @@ CTRL_SRCS-y       += xc_private.c
     8.4  CTRL_SRCS-y       += xc_sedf.c
     8.5  CTRL_SRCS-y       += xc_csched.c
     8.6  CTRL_SRCS-y       += xc_tbuf.c
     8.7 -CTRL_SRCS-$(CONFIG_X86) += xc_ptrace.c xc_ptrace_core.c xc_pagetab.c
     8.8 +CTRL_SRCS-$(CONFIG_X86) += xc_pagetab.c
     8.9  CTRL_SRCS-$(CONFIG_Linux) += xc_linux.c
    8.10 +CTRL_SRCS-$(CONFIG_X86_Linux) += xc_ptrace.c xc_ptrace_core.c
    8.11  
    8.12  GUEST_SRCS-y :=
    8.13  GUEST_SRCS-y += xc_load_bin.c
     9.1 --- a/tools/libxc/xc_private.h	Tue Oct 17 17:29:19 2006 +0100
     9.2 +++ b/tools/libxc/xc_private.h	Tue Oct 17 17:59:32 2006 +0100
     9.3 @@ -30,6 +30,9 @@
     9.4  #define DECLARE_SYSCTL struct xen_sysctl sysctl
     9.5  #endif
     9.6  
     9.7 +#undef PAGE_SHIFT
     9.8 +#undef PAGE_SIZE
     9.9 +#undef PAGE_MASK
    9.10  #define PAGE_SHIFT              XC_PAGE_SHIFT
    9.11  #define PAGE_SIZE               (1UL << PAGE_SHIFT)
    9.12  #define PAGE_MASK               (~(PAGE_SIZE-1))
    10.1 --- a/tools/libxc/xc_ptrace.c	Tue Oct 17 17:29:19 2006 +0100
    10.2 +++ b/tools/libxc/xc_ptrace.c	Tue Oct 17 17:59:32 2006 +0100
    10.3 @@ -1,5 +1,3 @@
    10.4 -#define XC_PTRACE_PRIVATE
    10.5 -
    10.6  #include <sys/ptrace.h>
    10.7  #include <sys/wait.h>
    10.8  #include <time.h>
    11.1 --- a/tools/libxc/xc_ptrace.h	Tue Oct 17 17:29:19 2006 +0100
    11.2 +++ b/tools/libxc/xc_ptrace.h	Tue Oct 17 17:59:32 2006 +0100
    11.3 @@ -1,9 +1,6 @@
    11.4  #ifndef XC_PTRACE_
    11.5  #define XC_PTRACE_
    11.6  
    11.7 -#include <thread_db.h>
    11.8 -
    11.9 -#ifdef XC_PTRACE_PRIVATE
   11.10  #define X86_CR0_PE              0x00000001 /* Enable Protected Mode    (RW) */
   11.11  #define X86_CR0_PG              0x80000000 /* Paging                   (RW) */
   11.12  #define BSD_PAGE_MASK (PAGE_SIZE-1)
   11.13 @@ -160,25 +157,4 @@ struct gdb_regs {
   11.14  }
   11.15  #endif
   11.16  
   11.17 -#endif
   11.18 -
   11.19 -typedef void (*thr_ev_handler_t)(long);
   11.20 -
   11.21 -void xc_register_event_handler(
   11.22 -    thr_ev_handler_t h,
   11.23 -    td_event_e e);
   11.24 -
   11.25 -long xc_ptrace(
   11.26 -    int xc_handle,
   11.27 -    enum __ptrace_request request,
   11.28 -    uint32_t  domid,
   11.29 -    long addr,
   11.30 -    long data);
   11.31 -
   11.32 -int xc_waitdomain(
   11.33 -    int xc_handle,
   11.34 -    int domain,
   11.35 -    int *status,
   11.36 -    int options);
   11.37 -
   11.38  #endif /* XC_PTRACE */
    12.1 --- a/tools/libxc/xc_ptrace_core.c	Tue Oct 17 17:29:19 2006 +0100
    12.2 +++ b/tools/libxc/xc_ptrace_core.c	Tue Oct 17 17:59:32 2006 +0100
    12.3 @@ -1,5 +1,3 @@
    12.4 -#define XC_PTRACE_PRIVATE
    12.5 -
    12.6  #include <sys/ptrace.h>
    12.7  #include <sys/wait.h>
    12.8  #include "xc_private.h"
    13.1 --- a/tools/libxc/xenctrl.h	Tue Oct 17 17:29:19 2006 +0100
    13.2 +++ b/tools/libxc/xenctrl.h	Tue Oct 17 17:59:32 2006 +0100
    13.3 @@ -16,7 +16,6 @@
    13.4  
    13.5  #include <stddef.h>
    13.6  #include <stdint.h>
    13.7 -#include <sys/ptrace.h>
    13.8  #include <xen/xen.h>
    13.9  #include <xen/domctl.h>
   13.10  #include <xen/sysctl.h>
   13.11 @@ -105,6 +104,11 @@ int xc_find_device_number(const char *na
   13.12   * DOMAIN DEBUGGING FUNCTIONS
   13.13   */
   13.14  
   13.15 +#ifdef __linux__
   13.16 +
   13.17 +#include <sys/ptrace.h>
   13.18 +#include <thread_db.h>
   13.19 +
   13.20  typedef struct xc_core_header {
   13.21      unsigned int xch_magic;
   13.22      unsigned int xch_nr_vcpus;
   13.23 @@ -134,6 +138,26 @@ int xc_waitdomain_core(
   13.24      int *status,
   13.25      int options,
   13.26      vcpu_guest_context_t *ctxt);
   13.27 +typedef void (*thr_ev_handler_t)(long);
   13.28 +
   13.29 +void xc_register_event_handler(
   13.30 +    thr_ev_handler_t h,
   13.31 +    td_event_e e);
   13.32 +
   13.33 +long xc_ptrace(
   13.34 +    int xc_handle,
   13.35 +    enum __ptrace_request request,
   13.36 +    uint32_t  domid,
   13.37 +    long addr,
   13.38 +    long data);
   13.39 +
   13.40 +int xc_waitdomain(
   13.41 +    int xc_handle,
   13.42 +    int domain,
   13.43 +    int *status,
   13.44 +    int options);
   13.45 +
   13.46 +#endif /* __linux__ */
   13.47  
   13.48  /*
   13.49   * DOMAIN MANAGEMENT FUNCTIONS
    14.1 --- a/tools/libxc/xg_private.h	Tue Oct 17 17:29:19 2006 +0100
    14.2 +++ b/tools/libxc/xg_private.h	Tue Oct 17 17:59:32 2006 +0100
    14.3 @@ -79,10 +79,6 @@ unsigned long csum_page (void * page);
    14.4  #define L4_PAGETABLE_ENTRIES    512
    14.5  #endif
    14.6  
    14.7 -#define PAGE_SHIFT              XC_PAGE_SHIFT
    14.8 -#define PAGE_SIZE               (1UL << PAGE_SHIFT)
    14.9 -#define PAGE_MASK               (~(PAGE_SIZE-1))
   14.10 -
   14.11  typedef uint32_t l1_pgentry_32_t;
   14.12  typedef uint32_t l2_pgentry_32_t;
   14.13  typedef uint64_t l1_pgentry_64_t;