summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2012-02-12 10:44:07 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2012-02-12 10:50:12 +0000
commit97935b308484879fd7117fcaf46cffa84552caaf (patch)
treee593c3271f81f72eb3f2f801a13fd4852e60e63a
parentcd46eba6f617f9d99d6485c14d2375fb4bdd68ca (diff)
downloadaports-97935b308484879fd7117fcaf46cffa84552caaf.tar.bz2
aports-97935b308484879fd7117fcaf46cffa84552caaf.tar.xz
main/xen: upgrade to 4.1.2
-rw-r--r--main/xen/APKBUILD86
-rw-r--r--main/xen/blktap-write.patch24
-rw-r--r--main/xen/blktap2_libvhd_add_iconv.patch (renamed from testing/xen/blktap2_libvhd_add_iconv.patch)0
-rw-r--r--main/xen/busybox-sed.patch (renamed from testing/xen/busybox-sed.patch)0
-rw-r--r--main/xen/define_fsimage_dir.patch (renamed from testing/xen/define_fsimage_dir.patch)0
-rw-r--r--main/xen/detect_libiconv.patch (renamed from testing/xen/detect_libiconv.patch)0
-rw-r--r--main/xen/fix_bswap_blktap.patch (renamed from testing/xen/fix_bswap_blktap.patch)0
-rw-r--r--main/xen/fix_bswap_blktap2.patch (renamed from testing/xen/fix_bswap_blktap2.patch)0
-rw-r--r--main/xen/fix_ipxe_no_pie_default.patch (renamed from testing/xen/fix_ipxe_no_pie_default.patch)0
-rw-r--r--main/xen/librt.patch (renamed from testing/xen/librt.patch)0
-rw-r--r--main/xen/pygrub_alpine.patch (renamed from testing/xen/pygrub_alpine.patch)0
-rw-r--r--main/xen/xen-blktap-uclibc.patch11
-rw-r--r--main/xen/xen-blktap2-uclibc.patch22
-rw-r--r--main/xen/xen-disable-firmware.patch10
-rw-r--r--main/xen/xen-dont-use-lib64.patch11
-rw-r--r--main/xen/xen-gcc-4.6-Werror-fix.patch36
-rw-r--r--main/xen/xen-gcc-4.6-hvmloader-is-broken.patch733
-rw-r--r--main/xen/xen-sed-is-broken-hack.patch11
-rw-r--r--main/xen/xen-x86-pic.patch19
-rw-r--r--[-rwxr-xr-x]main/xen/xencommons.initd133
-rw-r--r--main/xen/xend.initd39
-rw-r--r--main/xen/xendomains.initd68
-rw-r--r--testing/xen/APKBUILD95
-rw-r--r--testing/xen/xencommons.initd102
-rw-r--r--testing/xen/xend.initd53
-rw-r--r--testing/xen/xendomains.initd105
26 files changed, 194 insertions, 1364 deletions
diff --git a/main/xen/APKBUILD b/main/xen/APKBUILD
index b427fbd37..0fe61ee06 100644
--- a/main/xen/APKBUILD
+++ b/main/xen/APKBUILD
@@ -1,70 +1,67 @@
# Contributor: William Pitcock <nenolod@dereferenced.org>
+# Contributor: Roger Pau Monne <roger.pau@entel.upc.edu>
# Maintainer: William Pitcock <nenolod@dereferenced.org>
pkgname=xen
-pkgver=4.1.1
-pkgrel=2
+pkgver=4.1.2
+pkgrel=3
pkgdesc="Xen hypervisor"
url="http://www.xen.org/"
+arch="x86 x86_64"
license="GPL"
-depends="coreutils python sed gawk"
-makedepends="libgcrypt-dev gnutls-dev pciutils-dev texinfo wget mesa-dev sdl-dev zlib-dev openssl-dev util-linux-dev python-dev gettext-dev ncurses-dev perl"
-install=
+depends="udev syslinux bash"
+depends_dev="openssl-dev python-dev e2fsprogs-dev gettext zlib-dev ncurses-dev
+ libiconv-dev dev86 texinfo perl iasl pciutils-dev"
+makedepends="$depends_dev"
+install=""
subpackages="$pkgname-doc"
source="http://bits.xensource.com/oss-xen/release/$pkgver/$pkgname-$pkgver.tar.gz
- xen-blktap-uclibc.patch
- xen-blktap2-uclibc.patch
- xen-disable-firmware.patch
- xen-dont-use-lib64.patch
- xen-sed-is-broken-hack.patch
- blktap-write.patch
- xen-x86-pic.patch
- xen-gcc-4.6-Werror-fix.patch
- xen-gcc-4.6-hvmloader-is-broken.patch
+ blktap2_libvhd_add_iconv.patch
+ detect_libiconv.patch
+ fix_bswap_blktap.patch
+ fix_bswap_blktap2.patch
+ fix_ipxe_no_pie_default.patch
+ define_fsimage_dir.patch
+ pygrub_alpine.patch
+ librt.patch
+ busybox-sed.patch
xencommons.initd
xend.initd
xendomains.initd"
-arch="x86 x86_64"
_builddir="$srcdir"/$pkgname-$pkgver
-
prepare() {
+ local i
cd "$_builddir"
-
- msg "Patching sources..."
for i in $source; do
case $i in
- *.patch)
- msg "Applying $i..."
- patch -s -p1 -N -i "$srcdir"/$i || return 1
- ;;
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
esac
done
- msg "Sources have been patched successfully."
# remove all -Werror
msg "Eradicating -Werror..."
find -name '*.mk' -o -name 'Make*' | xargs sed -i -e 's/-Werror//g'
+
+ echo "LIBLEAFDIR_x86_64=lib" >> .config
}
build() {
cd "$_builddir"
- # We unset $CFLAGS and $LDFLAGS because Xen's buildsystem does not
- # like these values being set. Arguably this is a bug but I can't be
- # bothered to track it down. --nenolod
+ # Unset CFLAGS and LDFLAGS because the xen build system
+ # doesn't support them. Instead use .config in xen root
+ # folder if necessary.
unset CFLAGS
unset LDFLAGS
- # If we provide no parameters it tries to build a kernel image. We
- # definitely don't want that.
msg "Running preflight check..."
(cd tools/check; ./chk build) || return 1
msg "Building hypervisor..."
- make -j1 xen || return 1
+ make xen || return 1
msg "Building tools..."
- make -j1 tools || return 1
+ make tools || return 1
msg "Building stub domains..."
make -j1 stubdom || return 1
@@ -73,9 +70,6 @@ build() {
package() {
cd "$_builddir"
- # We unset $CFLAGS and $LDFLAGS because Xen's buildsystem does not
- # like these values being set. Arguably this is a bug but I can't be
- # bothered to track it down. --nenolod
unset CFLAGS
unset LDFLAGS
@@ -87,16 +81,16 @@ package() {
install -m755 -D "$srcdir"/xendomains.initd "$pkgdir"/etc/init.d/xendomains
}
-md5sums="fab4bf74d73444ff9b43bced2e4fc5a2 xen-4.1.1.tar.gz
-edb5c3e7fba8214702fac709f0e53124 xen-blktap-uclibc.patch
-1f7f847ae0baa915c7b52d0ed5869fe6 xen-blktap2-uclibc.patch
-a569f16a7e3c832ba3fab6154f657244 xen-disable-firmware.patch
-20ce621f3a2fc8ae78e74b9b72da775c xen-dont-use-lib64.patch
-0cec6a97de9e4bc178f3e71190495cc3 xen-sed-is-broken-hack.patch
-56af00443c8d40944082e26304452a5e blktap-write.patch
-c4fc42b11c5917a93f66acf0f83a8747 xen-x86-pic.patch
-faafc199fa8cf33aac44e41c9e1659ea xen-gcc-4.6-Werror-fix.patch
-202dae12f61f4068971cf9b0f47081da xen-gcc-4.6-hvmloader-is-broken.patch
-0b62c1fbe2699a32e745724fd301db5b xencommons.initd
-5ee6a16ec70dfbcd4944ded71b393fa2 xend.initd
-a2b5234483f1b5892d22e9315d9c307f xendomains.initd"
+md5sums="73561faf3c1b5e36ec5c089b5db848ad xen-4.1.2.tar.gz
+6d4b045ae56be6288733d0e078f591ea blktap2_libvhd_add_iconv.patch
+ed3283697cb1ddff066f4087eabf68c6 detect_libiconv.patch
+503f0883f4a0b50fe4e37e09ed9a6177 fix_bswap_blktap.patch
+b973dc1ffcc6872e222b36f3b7b4836b fix_bswap_blktap2.patch
+10dcf0b6a05691e9f88afc01bd414480 fix_ipxe_no_pie_default.patch
+0bb8a435020a5a49b38b1a447fb69977 define_fsimage_dir.patch
+a7500c42804abdf68e051dc667e65f93 pygrub_alpine.patch
+fa06495a175571f4aa3b6cb88937953e librt.patch
+1bea3543ddc712330527b62fd9ff6520 busybox-sed.patch
+4cf88b53f8ca8d99ad52bae419b620a7 xencommons.initd
+b5bfc08b82bc0d21193714719a719798 xend.initd
+86e7923383a906404da321d1814657e9 xendomains.initd"
diff --git a/main/xen/blktap-write.patch b/main/xen/blktap-write.patch
deleted file mode 100644
index 4b589daec..000000000
--- a/main/xen/blktap-write.patch
+++ /dev/null
@@ -1,24 +0,0 @@
---- ./tools/blktap2/include/blktaplib.h.orig
-+++ ./tools/blktap2/include/blktaplib.h
-@@ -198,7 +198,9 @@
- } msg_lock_t;
-
- #define READ 0
-+#ifndef WRITE
- #define WRITE 1
-+#endif
-
- /*Control Messages between manager and tapdev*/
- #define CTLMSG_PARAMS 1
---- ./tools/blktap/lib/blktaplib.h.orig
-+++ ./tools/blktap/lib/blktaplib.h
-@@ -196,7 +196,9 @@
- } msg_pid_t;
-
- #define READ 0
-+#ifndef WRITE
- #define WRITE 1
-+#endif
-
- /*Control Messages between manager and tapdev*/
- #define CTLMSG_PARAMS 1
diff --git a/testing/xen/blktap2_libvhd_add_iconv.patch b/main/xen/blktap2_libvhd_add_iconv.patch
index 2353e38a6..2353e38a6 100644
--- a/testing/xen/blktap2_libvhd_add_iconv.patch
+++ b/main/xen/blktap2_libvhd_add_iconv.patch
diff --git a/testing/xen/busybox-sed.patch b/main/xen/busybox-sed.patch
index e1a953157..e1a953157 100644
--- a/testing/xen/busybox-sed.patch
+++ b/main/xen/busybox-sed.patch
diff --git a/testing/xen/define_fsimage_dir.patch b/main/xen/define_fsimage_dir.patch
index 04e4aed2a..04e4aed2a 100644
--- a/testing/xen/define_fsimage_dir.patch
+++ b/main/xen/define_fsimage_dir.patch
diff --git a/testing/xen/detect_libiconv.patch b/main/xen/detect_libiconv.patch
index 5b2359eb6..5b2359eb6 100644
--- a/testing/xen/detect_libiconv.patch
+++ b/main/xen/detect_libiconv.patch
diff --git a/testing/xen/fix_bswap_blktap.patch b/main/xen/fix_bswap_blktap.patch
index 71671d9dc..71671d9dc 100644
--- a/testing/xen/fix_bswap_blktap.patch
+++ b/main/xen/fix_bswap_blktap.patch
diff --git a/testing/xen/fix_bswap_blktap2.patch b/main/xen/fix_bswap_blktap2.patch
index 69cd2e369..69cd2e369 100644
--- a/testing/xen/fix_bswap_blktap2.patch
+++ b/main/xen/fix_bswap_blktap2.patch
diff --git a/testing/xen/fix_ipxe_no_pie_default.patch b/main/xen/fix_ipxe_no_pie_default.patch
index 3ffb5388c..3ffb5388c 100644
--- a/testing/xen/fix_ipxe_no_pie_default.patch
+++ b/main/xen/fix_ipxe_no_pie_default.patch
diff --git a/testing/xen/librt.patch b/main/xen/librt.patch
index cbb52071a..cbb52071a 100644
--- a/testing/xen/librt.patch
+++ b/main/xen/librt.patch
diff --git a/testing/xen/pygrub_alpine.patch b/main/xen/pygrub_alpine.patch
index 98d0822c7..98d0822c7 100644
--- a/testing/xen/pygrub_alpine.patch
+++ b/main/xen/pygrub_alpine.patch
diff --git a/main/xen/xen-blktap-uclibc.patch b/main/xen/xen-blktap-uclibc.patch
deleted file mode 100644
index d8668ec19..000000000
--- a/main/xen/xen-blktap-uclibc.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- xen-4.0.1/tools/blktap/drivers/bswap.h
-+++ xen-4.0.1.mod/tools/blktap/drivers/bswap.h
-@@ -15,6 +15,8 @@
- #define bswap_64(x) swap64(x)
- #else
-
-+#define HAVE_BYTESWAP_H
-+
- #ifdef HAVE_BYTESWAP_H
- #include <byteswap.h>
- #else
diff --git a/main/xen/xen-blktap2-uclibc.patch b/main/xen/xen-blktap2-uclibc.patch
deleted file mode 100644
index 7ce1dc0cf..000000000
--- a/main/xen/xen-blktap2-uclibc.patch
+++ /dev/null
@@ -1,22 +0,0 @@
---- xen-4.0.1/tools/blktap2/drivers/bswap.h
-+++ xen-4.0.1.mod/tools/blktap2/drivers/bswap.h
-@@ -15,6 +15,8 @@
- #define bswap_64(x) swap64(x)
- #else
-
-+#define HAVE_BYTESWAP_H
-+
- #ifdef HAVE_BYTESWAP_H
- #include <byteswap.h>
- #else
---- xen-4.0.1/tools/blktap2/vhd/lib/Makefile
-+++ xen-4.0.1.mod/tools/blktap2/vhd/lib/Makefile
-@@ -23,6 +23,8 @@
- LIBS := -luuid
- endif
-
-+LIBS += -liconv
-+
- # Get gcc to generate the dependencies for us.
- CFLAGS += -Wp,-MD,.$(@F).d
- DEPS = .*.d
diff --git a/main/xen/xen-disable-firmware.patch b/main/xen/xen-disable-firmware.patch
deleted file mode 100644
index 06e43d41c..000000000
--- a/main/xen/xen-disable-firmware.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- xen-4.0.1/tools/Makefile
-+++ xen-4.0.1.mod/tools/Makefile
-@@ -13,7 +13,6 @@
- SUBDIRS-y += hotplug
- SUBDIRS-y += xentrace
- SUBDIRS-$(CONFIG_XCUTILS) += xcutils
--SUBDIRS-$(CONFIG_X86) += firmware
- SUBDIRS-$(ACM_SECURITY) += security
- SUBDIRS-y += console
- SUBDIRS-y += xenmon
diff --git a/main/xen/xen-dont-use-lib64.patch b/main/xen/xen-dont-use-lib64.patch
deleted file mode 100644
index b14ff1016..000000000
--- a/main/xen/xen-dont-use-lib64.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- xen-4.0.1/config/StdGNU.mk
-+++ xen-4.0.1.mod/config/StdGNU.mk
-@@ -28,7 +28,7 @@
- INCLUDEDIR = $(PREFIX)/include
- LIBLEAFDIR = lib
- LIBLEAFDIR_x86_32 = lib
--LIBLEAFDIR_x86_64 ?= lib64
-+LIBLEAFDIR_x86_64 ?= lib
- LIBDIR = $(PREFIX)/$(LIBLEAFDIR)
- LIBDIR_x86_32 = $(PREFIX)/$(LIBLEAFDIR_x86_32)
- LIBDIR_x86_64 = $(PREFIX)/$(LIBLEAFDIR_x86_64)
diff --git a/main/xen/xen-gcc-4.6-Werror-fix.patch b/main/xen/xen-gcc-4.6-Werror-fix.patch
deleted file mode 100644
index b04ae9cae..000000000
--- a/main/xen/xen-gcc-4.6-Werror-fix.patch
+++ /dev/null
@@ -1,36 +0,0 @@
---- ./tools/python/xen/lowlevel/checkpoint/libcheckpoint.c.orig
-+++ ./tools/python/xen/lowlevel/checkpoint/libcheckpoint.c
-@@ -820,12 +820,10 @@
-
- static void stop_suspend_thread(checkpoint_state* s)
- {
-- int err;
--
- s->done = 1;
-
-- err = sem_post(&s->resumed_sem);
-+ (void)sem_post(&s->resumed_sem);
-
-- err = pthread_join(s->suspend_thr, NULL);
-+ (void)pthread_join(s->suspend_thr, NULL);
- s->suspend_thr = 0;
- }
---- ./tools/python/xen/lowlevel/netlink/libnetlink.c.orig
-+++ ./tools/python/xen/lowlevel/netlink/libnetlink.c
-@@ -433,7 +433,7 @@
- nladdr.nl_groups = 0;
-
- while (1) {
-- int err, len, type;
-+ int err, len;
- int l;
-
- status = fread(&buf, 1, sizeof(*h), rtnl);
-@@ -448,7 +448,6 @@
- return 0;
-
- len = h->nlmsg_len;
-- type= h->nlmsg_type;
- l = len - sizeof(*h);
-
- if (l<0 || len>sizeof(buf)) {
diff --git a/main/xen/xen-gcc-4.6-hvmloader-is-broken.patch b/main/xen/xen-gcc-4.6-hvmloader-is-broken.patch
deleted file mode 100644
index 767abed5d..000000000
--- a/main/xen/xen-gcc-4.6-hvmloader-is-broken.patch
+++ /dev/null
@@ -1,733 +0,0 @@
-
-# HG changeset patch
-# User Keir Fraser <keir@xen.org>
-# Date 1311171934 -3600
-# Node ID 1976adbf2b807e505fdf0356c29ec0c0499ed533
-# Parent 411b38f8f90bc042a9e6839b6840dd57cbee4a8c
-hvmloader: Switch to absolute addressing for calling hypercall stubs.
-
-This is clearer and less fragile than trying to make relative calls
-work. In particular, the old approach failed if _start was not
-== HVMLOADER_PHYSICAL_ADDRESS. This was the case for some modern
-toolchains which reorder functions.
-
-Signed-off-by: Keir Fraser <keir@xen.org>
-xen-unstable changeset: 23730:dd5eecf739d1
-xen-unstable date: Wed Jul 20 15:02:16 2011 +0100
-
-
-hvmloader: Remove hard tabs from source files.
-
-Signed-off-by: Keir Fraser <keir@xen.org>
-xen-unstable changeset: 23729:4f1109af9c63
-xen-unstable date: Wed Jul 20 14:52:16 2011 +0100
-
-diff -r 411b38f8f90b -r 1976adbf2b80 tools/firmware/hvmloader/hypercall.h
---- a/tools/firmware/hvmloader/hypercall.h Wed Jul 20 15:24:09 2011 +0100
-+++ b/tools/firmware/hvmloader/hypercall.h Wed Jul 20 15:25:34 2011 +0100
-@@ -35,147 +35,148 @@
- #include <xen/xen.h>
- #include "config.h"
-
--/*
-- * NB. Hypercall address needs to be relative to a linkage symbol for
-- * some version of ld to relocate the relative calls properly.
-- */
--#define hypercall_pa "_start - " STR(HVMLOADER_PHYSICAL_ADDRESS) \
-- " + " STR(HYPERCALL_PHYSICAL_ADDRESS)
-+#define hcall_addr(name) \
-+ ((unsigned long)HYPERCALL_PHYSICAL_ADDRESS + __HYPERVISOR_##name * 32)
-
--#define _hypercall0(type, name) \
--({ \
-- long __res; \
-- asm volatile ( \
-- "call "hypercall_pa" + " STR(__HYPERVISOR_##name * 32) \
-- : "=a" (__res) \
-- : \
-- : "memory" ); \
-- (type)__res; \
-+#define _hypercall0(type, name) \
-+({ \
-+ long __res; \
-+ asm volatile ( \
-+ "call *%%eax" \
-+ : "=a" (__res) \
-+ : "0" (hcall_addr(name)) \
-+ : "memory" ); \
-+ (type)__res; \
- })
-
--#define _hypercall1(type, name, a1) \
--({ \
-- long __res, __ign1; \
-- asm volatile ( \
-- "call "hypercall_pa" + " STR(__HYPERVISOR_##name * 32) \
-- : "=a" (__res), "=b" (__ign1) \
-- : "1" ((long)(a1)) \
-- : "memory" ); \
-- (type)__res; \
-+#define _hypercall1(type, name, a1) \
-+({ \
-+ long __res, __ign1; \
-+ asm volatile ( \
-+ "call *%%eax" \
-+ : "=a" (__res), "=b" (__ign1) \
-+ : "0" (hcall_addr(name)), \
-+ "1" ((long)(a1)) \
-+ : "memory" ); \
-+ (type)__res; \
- })
-
--#define _hypercall2(type, name, a1, a2) \
--({ \
-- long __res, __ign1, __ign2; \
-- asm volatile ( \
-- "call "hypercall_pa" + " STR(__HYPERVISOR_##name * 32) \
-- : "=a" (__res), "=b" (__ign1), "=c" (__ign2) \
-- : "1" ((long)(a1)), "2" ((long)(a2)) \
-- : "memory" ); \
-- (type)__res; \
-+#define _hypercall2(type, name, a1, a2) \
-+({ \
-+ long __res, __ign1, __ign2; \
-+ asm volatile ( \
-+ "call *%%eax" \
-+ : "=a" (__res), "=b" (__ign1), "=c" (__ign2) \
-+ : "0" (hcall_addr(name)), \
-+ "1" ((long)(a1)), "2" ((long)(a2)) \
-+ : "memory" ); \
-+ (type)__res; \
- })
-
--#define _hypercall3(type, name, a1, a2, a3) \
--({ \
-- long __res, __ign1, __ign2, __ign3; \
-- asm volatile ( \
-- "call "hypercall_pa" + " STR(__HYPERVISOR_##name * 32) \
-- : "=a" (__res), "=b" (__ign1), "=c" (__ign2), \
-- "=d" (__ign3) \
-- : "1" ((long)(a1)), "2" ((long)(a2)), \
-- "3" ((long)(a3)) \
-- : "memory" ); \
-- (type)__res; \
-+#define _hypercall3(type, name, a1, a2, a3) \
-+({ \
-+ long __res, __ign1, __ign2, __ign3; \
-+ asm volatile ( \
-+ "call *%%eax" \
-+ : "=a" (__res), "=b" (__ign1), "=c" (__ign2), \
-+ "=d" (__ign3) \
-+ : "0" (hcall_addr(name)), \
-+ "1" ((long)(a1)), "2" ((long)(a2)), \
-+ "3" ((long)(a3)) \
-+ : "memory" ); \
-+ (type)__res; \
- })
-
--#define _hypercall4(type, name, a1, a2, a3, a4) \
--({ \
-- long __res, __ign1, __ign2, __ign3, __ign4; \
-- asm volatile ( \
-- "call "hypercall_pa" + " STR(__HYPERVISOR_##name * 32) \
-- : "=a" (__res), "=b" (__ign1), "=c" (__ign2), \
-- "=d" (__ign3), "=S" (__ign4) \
-- : "1" ((long)(a1)), "2" ((long)(a2)), \
-- "3" ((long)(a3)), "4" ((long)(a4)) \
-- : "memory" ); \
-- (type)__res; \
-+#define _hypercall4(type, name, a1, a2, a3, a4) \
-+({ \
-+ long __res, __ign1, __ign2, __ign3, __ign4; \
-+ asm volatile ( \
-+ "call *%%eax" \
-+ : "=a" (__res), "=b" (__ign1), "=c" (__ign2), \
-+ "=d" (__ign3), "=S" (__ign4) \
-+ : "0" (hcall_addr(name)), \
-+ "1" ((long)(a1)), "2" ((long)(a2)), \
-+ "3" ((long)(a3)), "4" ((long)(a4)) \
-+ : "memory" ); \
-+ (type)__res; \
- })
-
--#define _hypercall5(type, name, a1, a2, a3, a4, a5) \
--({ \
-- long __res, __ign1, __ign2, __ign3, __ign4, __ign5; \
-- asm volatile ( \
-- "call "hypercall_pa" + " STR(__HYPERVISOR_##name * 32) \
-- : "=a" (__res), "=b" (__ign1), "=c" (__ign2), \
-- "=d" (__ign3), "=S" (__ign4), "=D" (__ign5) \
-- : "1" ((long)(a1)), "2" ((long)(a2)), \
-- "3" ((long)(a3)), "4" ((long)(a4)), \
-- "5" ((long)(a5)) \
-- : "memory" ); \
-- (type)__res; \
-+#define _hypercall5(type, name, a1, a2, a3, a4, a5) \
-+({ \
-+ long __res, __ign1, __ign2, __ign3, __ign4, __ign5; \
-+ asm volatile ( \
-+ "call *%%eax" \
-+ : "=a" (__res), "=b" (__ign1), "=c" (__ign2), \
-+ "=d" (__ign3), "=S" (__ign4), "=D" (__ign5) \
-+ : "0" (hcall_addr(name)), \
-+ "1" ((long)(a1)), "2" ((long)(a2)), \
-+ "3" ((long)(a3)), "4" ((long)(a4)), \
-+ "5" ((long)(a5)) \
-+ : "memory" ); \
-+ (type)__res; \
- })
-
- static inline int
- hypercall_sched_op(
-- int cmd, void *arg)
-+ int cmd, void *arg)
- {
-- return _hypercall2(int, sched_op, cmd, arg);
-+ return _hypercall2(int, sched_op, cmd, arg);
- }
-
- static inline int
- hypercall_memory_op(
-- unsigned int cmd, void *arg)
-+ unsigned int cmd, void *arg)
- {
-- return _hypercall2(int, memory_op, cmd, arg);
-+ return _hypercall2(int, memory_op, cmd, arg);
- }
-
- static inline int
- hypercall_multicall(
-- void *call_list, int nr_calls)
-+ void *call_list, int nr_calls)
- {
-- return _hypercall2(int, multicall, call_list, nr_calls);
-+ return _hypercall2(int, multicall, call_list, nr_calls);
- }
-
- static inline int
- hypercall_event_channel_op(
-- int cmd, void *arg)
-+ int cmd, void *arg)
- {
-- return _hypercall2(int, event_channel_op, cmd, arg);
-+ return _hypercall2(int, event_channel_op, cmd, arg);
- }
-
- static inline int
- hypercall_xen_version(
-- int cmd, void *arg)
-+ int cmd, void *arg)
- {
-- return _hypercall2(int, xen_version, cmd, arg);
-+ return _hypercall2(int, xen_version, cmd, arg);
- }
-
- static inline int
- hypercall_console_io(
-- int cmd, int count, char *str)
-+ int cmd, int count, char *str)
- {
-- return _hypercall3(int, console_io, cmd, count, str);
-+ return _hypercall3(int, console_io, cmd, count, str);
- }
-
- static inline int
- hypercall_vm_assist(
-- unsigned int cmd, unsigned int type)
-+ unsigned int cmd, unsigned int type)
- {
-- return _hypercall2(int, vm_assist, cmd, type);
-+ return _hypercall2(int, vm_assist, cmd, type);
- }
-
- static inline int
- hypercall_vcpu_op(
-- int cmd, int vcpuid, void *extra_args)
-+ int cmd, int vcpuid, void *extra_args)
- {
-- return _hypercall3(int, vcpu_op, cmd, vcpuid, extra_args);
-+ return _hypercall3(int, vcpu_op, cmd, vcpuid, extra_args);
- }
-
- static inline int
- hypercall_hvm_op(
-- int cmd, void *arg)
-+ int cmd, void *arg)
- {
-- return _hypercall2(int, hvm_op, cmd, arg);
-+ return _hypercall2(int, hvm_op, cmd, arg);
- }
-
- #endif /* __HVMLOADER_HYPERCALL_H__ */
-diff -r 411b38f8f90b -r 1976adbf2b80 tools/firmware/hvmloader/pci_regs.h
---- a/tools/firmware/hvmloader/pci_regs.h Wed Jul 20 15:24:09 2011 +0100
-+++ b/tools/firmware/hvmloader/pci_regs.h Wed Jul 20 15:25:34 2011 +0100
-@@ -1,69 +1,69 @@
- /*
-- * pci_regs.h
-+ * pci_regs.h
- *
-- * PCI standard defines
-- * Copyright 1994, Drew Eckhardt
-- * Copyright 1997--1999 Martin Mares <mj@ucw.cz>
-+ * PCI standard defines
-+ * Copyright 1994, Drew Eckhardt
-+ * Copyright 1997--1999 Martin Mares <mj@ucw.cz>
- *
-- * For more information, please consult the following manuals (look at
-- * http://www.pcisig.com/ for how to get them):
-+ * For more information, please consult the following manuals (look at
-+ * http://www.pcisig.com/ for how to get them):
- *
-- * PCI BIOS Specification
-- * PCI Local Bus Specification
-- * PCI to PCI Bridge Specification
-- * PCI System Design Guide
-+ * PCI BIOS Specification
-+ * PCI Local Bus Specification
-+ * PCI to PCI Bridge Specification
-+ * PCI System Design Guide
- */
-
- #ifndef __HVMLOADER_PCI_REGS_H__
- #define __HVMLOADER_PCI_REGS_H__
-
--#define PCI_VENDOR_ID 0x00 /* 16 bits */
--#define PCI_DEVICE_ID 0x02 /* 16 bits */
--#define PCI_COMMAND 0x04 /* 16 bits */
--#define PCI_COMMAND_IO 0x1 /* Enable response in I/O space */
--#define PCI_COMMAND_MEMORY 0x2 /* Enable response in Memory space */
--#define PCI_COMMAND_MASTER 0x4 /* Enable bus mastering */
--#define PCI_COMMAND_SPECIAL 0x8 /* Enable response to special cycles */
--#define PCI_COMMAND_INVALIDATE 0x10 /* Use memory write and invalidate */
--#define PCI_COMMAND_VGA_PALETTE 0x20 /* Enable palette snooping */
--#define PCI_COMMAND_PARITY 0x40 /* Enable parity checking */
--#define PCI_COMMAND_WAIT 0x80 /* Enable address/data stepping */
--#define PCI_COMMAND_SERR 0x100 /* Enable SERR */
--#define PCI_COMMAND_FAST_BACK 0x200 /* Enable back-to-back writes */
-+#define PCI_VENDOR_ID 0x00 /* 16 bits */
-+#define PCI_DEVICE_ID 0x02 /* 16 bits */
-+#define PCI_COMMAND 0x04 /* 16 bits */
-+#define PCI_COMMAND_IO 0x1 /* Enable response in I/O space */
-+#define PCI_COMMAND_MEMORY 0x2 /* Enable response in Memory space */
-+#define PCI_COMMAND_MASTER 0x4 /* Enable bus mastering */
-+#define PCI_COMMAND_SPECIAL 0x8 /* Enable response to special cycles */
-+#define PCI_COMMAND_INVALIDATE 0x10 /* Use memory write and invalidate */
-+#define PCI_COMMAND_VGA_PALETTE 0x20 /* Enable palette snooping */
-+#define PCI_COMMAND_PARITY 0x40 /* Enable parity checking */
-+#define PCI_COMMAND_WAIT 0x80 /* Enable address/data stepping */
-+#define PCI_COMMAND_SERR 0x100 /* Enable SERR */
-+#define PCI_COMMAND_FAST_BACK 0x200 /* Enable back-to-back writes */
- #define PCI_COMMAND_INTX_DISABLE 0x400 /* INTx Emulation Disable */
-
--#define PCI_STATUS 0x06 /* 16 bits */
--#define PCI_STATUS_CAP_LIST 0x10 /* Support Capability List */
--#define PCI_STATUS_66MHZ 0x20 /* Support 66 Mhz PCI 2.1 bus */
--#define PCI_STATUS_UDF 0x40 /* Support User Definable Features [obsolete] */
--#define PCI_STATUS_FAST_BACK 0x80 /* Accept fast-back to back */
--#define PCI_STATUS_PARITY 0x100 /* Detected parity error */
--#define PCI_STATUS_DEVSEL_MASK 0x600 /* DEVSEL timing */
--#define PCI_STATUS_DEVSEL_FAST 0x000
--#define PCI_STATUS_DEVSEL_MEDIUM 0x200
--#define PCI_STATUS_DEVSEL_SLOW 0x400
--#define PCI_STATUS_SIG_TARGET_ABORT 0x800 /* Set on target abort */
--#define PCI_STATUS_REC_TARGET_ABORT 0x1000 /* Master ack of " */
--#define PCI_STATUS_REC_MASTER_ABORT 0x2000 /* Set on master abort */
--#define PCI_STATUS_SIG_SYSTEM_ERROR 0x4000 /* Set when we drive SERR */
--#define PCI_STATUS_DETECTED_PARITY 0x8000 /* Set on parity error */
-+#define PCI_STATUS 0x06 /* 16 bits */
-+#define PCI_STATUS_CAP_LIST 0x10 /* Support Capability List */
-+#define PCI_STATUS_66MHZ 0x20 /* Support 66 Mhz PCI 2.1 bus */
-+#define PCI_STATUS_UDF 0x40 /* Support User Definable Features [obsolete] */
-+#define PCI_STATUS_FAST_BACK 0x80 /* Accept fast-back to back */
-+#define PCI_STATUS_PARITY 0x100 /* Detected parity error */
-+#define PCI_STATUS_DEVSEL_MASK 0x600 /* DEVSEL timing */
-+#define PCI_STATUS_DEVSEL_FAST 0x000
-+#define PCI_STATUS_DEVSEL_MEDIUM 0x200
-+#define PCI_STATUS_DEVSEL_SLOW 0x400
-+#define PCI_STATUS_SIG_TARGET_ABORT 0x800 /* Set on target abort */
-+#define PCI_STATUS_REC_TARGET_ABORT 0x1000 /* Master ack of " */
-+#define PCI_STATUS_REC_MASTER_ABORT 0x2000 /* Set on master abort */
-+#define PCI_STATUS_SIG_SYSTEM_ERROR 0x4000 /* Set when we drive SERR */
-+#define PCI_STATUS_DETECTED_PARITY 0x8000 /* Set on parity error */
-
--#define PCI_CLASS_REVISION 0x08 /* High 24 bits are class, low 8 revision */
--#define PCI_REVISION_ID 0x08 /* Revision ID */
--#define PCI_CLASS_PROG 0x09 /* Reg. Level Programming Interface */
--#define PCI_CLASS_DEVICE 0x0a /* Device class */
-+#define PCI_CLASS_REVISION 0x08 /* High 24 bits are class, low 8 revision */
-+#define PCI_REVISION_ID 0x08 /* Revision ID */
-+#define PCI_CLASS_PROG 0x09 /* Reg. Level Programming Interface */
-+#define PCI_CLASS_DEVICE 0x0a /* Device class */
-
--#define PCI_CACHE_LINE_SIZE 0x0c /* 8 bits */
--#define PCI_LATENCY_TIMER 0x0d /* 8 bits */
--#define PCI_HEADER_TYPE 0x0e /* 8 bits */
--#define PCI_HEADER_TYPE_NORMAL 0
--#define PCI_HEADER_TYPE_BRIDGE 1
--#define PCI_HEADER_TYPE_CARDBUS 2
-+#define PCI_CACHE_LINE_SIZE 0x0c /* 8 bits */
-+#define PCI_LATENCY_TIMER 0x0d /* 8 bits */
-+#define PCI_HEADER_TYPE 0x0e /* 8 bits */
-+#define PCI_HEADER_TYPE_NORMAL 0
-+#define PCI_HEADER_TYPE_BRIDGE 1
-+#define PCI_HEADER_TYPE_CARDBUS 2
-
--#define PCI_BIST 0x0f /* 8 bits */
--#define PCI_BIST_CODE_MASK 0x0f /* Return result */
--#define PCI_BIST_START 0x40 /* 1 to start BIST, 2 secs or less */
--#define PCI_BIST_CAPABLE 0x80 /* 1 if BIST capable */
-+#define PCI_BIST 0x0f /* 8 bits */
-+#define PCI_BIST_CODE_MASK 0x0f /* Return result */
-+#define PCI_BIST_START 0x40 /* 1 to start BIST, 2 secs or less */
-+#define PCI_BIST_CAPABLE 0x80 /* 1 if BIST capable */
-
- /*
- * Base addresses specify locations in memory or I/O space.
-@@ -71,38 +71,38 @@
- * 0xffffffff to the register, and reading it back. Only
- * 1 bits are decoded.
- */
--#define PCI_BASE_ADDRESS_0 0x10 /* 32 bits */
--#define PCI_BASE_ADDRESS_1 0x14 /* 32 bits [htype 0,1 only] */
--#define PCI_BASE_ADDRESS_2 0x18 /* 32 bits [htype 0 only] */
--#define PCI_BASE_ADDRESS_3 0x1c /* 32 bits */
--#define PCI_BASE_ADDRESS_4 0x20 /* 32 bits */
--#define PCI_BASE_ADDRESS_5 0x24 /* 32 bits */
--#define PCI_BASE_ADDRESS_SPACE 0x01 /* 0 = memory, 1 = I/O */
--#define PCI_BASE_ADDRESS_SPACE_IO 0x01
--#define PCI_BASE_ADDRESS_SPACE_MEMORY 0x00
--#define PCI_BASE_ADDRESS_MEM_TYPE_MASK 0x06
--#define PCI_BASE_ADDRESS_MEM_TYPE_32 0x00 /* 32 bit address */
--#define PCI_BASE_ADDRESS_MEM_TYPE_1M 0x02 /* Below 1M [obsolete] */
--#define PCI_BASE_ADDRESS_MEM_TYPE_64 0x04 /* 64 bit address */
--#define PCI_BASE_ADDRESS_MEM_PREFETCH 0x08 /* prefetchable? */
--#define PCI_BASE_ADDRESS_MEM_MASK (~0x0fUL)
--#define PCI_BASE_ADDRESS_IO_MASK (~0x03UL)
-+#define PCI_BASE_ADDRESS_0 0x10 /* 32 bits */
-+#define PCI_BASE_ADDRESS_1 0x14 /* 32 bits [htype 0,1 only] */
-+#define PCI_BASE_ADDRESS_2 0x18 /* 32 bits [htype 0 only] */
-+#define PCI_BASE_ADDRESS_3 0x1c /* 32 bits */
-+#define PCI_BASE_ADDRESS_4 0x20 /* 32 bits */
-+#define PCI_BASE_ADDRESS_5 0x24 /* 32 bits */
-+#define PCI_BASE_ADDRESS_SPACE 0x01 /* 0 = memory, 1 = I/O */
-+#define PCI_BASE_ADDRESS_SPACE_IO 0x01
-+#define PCI_BASE_ADDRESS_SPACE_MEMORY 0x00
-+#define PCI_BASE_ADDRESS_MEM_TYPE_MASK 0x06
-+#define PCI_BASE_ADDRESS_MEM_TYPE_32 0x00 /* 32 bit address */
-+#define PCI_BASE_ADDRESS_MEM_TYPE_1M 0x02 /* Below 1M [obsolete] */
-+#define PCI_BASE_ADDRESS_MEM_TYPE_64 0x04 /* 64 bit address */
-+#define PCI_BASE_ADDRESS_MEM_PREFETCH 0x08 /* prefetchable? */
-+#define PCI_BASE_ADDRESS_MEM_MASK (~0x0fUL)
-+#define PCI_BASE_ADDRESS_IO_MASK (~0x03UL)
- /* bit 1 is reserved if address_space = 1 */
-
- /* Header type 0 (normal devices) */
--#define PCI_CARDBUS_CIS 0x28
--#define PCI_SUBSYSTEM_VENDOR_ID 0x2c
--#define PCI_SUBSYSTEM_ID 0x2e
--#define PCI_ROM_ADDRESS 0x30 /* Bits 31..11 are address, 10..1 reserved */
--#define PCI_ROM_ADDRESS_ENABLE 0x01
--#define PCI_ROM_ADDRESS_MASK (~0x7ffUL)
-+#define PCI_CARDBUS_CIS 0x28
-+#define PCI_SUBSYSTEM_VENDOR_ID 0x2c
-+#define PCI_SUBSYSTEM_ID 0x2e
-+#define PCI_ROM_ADDRESS 0x30 /* Bits 31..11 are address, 10..1 reserved */
-+#define PCI_ROM_ADDRESS_ENABLE 0x01
-+#define PCI_ROM_ADDRESS_MASK (~0x7ffUL)
-
--#define PCI_CAPABILITY_LIST 0x34 /* Offset of first capability list entry */
-+#define PCI_CAPABILITY_LIST 0x34 /* Offset of first capability list entry */
-
- /* 0x35-0x3b are reserved */
--#define PCI_INTERRUPT_LINE 0x3c /* 8 bits */
--#define PCI_INTERRUPT_PIN 0x3d /* 8 bits */
--#define PCI_MIN_GNT 0x3e /* 8 bits */
--#define PCI_MAX_LAT 0x3f /* 8 bits */
-+#define PCI_INTERRUPT_LINE 0x3c /* 8 bits */
-+#define PCI_INTERRUPT_PIN 0x3d /* 8 bits */
-+#define PCI_MIN_GNT 0x3e /* 8 bits */
-+#define PCI_MAX_LAT 0x3f /* 8 bits */
-
- #endif /* __HVMLOADER_PCI_REGS_H__ */
-diff -r 411b38f8f90b -r 1976adbf2b80 tools/firmware/hvmloader/smbios_types.h
---- a/tools/firmware/hvmloader/smbios_types.h Wed Jul 20 15:24:09 2011 +0100
-+++ b/tools/firmware/hvmloader/smbios_types.h Wed Jul 20 15:25:34 2011 +0100
-@@ -32,157 +32,157 @@
- between 0xf0000 and 0xfffff.
- */
- struct smbios_entry_point {
-- char anchor_string[4];
-- uint8_t checksum;
-- uint8_t length;
-- uint8_t smbios_major_version;
-- uint8_t smbios_minor_version;
-- uint16_t max_structure_size;
-- uint8_t entry_point_revision;
-- uint8_t formatted_area[5];
-- char intermediate_anchor_string[5];
-- uint8_t intermediate_checksum;
-- uint16_t structure_table_length;
-- uint32_t structure_table_address;
-- uint16_t number_of_structures;
-- uint8_t smbios_bcd_revision;
-+ char anchor_string[4];
-+ uint8_t checksum;
-+ uint8_t length;
-+ uint8_t smbios_major_version;
-+ uint8_t smbios_minor_version;
-+ uint16_t max_structure_size;
-+ uint8_t entry_point_revision;
-+ uint8_t formatted_area[5];
-+ char intermediate_anchor_string[5];
-+ uint8_t intermediate_checksum;
-+ uint16_t structure_table_length;
-+ uint32_t structure_table_address;
-+ uint16_t number_of_structures;
-+ uint8_t smbios_bcd_revision;
- } __attribute__ ((packed));
-
- /* This goes at the beginning of every SMBIOS structure. */
- struct smbios_structure_header {
-- uint8_t type;
-- uint8_t length;
-- uint16_t handle;
-+ uint8_t type;
-+ uint8_t length;
-+ uint16_t handle;
- } __attribute__ ((packed));
-
- /* SMBIOS type 0 - BIOS Information */
- struct smbios_type_0 {
-- struct smbios_structure_header header;
-- uint8_t vendor_str;
-- uint8_t version_str;
-- uint16_t starting_address_segment;
-- uint8_t release_date_str;
-- uint8_t rom_size;
-- uint8_t characteristics[8];
-- uint8_t characteristics_extension_bytes[2];
-- uint8_t major_release;
-- uint8_t minor_release;
-- uint8_t embedded_controller_major;
-- uint8_t embedded_controller_minor;
-+ struct smbios_structure_header header;
-+ uint8_t vendor_str;
-+ uint8_t version_str;
-+ uint16_t starting_address_segment;
-+ uint8_t release_date_str;
-+ uint8_t rom_size;
-+ uint8_t characteristics[8];
-+ uint8_t characteristics_extension_bytes[2];
-+ uint8_t major_release;
-+ uint8_t minor_release;
-+ uint8_t embedded_controller_major;
-+ uint8_t embedded_controller_minor;
- } __attribute__ ((packed));
-
- /* SMBIOS type 1 - System Information */
- struct smbios_type_1 {
-- struct smbios_structure_header header;
-- uint8_t manufacturer_str;
-- uint8_t product_name_str;
-- uint8_t version_str;
-- uint8_t serial_number_str;
-- uint8_t uuid[16];
-- uint8_t wake_up_type;
-- uint8_t sku_str;
-- uint8_t family_str;
-+ struct smbios_structure_header header;
-+ uint8_t manufacturer_str;
-+ uint8_t product_name_str;
-+ uint8_t version_str;
-+ uint8_t serial_number_str;
-+ uint8_t uuid[16];
-+ uint8_t wake_up_type;
-+ uint8_t sku_str;
-+ uint8_t family_str;
- } __attribute__ ((packed));
-
- /* SMBIOS type 3 - System Enclosure */
- struct smbios_type_3 {
-- struct smbios_structure_header header;
-- uint8_t manufacturer_str;
-- uint8_t type;
-- uint8_t version_str;
-- uint8_t serial_number_str;
-- uint8_t asset_tag_str;
-- uint8_t boot_up_state;
-- uint8_t power_supply_state;
-- uint8_t thermal_state;
-- uint8_t security_status;
-+ struct smbios_structure_header header;
-+ uint8_t manufacturer_str;
-+ uint8_t type;
-+ uint8_t version_str;
-+ uint8_t serial_number_str;
-+ uint8_t asset_tag_str;
-+ uint8_t boot_up_state;
-+ uint8_t power_supply_state;
-+ uint8_t thermal_state;
-+ uint8_t security_status;
- } __attribute__ ((packed));
-
- /* SMBIOS type 4 - Processor Information */
- struct smbios_type_4 {
-- struct smbios_structure_header header;
-- uint8_t socket_designation_str;
-- uint8_t processor_type;
-- uint8_t processor_family;
-- uint8_t manufacturer_str;
-- uint32_t cpuid[2];
-- uint8_t version_str;
-- uint8_t voltage;
-- uint16_t external_clock;
-- uint16_t max_speed;
-- uint16_t current_speed;
-- uint8_t status;
-- uint8_t upgrade;
-+ struct smbios_structure_header header;
-+ uint8_t socket_designation_str;
-+ uint8_t processor_type;
-+ uint8_t processor_family;
-+ uint8_t manufacturer_str;
-+ uint32_t cpuid[2];
-+ uint8_t version_str;
-+ uint8_t voltage;
-+ uint16_t external_clock;
-+ uint16_t max_speed;
-+ uint16_t current_speed;
-+ uint8_t status;
-+ uint8_t upgrade;
- } __attribute__ ((packed));
-
- /* SMBIOS type 11 - OEM Strings */
- struct smbios_type_11 {
-- struct smbios_structure_header header;
-- uint8_t count;
-+ struct smbios_structure_header header;
-+ uint8_t count;
- } __attribute__ ((packed));
-
- /* SMBIOS type 16 - Physical Memory Array
- * Associated with one type 17 (Memory Device).
- */
- struct smbios_type_16 {
-- struct smbios_structure_header header;
-- uint8_t location;
-- uint8_t use;
-- uint8_t error_correction;
-- uint32_t maximum_capacity;
-- uint16_t memory_error_information_handle;
-- uint16_t number_of_memory_devices;
-+ struct smbios_structure_header header;
-+ uint8_t location;
-+ uint8_t use;
-+ uint8_t error_correction;
-+ uint32_t maximum_capacity;
-+ uint16_t memory_error_information_handle;
-+ uint16_t number_of_memory_devices;
- } __attribute__ ((packed));
-
- /* SMBIOS type 17 - Memory Device
- * Associated with one type 19
- */
- struct smbios_type_17 {
-- struct smbios_structure_header header;
-- uint16_t physical_memory_array_handle;
-- uint16_t memory_error_information_handle;
-- uint16_t total_width;
-- uint16_t data_width;
-- uint16_t size;
-- uint8_t form_factor;
-- uint8_t device_set;
-- uint8_t device_locator_str;
-- uint8_t bank_locator_str;
-- uint8_t memory_type;
-- uint16_t type_detail;
-+ struct smbios_structure_header header;
-+ uint16_t physical_memory_array_handle;
-+ uint16_t memory_error_information_handle;
-+ uint16_t total_width;
-+ uint16_t data_width;
-+ uint16_t size;
-+ uint8_t form_factor;
-+ uint8_t device_set;
-+ uint8_t device_locator_str;
-+ uint8_t bank_locator_str;
-+ uint8_t memory_type;
-+ uint16_t type_detail;
- } __attribute__ ((packed));
-
- /* SMBIOS type 19 - Memory Array Mapped Address */
- struct smbios_type_19 {
-- struct smbios_structure_header header;
-- uint32_t starting_address;
-- uint32_t ending_address;
-- uint16_t memory_array_handle;
-- uint8_t partition_width;
-+ struct smbios_structure_header header;
-+ uint32_t starting_address;
-+ uint32_t ending_address;
-+ uint16_t memory_array_handle;
-+ uint8_t partition_width;
- } __attribute__ ((packed));
-
- /* SMBIOS type 20 - Memory Device Mapped Address */
- struct smbios_type_20 {
-- struct smbios_structure_header header;
-- uint32_t starting_address;
-- uint32_t ending_address;
-- uint16_t memory_device_handle;
-- uint16_t memory_array_mapped_address_handle;
-- uint8_t partition_row_position;
-- uint8_t interleave_position;
-- uint8_t interleaved_data_depth;
-+ struct smbios_structure_header header;
-+ uint32_t starting_address;
-+ uint32_t ending_address;
-+ uint16_t memory_device_handle;
-+ uint16_t memory_array_mapped_address_handle;
-+ uint8_t partition_row_position;
-+ uint8_t interleave_position;
-+ uint8_t interleaved_data_depth;
- } __attribute__ ((packed));
-
- /* SMBIOS type 32 - System Boot Information */
- struct smbios_type_32 {
-- struct smbios_structure_header header;
-- uint8_t reserved[6];
-- uint8_t boot_status;
-+ struct smbios_structure_header header;
-+ uint8_t reserved[6];
-+ uint8_t boot_status;
- } __attribute__ ((packed));
-
- /* SMBIOS type 127 -- End-of-table */
- struct smbios_type_127 {
-- struct smbios_structure_header header;
-+ struct smbios_structure_header header;
- } __attribute__ ((packed));
-
- #endif /* SMBIOS_TYPES_H */
-diff -r 411b38f8f90b -r 1976adbf2b80 tools/firmware/hvmloader/util.c
---- a/tools/firmware/hvmloader/util.c Wed Jul 20 15:24:09 2011 +0100
-+++ b/tools/firmware/hvmloader/util.c Wed Jul 20 15:25:34 2011 +0100
-@@ -125,11 +125,11 @@
-
- int strncmp(const char *s1, const char *s2, uint32_t n)
- {
-- uint32_t ctr;
-- for (ctr = 0; ctr < n; ctr++)
-- if (s1[ctr] != s2[ctr])
-- return (int)(s1[ctr] - s2[ctr]);
-- return 0;
-+ uint32_t ctr;
-+ for (ctr = 0; ctr < n; ctr++)
-+ if (s1[ctr] != s2[ctr])
-+ return (int)(s1[ctr] - s2[ctr]);
-+ return 0;
- }
-
- void *memcpy(void *dest, const void *src, unsigned n)
-
diff --git a/main/xen/xen-sed-is-broken-hack.patch b/main/xen/xen-sed-is-broken-hack.patch
deleted file mode 100644
index 4168f7206..000000000
--- a/main/xen/xen-sed-is-broken-hack.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- xen-4.0.1/xen/arch/x86/boot/Makefile
-+++ xen-4.0.1.mod/xen/arch/x86/boot/Makefile
-@@ -2,7 +2,7 @@
-
- head.o: reloc.S
-
--BOOT_TRAMPOLINE := $(shell sed -n 's,^\#define[[:space:]]\{1\,\}BOOT_TRAMPOLINE[[:space:]]\{1\,\},,p' $(BASEDIR)/include/asm-x86/config.h)
-+BOOT_TRAMPOLINE := 0x7c000
- %.S: %.c
- RELOC=$(BOOT_TRAMPOLINE) XEN_BITSPERLONG=$(patsubst x86_%,%,$(TARGET_SUBARCH)) $(MAKE) -f build32.mk $@
-
diff --git a/main/xen/xen-x86-pic.patch b/main/xen/xen-x86-pic.patch
deleted file mode 100644
index dcb4d0d81..000000000
--- a/main/xen/xen-x86-pic.patch
+++ /dev/null
@@ -1,19 +0,0 @@
---- ./tools/misc/xen-detect.c.orig
-+++ ./tools/misc/xen-detect.c
-@@ -41,8 +41,16 @@
- int pv_context)
- {
- asm volatile (
-+#if defined(__PIC__) && defined(__i386__)
-+ "movl %%ebx, %%edi ;"
-+ "test %1,%1 ; jz 1f ; ud2a ; .ascii \"xen\" ;"
-+ "1: cpuid ; "
-+ "xchg %%ebx, %%edi"
-+ : "=a" (*eax), "=D" (*ebx), "=c" (*ecx), "=d" (*edx)
-+#else
- "test %1,%1 ; jz 1f ; ud2a ; .ascii \"xen\" ; 1: cpuid"
- : "=a" (*eax), "=b" (*ebx), "=c" (*ecx), "=d" (*edx)
-+#endif
- : "0" (idx), "1" (pv_context) );
- }
-
diff --git a/main/xen/xencommons.initd b/main/xen/xencommons.initd
index 1ad0fb8c3..3d3c5da38 100755..100644
--- a/main/xen/xencommons.initd
+++ b/main/xen/xencommons.initd
@@ -3,89 +3,100 @@
# Distributed under the terms of the GNU General Public License v2
# $Header: $
-opts="start stop status restart"
-
if [ -d /etc/sysconfig ]; then
- xencommons_config=/etc/sysconfig
+ xencommons_config=/etc/sysconfig
else
- xencommons_config=/etc/default
+ xencommons_config=/etc/default
fi
test -f $xencommons_config/xencommons && . $xencommons_config/xencommons
XENCONSOLED_PIDFILE=/var/run/xenconsoled.pid
-#shopt -s extglob
+# not running in Xen dom0 or domU
+if ! test -d /proc/xen ; then
+ exit 0
+fi
+
+# mount xenfs in dom0 or domU with a pv_ops kernel
if test "x$1" = xstart && \
- test -d /proc/xen && \
- ! test -f /proc/xen/capabilities && \
- ! grep '^xenfs ' /proc/mounts >/dev/null;
+ ! test -f /proc/xen/capabilities && \
+ ! grep '^xenfs ' /proc/mounts >/dev/null;
then
- mount -t xenfs xenfs /proc/xen
+ mount -t xenfs xenfs /proc/xen
fi
-if ! grep -q "control_d" /proc/xen/capabilities ; then
- exit 0
+# run this script only in dom0:
+# no capabilities file in xenlinux domU kernel
+# empty capabilities file in pv_ops domU kernel
+if test -f /proc/xen/capabilities && \
+ ! grep -q "control_d" /proc/xen/capabilities ; then
+ exit 0
fi
depend() {
- need net
- before xend
+ need udev
+ before xend
}
start() {
- local time=0
- local timeout=30
-
- if ! `xenstore-read -s / >/dev/null 2>&1`
- then
- test -z "$XENSTORED_ROOTDIR" || XENSTORED_ROOTDIR="/var/lib/xenstored"
- rm -f "$XENSTORED_ROOTDIR"/tdb* &>/dev/null
- test -z "$XENSTORED_TRACE" || XENSTORED_ARGS=" -T /var/log/xen/xenstored-trace.log"
-
- ebegin "Starting xenstored..."
- xenstored --pid-file=/var/run/xenstored.pid $XENSTORED_ARGS
-
- # Wait for xenstored to actually come up, timing out after 30 seconds
- while [ $time -lt $timeout ] && ! `xenstore-read -s / >/dev/null 2>&1` ; do
- time=$(($time+1))
- sleep 1
- done
-
- # Exit if we timed out
- if ! [ $time -lt $timeout ] ; then
- eend 1
- echo Could not start xenstored
- exit 1
- fi
- eend 0
-
- ebegin "Setting domain 0 name..."
- xenstore-write "/local/domain/0/name" "Domain-0"
- eend $?
- fi
-
- ebegin "Starting xenconsoled..."
- test -z "$XENCONSOLED_TRACE" || XENCONSOLED_ARGS=" --log=$XENCONSOLED_TRACE"
- xenconsoled --pid-file=$XENCONSOLED_PIDFILE $XENCONSOLED_ARGS
- eend $?
-
- test -z "$XENBACKENDD_DEBUG" || XENBACKENDD_ARGS="-d"
- test "`uname`" != "NetBSD" || xenbackendd $XENBACKENDD_ARGS
+ local time=0
+ local timeout=30
+
+ modprobe xen-evtchn 2>/dev/null
+ modprobe xen-gntdev 2>/dev/null
+ modprobe evtchn 2>/dev/null
+ modprobe gntdev 2>/dev/null
+
+ if ! `xenstore-read -s / >/dev/null 2>&1`
+ then
+ test -z "$XENSTORED_ROOTDIR" || XENSTORED_ROOTDIR="/var/lib/xenstored"
+ rm -f "$XENSTORED_ROOTDIR"/tdb* &>/dev/null
+ test -z "$XENSTORED_TRACE" || XENSTORED_ARGS=" -T /var/log/xen/xenstored-trace.log"
+
+ ebegin "Starting xenstored..."
+ xenstored --pid-file=/var/run/xenstored.pid $XENSTORED_ARGS
+
+ # Wait for xenstored to actually come up, timing out after 30 seconds
+ while [ $time -lt $timeout ] && ! `xenstore-read -s / >/dev/null 2>&1` ; do
+ time=$(($time+1))
+ sleep 1
+ done
+
+ # Exit if we timed out
+ if ! [ $time -lt $timeout ] ; then
+ eend 1
+ echo Could not start xenstored
+ exit 1
+ fi
+ eend 0
+
+ ebegin "Setting domain 0 name..."
+ xenstore-write "/local/domain/0/name" "Domain-0"
+ eend $?
+ fi
+
+ ebegin "Starting xenconsoled..."
+ test -z "$XENCONSOLED_TRACE" || XENCONSOLED_ARGS=" --log=$XENCONSOLED_TRACE"
+ xenconsoled --pid-file=$XENCONSOLED_PIDFILE $XENCONSOLED_ARGS
+ eend $?
+
+ test -z "$XENBACKENDD_DEBUG" || XENBACKENDD_ARGS="-d"
+ test "`uname`" != "NetBSD" || xenbackendd $XENBACKENDD_ARGS
}
stop() {
- ebegin "Stopping xenconsoled"
- if read 2>/dev/null <$XENCONSOLED_PIDFILE pid; then
- kill $pid
- while kill -9 $pid >/dev/null 2>&1; do sleep 0.1; done
- rm -f $XENCONSOLED_PIDFILE
- fi
- eend 0
-
- echo WARNING: Not stopping xenstored, as it cannot be restarted.
+ ebegin "Stopping xenconsoled"
+ if read 2>/dev/null <$XENCONSOLED_PIDFILE pid; then
+ kill $pid
+ while kill -9 $pid >/dev/null 2>&1; do sleep 0.1; done
+ rm -f $XENCONSOLED_PIDFILE
+ fi
+ eend 0
+
+ echo WARNING: Not stopping xenstored, as it cannot be restarted.
}
status() {
- xenstore-read -s / >/dev/null 2>&1
+ xenstore-read -s / >/dev/null 2>&1
}
diff --git a/main/xen/xend.initd b/main/xen/xend.initd
index ee26c3f33..398ecd86b 100644
--- a/main/xen/xend.initd
+++ b/main/xen/xend.initd
@@ -1,38 +1,53 @@
#!/sbin/runscript
depend() {
- need net xencommons
- before xendomains sshd ntp-client ntpd nfs nfsmount rsyncd portmap dhcp
+ need xencommons
+ before xendomains
}
-is_privileged_domain() {
- grep -qsE '^control_d$' /proc/xen/capabilities
- return $?
+await_daemons_up() {
+ i=1
+ rets=10
+ /usr/sbin/xend status
+ while [ $? -ne 0 -a $i -lt $rets ]; do
+ sleep 1
+ i=$(($i + 1))
+ /usr/sbin/xend status
+ done
}
start() {
- if is_privileged_domain ; then
- ebegin "Starting Xen daemons"
- /usr/sbin/xend start
- eend $?
+ ebegin "Starting Xen daemons"
+ if [ -z "`ps xenconsoled -o pid=`" ]; then
+ eend 1
+ echo "xencommons should be started first."
+ exit 1
+ fi
+ mkdir -p /var/lock
+ if [ -d /var/lock/subsys ]; then
+ touch /var/lock/subsys/xend
else
- eerror "Can't start xend - not a privileged domain"
- return 1
+ touch /var/lock/xend
fi
+ /usr/sbin/xend start
+ await_daemons_up
+ eend $?
}
stop() {
ebegin "Stopping Xen control daemon"
/usr/sbin/xend stop
+ rm -f /var/lock/subsys/xend /var/lock/xend
eend $?
}
restart() {
ebegin "Restarting Xen control daemon"
/usr/sbin/xend restart
+ await_daemons_up
eend $?
}
status() {
- is_privileged_domain && /usr/sbin/xend status
+ /usr/sbin/xend status
}
diff --git a/main/xen/xendomains.initd b/main/xen/xendomains.initd
index d12577c2b..0f309ef3d 100644
--- a/main/xen/xendomains.initd
+++ b/main/xen/xendomains.initd
@@ -1,22 +1,64 @@
#!/sbin/runscript
+CMD=xm
+/usr/sbin/$CMD list &> /dev/null
+if test $? -ne 0
+then
+ CMD=xl
+fi
+
+/usr/sbin/$CMD list &> /dev/null
+if test $? -ne 0
+then
+ eend 1;
+ exit 1;
+fi
+
+# Correct exit code would probably be 5, but it's enough
+# if xend complains if we're not running as privileged domain
+if ! [ -e /proc/xen/privcmd ]; then
+ eend 1;
+ exit 1;
+fi
+
+# See docs/misc/distro_mapping.txt
+if [ -d /var/lock/subsys ]; then
+ LOCKFILE=/var/lock/subsys/xendomains
+else
+ LOCKFILE=/var/lock/xendomains
+fi
+
+if [ -d /etc/sysconfig ]; then
+ XENDOM_CONFIG=/etc/sysconfig/xendomains
+else
+ XENDOM_CONFIG=/etc/default/xendomains
+fi
+
+if ! [ -r $XENDOM_CONFIG ]; then
+ eend 1;
+ echo "$XENDOM_CONFIG not existing";
+ exit 1;
+fi
+
+. $XENDOM_CONFIG
+
depend() {
- need xend
- after dhcp
+ need xencommons
+ after net xend
}
get_domname() {
- local name_from_file=$(sed -rn 's/^name\W*=\W*\"?([[:alnum:]_\.-]+)\"?\W*;?/\1/p' "${1}" | tail -n 1)
+ local name_from_file=$(sed -rn 's/^name\W*=\W*\"?([[:alnum:]_\.-]+)\"?\W*;?/\1/p' "${1}" | tail -n 1)
- if [[ -z ${name_from_file} ]] ; then
- basename "${1}"
- else
- echo ${name_from_file}
- fi
+ if [[ -z ${name_from_file} ]] ; then
+ basename "${1}"
+ else
+ echo ${name_from_file}
+ fi
}
is_running() {
- /usr/sbin/xm list "${1}" >/dev/null 2>&1
+ /usr/sbin/$CMD list "${1}" >/dev/null 2>&1
}
start() {
@@ -26,7 +68,7 @@ start() {
name=$(get_domname ${dom})
if ! is_running ${name} ; then
ebegin " Starting domain ${name}"
- xm create --quiet ${dom}
+ /usr/sbin/$CMD create --quiet --defconfig ${dom}
eend $?
else
einfo " Not starting ${name} - already running."
@@ -41,7 +83,7 @@ stop() {
name=$(get_domname ${dom})
if is_running ${name} ; then
ebegin " Sending shutdown signal to ${name}"
- xm shutdown ${name} >/dev/null
+ /usr/sbin/$CMD shutdown ${name} >/dev/null
eend $?
fi
done
@@ -50,7 +92,7 @@ stop() {
name=$(get_domname ${dom})
if is_running ${name} ; then
ebegin " Waiting for domain ${name} to shutdown"
- xm shutdown --wait ${name}
+ /usr/sbin/$CMD shutdown --wait ${name}
eend $?
else
einfo " Not stopping ${name} - not running."
@@ -59,5 +101,5 @@ stop() {
}
status() {
- /usr/sbin/xm list
+ /usr/sbin/$CMD list
}
diff --git a/testing/xen/APKBUILD b/testing/xen/APKBUILD
deleted file mode 100644
index c6c120168..000000000
--- a/testing/xen/APKBUILD
+++ /dev/null
@@ -1,95 +0,0 @@
-# Contributor: Roger Pau Monne <roger.pau@entel.upc.edu>
-# Maintainer:
-pkgname=xen
-pkgver=4.1.2
-pkgrel=2
-pkgdesc="Xen hypervisor"
-url="http://www.xen.org"
-arch="x86 x86_64"
-license="GPL"
-depends="udev syslinux bash"
-depends_dev="openssl-dev python-dev e2fsprogs-dev gettext zlib-dev ncurses-dev
- libiconv-dev dev86 texinfo perl iasl pciutils-dev"
-makedepends="$depends_dev"
-install=""
-subpackages="$pkgname-doc"
-source="http://bits.xensource.com/oss-xen/release/$pkgver/$pkgname-$pkgver.tar.gz
- blktap2_libvhd_add_iconv.patch
- detect_libiconv.patch
- fix_bswap_blktap.patch
- fix_bswap_blktap2.patch
- fix_ipxe_no_pie_default.patch
- define_fsimage_dir.patch
- pygrub_alpine.patch
- librt.patch
- busybox-sed.patch
- xencommons.initd
- xend.initd
- xendomains.initd"
-
-_builddir="$srcdir"/$pkgname-$pkgver
-prepare() {
- local i
- cd "$_builddir"
- for i in $source; do
- case $i in
- *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
- esac
- done
-
- # remove all -Werror
- msg "Eradicating -Werror..."
- find -name '*.mk' -o -name 'Make*' | xargs sed -i -e 's/-Werror//g'
-
- echo "LIBLEAFDIR_x86_64=lib" >> .config
-}
-
-build() {
- cd "$_builddir"
-
- # Unset CFLAGS and LDFLAGS because the xen build system
- # doesn't support them. Instead use .config in xen root
- # folder if necessary.
- unset CFLAGS
- unset LDFLAGS
-
- msg "Running preflight check..."
- (cd tools/check; ./chk build) || return 1
-
- msg "Building hypervisor..."
- make xen || return 1
-
- msg "Building tools..."
- make tools || return 1
-
- msg "Building stub domains..."
- make -j1 stubdom || return 1
-}
-
-package() {
- cd "$_builddir"
-
- unset CFLAGS
- unset LDFLAGS
-
- make -j1 DESTDIR="$pkgdir" install-xen install-tools install-stubdom \
- || return 1
-
- install -m755 -D "$srcdir"/xencommons.initd "$pkgdir"/etc/init.d/xencommons
- install -m755 -D "$srcdir"/xend.initd "$pkgdir"/etc/init.d/xend
- install -m755 -D "$srcdir"/xendomains.initd "$pkgdir"/etc/init.d/xendomains
-}
-
-md5sums="73561faf3c1b5e36ec5c089b5db848ad xen-4.1.2.tar.gz
-6d4b045ae56be6288733d0e078f591ea blktap2_libvhd_add_iconv.patch
-ed3283697cb1ddff066f4087eabf68c6 detect_libiconv.patch
-503f0883f4a0b50fe4e37e09ed9a6177 fix_bswap_blktap.patch
-b973dc1ffcc6872e222b36f3b7b4836b fix_bswap_blktap2.patch
-10dcf0b6a05691e9f88afc01bd414480 fix_ipxe_no_pie_default.patch
-0bb8a435020a5a49b38b1a447fb69977 define_fsimage_dir.patch
-a7500c42804abdf68e051dc667e65f93 pygrub_alpine.patch
-fa06495a175571f4aa3b6cb88937953e librt.patch
-1bea3543ddc712330527b62fd9ff6520 busybox-sed.patch
-4cf88b53f8ca8d99ad52bae419b620a7 xencommons.initd
-b5bfc08b82bc0d21193714719a719798 xend.initd
-86e7923383a906404da321d1814657e9 xendomains.initd"
diff --git a/testing/xen/xencommons.initd b/testing/xen/xencommons.initd
deleted file mode 100644
index 3d3c5da38..000000000
--- a/testing/xen/xencommons.initd
+++ /dev/null
@@ -1,102 +0,0 @@
-#!/sbin/runscript
-# Copyright 1999-2011 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: $
-
-if [ -d /etc/sysconfig ]; then
- xencommons_config=/etc/sysconfig
-else
- xencommons_config=/etc/default
-fi
-
-test -f $xencommons_config/xencommons && . $xencommons_config/xencommons
-
-XENCONSOLED_PIDFILE=/var/run/xenconsoled.pid
-
-# not running in Xen dom0 or domU
-if ! test -d /proc/xen ; then
- exit 0
-fi
-
-# mount xenfs in dom0 or domU with a pv_ops kernel
-if test "x$1" = xstart && \
- ! test -f /proc/xen/capabilities && \
- ! grep '^xenfs ' /proc/mounts >/dev/null;
-then
- mount -t xenfs xenfs /proc/xen
-fi
-
-# run this script only in dom0:
-# no capabilities file in xenlinux domU kernel
-# empty capabilities file in pv_ops domU kernel
-if test -f /proc/xen/capabilities && \
- ! grep -q "control_d" /proc/xen/capabilities ; then
- exit 0
-fi
-
-depend() {
- need udev
- before xend
-}
-
-start() {
- local time=0
- local timeout=30
-
- modprobe xen-evtchn 2>/dev/null
- modprobe xen-gntdev 2>/dev/null
- modprobe evtchn 2>/dev/null
- modprobe gntdev 2>/dev/null
-
- if ! `xenstore-read -s / >/dev/null 2>&1`
- then
- test -z "$XENSTORED_ROOTDIR" || XENSTORED_ROOTDIR="/var/lib/xenstored"
- rm -f "$XENSTORED_ROOTDIR"/tdb* &>/dev/null
- test -z "$XENSTORED_TRACE" || XENSTORED_ARGS=" -T /var/log/xen/xenstored-trace.log"
-
- ebegin "Starting xenstored..."
- xenstored --pid-file=/var/run/xenstored.pid $XENSTORED_ARGS
-
- # Wait for xenstored to actually come up, timing out after 30 seconds
- while [ $time -lt $timeout ] && ! `xenstore-read -s / >/dev/null 2>&1` ; do
- time=$(($time+1))
- sleep 1
- done
-
- # Exit if we timed out
- if ! [ $time -lt $timeout ] ; then
- eend 1
- echo Could not start xenstored
- exit 1
- fi
- eend 0
-
- ebegin "Setting domain 0 name..."
- xenstore-write "/local/domain/0/name" "Domain-0"
- eend $?
- fi
-
- ebegin "Starting xenconsoled..."
- test -z "$XENCONSOLED_TRACE" || XENCONSOLED_ARGS=" --log=$XENCONSOLED_TRACE"
- xenconsoled --pid-file=$XENCONSOLED_PIDFILE $XENCONSOLED_ARGS
- eend $?
-
- test -z "$XENBACKENDD_DEBUG" || XENBACKENDD_ARGS="-d"
- test "`uname`" != "NetBSD" || xenbackendd $XENBACKENDD_ARGS
-}
-
-stop() {
- ebegin "Stopping xenconsoled"
- if read 2>/dev/null <$XENCONSOLED_PIDFILE pid; then
- kill $pid
- while kill -9 $pid >/dev/null 2>&1; do sleep 0.1; done
- rm -f $XENCONSOLED_PIDFILE
- fi
- eend 0
-
- echo WARNING: Not stopping xenstored, as it cannot be restarted.
-}
-
-status() {
- xenstore-read -s / >/dev/null 2>&1
-}
diff --git a/testing/xen/xend.initd b/testing/xen/xend.initd
deleted file mode 100644
index 398ecd86b..000000000
--- a/testing/xen/xend.initd
+++ /dev/null
@@ -1,53 +0,0 @@
-#!/sbin/runscript
-
-depend() {
- need xencommons
- before xendomains
-}
-
-await_daemons_up() {
- i=1
- rets=10
- /usr/sbin/xend status
- while [ $? -ne 0 -a $i -lt $rets ]; do
- sleep 1
- i=$(($i + 1))
- /usr/sbin/xend status
- done
-}
-
-start() {
- ebegin "Starting Xen daemons"
- if [ -z "`ps xenconsoled -o pid=`" ]; then
- eend 1
- echo "xencommons should be started first."
- exit 1
- fi
- mkdir -p /var/lock
- if [ -d /var/lock/subsys ]; then
- touch /var/lock/subsys/xend
- else
- touch /var/lock/xend
- fi
- /usr/sbin/xend start
- await_daemons_up
- eend $?
-}
-
-stop() {
- ebegin "Stopping Xen control daemon"
- /usr/sbin/xend stop
- rm -f /var/lock/subsys/xend /var/lock/xend
- eend $?
-}
-
-restart() {
- ebegin "Restarting Xen control daemon"
- /usr/sbin/xend restart
- await_daemons_up
- eend $?
-}
-
-status() {
- /usr/sbin/xend status
-}
diff --git a/testing/xen/xendomains.initd b/testing/xen/xendomains.initd
deleted file mode 100644
index 0f309ef3d..000000000
--- a/testing/xen/xendomains.initd
+++ /dev/null
@@ -1,105 +0,0 @@
-#!/sbin/runscript
-
-CMD=xm
-/usr/sbin/$CMD list &> /dev/null
-if test $? -ne 0
-then
- CMD=xl
-fi
-
-/usr/sbin/$CMD list &> /dev/null
-if test $? -ne 0
-then
- eend 1;
- exit 1;
-fi
-
-# Correct exit code would probably be 5, but it's enough
-# if xend complains if we're not running as privileged domain
-if ! [ -e /proc/xen/privcmd ]; then
- eend 1;
- exit 1;
-fi
-
-# See docs/misc/distro_mapping.txt
-if [ -d /var/lock/subsys ]; then
- LOCKFILE=/var/lock/subsys/xendomains
-else
- LOCKFILE=/var/lock/xendomains
-fi
-
-if [ -d /etc/sysconfig ]; then
- XENDOM_CONFIG=/etc/sysconfig/xendomains
-else
- XENDOM_CONFIG=/etc/default/xendomains
-fi
-
-if ! [ -r $XENDOM_CONFIG ]; then
- eend 1;
- echo "$XENDOM_CONFIG not existing";
- exit 1;
-fi
-
-. $XENDOM_CONFIG
-
-depend() {
- need xencommons
- after net xend
-}
-
-get_domname() {
- local name_from_file=$(sed -rn 's/^name\W*=\W*\"?([[:alnum:]_\.-]+)\"?\W*;?/\1/p' "${1}" | tail -n 1)
-
- if [[ -z ${name_from_file} ]] ; then
- basename "${1}"
- else
- echo ${name_from_file}
- fi
-}
-
-is_running() {
- /usr/sbin/$CMD list "${1}" >/dev/null 2>&1
-}
-
-start() {
- einfo "Starting Xen domains in ${AUTODIR:=/etc/xen/auto}"
-
- for dom in $(ls "${AUTODIR:=/etc/xen/auto}/"* 2>/dev/null | sort); do
- name=$(get_domname ${dom})
- if ! is_running ${name} ; then
- ebegin " Starting domain ${name}"
- /usr/sbin/$CMD create --quiet --defconfig ${dom}
- eend $?
- else
- einfo " Not starting ${name} - already running."
- fi
- done
-}
-
-stop() {
- einfo "Stopping Xen domains in ${AUTODIR:=/etc/xen/auto}"
-
- for dom in $(ls "${AUTODIR:=/etc/xen/auto}/"* 2>/dev/null | sort); do
- name=$(get_domname ${dom})
- if is_running ${name} ; then
- ebegin " Sending shutdown signal to ${name}"
- /usr/sbin/$CMD shutdown ${name} >/dev/null
- eend $?
- fi
- done
-
- for dom in $(ls "${AUTODIR:=/etc/xen/auto}/"* 2>/dev/null | sort); do
- name=$(get_domname ${dom})
- if is_running ${name} ; then
- ebegin " Waiting for domain ${name} to shutdown"
- /usr/sbin/$CMD shutdown --wait ${name}
- eend $?
- else
- einfo " Not stopping ${name} - not running."
- fi
- done
-}
-
-status() {
- /usr/sbin/$CMD list
-}