# HG changeset patch
# User cl349@xxxxxxxxxxxxxxxxxxxx
# Node ID f752e0c873a6da1d7779096ff954a24d443bbdf2
# Parent b594bb976a743d509f1ffabb5bc698874ab90d8f
# Parent 939fd35d58da459ecae6a79c710617e3d7d2dabc
merge?
diff -r b594bb976a74 -r f752e0c873a6 Makefile
--- a/Makefile Mon Sep 12 12:31:41 2005
+++ b/Makefile Mon Sep 12 12:32:20 2005
@@ -10,7 +10,6 @@
INSTALL_DIR := $(INSTALL) -d -m0755
INSTALL_DATA := $(INSTALL) -m0644
INSTALL_PROG := $(INSTALL) -m0755
-XEN_LOCALVERSION:=
KERNELS ?= linux-2.6-xen0 linux-2.6-xenU
# linux-2.4-xen0 linux-2.4-xenU netbsd-2.0-xenU
@@ -19,7 +18,6 @@
XKERNELS := $(foreach kernel, $(KERNELS), $(patsubst
buildconfigs/mk.%,%,$(wildcard buildconfigs/mk.$(kernel))) )
export DESTDIR
-export XEN_LOCALVERSION
# Export target architecture overrides to Xen and Linux sub-trees.
ifneq ($(XEN_TARGET_ARCH),)
diff -r b594bb976a74 -r f752e0c873a6 buildconfigs/mk.linux-2.6-xen
--- a/buildconfigs/mk.linux-2.6-xen Mon Sep 12 12:31:41 2005
+++ b/buildconfigs/mk.linux-2.6-xen Mon Sep 12 12:32:20 2005
@@ -7,7 +7,6 @@
EXTRAVERSION = xen
LINUX_DIR = $(OS)-$(LINUX_VER)-$(EXTRAVERSION)
-LOCALSTR = CONFIG_LOCALVERSION=$(XEN_LOCALVERSION)
include buildconfigs/Rules.mk
@@ -16,10 +15,10 @@
# The real action starts here!
build: $(LINUX_DIR)/include/linux/autoconf.h
if grep "^CONFIG_MODULES=" $(LINUX_DIR)/.config ; then \
- $(MAKE) $(LOCALSTR) -C $(LINUX_DIR) ARCH=xen modules ; \
- $(MAKE) $(LOCALSTR) -C $(LINUX_DIR) ARCH=xen
INSTALL_MOD_PATH=$(DESTDIR) modules_install ; \
+ $(MAKE) -C $(LINUX_DIR) ARCH=xen modules ; \
+ $(MAKE) -C $(LINUX_DIR) ARCH=xen INSTALL_MOD_PATH=$(DESTDIR)
modules_install ; \
fi
- $(MAKE) $(LOCALSTR) -C $(LINUX_DIR) ARCH=xen INSTALL_PATH=$(DESTDIR)
install
+ $(MAKE) -C $(LINUX_DIR) ARCH=xen INSTALL_PATH=$(DESTDIR) install
$(LINUX_DIR)/include/linux/autoconf.h: ref-$(OS)-$(LINUX_VER)/.valid-ref
rm -rf $(LINUX_DIR)
diff -r b594bb976a74 -r f752e0c873a6 buildconfigs/mk.linux-2.6-xen0
--- a/buildconfigs/mk.linux-2.6-xen0 Mon Sep 12 12:31:41 2005
+++ b/buildconfigs/mk.linux-2.6-xen0 Mon Sep 12 12:32:20 2005
@@ -7,7 +7,6 @@
EXTRAVERSION = xen0
LINUX_DIR = $(OS)-$(LINUX_VER)-$(EXTRAVERSION)
-LOCALSTR = CONFIG_LOCALVERSION=$(XEN_LOCALVERSION)
include buildconfigs/Rules.mk
@@ -16,10 +15,10 @@
# The real action starts here!
build: $(LINUX_DIR)/include/linux/autoconf.h
if grep "^CONFIG_MODULES=" $(LINUX_DIR)/.config ; then \
- $(MAKE) $(LOCALSTR) -C $(LINUX_DIR) ARCH=xen modules ; \
- $(MAKE) $(LOCALSTR) -C $(LINUX_DIR) ARCH=xen
INSTALL_MOD_PATH=$(DESTDIR) modules_install ; \
+ $(MAKE) -C $(LINUX_DIR) ARCH=xen modules ; \
+ $(MAKE) -C $(LINUX_DIR) ARCH=xen INSTALL_MOD_PATH=$(DESTDIR)
modules_install ; \
fi
- $(MAKE) $(LOCALSTR) -C $(LINUX_DIR) ARCH=xen INSTALL_PATH=$(DESTDIR)
install
+ $(MAKE) -C $(LINUX_DIR) ARCH=xen INSTALL_PATH=$(DESTDIR) install
$(LINUX_DIR)/include/linux/autoconf.h: ref-$(OS)-$(LINUX_VER)/.valid-ref
rm -rf $(LINUX_DIR)
diff -r b594bb976a74 -r f752e0c873a6 buildconfigs/mk.linux-2.6-xenU
--- a/buildconfigs/mk.linux-2.6-xenU Mon Sep 12 12:31:41 2005
+++ b/buildconfigs/mk.linux-2.6-xenU Mon Sep 12 12:32:20 2005
@@ -7,7 +7,6 @@
EXTRAVERSION = xenU
LINUX_DIR = $(OS)-$(LINUX_VER)-$(EXTRAVERSION)
-LOCALSTR = CONFIG_LOCALVERSION=$(XEN_LOCALVERSION)
include buildconfigs/Rules.mk
@@ -16,10 +15,10 @@
# The real action starts here!
build: $(LINUX_DIR)/include/linux/autoconf.h
if grep "^CONFIG_MODULES=" $(LINUX_DIR)/.config ; then \
- $(MAKE) $(LOCALSTR) -C $(LINUX_DIR) ARCH=xen modules ; \
- $(MAKE) $(LOCALSTR) -C $(LINUX_DIR) ARCH=xen
INSTALL_MOD_PATH=$(DESTDIR) modules_install ; \
+ $(MAKE) -C $(LINUX_DIR) ARCH=xen modules ; \
+ $(MAKE) -C $(LINUX_DIR) ARCH=xen INSTALL_MOD_PATH=$(DESTDIR)
modules_install ; \
fi
- $(MAKE) $(LOCALSTR) -C $(LINUX_DIR) ARCH=xen INSTALL_PATH=$(DESTDIR)
install
+ $(MAKE) -C $(LINUX_DIR) ARCH=xen INSTALL_PATH=$(DESTDIR) install
$(LINUX_DIR)/include/linux/autoconf.h: ref-$(OS)-$(LINUX_VER)/.valid-ref
rm -rf $(LINUX_DIR)
diff -r b594bb976a74 -r f752e0c873a6 extras/mini-os/include/hypervisor.h
--- a/extras/mini-os/include/hypervisor.h Mon Sep 12 12:31:41 2005
+++ b/extras/mini-os/include/hypervisor.h Mon Sep 12 12:32:20 2005
@@ -414,15 +414,15 @@
static inline int
HYPERVISOR_xen_version(
- int cmd)
-{
- int ret;
- unsigned long ignore;
-
- __asm__ __volatile__ (
- TRAP_INSTR
- : "=a" (ret), "=b" (ignore)
- : "0" (__HYPERVISOR_xen_version), "1" (cmd)
+ int cmd, void *arg)
+{
+ int ret;
+ unsigned long ignore, ign2;
+
+ __asm__ __volatile__ (
+ TRAP_INSTR
+ : "=a" (ret), "=b" (ignore), "=c" (ign2)
+ : "0" (__HYPERVISOR_xen_version), "1" (cmd), "2" (arg)
: "memory" );
return ret;
diff -r b594bb976a74 -r f752e0c873a6
linux-2.6-xen-sparse/arch/xen/kernel/evtchn.c
--- a/linux-2.6-xen-sparse/arch/xen/kernel/evtchn.c Mon Sep 12 12:31:41 2005
+++ b/linux-2.6-xen-sparse/arch/xen/kernel/evtchn.c Mon Sep 12 12:32:20 2005
@@ -123,7 +123,7 @@
*/
void force_evtchn_callback(void)
{
- (void)HYPERVISOR_xen_version(0);
+ (void)HYPERVISOR_xen_version(0, NULL);
}
EXPORT_SYMBOL(force_evtchn_callback);
diff -r b594bb976a74 -r f752e0c873a6
linux-2.6-xen-sparse/include/asm-xen/asm-i386/hypercall.h
--- a/linux-2.6-xen-sparse/include/asm-xen/asm-i386/hypercall.h Mon Sep 12
12:31:41 2005
+++ b/linux-2.6-xen-sparse/include/asm-xen/asm-i386/hypercall.h Mon Sep 12
12:32:20 2005
@@ -270,9 +270,9 @@
static inline int
HYPERVISOR_xen_version(
- int cmd)
-{
- return _hypercall1(int, xen_version, cmd);
+ int cmd, void *arg)
+{
+ return _hypercall2(int, xen_version, cmd, arg);
}
static inline int
diff -r b594bb976a74 -r f752e0c873a6
linux-2.6-xen-sparse/include/asm-xen/asm-x86_64/hypercall.h
--- a/linux-2.6-xen-sparse/include/asm-xen/asm-x86_64/hypercall.h Mon Sep
12 12:31:41 2005
+++ b/linux-2.6-xen-sparse/include/asm-xen/asm-x86_64/hypercall.h Mon Sep
12 12:32:20 2005
@@ -260,9 +260,9 @@
static inline int
HYPERVISOR_xen_version(
- int cmd)
-{
- return _hypercall1(int, xen_version, cmd);
+ int cmd, void *arg)
+{
+ return _hypercall2(int, xen_version, cmd, arg);
}
static inline int
diff -r b594bb976a74 -r f752e0c873a6 tools/libxc/xc_private.c
--- a/tools/libxc/xc_private.c Mon Sep 12 12:31:41 2005
+++ b/tools/libxc/xc_private.c Mon Sep 12 12:32:20 2005
@@ -425,23 +425,49 @@
int xc_version(int xc_handle, int cmd, void *arg)
{
- return do_xen_version(xc_handle, cmd, arg);
-}
-
-unsigned long xc_make_page_below_4G(int xc_handle, u32 domid,
- unsigned long mfn)
+ int rc, argsize = 0;
+
+ switch ( cmd )
+ {
+ case XENVER_extraversion: argsize = sizeof(xen_extraversion_t); break;
+ case XENVER_compile_info: argsize = sizeof(xen_compile_info_t); break;
+ case XENVER_capabilities: argsize = sizeof(xen_capabilities_info_t); break;
+ case XENVER_changeset: argsize = sizeof(xen_changeset_info_t); break;
+ case XENVER_parameters: argsize = sizeof(xen_parameters_info_t); break;
+ }
+
+ if ( (argsize != 0) && (mlock(arg, argsize) != 0) )
+ {
+ PERROR("Could not lock memory for version hypercall");
+ return -ENOMEM;
+ }
+
+ rc = do_xen_version(xc_handle, cmd, arg);
+
+ if ( argsize != 0 )
+ safe_munlock(arg, argsize);
+
+ return rc;
+}
+
+unsigned long xc_make_page_below_4G(
+ int xc_handle, u32 domid, unsigned long mfn)
{
unsigned long new_mfn;
+
if ( xc_domain_memory_decrease_reservation(
- xc_handle, domid, 1, 0, &mfn ) != 1 )
+ xc_handle, domid, 1, 0, &mfn) != 1 )
{
fprintf(stderr,"xc_make_page_below_4G decrease failed. mfn=%lx\n",mfn);
return 0;
}
- if ( xc_domain_memory_increase_reservation( xc_handle, domid, 1, 0, 32,
&new_mfn ) != 1 )
+
+ if ( xc_domain_memory_increase_reservation(
+ xc_handle, domid, 1, 0, 32, &new_mfn) != 1 )
{
fprintf(stderr,"xc_make_page_below_4G increase failed. mfn=%lx\n",mfn);
return 0;
}
+
return new_mfn;
}
diff -r b594bb976a74 -r f752e0c873a6 xen/Makefile
--- a/xen/Makefile Mon Sep 12 12:31:41 2005
+++ b/xen/Makefile Mon Sep 12 12:32:20 2005
@@ -11,8 +11,7 @@
export XEN_VERSION = 3
export XEN_SUBVERSION = 0
export XEN_EXTRAVERSION = -devel
-export XEN_LOCALVERSION =
-export XEN_FULLVERSION =
$(XEN_VERSION).$(XEN_SUBVERSION)$(XEN_EXTRAVERSION)$(XEN_LOCALVERSION)
+export XEN_FULLVERSION = $(XEN_VERSION).$(XEN_SUBVERSION)$(XEN_EXTRAVERSION)
export BASEDIR := $(CURDIR)
@@ -33,7 +32,6 @@
install: $(TARGET).gz
[ -d $(DESTDIR)/boot ] || $(INSTALL_DIR) $(DESTDIR)/boot
$(INSTALL_DATA) $(TARGET).gz $(DESTDIR)/boot/$(notdir
$(TARGET))-$(XEN_FULLVERSION).gz
- ln -f -s $(notdir $(TARGET))-$(XEN_FULLVERSION).gz
$(DESTDIR)/boot/$(notdir
$(TARGET))-$(XEN_VERSION).$(XEN_SUBVERSION)$(XEN_LOCALVERSION).gz
ln -f -s $(notdir $(TARGET))-$(XEN_FULLVERSION).gz
$(DESTDIR)/boot/$(notdir $(TARGET))-$(XEN_VERSION).$(XEN_SUBVERSION).gz
ln -f -s $(notdir $(TARGET))-$(XEN_FULLVERSION).gz
$(DESTDIR)/boot/$(notdir $(TARGET))-$(XEN_VERSION).gz
ln -f -s $(notdir $(TARGET))-$(XEN_FULLVERSION).gz
$(DESTDIR)/boot/$(notdir $(TARGET)).gz
diff -r b594bb976a74 -r f752e0c873a6 xen/arch/x86/x86_32/entry.S
--- a/xen/arch/x86/x86_32/entry.S Mon Sep 12 12:31:41 2005
+++ b/xen/arch/x86/x86_32/entry.S Mon Sep 12 12:32:20 2005
@@ -834,7 +834,7 @@
.byte 4 /* do_update_va_mapping */
.byte 2 /* do_set_timer_op */ /* 15 */
.byte 1 /* do_event_channel_op */
- .byte 1 /* do_xen_version */
+ .byte 2 /* do_xen_version */
.byte 3 /* do_console_io */
.byte 1 /* do_physdev_op */
.byte 3 /* do_grant_table_op */ /* 20 */
diff -r b594bb976a74 -r f752e0c873a6 xen/arch/x86/x86_64/entry.S
--- a/xen/arch/x86/x86_64/entry.S Mon Sep 12 12:31:41 2005
+++ b/xen/arch/x86/x86_64/entry.S Mon Sep 12 12:32:20 2005
@@ -655,7 +655,7 @@
.byte 3 /* do_update_va_mapping */
.byte 1 /* do_set_timer_op */ /* 15 */
.byte 1 /* do_event_channel_op */
- .byte 1 /* do_xen_version */
+ .byte 2 /* do_xen_version */
.byte 3 /* do_console_io */
.byte 1 /* do_physdev_op */
.byte 3 /* do_grant_table_op */ /* 20 */
diff -r b594bb976a74 -r f752e0c873a6 xen/common/memory.c
--- a/xen/common/memory.c Mon Sep 12 12:31:41 2005
+++ b/xen/common/memory.c Mon Sep 12 12:32:20 2005
@@ -29,7 +29,7 @@
int *preempted)
{
struct pfn_info *page;
- unsigned long i;
+ unsigned int i;
if ( (extent_list != NULL) &&
!array_access_ok(extent_list, nr_extents, sizeof(*extent_list)) )
@@ -37,7 +37,7 @@
if ( (extent_order != 0) && !IS_CAPABLE_PHYSDEV(current->domain) )
{
- DPRINTK("Only I/O-capable domains may allocate > order-0 memory.\n");
+ DPRINTK("Only I/O-capable domains may allocate multi-page extents.\n");
return 0;
}
@@ -52,8 +52,9 @@
if ( unlikely((page = alloc_domheap_pages(
d, extent_order, flags)) == NULL) )
{
- DPRINTK("Could not allocate order=%d extent: id=%d flags=%x\n",
- extent_order, d->domain_id, flags);
+ DPRINTK("Could not allocate order=%d extent: "
+ "id=%d flags=%x (%d of %d)\n",
+ extent_order, d->domain_id, flags, i, nr_extents);
return i;
}
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|