pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/sysutils/xenkernel46 Xen is a hypervisor which support...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/903f3f0ef976
branches:  trunk
changeset: 349332:903f3f0ef976
user:      jnemeth <jnemeth%pkgsrc.org@localhost>
date:      Mon Jul 04 07:25:13 2016 +0000

description:
Xen is a hypervisor which supports running multiple guest operating
systems on a single machine. Guest OSes (also called "domains")
can be either paravirtualised (i.e. make hypercalls in order to
access hardware), run in HVM (Hardware Virtualisation Mode) where
they will be presented with virtual devices, or a combination where
they use hypercalls to access hardware but manage memory themselves.
At boot, the xen kernel is loaded along with the guest kernel for
the first domain (called domain0). domain0 has privileges to access
the physical hardware (PCI and ISA devices), administrate other
domains and provide virtual devices (disks and network) to other
domains.

This package contains the 4.6 Xen kernel itself.  PCI passthrough is
not supported.  PAE is mandatory; on i386 one must use XEN3PAE_DOM[0U].

diffstat:

 sysutils/xenkernel46/DESCR                                               |  14 ++
 sysutils/xenkernel46/MESSAGE                                             |   7 +
 sysutils/xenkernel46/Makefile                                            |  56 ++++++++++
 sysutils/xenkernel46/PLIST                                               |   3 +
 sysutils/xenkernel46/distinfo                                            |  13 ++
 sysutils/xenkernel46/patches/patch-Config.mk                             |  13 ++
 sysutils/xenkernel46/patches/patch-xen_Makefile                          |  13 ++
 sysutils/xenkernel46/patches/patch-xen_arch_x86_Rules.mk                 |  12 ++
 sysutils/xenkernel46/patches/patch-xen_common_page__alloc.c              |  13 ++
 sysutils/xenkernel46/patches/patch-xen_drivers_passthrough_vtd_x86_ats.c |  22 +++
 sysutils/xenkernel46/patches/patch-xen_include_asm-x86_current.h         |  13 ++
 sysutils/xenkernel46/patches/patch-xen_include_xen_lib.h                 |  13 ++
 12 files changed, 192 insertions(+), 0 deletions(-)

diffs (240 lines):

