ia64/xen-unstable

changeset 6756:f752e0c873a6

merge?
author cl349@firebug.cl.cam.ac.uk
date Mon Sep 12 12:32:20 2005 +0000 (2005-09-12)
parents b594bb976a74 939fd35d58da
children 413c911e5780 f5adc1aa61d8
files Makefile buildconfigs/mk.linux-2.6-xen buildconfigs/mk.linux-2.6-xen0 buildconfigs/mk.linux-2.6-xenU extras/mini-os/include/hypervisor.h linux-2.6-xen-sparse/arch/xen/kernel/evtchn.c linux-2.6-xen-sparse/include/asm-xen/asm-i386/hypercall.h linux-2.6-xen-sparse/include/asm-xen/asm-x86_64/hypercall.h tools/libxc/xc_private.c tools/xenstore/xenstored_watch.c xen/Makefile xen/arch/x86/x86_32/entry.S xen/arch/x86/x86_64/entry.S xen/common/memory.c
line diff
     1.1 --- a/Makefile	Mon Sep 12 12:31:41 2005 +0000
     1.2 +++ b/Makefile	Mon Sep 12 12:32:20 2005 +0000
     1.3 @@ -10,7 +10,6 @@ INSTALL		:= install
     1.4  INSTALL_DIR	:= $(INSTALL) -d -m0755
     1.5  INSTALL_DATA	:= $(INSTALL) -m0644
     1.6  INSTALL_PROG	:= $(INSTALL) -m0755
     1.7 -XEN_LOCALVERSION:=
     1.8  
     1.9  KERNELS ?= linux-2.6-xen0 linux-2.6-xenU
    1.10  # linux-2.4-xen0 linux-2.4-xenU netbsd-2.0-xenU
    1.11 @@ -19,7 +18,6 @@ KERNELS ?= linux-2.6-xen0 linux-2.6-xenU
    1.12  XKERNELS := $(foreach kernel, $(KERNELS), $(patsubst buildconfigs/mk.%,%,$(wildcard buildconfigs/mk.$(kernel))) )
    1.13  
    1.14  export DESTDIR
    1.15 -export XEN_LOCALVERSION
    1.16  
    1.17  # Export target architecture overrides to Xen and Linux sub-trees.
    1.18  ifneq ($(XEN_TARGET_ARCH),)
     2.1 --- a/buildconfigs/mk.linux-2.6-xen	Mon Sep 12 12:31:41 2005 +0000
     2.2 +++ b/buildconfigs/mk.linux-2.6-xen	Mon Sep 12 12:32:20 2005 +0000
     2.3 @@ -7,7 +7,6 @@ LINUX_VER    = 2.6.12
     2.4  EXTRAVERSION = xen
     2.5  
     2.6  LINUX_DIR    = $(OS)-$(LINUX_VER)-$(EXTRAVERSION)
     2.7 -LOCALSTR     = CONFIG_LOCALVERSION=$(XEN_LOCALVERSION)
     2.8  
     2.9  include buildconfigs/Rules.mk
    2.10  
    2.11 @@ -16,10 +15,10 @@ include buildconfigs/Rules.mk
    2.12  # The real action starts here!
    2.13  build: $(LINUX_DIR)/include/linux/autoconf.h
    2.14  	if grep "^CONFIG_MODULES=" $(LINUX_DIR)/.config ; then \
    2.15 -	    $(MAKE) $(LOCALSTR) -C $(LINUX_DIR) ARCH=xen modules ; \
    2.16 -	    $(MAKE) $(LOCALSTR) -C $(LINUX_DIR) ARCH=xen INSTALL_MOD_PATH=$(DESTDIR) modules_install ; \
    2.17 +	    $(MAKE) -C $(LINUX_DIR) ARCH=xen modules ; \
    2.18 +	    $(MAKE) -C $(LINUX_DIR) ARCH=xen INSTALL_MOD_PATH=$(DESTDIR) modules_install ; \
    2.19  	fi
    2.20 -	$(MAKE) $(LOCALSTR) -C $(LINUX_DIR) ARCH=xen INSTALL_PATH=$(DESTDIR) install
    2.21 +	$(MAKE) -C $(LINUX_DIR) ARCH=xen INSTALL_PATH=$(DESTDIR) install
    2.22  
    2.23  $(LINUX_DIR)/include/linux/autoconf.h: ref-$(OS)-$(LINUX_VER)/.valid-ref
    2.24  	rm -rf $(LINUX_DIR)
     3.1 --- a/buildconfigs/mk.linux-2.6-xen0	Mon Sep 12 12:31:41 2005 +0000
     3.2 +++ b/buildconfigs/mk.linux-2.6-xen0	Mon Sep 12 12:32:20 2005 +0000
     3.3 @@ -7,7 +7,6 @@ LINUX_VER    = 2.6.12
     3.4  EXTRAVERSION = xen0
     3.5  
     3.6  LINUX_DIR    = $(OS)-$(LINUX_VER)-$(EXTRAVERSION)
     3.7 -LOCALSTR     = CONFIG_LOCALVERSION=$(XEN_LOCALVERSION)
     3.8  
     3.9  include buildconfigs/Rules.mk
    3.10  
    3.11 @@ -16,10 +15,10 @@ include buildconfigs/Rules.mk
    3.12  # The real action starts here!
    3.13  build: $(LINUX_DIR)/include/linux/autoconf.h
    3.14  	if grep "^CONFIG_MODULES=" $(LINUX_DIR)/.config ; then \
    3.15 -	    $(MAKE) $(LOCALSTR) -C $(LINUX_DIR) ARCH=xen modules ; \
    3.16 -	    $(MAKE) $(LOCALSTR) -C $(LINUX_DIR) ARCH=xen INSTALL_MOD_PATH=$(DESTDIR) modules_install ; \
    3.17 +	    $(MAKE) -C $(LINUX_DIR) ARCH=xen modules ; \
    3.18 +	    $(MAKE) -C $(LINUX_DIR) ARCH=xen INSTALL_MOD_PATH=$(DESTDIR) modules_install ; \
    3.19  	fi
    3.20 -	$(MAKE) $(LOCALSTR) -C $(LINUX_DIR) ARCH=xen INSTALL_PATH=$(DESTDIR) install
    3.21 +	$(MAKE) -C $(LINUX_DIR) ARCH=xen INSTALL_PATH=$(DESTDIR) install
    3.22  
    3.23  $(LINUX_DIR)/include/linux/autoconf.h: ref-$(OS)-$(LINUX_VER)/.valid-ref
    3.24  	rm -rf $(LINUX_DIR)
     4.1 --- a/buildconfigs/mk.linux-2.6-xenU	Mon Sep 12 12:31:41 2005 +0000
     4.2 +++ b/buildconfigs/mk.linux-2.6-xenU	Mon Sep 12 12:32:20 2005 +0000
     4.3 @@ -7,7 +7,6 @@ LINUX_VER    = 2.6.12
     4.4  EXTRAVERSION = xenU
     4.5  
     4.6  LINUX_DIR    = $(OS)-$(LINUX_VER)-$(EXTRAVERSION)
     4.7 -LOCALSTR     = CONFIG_LOCALVERSION=$(XEN_LOCALVERSION)
     4.8  
     4.9  include buildconfigs/Rules.mk
    4.10  
    4.11 @@ -16,10 +15,10 @@ include buildconfigs/Rules.mk
    4.12  # The real action starts here!
    4.13  build: $(LINUX_DIR)/include/linux/autoconf.h
    4.14  	if grep "^CONFIG_MODULES=" $(LINUX_DIR)/.config ; then \
    4.15 -	    $(MAKE) $(LOCALSTR) -C $(LINUX_DIR) ARCH=xen modules ; \
    4.16 -	    $(MAKE) $(LOCALSTR) -C $(LINUX_DIR) ARCH=xen INSTALL_MOD_PATH=$(DESTDIR) modules_install ; \
    4.17 +	    $(MAKE) -C $(LINUX_DIR) ARCH=xen modules ; \
    4.18 +	    $(MAKE) -C $(LINUX_DIR) ARCH=xen INSTALL_MOD_PATH=$(DESTDIR) modules_install ; \
    4.19  	fi
    4.20 -	$(MAKE) $(LOCALSTR) -C $(LINUX_DIR) ARCH=xen INSTALL_PATH=$(DESTDIR) install
    4.21 +	$(MAKE) -C $(LINUX_DIR) ARCH=xen INSTALL_PATH=$(DESTDIR) install
    4.22  
    4.23  $(LINUX_DIR)/include/linux/autoconf.h: ref-$(OS)-$(LINUX_VER)/.valid-ref
    4.24  	rm -rf $(LINUX_DIR)
     5.1 --- a/extras/mini-os/include/hypervisor.h	Mon Sep 12 12:31:41 2005 +0000
     5.2 +++ b/extras/mini-os/include/hypervisor.h	Mon Sep 12 12:32:20 2005 +0000
     5.3 @@ -414,15 +414,15 @@ HYPERVISOR_event_channel_op(
     5.4  
     5.5  static inline int
     5.6  HYPERVISOR_xen_version(
     5.7 -    int cmd)
     5.8 +    int cmd, void *arg)
     5.9  {
    5.10      int ret;
    5.11 -    unsigned long ignore;
    5.12 +    unsigned long ignore, ign2;
    5.13  
    5.14      __asm__ __volatile__ (
    5.15          TRAP_INSTR
    5.16 -        : "=a" (ret), "=b" (ignore)
    5.17 -	: "0" (__HYPERVISOR_xen_version), "1" (cmd)
    5.18 +        : "=a" (ret), "=b" (ignore), "=c" (ign2)
    5.19 +	: "0" (__HYPERVISOR_xen_version), "1" (cmd), "2" (arg)
    5.20  	: "memory" );
    5.21  
    5.22      return ret;
     6.1 --- a/linux-2.6-xen-sparse/arch/xen/kernel/evtchn.c	Mon Sep 12 12:31:41 2005 +0000
     6.2 +++ b/linux-2.6-xen-sparse/arch/xen/kernel/evtchn.c	Mon Sep 12 12:32:20 2005 +0000
     6.3 @@ -123,7 +123,7 @@ extern asmlinkage unsigned int do_IRQ(st
     6.4   */
     6.5  void force_evtchn_callback(void)
     6.6  {
     6.7 -    (void)HYPERVISOR_xen_version(0);
     6.8 +    (void)HYPERVISOR_xen_version(0, NULL);
     6.9  }
    6.10  EXPORT_SYMBOL(force_evtchn_callback);
    6.11  
     7.1 --- a/linux-2.6-xen-sparse/include/asm-xen/asm-i386/hypercall.h	Mon Sep 12 12:31:41 2005 +0000
     7.2 +++ b/linux-2.6-xen-sparse/include/asm-xen/asm-i386/hypercall.h	Mon Sep 12 12:32:20 2005 +0000
     7.3 @@ -270,9 +270,9 @@ HYPERVISOR_event_channel_op(
     7.4  
     7.5  static inline int
     7.6  HYPERVISOR_xen_version(
     7.7 -	int cmd)
     7.8 +	int cmd, void *arg)
     7.9  {
    7.10 -	return _hypercall1(int, xen_version, cmd);
    7.11 +	return _hypercall2(int, xen_version, cmd, arg);
    7.12  }
    7.13  
    7.14  static inline int
     8.1 --- a/linux-2.6-xen-sparse/include/asm-xen/asm-x86_64/hypercall.h	Mon Sep 12 12:31:41 2005 +0000
     8.2 +++ b/linux-2.6-xen-sparse/include/asm-xen/asm-x86_64/hypercall.h	Mon Sep 12 12:32:20 2005 +0000
     8.3 @@ -260,9 +260,9 @@ HYPERVISOR_event_channel_op(
     8.4  
     8.5  static inline int
     8.6  HYPERVISOR_xen_version(
     8.7 -	int cmd)
     8.8 +	int cmd, void *arg)
     8.9  {
    8.10 -	return _hypercall1(int, xen_version, cmd);
    8.11 +	return _hypercall2(int, xen_version, cmd, arg);
    8.12  }
    8.13  
    8.14  static inline int
     9.1 --- a/tools/libxc/xc_private.c	Mon Sep 12 12:31:41 2005 +0000
     9.2 +++ b/tools/libxc/xc_private.c	Mon Sep 12 12:32:20 2005 +0000
     9.3 @@ -425,23 +425,49 @@ int xc_dom0_op(int xc_handle, dom0_op_t 
     9.4  
     9.5  int xc_version(int xc_handle, int cmd, void *arg)
     9.6  {
     9.7 -    return do_xen_version(xc_handle, cmd, arg);
     9.8 +    int rc, argsize = 0;
     9.9 +
    9.10 +    switch ( cmd )
    9.11 +    {
    9.12 +    case XENVER_extraversion: argsize = sizeof(xen_extraversion_t); break;
    9.13 +    case XENVER_compile_info: argsize = sizeof(xen_compile_info_t); break;
    9.14 +    case XENVER_capabilities: argsize = sizeof(xen_capabilities_info_t); break;
    9.15 +    case XENVER_changeset:    argsize = sizeof(xen_changeset_info_t); break;
    9.16 +    case XENVER_parameters:   argsize = sizeof(xen_parameters_info_t); break;
    9.17 +    }
    9.18 +
    9.19 +    if ( (argsize != 0) && (mlock(arg, argsize) != 0) )
    9.20 +    {
    9.21 +        PERROR("Could not lock memory for version hypercall");
    9.22 +        return -ENOMEM;
    9.23 +    }
    9.24 +
    9.25 +    rc = do_xen_version(xc_handle, cmd, arg);
    9.26 +
    9.27 +    if ( argsize != 0 )
    9.28 +        safe_munlock(arg, argsize);
    9.29 +
    9.30 +    return rc;
    9.31  }
    9.32  
    9.33 -unsigned long xc_make_page_below_4G(int xc_handle, u32 domid, 
    9.34 -				    unsigned long mfn)
    9.35 +unsigned long xc_make_page_below_4G(
    9.36 +    int xc_handle, u32 domid, unsigned long mfn)
    9.37  {
    9.38      unsigned long new_mfn;
    9.39 +
    9.40      if ( xc_domain_memory_decrease_reservation( 
    9.41 -	xc_handle, domid, 1, 0, &mfn ) != 1 )
    9.42 +	xc_handle, domid, 1, 0, &mfn) != 1 )
    9.43      {
    9.44  	fprintf(stderr,"xc_make_page_below_4G decrease failed. mfn=%lx\n",mfn);
    9.45  	return 0;
    9.46      }
    9.47 -    if ( xc_domain_memory_increase_reservation( xc_handle, domid, 1, 0, 32, &new_mfn ) != 1 )
    9.48 +
    9.49 +    if ( xc_domain_memory_increase_reservation(
    9.50 +        xc_handle, domid, 1, 0, 32, &new_mfn) != 1 )
    9.51      {
    9.52  	fprintf(stderr,"xc_make_page_below_4G increase failed. mfn=%lx\n",mfn);
    9.53  	return 0;
    9.54      }
    9.55 +
    9.56      return new_mfn;
    9.57  }
    10.1 --- a/xen/Makefile	Mon Sep 12 12:31:41 2005 +0000
    10.2 +++ b/xen/Makefile	Mon Sep 12 12:32:20 2005 +0000
    10.3 @@ -11,8 +11,7 @@ INSTALL_DIR		= $(INSTALL) -d -m0755
    10.4  export XEN_VERSION       = 3
    10.5  export XEN_SUBVERSION    = 0
    10.6  export XEN_EXTRAVERSION  = -devel
    10.7 -export XEN_LOCALVERSION  =
    10.8 -export XEN_FULLVERSION   = $(XEN_VERSION).$(XEN_SUBVERSION)$(XEN_EXTRAVERSION)$(XEN_LOCALVERSION)
    10.9 +export XEN_FULLVERSION   = $(XEN_VERSION).$(XEN_SUBVERSION)$(XEN_EXTRAVERSION)
   10.10  
   10.11  export BASEDIR          := $(CURDIR)
   10.12  
   10.13 @@ -33,7 +32,6 @@ build: $(TARGET).gz
   10.14  install: $(TARGET).gz
   10.15  	[ -d $(DESTDIR)/boot ] || $(INSTALL_DIR) $(DESTDIR)/boot
   10.16  	$(INSTALL_DATA) $(TARGET).gz $(DESTDIR)/boot/$(notdir $(TARGET))-$(XEN_FULLVERSION).gz
   10.17 -	ln -f -s $(notdir $(TARGET))-$(XEN_FULLVERSION).gz $(DESTDIR)/boot/$(notdir $(TARGET))-$(XEN_VERSION).$(XEN_SUBVERSION)$(XEN_LOCALVERSION).gz
   10.18  	ln -f -s $(notdir $(TARGET))-$(XEN_FULLVERSION).gz $(DESTDIR)/boot/$(notdir $(TARGET))-$(XEN_VERSION).$(XEN_SUBVERSION).gz
   10.19  	ln -f -s $(notdir $(TARGET))-$(XEN_FULLVERSION).gz $(DESTDIR)/boot/$(notdir $(TARGET))-$(XEN_VERSION).gz
   10.20  	ln -f -s $(notdir $(TARGET))-$(XEN_FULLVERSION).gz $(DESTDIR)/boot/$(notdir $(TARGET)).gz
    11.1 --- a/xen/arch/x86/x86_32/entry.S	Mon Sep 12 12:31:41 2005 +0000
    11.2 +++ b/xen/arch/x86/x86_32/entry.S	Mon Sep 12 12:32:20 2005 +0000
    11.3 @@ -834,7 +834,7 @@ ENTRY(hypercall_args_table)
    11.4          .byte 4 /* do_update_va_mapping */
    11.5          .byte 2 /* do_set_timer_op      */  /* 15 */
    11.6          .byte 1 /* do_event_channel_op  */
    11.7 -        .byte 1 /* do_xen_version       */
    11.8 +        .byte 2 /* do_xen_version       */
    11.9          .byte 3 /* do_console_io        */
   11.10          .byte 1 /* do_physdev_op        */
   11.11          .byte 3 /* do_grant_table_op    */  /* 20 */
    12.1 --- a/xen/arch/x86/x86_64/entry.S	Mon Sep 12 12:31:41 2005 +0000
    12.2 +++ b/xen/arch/x86/x86_64/entry.S	Mon Sep 12 12:32:20 2005 +0000
    12.3 @@ -655,7 +655,7 @@ ENTRY(hypercall_args_table)
    12.4          .byte 3 /* do_update_va_mapping */
    12.5          .byte 1 /* do_set_timer_op      */  /* 15 */
    12.6          .byte 1 /* do_event_channel_op  */
    12.7 -        .byte 1 /* do_xen_version       */
    12.8 +        .byte 2 /* do_xen_version       */
    12.9          .byte 3 /* do_console_io        */
   12.10          .byte 1 /* do_physdev_op        */
   12.11          .byte 3 /* do_grant_table_op    */  /* 20 */
    13.1 --- a/xen/common/memory.c	Mon Sep 12 12:31:41 2005 +0000
    13.2 +++ b/xen/common/memory.c	Mon Sep 12 12:32:20 2005 +0000
    13.3 @@ -29,7 +29,7 @@ increase_reservation(
    13.4      int           *preempted)
    13.5  {
    13.6      struct pfn_info *page;
    13.7 -    unsigned long    i;
    13.8 +    unsigned int     i;
    13.9  
   13.10      if ( (extent_list != NULL) &&
   13.11           !array_access_ok(extent_list, nr_extents, sizeof(*extent_list)) )
   13.12 @@ -37,7 +37,7 @@ increase_reservation(
   13.13  
   13.14      if ( (extent_order != 0) && !IS_CAPABLE_PHYSDEV(current->domain) )
   13.15      {
   13.16 -        DPRINTK("Only I/O-capable domains may allocate > order-0 memory.\n");
   13.17 +        DPRINTK("Only I/O-capable domains may allocate multi-page extents.\n");
   13.18          return 0;
   13.19      }
   13.20  
   13.21 @@ -52,8 +52,9 @@ increase_reservation(
   13.22          if ( unlikely((page = alloc_domheap_pages(
   13.23              d, extent_order, flags)) == NULL) )
   13.24          {
   13.25 -            DPRINTK("Could not allocate order=%d extent: id=%d flags=%x\n",
   13.26 -                    extent_order, d->domain_id, flags);
   13.27 +            DPRINTK("Could not allocate order=%d extent: "
   13.28 +                    "id=%d flags=%x (%d of %d)\n",
   13.29 +                    extent_order, d->domain_id, flags, i, nr_extents);
   13.30              return i;
   13.31          }
   13.32