diff -r cb8a3dbdbe04 -r 903f3f0ef976 sysutils/xenkernel46/DESCR
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/xenkernel46/DESCR        Mon Jul 04 07:25:13 2016 +0000
@@ -0,0 +1,14 @@
+Xen is a hypervisor which supports running multiple guest operating
+systems on a single machine. Guest OSes (also called "domains")
+can be either paravirtualised (i.e. make hypercalls in order to
+access hardware), run in HVM (Hardware Virtualisation Mode) where
+they will be presented with virtual devices, or a combination where
+they use hypercalls to access hardware but manage memory themselves.
+At boot, the xen kernel is loaded along with the guest kernel for
+the first domain (called domain0). domain0 has privileges to access
+the physical hardware (PCI and ISA devices), administrate other
+domains and provide virtual devices (disks and network) to other
+domains.
+
+This package contains the 4.6 Xen kernel itself.  PCI passthrough is
+not supported.  PAE is mandatory; on i386 one must use XEN3PAE_DOM[0U].
diff -r cb8a3dbdbe04 -r 903f3f0ef976 sysutils/xenkernel46/MESSAGE
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/xenkernel46/MESSAGE      Mon Jul 04 07:25:13 2016 +0000
@@ -0,0 +1,7 @@
+===========================================================================
+$NetBSD: MESSAGE,v 1.1.1.1 2016/07/04 07:25:13 jnemeth Exp $
+
+The Xen hypervisor is installed under the following locations:
+       ${XENKERNELDIR}/xen.gz          (standard hypervisor)
+       ${XENKERNELDIR}/xen-debug.gz    (debug hypervisor)
+===========================================================================
diff -r cb8a3dbdbe04 -r 903f3f0ef976 sysutils/xenkernel46/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/xenkernel46/Makefile     Mon Jul 04 07:25:13 2016 +0000
@@ -0,0 +1,56 @@
+# $NetBSD: Makefile,v 1.1.1.1 2016/07/04 07:25:13 jnemeth Exp $
+
+VERSION=       4.6.3
+DISTNAME=      xen-${VERSION}
+PKGNAME=       xenkernel46-${VERSION}
+#PKGREVISION=  0
+CATEGORIES=    sysutils
+MASTER_SITES=  http://bits.xensource.com/oss-xen/release/${VERSION}/
+
+MAINTAINER=    pkgsrc-users%NetBSD.org@localhost
+HOMEPAGE=      http://xenproject.org/
+COMMENT=       Xen 4.6.x Kernel
+
+LICENSE=       gnu-gpl-v2
+
+ONLY_FOR_PLATFORM=     Linux-2.6*-i386 Linux-2.6*-x86_64
+ONLY_FOR_PLATFORM+=    NetBSD-[5-9].*-x86_64 NetBSD-[5-9].*-i386
+
+NO_CONFIGURE=  yes
+USE_TOOLS+=    gmake
+
+PYTHON_FOR_BUILD_ONLY=         YES
+PYTHON_VERSIONS_INCOMPATIBLE=  33 34 35
+
+MAKE_ENV+=     OCAML_TOOLS=no
+
+INSTALLATION_DIRS=     xen46-kernel
+XENKERNELDIR=          ${PREFIX}/${INSTALLATION_DIRS}
+
+MESSAGE_SUBST+=                XENKERNELDIR=${XENKERNELDIR}
+
+.include "../../mk/compiler.mk"
+.if !empty(PKGSRC_COMPILER:Mclang)
+EXTRA_CFLAGS+= -Qunused-arguments -no-integrated-as -Wno-error=format \
+               -Wno-error=parentheses-equality -Wno-error=enum-conversion \
+               -Wno-error=unused-function -Wno-error=unused-const-variable \
+               -Wno-error=ignored-attributes -Wno-error=initializer-overrides
+.endif
+
+MAKE_ENV+=     EXTRA_CFLAGS=${EXTRA_CFLAGS:Q}
+
+do-build:
+       cd ${WRKSRC}/xen && ${BUILD_MAKE_CMD} debug=n build
+       ${CP} ${WRKSRC}/xen/xen.gz ${WRKDIR}/xen.gz
+       cd ${WRKSRC}/xen && ${MAKE_PROGRAM} clean
+       cd ${WRKSRC}/xen && ${BUILD_MAKE_CMD} debug=y build
+       ${CP} ${WRKSRC}/xen/xen.gz ${WRKDIR}/xen-debug.gz
+
+do-install:
+       ${INSTALL_DATA} ${WRKDIR}/xen.gz \
+           ${DESTDIR}${XENKERNELDIR}/xen.gz
+       ${INSTALL_DATA} ${WRKDIR}/xen-debug.gz \
+           ${DESTDIR}${XENKERNELDIR}/xen-debug.gz
+
+.include "../../lang/python/application.mk"
+.include "../../mk/bsd.pkg.mk"
diff -r cb8a3dbdbe04 -r 903f3f0ef976 sysutils/xenkernel46/PLIST
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/xenkernel46/PLIST        Mon Jul 04 07:25:13 2016 +0000
@@ -0,0 +1,3 @@
+@comment $NetBSD: PLIST,v 1.1.1.1 2016/07/04 07:25:13 jnemeth Exp $
+xen46-kernel/xen-debug.gz
+xen46-kernel/xen.gz
diff -r cb8a3dbdbe04 -r 903f3f0ef976 sysutils/xenkernel46/distinfo
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/xenkernel46/distinfo     Mon Jul 04 07:25:13 2016 +0000
@@ -0,0 +1,13 @@
+$NetBSD: distinfo,v 1.1.1.1 2016/07/04 07:25:13 jnemeth Exp $
+
+SHA1 (xen-4.6.3.tar.gz) = 2aa59d0a05a6c5ac7f336f2069c66a54f95c4349
+RMD160 (xen-4.6.3.tar.gz) = 2798bd888ee001a4829165e55feb705a86af4f74
+SHA512 (xen-4.6.3.tar.gz) = 187a860b40c05139f22b8498a5fae1db173c3110d957147af29a56cb83b7111c9dc4946d65f9dffc847001fc01c5e9bf51886eaa1194bb9cfd0b6dbcd43a2c5c
+Size (xen-4.6.3.tar.gz) = 19707041 bytes
+SHA1 (patch-Config.mk) = a2a104d023cea4e551a3ad40927d4884d6c610bf
+SHA1 (patch-xen_Makefile) = be3f4577a205b23187b91319f91c50720919f70b
+SHA1 (patch-xen_arch_x86_Rules.mk) = 7b0894ba7311edb02118a021671f304cf3872154
+SHA1 (patch-xen_common_page__alloc.c) = c4d606de1cada8cf89b5abd16efada3d58c68a03
+SHA1 (patch-xen_drivers_passthrough_vtd_x86_ats.c) = f72fd4bb2aeeaeb0b167031dfd5498e73666aa4e
+SHA1 (patch-xen_include_asm-x86_current.h) = 8a21577be06383c0c7f53c15ba828f77fb6314ad
+SHA1 (patch-xen_include_xen_lib.h) = 82a219b7d9c5deaa2b8e0adc774f60395adc4815
diff -r cb8a3dbdbe04 -r 903f3f0ef976 sysutils/xenkernel46/patches/patch-Config.mk
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/xenkernel46/patches/patch-Config.mk      Mon Jul 04 07:25:13 2016 +0000
@@ -0,0 +1,13 @@
+$NetBSD: patch-Config.mk,v 1.1.1.1 2016/07/04 07:25:13 jnemeth Exp $
+
+--- Config.mk.orig     2015-01-12 17:53:24.000000000 +0100
++++ Config.mk  2015-01-19 12:29:14.000000000 +0100
+@@ -39,6 +39,8 @@
+ HOSTCC      = gcc
+ HOSTCFLAGS  = -Wall -Werror -Wstrict-prototypes -O2 -fomit-frame-pointer
+ HOSTCFLAGS += -fno-strict-aliasing
++HOSTCFLAGS += ${EXTRA_CFLAGS}
++CFLAGS     += ${EXTRA_CFLAGS}
+ 
+ DISTDIR     ?= $(XEN_ROOT)/dist
+ DESTDIR     ?= /
diff -r cb8a3dbdbe04 -r 903f3f0ef976 sysutils/xenkernel46/patches/patch-xen_Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/xenkernel46/patches/patch-xen_Makefile   Mon Jul 04 07:25:13 2016 +0000
@@ -0,0 +1,13 @@
+$NetBSD: patch-xen_Makefile,v 1.1.1.1 2016/07/04 07:25:13 jnemeth Exp $
+
+--- xen/Makefile.orig  2016-02-09 14:44:19.000000000 +0000
++++ xen/Makefile
+@@ -135,7 +135,7 @@ include/xen/compile.h: include/xen/compi
+           -e 's/@@whoami@@/$(XEN_WHOAMI)/g' \
+           -e 's/@@domain@@/$(XEN_DOMAIN)/g' \
+           -e 's/@@hostname@@/$(XEN_BUILD_HOST)/g' \
+-          -e 's!@@compiler@@!$(shell $(CC) $(CFLAGS) --version 2>&1 | head -1)!g' \
++          -e 's!@@compiler@@!$(shell $(CC) $(EXTRA_CFLAGS) $(CFLAGS) --version 2>&1 | head -1)!g' \
+           -e 's/@@version@@/$(XEN_VERSION)/g' \
+           -e 's/@@subversion@@/$(XEN_SUBVERSION)/g' \
+           -e 's/@@extraversion@@/$(XEN_EXTRAVERSION)/g' \
diff -r cb8a3dbdbe04 -r 903f3f0ef976 sysutils/xenkernel46/patches/patch-xen_arch_x86_Rules.mk
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/xenkernel46/patches/patch-xen_arch_x86_Rules.mk  Mon Jul 04 07:25:13 2016 +0000
@@ -0,0 +1,12 @@
+$NetBSD: patch-xen_arch_x86_Rules.mk,v 1.1.1.1 2016/07/04 07:25:14 jnemeth Exp $
+
+--- xen/arch/x86/Rules.mk.orig 2015-01-12 17:53:24.000000000 +0100
++++ xen/arch/x86/Rules.mk      2015-01-19 12:29:14.000000000 +0100
+@@ -24,6 +24,7 @@
+ CFLAGS += -I$(BASEDIR)/include 
+ CFLAGS += -I$(BASEDIR)/include/asm-x86/mach-generic
+ CFLAGS += -I$(BASEDIR)/include/asm-x86/mach-default
++CFLAGS += $(EXTRA_CFLAGS)
+ 
+ # Prevent floating-point variables from creeping into Xen.
+ CFLAGS += -msoft-float
diff -r cb8a3dbdbe04 -r 903f3f0ef976 sysutils/xenkernel46/patches/patch-xen_common_page__alloc.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/xenkernel46/patches/patch-xen_common_page__alloc.c       Mon Jul 04 07:25:13 2016 +0000
@@ -0,0 +1,13 @@
+$NetBSD: patch-xen_common_page__alloc.c,v 1.1.1.1 2016/07/04 07:25:13 jnemeth Exp $
+
+--- xen/common/page_alloc.c.orig       2015-09-13 17:37:09.000000000 +0000
++++ xen/common/page_alloc.c
+@@ -1561,7 +1561,7 @@ void *alloc_xenheap_pages(unsigned int o
+     ASSERT(!in_irq());
+ 
+     if ( xenheap_bits && (memflags >> _MEMF_bits) > xenheap_bits )
+-        memflags &= ~MEMF_bits(~0);
++        memflags &= ~MEMF_bits(~0U);
+     if ( !(memflags >> _MEMF_bits) )
+         memflags |= MEMF_bits(xenheap_bits);
+ 
diff -r cb8a3dbdbe04 -r 903f3f0ef976 sysutils/xenkernel46/patches/patch-xen_drivers_passthrough_vtd_x86_ats.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/xenkernel46/patches/patch-xen_drivers_passthrough_vtd_x86_ats.c  Mon Jul 04 07:25:13 2016 +0000
@@ -0,0 +1,22 @@
+$NetBSD: patch-xen_drivers_passthrough_vtd_x86_ats.c,v 1.1.1.1 2016/07/04 07:25:14 jnemeth Exp $
+
+--- xen/drivers/passthrough/vtd/x86/ats.c.orig 2015-06-22 13:41:35.000000000 +0000
++++ xen/drivers/passthrough/vtd/x86/ats.c
+@@ -134,7 +134,7 @@ int dev_invalidate_iotlb(struct iommu *i
+         case DMA_TLB_GLOBAL_FLUSH:
+             /* invalidate all translations: sbit=1,bit_63=0,bit[62:12]=1 */
+             sbit = 1;
+-            addr = (~0 << PAGE_SHIFT_4K) & 0x7FFFFFFFFFFFFFFF;
++            addr = (~0ULL << PAGE_SHIFT_4K) & 0x7FFFFFFFFFFFFFFF;
+             rc = qinval_device_iotlb(iommu, pdev->ats_queue_depth,
+                                      sid, sbit, addr);
+             break;
+@@ -146,7 +146,7 @@ int dev_invalidate_iotlb(struct iommu *i
+             sbit = size_order ? 1 : 0;
+ 
+             /* clear lower bits */
+-            addr &= ~0 << PAGE_SHIFT_4K;
++            addr &= ~0ULL << PAGE_SHIFT_4K;
+ 
+             /* if sbit == 1, zero out size_order bit and set lower bits to 1 */
+             if ( sbit )
diff -r cb8a3dbdbe04 -r 903f3f0ef976 sysutils/xenkernel46/patches/patch-xen_include_asm-x86_current.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/xenkernel46/patches/patch-xen_include_asm-x86_current.h  Mon Jul 04 07:25:13 2016 +0000
@@ -0,0 +1,13 @@
+$NetBSD: patch-xen_include_asm-x86_current.h,v 1.1.1.1 2016/07/04 07:25:13 jnemeth Exp $
+
+--- xen/include/asm-x86/current.h.orig 2015-01-30 12:45:05.000000000 +0000
++++ xen/include/asm-x86/current.h
+@@ -25,7 +25,7 @@ struct cpu_info {
+ 
+ static inline struct cpu_info *get_cpu_info(void)
+ {
+-    register unsigned long sp asm("rsp");
++    unsigned long sp = (unsigned long)__builtin_frame_address(0);
+ 
+     return (struct cpu_info *)((sp & ~(STACK_SIZE-1)) + STACK_SIZE) - 1;
+ }
diff -r cb8a3dbdbe04 -r 903f3f0ef976 sysutils/xenkernel46/patches/patch-xen_include_xen_lib.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/xenkernel46/patches/patch-xen_include_xen_lib.h  Mon Jul 04 07:25:13 2016 +0000
@@ -0,0 +1,13 @@
+$NetBSD: patch-xen_include_xen_lib.h,v 1.1.1.1 2016/07/04 07:25:13 jnemeth Exp $
+
+--- xen/include/xen/lib.h.orig 2015-06-22 15:41:35.000000000 +0200
++++ xen/include/xen/lib.h      2015-06-23 18:32:26.000000000 +0200
+@@ -44,7 +44,7 @@
+ #define ASSERT_UNREACHABLE() assert_failed("unreachable")
+ #define debug_build() 1
+ #else
+-#define ASSERT(p) do { if ( 0 && (p) ); } while (0)
++#define ASSERT(p) do { if ( 0 && (p) ) (void)0; } while (0)
+ #define ASSERT_UNREACHABLE() do { } while (0)
+ #define debug_build() 0
+ #endif



Home | Main Index | Thread Index | Old Index