Import of pkgsrc-2016Q3

This commit is contained in:
2016-11-18 22:39:22 +01:00
committed by sambuc
parent 9d819b6d54
commit 1242aa1e36
35952 changed files with 949747 additions and 377081 deletions
+5
View File
@@ -0,0 +1,5 @@
The Xen virtual machine monitor allows running several virtual machines
on a single physical machine. The xentools46 package contains the
tools to create, destroy and control the virtual machines.
This package contains the tools for Xen 4.6.x
+11
View File
@@ -0,0 +1,11 @@
===========================================================================
$NetBSD: MESSAGE,v 1.1.1.1 2016/07/04 07:30:47 jnemeth Exp $
Please note that the xm command has been removed.
You have to switch to the xl command, which is now functional on NetBSD.
Also note that the rc.d scripts have been updated in this version.
If you don't use PKG_RCD_SCRIPTS=YES then it is very important for
you to copy the new rc.d scripts to /etc/rc.d.
===========================================================================
+17
View File
@@ -0,0 +1,17 @@
===========================================================================
$NetBSD: MESSAGE.NetBSD,v 1.1.1.1 2016/07/04 07:30:47 jnemeth Exp $
Please ensure that the Xen-specific devices needed by xend(8) exist:
cd /dev && sh MAKEDEV xen
There are example configuration files for setting up a guest domain in:
${EGDIR}/
Please also refer to the the "NetBSD/xen How-To" for more information on
creating a Xen setup:
http://www.NetBSD.org/ports/xen/howto.html
===========================================================================
+251
View File
@@ -0,0 +1,251 @@
# $NetBSD: Makefile,v 1.3 2016/07/09 13:04:08 wiz Exp $
VERSION= 4.6.3
VERSION_IPXE= 9a93db3f0947484e30e753bbd61a10b17336e20e
DISTNAME= xen-${VERSION}
PKGNAME= xentools46-${VERSION}
PKGREVISION= 1
CATEGORIES= sysutils
MASTER_SITES= http://bits.xensource.com/oss-xen/release/${VERSION}/
DISTFILES= ${DISTNAME}.tar.gz
DISTFILES+= ipxe-git-${VERSION_IPXE}.tar.gz
SITES.ipxe-git-${VERSION_IPXE}.tar.gz += http://xenbits.xensource.com/xen-extfiles/
MAINTAINER= pkgsrc-users@NetBSD.org
HOMEPAGE= http://xenproject.org/
COMMENT= Userland Tools for Xen 4.6.x
LICENSE= gnu-gpl-v2
# XXX add version check: Xen requires dev86 >= 0.16.14
BUILD_DEPENDS+= dev86-[0-9]*:../../devel/dev86 # needed to build firmware
.if !exists(/usr/bin/iasl)
BUILD_DEPENDS+= acpica-utils-[0-9]*:../../sysutils/acpica-utils
.endif
DEPENDS+= ${PYPKGPREFIX}-curses>=0:../../devel/py-curses
PKG_SYSCONFSUBDIR= xen
ONLY_FOR_PLATFORM= Linux-2.6*-i386 Linux-2.6*-x86_64
ONLY_FOR_PLATFORM+= NetBSD-[5-9].*-x86_64 NetBSD-[5-9].*-i386
CONFLICTS+= libxen-[0-9]*
CONFLICTS+= xentools20-[0-9]*
CONFLICTS+= xentools3-[0-9]*
CONFLICTS+= xenstoretools-[0-9]*
XENTOP= ${WRKDIR}/xen-${VERSION}
WRKSRC= ${XENTOP}/tools
CHECK_PORTABILITY_SKIP= examples/*
EGDIR= ${PREFIX}/share/examples/xen
MESSAGE_SUBST+= EGDIR=${EGDIR}
USE_TOOLS+= pod2man gmake pkg-config makeinfo perl bash
USE_LANGUAGES= c
GNU_CONFIGURE= YES
#CONFIGURE_ARGS+= --enable-xenapi
CONFIGURE_ARGS+= --disable-seabios
CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFBASE}
MAKE_ENV+= PREFIX=${prefix:Q} WRKSRC=${WRKSRC}
MAKE_ENV+= XEN_EXAMPLES_DIR=${EGDIR}
MAKE_ENV+= MV=${MV:Q} PYTHON=${PYTHONBIN:Q} SED=${SED:Q}
MAKE_ENV+= V=YES
MAKE_ENV+= NO_WERROR=1
#MAKE_ENV+= INSTALL_DIR=${BSD_INSTALL_DATA_DIR}
#MAKE_ENV+= INSTALL_DATA=${BSD_INSTALL_DATA}
#MAKE_ENV+= INSTALL_PROG=${BSD_INSTALL_PROGRAM}
PYTHON_VERSIONS_INCOMPATIBLE= 34 35
PY_PATCHPLIST= yes
REPLACE_PYTHON+= misc/xen-bugtool misc/xen-ringwatch misc/xencons
REPLACE_PYTHON+= misc/xenpvnetboot misc/xensymoops
REPLACE_PYTHON+= python/scripts/convert-legacy-stream
REPLACE_PYTHON+= python/scripts/verify-stream-v2
REPLACE_PYTHON+= xenmon/xenmon.py
SUBST_CLASSES+= perlpath
SUBST_STAGE.perlpath= pre-configure
SUBST_FILES.perlpath= ../tools/misc/xencov_split
SUBST_FILES.perlpath+= ../tools/firmware/rombios/makesym.perl
SUBST_FILES.perlpath+= ../tools/qemu-xen-traditional/texi2pod.pl
SUBST_FILES.perlpath+= ../tools/examples/xeninfo.pl
SUBST_FILES.perlpath+= ../tools/include/xen-external/bsd-sys-queue-h-seddery
SUBST_FILES.perlpath+= ../tools/qemu-xen/scripts/texi2pod.pl
SUBST_FILES.perlpath+= ../tools/qemu-xen/scripts/get_maintainer.pl
SUBST_FILES.perlpath+= ../tools/qemu-xen/scripts/checkpatch.pl
SUBST_FILES.perlpath+= ../tools/libxl/libxl_save_msgs_gen.pl
SUBST_FILES.perlpath+= ../tools/libxl/check-libxl-api-rules
SUBST_FILES.perlpath+= ../../ipxe/src/drivers/infiniband/qib_genbits.pl
SUBST_FILES.perlpath+= ../../ipxe/src/util/catrom.pl
SUBST_FILES.perlpath+= ../../ipxe/src/util/diffsize.pl
SUBST_FILES.perlpath+= ../../ipxe/src/util/disrom.pl
SUBST_FILES.perlpath+= ../../ipxe/src/util/get-pci-ids
SUBST_FILES.perlpath+= ../../ipxe/src/util/licence.pl
SUBST_FILES.perlpath+= ../../ipxe/src/util/mergerom.pl
SUBST_FILES.perlpath+= ../../ipxe/src/util/modrom.pl
SUBST_FILES.perlpath+= ../../ipxe/src/util/padimg.pl
SUBST_FILES.perlpath+= ../../ipxe/src/util/parserom.pl
SUBST_FILES.perlpath+= ../../ipxe/src/util/sortobjdump.pl
SUBST_FILES.perlpath+= ../../ipxe/src/util/swapdevids.pl
SUBST_FILES.perlpath+= ../../ipxe/src/util/symcheck.pl
SUBST_SED.perlpath= -e "s|/usr/bin/perl|${PREFIX}/bin/perl|g"
SUBST_CLASSES+= pathsvar
SUBST_STAGE.pathsvar= pre-configure
SUBST_FILES.pathsvar= Makefile \
hotplug/Linux/init.d/sysconfig.xendomains
SUBST_SED.pathsvar= -e "s|/var/lib|${VARBASE}/run|g"
SUBST_CLASSES+= conf
SUBST_STAGE.conf= pre-configure
SUBST_FILES.conf+= ocaml/xenstored/define.ml
SUBST_FILES.conf+= libxl/xl_cmdtable.c
SUBST_FILES.conf+= ../docs/misc/xl-disk-configuration.txt
SUBST_SED.conf= -e "s,@XENDCONFDIR@,${PKG_SYSCONFDIR},g"
XEND_SCRIPTS= block vif-bridge vif-ip qemu-ifup hotplugpath.sh locking.sh
SUBST_CLASSES.NetBSD+= proc
SUBST_STAGE.proc= pre-configure
SUBST_FILES.proc+= ocaml/xenstored/define.ml
SUBST_SED.proc= -e "s|/proc|/kern|g"
OPSYSVARS+= PROCPATH
PROCPATH.NetBSD= /kern
PROCPATH.*= /proc
.include "../../mk/bsd.prefs.mk"
SUBST_CLASSES+= procdev
SUBST_STAGE.procdev= pre-configure
SUBST_FILES.procdev= ocaml/xenstored/define.ml
.if ${OPSYS} == "NetBSD"
SUBST_SED.procdev= -e "s|@PROCDEV@|/dev|g"
.else
SUBST_SED.procdev= -e "s|@PROCDEV@|/proc/xen|g"
.endif
.if ${OPSYS} == "NetBSD"
MESSAGE_SRC= ${.CURDIR}/MESSAGE ${.CURDIR}/MESSAGE.NetBSD
.endif
RCD_SCRIPTS= xen-watchdog xencommons xendomains
FILES_SUBST+= RCD_INTERPRETER=${PYTHONBIN:Q}
FILES_SUBST+= PROCPATH=${PROCPATH:Q}
FILES_SUBST+= PKG_SYSCONFDIR=${PKG_SYSCONFDIR}
FILES_SUBST+= PREFIX=${PREFIX}
CONF_FILES+= ${EGDIR}/xl.conf ${PKG_SYSCONFDIR}/xl.conf
CONF_FILES+= ${EGDIR}/oxenstored.conf ${PKG_SYSCONFDIR}/oxenstored.conf
OWN_DIRS= ${PKG_SYSCONFDIR}/scripts ${VARBASE}/log/xen
OWN_DIRS+= ${VARBASE}/lib/xen
.for s in ${XEND_SCRIPTS}
CONF_FILES_PERMS+= ${EGDIR}/scripts/${s} ${PKG_SYSCONFDIR}/scripts/${s} \
${REAL_ROOT_USER} ${REAL_ROOT_GROUP} 0755
.endfor
pre-build:
rm -f ${WRKSRC}/check/check_x11_devel
${CP} -f ${FILESDIR}/locking.sh ${WRKSRC}/hotplug/NetBSD/
${SED} -e "s,@XENDCONFDIR@,${PKG_SYSCONFDIR},g" \
${XENTOP}/docs/man/xenstore-chmod.pod.1 |\
pod2man -n xenstore-chmod >${WRKDIR}/xenstore-chmod.1
${SED} -e "s,@XENDCONFDIR@,${PKG_SYSCONFDIR},g" \
${XENTOP}/docs/man/xenstore-ls.pod.1 |\
pod2man -n xenstore-ls >${WRKDIR}/xenstore-ls.1
${SED} -e "s,@XENDCONFDIR@,${PKG_SYSCONFDIR},g" \
${XENTOP}/docs/man/xenstore.pod.1 |\
pod2man -n xenstore >${WRKDIR}/xenstore.1
${SED} -e "s,@XENDCONFDIR@,${PKG_SYSCONFDIR},g" \
${XENTOP}/docs/man/xentop.pod.1 |\
pod2man -n xentop >${WRKDIR}/xentop.1
${SED} -e "s,@XENDCONFDIR@,${PKG_SYSCONFDIR},g" \
${XENTOP}/docs/man/xentrace.pod.8 |\
pod2man -n xentrace >${WRKDIR}/xentrace.8
${SED} -e "s,@XENDCONFDIR@,${PKG_SYSCONFDIR},g" \
${XENTOP}/docs/man/xentrace_format.pod.1 |\
pod2man -n xenstore_format >${WRKDIR}/xentrace_format.1
${SED} -e "s,@XENDCONFDIR@,${PKG_SYSCONFDIR},g" \
${XENTOP}/docs/man/xl.cfg.pod.5 |\
pod2man -n xl.cfg >${WRKDIR}/xl.cfg.5
${SED} -e "s,@XENDCONFDIR@,${PKG_SYSCONFDIR},g" \
${XENTOP}/docs/man/xl.conf.pod.5 |\
pod2man -n xl.conf >${WRKDIR}/xl.conf.5
${SED} -e "s,@XENDCONFDIR@,${PKG_SYSCONFDIR},g" \
${XENTOP}/docs/man/xl.pod.1 |\
pod2man -n xl >${WRKDIR}/xl.1
${SED} -e "s,@XENDCONFDIR@,${PKG_SYSCONFDIR},g" \
${XENTOP}/docs/man/xlcpupool.cfg.pod.5 |\
pod2man -n xlcpupool.cfg >${WRKDIR}/xlcpupool.cfg.5
INSTALLATION_DIRS= ${EGDIR} ${PKGMANDIR}/man1 ${PKGMANDIR}/man5
INSTALLATION_DIRS+= ${PKGMANDIR}/man8 share/doc/xen
BUILD_DEFS+= VARBASE
post-install:
${INSTALL_MAN} ${WRKDIR}/xenstore-chmod.1 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1
${INSTALL_MAN} ${WRKDIR}/xenstore-ls.1 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1
${INSTALL_MAN} ${WRKDIR}/xenstore.1 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1
${INSTALL_MAN} ${WRKDIR}/xentop.1 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1
${INSTALL_MAN} ${WRKDIR}/xentrace.8 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man8
${INSTALL_MAN} ${WRKDIR}/xentrace_format.1 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1
${INSTALL_MAN} ${WRKDIR}/xl.cfg.5 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man5
${INSTALL_MAN} ${WRKDIR}/xl.conf.5 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man5
${INSTALL_MAN} ${WRKDIR}/xl.1 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1
${INSTALL_MAN} ${WRKDIR}/xlcpupool.cfg.5 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man5
${INSTALL_DATA} ${XENTOP}/docs/misc/channel.txt ${DESTDIR}${PREFIX}/share/doc/xen
${INSTALL_DATA} ${XENTOP}/docs/misc/console.txt ${DESTDIR}${PREFIX}/share/doc/xen
${INSTALL_DATA} ${XENTOP}/docs/misc/dump-core-format.txt ${DESTDIR}${PREFIX}/share/doc/xen
${INSTALL_DATA} ${XENTOP}/docs/misc/xen-command-line.markdown ${DESTDIR}${PREFIX}/share/doc/xen
${INSTALL_DATA} ${XENTOP}/docs/misc/xenmon.txt ${DESTDIR}${PREFIX}/share/doc/xen
${INSTALL_DATA} ${XENTOP}/docs/misc/xenstore-paths.markdown ${DESTDIR}${PREFIX}/share/doc/xen
${INSTALL_DATA} ${XENTOP}/docs/misc/xenstore.txt ${DESTDIR}${PREFIX}/share/doc/xen
${INSTALL_DATA} ${XENTOP}/docs/misc/xl-disk-configuration.txt ${DESTDIR}${PREFIX}/share/doc/xen
${INSTALL_DATA} ${XENTOP}/docs/misc/xl-network-configuration.markdown ${DESTDIR}${PREFIX}/share/doc/xen
.if (${OPSYS} == "NetBSD" && \
(empty(OS_VERSION:M6.99.[3-9]?) && empty(OS_VERSION:M[7-9].*)))
CPPFLAGS+= -Dshm_open=open -Dshm_unlink=unlink
.endif
.include "../../mk/compiler.mk"
.if !empty(PKGSRC_COMPILER:Mclang)
EXTRA_HOSTCFLAGS+= -Wno-error=ignored-attributes
EXTRA_CFLAGS+= -Wno-error=ignored-attributes -no-integrated-as \
-Wno-error=tautological-compare -Wno-error=null-dereference \
-Wno-error=empty-body -Wno-error=self-assign \
-Wno-error=sometimes-uninitialized \
-Wno-error=unused-function -Wno-error=format \
-Wno-error=unused-const-variable \
-Wno-error=gnu-designator -Wno-error=uninitialized \
-Wno-error=parentheses-equality \
-Wno-error=enum-conversion
BUILDLINK_TRANSFORM+= rm:-falign-jumps=1 rm:-falign-loops=1 \
rm:-mpreferred-stack-boundary=2
.endif
MAKE_ENV+= EXTRA_HOSTCFLAGS=${EXTRA_HOSTCFLAGS:Q} EXTRA_CFLAGS=${EXTRA_CFLAGS:M*:Q}
.include "../../lang/python/application.mk"
.include "../../lang/python/extension.mk"
.include "../../devel/ncurses/buildlink3.mk"
#.include "../../devel/SDL/buildlink3.mk"
.include "../../lang/ocaml/buildlink3.mk"
.include "../../devel/ocaml-findlib/buildlink3.mk"
.include "../../sysutils/pciutils/buildlink3.mk"
.include "../../devel/glib2/buildlink3.mk"
.include "../../devel/yajl/buildlink3.mk"
.include "../../devel/argp/buildlink3.mk"
.include "../../x11/pixman/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
+441
View File
@@ -0,0 +1,441 @@
@comment $NetBSD: PLIST,v 1.1.1.1 2016/07/04 07:30:48 jnemeth Exp $
bin/pygrub
bin/qemu-img-xen
bin/xen-detect
bin/xenalyze
bin/xencons
bin/xencov_split
bin/xenstore
bin/xenstore-chmod
bin/xenstore-control
bin/xenstore-exists
bin/xenstore-list
bin/xenstore-ls
bin/xenstore-read
bin/xenstore-rm
bin/xenstore-watch
bin/xenstore-write
bin/xentrace_format
include/_libxl_list.h
include/_libxl_types.h
include/_libxl_types_json.h
include/fsimage.h
include/fsimage_grub.h
include/fsimage_plugin.h
include/libxl.h
include/libxl_event.h
include/libxl_json.h
include/libxl_utils.h
include/libxl_uuid.h
include/libxlutil.h
include/xen/COPYING
include/xen/arch-arm.h
include/xen/arch-arm/hvm/save.h
include/xen/arch-x86/cpuid.h
include/xen/arch-x86/hvm/save.h
include/xen/arch-x86/pmu.h
include/xen/arch-x86/xen-mca.h
include/xen/arch-x86/xen-x86_32.h
include/xen/arch-x86/xen-x86_64.h
include/xen/arch-x86/xen.h
include/xen/arch-x86_32.h
include/xen/arch-x86_64.h
include/xen/callback.h
include/xen/dom0_ops.h
include/xen/domctl.h
include/xen/elfnote.h
include/xen/errno.h
include/xen/event_channel.h
include/xen/features.h
include/xen/foreign/arm32.h
include/xen/foreign/arm64.h
include/xen/foreign/x86_32.h
include/xen/foreign/x86_64.h
include/xen/gcov.h
include/xen/grant_table.h
include/xen/hvm/e820.h
include/xen/hvm/hvm_info_table.h
include/xen/hvm/hvm_op.h
include/xen/hvm/hvm_xs_strings.h
include/xen/hvm/ioreq.h
include/xen/hvm/params.h
include/xen/hvm/pvdrivers.h
include/xen/hvm/save.h
include/xen/io/blkif.h
include/xen/io/console.h
include/xen/io/fbif.h
include/xen/io/fsif.h
include/xen/io/kbdif.h
include/xen/io/libxenvchan.h
include/xen/io/netif.h
include/xen/io/pciif.h
include/xen/io/protocols.h
include/xen/io/ring.h
include/xen/io/tpmif.h
include/xen/io/usbif.h
include/xen/io/vscsiif.h
include/xen/io/xenbus.h
include/xen/io/xs_wire.h
include/xen/kexec.h
include/xen/memory.h
include/xen/nmi.h
include/xen/physdev.h
include/xen/platform.h
include/xen/pmu.h
include/xen/sched.h
include/xen/sys/evtchn.h
include/xen/sys/gntdev.h
include/xen/sys/privcmd.h
include/xen/sysctl.h
include/xen/tmem.h
include/xen/trace.h
include/xen/vcpu.h
include/xen/version.h
include/xen/vm_event.h
include/xen/xen-compat.h
include/xen/xen.h
include/xen/xencomm.h
include/xen/xenoprof.h
include/xen/xsm/flask_op.h
include/xenctrl.h
include/xenctrlosdep.h
include/xenguest.h
include/xenstat.h
include/xenstore-compat/xs.h
include/xenstore-compat/xs_lib.h
include/xenstore.h
include/xenstore_lib.h
include/xentoollog.h
include/xs.h
include/xs_lib.h
lib/fs/ext2fs/fsimage.so
lib/fs/fat/fsimage.so
lib/fs/iso9660/fsimage.so
lib/fs/reiserfs/fsimage.so
lib/fs/ufs/fsimage.so
lib/fs/xfs/fsimage.so
lib/fs/zfs/fsimage.so
lib/libfsimage.so
lib/libfsimage.so.1.0
lib/libfsimage.so.1.0.0
lib/libxenctrl.a
lib/libxenctrl.so
lib/libxenctrl.so.4.6
lib/libxenctrl.so.4.6.0
lib/libxenguest.a
lib/libxenguest.so
lib/libxenguest.so.4.6
lib/libxenguest.so.4.6.0
lib/libxenlight.a
lib/libxenlight.so
lib/libxenlight.so.4.6
lib/libxenlight.so.4.6.0
lib/libxenstat.a
lib/libxenstat.so
lib/libxenstat.so.0
lib/libxenstat.so.0.0
lib/libxenstore.a
lib/libxenstore.so
lib/libxenstore.so.3.0
lib/libxenstore.so.3.0.3
lib/libxlutil.a
lib/libxlutil.so
lib/libxlutil.so.4.6
lib/libxlutil.so.4.6.0
lib/ocaml/site-lib/xenbus/META
lib/ocaml/site-lib/xenbus/dllxenbus_stubs.so
lib/ocaml/site-lib/xenbus/libxenbus_stubs.a
lib/ocaml/site-lib/xenbus/xenbus.a
lib/ocaml/site-lib/xenbus/xenbus.cma
lib/ocaml/site-lib/xenbus/xenbus.cmi
lib/ocaml/site-lib/xenbus/xenbus.cmo
lib/ocaml/site-lib/xenbus/xenbus.cmx
lib/ocaml/site-lib/xenbus/xenbus.cmxa
lib/ocaml/site-lib/xenctrl/META
lib/ocaml/site-lib/xenctrl/dllxenctrl_stubs.so
lib/ocaml/site-lib/xenctrl/libxenctrl_stubs.a
lib/ocaml/site-lib/xenctrl/xenctrl.a
lib/ocaml/site-lib/xenctrl/xenctrl.cma
lib/ocaml/site-lib/xenctrl/xenctrl.cmi
lib/ocaml/site-lib/xenctrl/xenctrl.cmx
lib/ocaml/site-lib/xenctrl/xenctrl.cmxa
lib/ocaml/site-lib/xeneventchn/META
lib/ocaml/site-lib/xeneventchn/dllxeneventchn_stubs.so
lib/ocaml/site-lib/xeneventchn/libxeneventchn_stubs.a
lib/ocaml/site-lib/xeneventchn/xeneventchn.a
lib/ocaml/site-lib/xeneventchn/xeneventchn.cma
lib/ocaml/site-lib/xeneventchn/xeneventchn.cmi
lib/ocaml/site-lib/xeneventchn/xeneventchn.cmx
lib/ocaml/site-lib/xeneventchn/xeneventchn.cmxa
lib/ocaml/site-lib/xenlight/META
lib/ocaml/site-lib/xenlight/dllxenlight_stubs.so
lib/ocaml/site-lib/xenlight/libxenlight_stubs.a
lib/ocaml/site-lib/xenlight/xenlight.a
lib/ocaml/site-lib/xenlight/xenlight.cma
lib/ocaml/site-lib/xenlight/xenlight.cmi
lib/ocaml/site-lib/xenlight/xenlight.cmx
lib/ocaml/site-lib/xenlight/xenlight.cmxa
lib/ocaml/site-lib/xenmmap/META
lib/ocaml/site-lib/xenmmap/dllxenmmap_stubs.so
lib/ocaml/site-lib/xenmmap/libxenmmap_stubs.a
lib/ocaml/site-lib/xenmmap/xenmmap.a
lib/ocaml/site-lib/xenmmap/xenmmap.cma
lib/ocaml/site-lib/xenmmap/xenmmap.cmi
lib/ocaml/site-lib/xenmmap/xenmmap.cmx
lib/ocaml/site-lib/xenmmap/xenmmap.cmxa
lib/ocaml/site-lib/xenstore/META
lib/ocaml/site-lib/xenstore/xenstore.a
lib/ocaml/site-lib/xenstore/xenstore.cma
lib/ocaml/site-lib/xenstore/xenstore.cmi
lib/ocaml/site-lib/xenstore/xenstore.cmo
lib/ocaml/site-lib/xenstore/xenstore.cmx
lib/ocaml/site-lib/xenstore/xenstore.cmxa
lib/ocaml/site-lib/xentoollog/META
lib/ocaml/site-lib/xentoollog/dllxentoollog_stubs.so
lib/ocaml/site-lib/xentoollog/libxentoollog_stubs.a
lib/ocaml/site-lib/xentoollog/xentoollog.a
lib/ocaml/site-lib/xentoollog/xentoollog.cma
lib/ocaml/site-lib/xentoollog/xentoollog.cmi
lib/ocaml/site-lib/xentoollog/xentoollog.cmx
lib/ocaml/site-lib/xentoollog/xentoollog.cmxa
${PYSITELIB}/fsimage.so
${PYSITELIB}/grub/ExtLinuxConf.py
${PYSITELIB}/grub/ExtLinuxConf.pyc
${PYSITELIB}/grub/GrubConf.py
${PYSITELIB}/grub/GrubConf.pyc
${PYSITELIB}/grub/LiloConf.py
${PYSITELIB}/grub/LiloConf.pyc
${PYSITELIB}/grub/__init__.py
${PYSITELIB}/grub/__init__.pyc
${PYSITELIB}/xen/__init__.py
${PYSITELIB}/xen/__init__.pyc
${PYSITELIB}/xen/lowlevel/__init__.py
${PYSITELIB}/xen/lowlevel/__init__.pyc
${PYSITELIB}/xen/lowlevel/xc.so
${PYSITELIB}/xen/lowlevel/xs.so
${PYSITELIB}/xen/migration/__init__.py
${PYSITELIB}/xen/migration/__init__.pyc
${PYSITELIB}/xen/migration/legacy.py
${PYSITELIB}/xen/migration/legacy.pyc
${PYSITELIB}/xen/migration/libxc.py
${PYSITELIB}/xen/migration/libxc.pyc
${PYSITELIB}/xen/migration/libxl.py
${PYSITELIB}/xen/migration/libxl.pyc
${PYSITELIB}/xen/migration/public.py
${PYSITELIB}/xen/migration/public.pyc
${PYSITELIB}/xen/migration/tests.py
${PYSITELIB}/xen/migration/tests.pyc
${PYSITELIB}/xen/migration/verify.py
${PYSITELIB}/xen/migration/verify.pyc
${PYSITELIB}/xen/migration/xl.py
${PYSITELIB}/xen/migration/xl.pyc
libexec/xen/bin/convert-legacy-stream
libexec/xen/bin/libxl-save-helper
libexec/xen/bin/lsevtchn
libexec/xen/bin/pygrub
libexec/xen/bin/qemu-dm
libexec/xen/bin/qemu-img
libexec/xen/bin/qemu-io
libexec/xen/bin/qemu-nbd
libexec/xen/bin/qemu-system-i386
libexec/xen/bin/readnotes
libexec/xen/bin/verify-stream-v2
libexec/xen/bin/xen-init-dom0
libexec/xen/bin/xenconsole
libexec/xen/bin/xenctx
libexec/xen/bin/xenpaging
libexec/xen/bin/xenpvnetboot
libexec/xen/boot/hvmloader
libexec/xen/etc/qemu/target-x86_64.conf
man/man1/xenstore-chmod.1
man/man1/xenstore-ls.1
man/man1/xenstore.1
man/man1/xentop.1
man/man1/xentrace_format.1
man/man1/xl.1
man/man5/xl.cfg.5
man/man5/xl.conf.5
man/man5/xlcpupool.cfg.5
man/man8/xentrace.8
sbin/gdbsx
sbin/gtracestat
sbin/gtraceview
sbin/kdd
sbin/oxenstored
sbin/xen-bugtool
sbin/xen-hptool
sbin/xen-hvmcrash
sbin/xen-hvmctx
sbin/xen-lowmemd
sbin/xen-mfndump
sbin/xen-ringwatch
sbin/xen-tmem-list-parse
sbin/xenbaked
sbin/xenconsoled
sbin/xencov
sbin/xenlockprof
sbin/xenmon.py
sbin/xenperf
sbin/xenpm
sbin/xenpmd
sbin/xenstored
sbin/xentop
sbin/xentrace
sbin/xentrace_setmask
sbin/xentrace_setsize
sbin/xenwatchdogd
sbin/xl
share/doc/xen/channel.txt
share/doc/xen/console.txt
share/doc/xen/dump-core-format.txt
share/doc/xen/xen-command-line.markdown
share/doc/xen/xenmon.txt
share/doc/xen/xenstore-paths.markdown
share/doc/xen/xenstore.txt
share/doc/xen/xl-disk-configuration.txt
share/doc/xen/xl-network-configuration.markdown
share/examples/xen/README
share/examples/xen/README.incompatibilities
share/examples/xen/cpupool
share/examples/xen/oxenstored.conf
share/examples/xen/scripts/block
share/examples/xen/scripts/hotplugpath.sh
share/examples/xen/scripts/locking.sh
share/examples/xen/scripts/qemu-ifup
share/examples/xen/scripts/vif-bridge
share/examples/xen/scripts/vif-ip
share/examples/xen/xl.conf
share/examples/xen/xl.sh
share/examples/xen/xlexample.hvm
share/examples/xen/xlexample.pvlinux
share/pkgconfig/xenlight.pc
share/pkgconfig/xlutil.pc
share/qemu-xen/qemu/QEMU,cgthree.bin
share/qemu-xen/qemu/QEMU,tcx.bin
share/qemu-xen/qemu/acpi-dsdt.aml
share/qemu-xen/qemu/bamboo.dtb
share/qemu-xen/qemu/bios-256k.bin
share/qemu-xen/qemu/bios.bin
share/qemu-xen/qemu/efi-e1000.rom
share/qemu-xen/qemu/efi-eepro100.rom
share/qemu-xen/qemu/efi-ne2k_pci.rom
share/qemu-xen/qemu/efi-pcnet.rom
share/qemu-xen/qemu/efi-rtl8139.rom
share/qemu-xen/qemu/efi-virtio.rom
share/qemu-xen/qemu/keymaps/ar
share/qemu-xen/qemu/keymaps/bepo
share/qemu-xen/qemu/keymaps/common
share/qemu-xen/qemu/keymaps/cz
share/qemu-xen/qemu/keymaps/da
share/qemu-xen/qemu/keymaps/de
share/qemu-xen/qemu/keymaps/de-ch
share/qemu-xen/qemu/keymaps/en-gb
share/qemu-xen/qemu/keymaps/en-us
share/qemu-xen/qemu/keymaps/es
share/qemu-xen/qemu/keymaps/et
share/qemu-xen/qemu/keymaps/fi
share/qemu-xen/qemu/keymaps/fo
share/qemu-xen/qemu/keymaps/fr
share/qemu-xen/qemu/keymaps/fr-be
share/qemu-xen/qemu/keymaps/fr-ca
share/qemu-xen/qemu/keymaps/fr-ch
share/qemu-xen/qemu/keymaps/hr
share/qemu-xen/qemu/keymaps/hu
share/qemu-xen/qemu/keymaps/is
share/qemu-xen/qemu/keymaps/it
share/qemu-xen/qemu/keymaps/ja
share/qemu-xen/qemu/keymaps/lt
share/qemu-xen/qemu/keymaps/lv
share/qemu-xen/qemu/keymaps/mk
share/qemu-xen/qemu/keymaps/modifiers
share/qemu-xen/qemu/keymaps/nl
share/qemu-xen/qemu/keymaps/nl-be
share/qemu-xen/qemu/keymaps/no
share/qemu-xen/qemu/keymaps/pl
share/qemu-xen/qemu/keymaps/pt
share/qemu-xen/qemu/keymaps/pt-br
share/qemu-xen/qemu/keymaps/ru
share/qemu-xen/qemu/keymaps/sl
share/qemu-xen/qemu/keymaps/sv
share/qemu-xen/qemu/keymaps/th
share/qemu-xen/qemu/keymaps/tr
share/qemu-xen/qemu/kvmvapic.bin
share/qemu-xen/qemu/linuxboot.bin
share/qemu-xen/qemu/multiboot.bin
share/qemu-xen/qemu/openbios-ppc
share/qemu-xen/qemu/openbios-sparc32
share/qemu-xen/qemu/openbios-sparc64
share/qemu-xen/qemu/palcode-clipper
share/qemu-xen/qemu/petalogix-ml605.dtb
share/qemu-xen/qemu/petalogix-s3adsp1800.dtb
share/qemu-xen/qemu/ppc_rom.bin
share/qemu-xen/qemu/pxe-e1000.rom
share/qemu-xen/qemu/pxe-eepro100.rom
share/qemu-xen/qemu/pxe-ne2k_pci.rom
share/qemu-xen/qemu/pxe-pcnet.rom
share/qemu-xen/qemu/pxe-rtl8139.rom
share/qemu-xen/qemu/pxe-virtio.rom
share/qemu-xen/qemu/q35-acpi-dsdt.aml
share/qemu-xen/qemu/qemu-icon.bmp
share/qemu-xen/qemu/qemu_logo_no_text.svg
share/qemu-xen/qemu/s390-ccw.img
share/qemu-xen/qemu/s390-zipl.rom
share/qemu-xen/qemu/sgabios.bin
share/qemu-xen/qemu/slof.bin
share/qemu-xen/qemu/spapr-rtas.bin
share/qemu-xen/qemu/trace-events
share/qemu-xen/qemu/u-boot.e500
share/qemu-xen/qemu/vgabios-cirrus.bin
share/qemu-xen/qemu/vgabios-qxl.bin
share/qemu-xen/qemu/vgabios-stdvga.bin
share/qemu-xen/qemu/vgabios-vmware.bin
share/qemu-xen/qemu/vgabios.bin
share/xen/qemu/bamboo.dtb
share/xen/qemu/bios.bin
share/xen/qemu/keymaps/ar
share/xen/qemu/keymaps/common
share/xen/qemu/keymaps/da
share/xen/qemu/keymaps/de
share/xen/qemu/keymaps/de-ch
share/xen/qemu/keymaps/en-gb
share/xen/qemu/keymaps/en-us
share/xen/qemu/keymaps/es
share/xen/qemu/keymaps/et
share/xen/qemu/keymaps/fi
share/xen/qemu/keymaps/fo
share/xen/qemu/keymaps/fr
share/xen/qemu/keymaps/fr-be
share/xen/qemu/keymaps/fr-ca
share/xen/qemu/keymaps/fr-ch
share/xen/qemu/keymaps/hr
share/xen/qemu/keymaps/hu
share/xen/qemu/keymaps/is
share/xen/qemu/keymaps/it
share/xen/qemu/keymaps/ja
share/xen/qemu/keymaps/lt
share/xen/qemu/keymaps/lv
share/xen/qemu/keymaps/mk
share/xen/qemu/keymaps/modifiers
share/xen/qemu/keymaps/nl
share/xen/qemu/keymaps/nl-be
share/xen/qemu/keymaps/no
share/xen/qemu/keymaps/pl
share/xen/qemu/keymaps/pt
share/xen/qemu/keymaps/pt-br
share/xen/qemu/keymaps/ru
share/xen/qemu/keymaps/sl
share/xen/qemu/keymaps/sv
share/xen/qemu/keymaps/th
share/xen/qemu/keymaps/tr
share/xen/qemu/openbios-ppc
share/xen/qemu/openbios-sparc32
share/xen/qemu/openbios-sparc64
share/xen/qemu/ppc_rom.bin
share/xen/qemu/pxe-e1000.bin
share/xen/qemu/pxe-ne2k_pci.bin
share/xen/qemu/pxe-pcnet.bin
share/xen/qemu/pxe-rtl8139.bin
share/xen/qemu/vgabios-cirrus.bin
share/xen/qemu/vgabios.bin
share/xen/qemu/video.x
@pkgdir share/examples/xen/auto
+66
View File
@@ -0,0 +1,66 @@
$NetBSD: distinfo,v 1.1.1.1 2016/07/04 07:30:49 jnemeth Exp $
SHA1 (ipxe-git-9a93db3f0947484e30e753bbd61a10b17336e20e.tar.gz) = fecadf952821e830ce1a1d19655288eef8488f88
RMD160 (ipxe-git-9a93db3f0947484e30e753bbd61a10b17336e20e.tar.gz) = 539bfa12db7054228250d6dd380bbf96c1a040f8
SHA512 (ipxe-git-9a93db3f0947484e30e753bbd61a10b17336e20e.tar.gz) = c5cb1cdff40d2d71fd3e692a9d0efadf2aa17290daf5195391a1c81ddd9dfc913a8e44d5be2b12be85b2a5565ea31631c99c7053564f2fb2225c80ea0bb0e4a4
Size (ipxe-git-9a93db3f0947484e30e753bbd61a10b17336e20e.tar.gz) = 2867999 bytes
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-.._.._ipxe_src_core_settings.c) = 9e053e5e9936f49c46af0d59382a67d5f28cb39d
SHA1 (patch-.._.._ipxe_src_interface_efi_efi_snp.c) = 7cd8a2d2dbeff55624b5d3461d22cd8331221762
SHA1 (patch-.._.._ipxe_src_net_fcels.c) = 7c13c87af5e38233f8b867503789f536394e7005
SHA1 (patch-.._.._ipxe_src_net_tls.c) = c36b812c4c9a3aa7309219dfad2f7a24ba818e59
SHA1 (patch-.._Config.mk) = 36a8942a9fc0f7d601c9b5f7fd1332db99f9ac4b
SHA1 (patch-.._docs_man_xl.cfg.pod.5) = de23920965328806bb1441ef2ea11635466e9725
SHA1 (patch-.._docs_man_xl.conf.pod.5) = 015da24a45388468d56f1ecfa60f6acf07bdfef8
SHA1 (patch-.._docs_man_xl.pod.1) = b194f2c5608c6f0e80a4abd8655808cf91355cd5
SHA1 (patch-.._docs_man_xlcpupool.cfg.pod.5) = b44813af965e4d9d0d51c18b22d286736a4663b2
SHA1 (patch-.._docs_misc_xl-disk-configuration.txt) = 5b59cfc2569d1a4c10d6c0fcb98ed35278723b79
SHA1 (patch-Makefile) = 87defa487fcc7ba36fada41a7347e2f969f59045
SHA1 (patch-Rules.mk) = ec0af52c494718204f15adac30ddd06713ff572c
SHA1 (patch-configure) = a58d149de07613fb03444234278778a6a24b9b26
SHA1 (patch-console_daemon_utils.c) = 915078ce6155a367e3e597fa7ab551f6afac083f
SHA1 (patch-examples_Makefile) = 5fe7bb876d254cf0c4f774ed0f08dcaea5b355ff
SHA1 (patch-firmware_etherboot_Makefile) = f55e14948b7191e533a82b8fc3575f1052f23c45
SHA1 (patch-firmware_etherboot_patches_series) = 2fa1342c78094c6dd5d60a07c236c4a1c0599fc4
SHA1 (patch-firmware_hvmloader_Makefile) = a4ec32bd9945ebf3fd33beb5e04cae21ab91fa20
SHA1 (patch-hotplug_NetBSD_Makefile) = ddb8890552fd423b4baadac6837671aac8452a37
SHA1 (patch-hotplug_NetBSD_block) = 821a171fe29f2a396058f72ce9acc0f0ad565dd0
SHA1 (patch-hotplug_NetBSD_vif-bridge) = ac4cc7446715330b504b8cce8cbd47c8035cf33c
SHA1 (patch-hotplug_NetBSD_vif-ip) = ed23b0c16d87bd05230399d921e28860c5857b01
SHA1 (patch-hotplug_common_Makefile) = 1c8af96a3d0d1d5e9c168b1eb75fabb3e2164a19
SHA1 (patch-include_xen-sys_NetBSD_gntdev.h) = b1f60f46e606b7591d68d98655d1cb29df977c14
SHA1 (patch-libfsimage_ufs_ufs.h) = ce1461ab83499edb4e127e3b7af9dfc1e9c0267f
SHA1 (patch-libxc_xc__netbsd.c) = 4d1fef1076077b3f1ec6ed3db968063d50d62d03
SHA1 (patch-libxl_Makefile) = ae3beed81b51e60780123bc275f77b2b8c6ef660
SHA1 (patch-libxl_libxl__create.c) = d4c94e9a389e9a7601513460f31c82e4f4bf28c9
SHA1 (patch-libxl_libxl__netbsd.c) = afab3cabdc47690dcee7f8b00e2e84b9119ebcec
SHA1 (patch-libxl_libxl__save__helper.c) = 70e5237e28bea1aa87486e080fc25aa81300a6d8
SHA1 (patch-libxl_libxl_uuid.c) = d14286be8ccdbcb5fae544a1968e7b681b63e884
SHA1 (patch-libxl_xl__cmdtable.c) = d149603cac13c996d7800cee94a9df3aaadf9625
SHA1 (patch-ocaml_common.make) = 4d4bddca7b5d93489a3f6620af51d95bbe265abb
SHA1 (patch-ocaml_xenstored_Makefile) = 237e26d3ec25d706e16b415f90e0fcc4913e02e5
SHA1 (patch-ocaml_xenstored_define.ml) = 18d6878ae536554e8831f3732d2a8ea1b13a9b63
SHA1 (patch-ocaml_xenstored_utils.ml) = 04997cb9189a3331522c344aa1957e61febfd4d2
SHA1 (patch-pygrub_Makefile) = cea52a5af0e46626355ebe622e61fbe8e07021d7
SHA1 (patch-qemu-xen-traditional_Makefile) = aac50189b3e359314c5d47745d50113f190bbbe0
SHA1 (patch-qemu-xen-traditional_block-raw-posix.c) = fb03fe527515424d72758b606ab8d2e5bf8c341b
SHA1 (patch-qemu-xen-traditional_configure) = a29520d12c229feed85b335e9241dc085427a3db
SHA1 (patch-qemu-xen-traditional_hw_e1000.c) = d94874baa64a0974d29c8c3a117cf0fae030952d
SHA1 (patch-qemu-xen-traditional_hw_ide.c) = 4dc86cfec2d86766293af18b558b6bd5a336e697
SHA1 (patch-qemu-xen-traditional_hw_pass-through.c) = b87481f764e16fb1345c44b4f46fa3837901a4e2
SHA1 (patch-qemu-xen-traditional_hw_pass-through.h) = 0bf5cbc1d6f5506c1878296fce98ca3e42fc6560
SHA1 (patch-qemu-xen-traditional_hw_piix4acpi.c) = 432cbbd922a2453d3aab37e49cced767a3f1ad34
SHA1 (patch-qemu-xen-traditional_hw_pt-graphics.c) = 7c887bfea57f601dba439a2ee20061a772a0aca5
SHA1 (patch-qemu-xen-traditional_hw_pt-msi.c) = bc22e828a0cb9c93448b6f14284318963b7088e6
SHA1 (patch-qemu-xen-traditional_hw_pt-msi.h) = e2028d255bdfaee9e7eb4ca3be2edb061196809c
SHA1 (patch-qemu-xen-traditional_i386-dm_hookstarget.mak) = 50c6bc068406effe94b638ffced7d8edf5729717
SHA1 (patch-qemu-xen-traditional_xen-hooks.mak) = ccc055fdb56ee796e1464f709aa576ab8cd9c6f1
SHA1 (patch-qemu-xen_audio_audio.c) = 8452d63fe90e38a64111d0cf425bacd565fe6d82
SHA1 (patch-qemu-xen_qemu-doc.texi) = 721e80d15ac30ac71df3d6c4c485b0bf70897cf9
SHA1 (patch-qemu-xen_xen-hvm.c) = fc245a283a389bc0aa7db08029391aa68f77c149
SHA1 (patch-xenpaging_xenpaging.c) = 0805d6ea5241ac6c89a357d22e8fc3a36f9d4285
SHA1 (patch-xenstore_xc.c) = 51b39e9929062e72d0ff85f0ee6d13a6ac04ac65
SHA1 (patch-xentrace_xentrace.c) = 0a33c81a4db1c0124b3ccf6cec0671e115b2bb96
+38
View File
@@ -0,0 +1,38 @@
#include <inttypes.h>
#include <sys/ioctl.h>
#include <sys/disklabel.h>
#include "tapdisk.h"
#include "blk.h"
int blk_getimagesize(int fd, uint64_t *size)
{
int rc;
struct disklabel dl;
*size = 0;
rc = ioctl(fd, DIOCGDINFO, &dl);
if (rc) {
DPRINTF("ERR: DIOCGDINFO failed, couldn't stat image");
return -EINVAL;
}
*size = dl.d_secsize * dl.d_secpercyl;
return 0;
}
int blk_getsectorsize(int fd, uint64_t *sector_size)
{
int rc;
struct disklabel dl;
*sector_size = DEV_BSIZE;
rc = ioctl(fd, DIOCGDINFO, &dl);
if (rc) {
DPRINTF("ERR: DIOCGDINFO failed, couldn't stat image");
return 0; /* fallback to DEV_BSIZE */
}
*sector_size = dl.d_secsize;
return 0;
}
@@ -0,0 +1,16 @@
#include "blktaplib.h"
#include "blktapctrl.h"
int blktap_interface_open(void)
{
/* not yet implemented */
return -1;
}
int blktap_interface_create(int ctlfd, int *major, int *minor, blkif_t *blkif)
{
/* not yet implemented */
return -1;
}
+72
View File
@@ -0,0 +1,72 @@
#!/bin/sh
#
# Copyright (c) 2016, Christoph Badura. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS
# OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT,
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
#
LOCK_BASEDIR="$XEN_LOCK_DIR/xen-hotplug"
_lockfd=9
_have_lock=0 # lock not taken yet.
SHLOCK="shlock ${_shlock_debug-}"
_lock_set_vars() {
_lockfile="$LOCK_BASEDIR/$1.lock"
_lockfifo="$LOCK_BASEDIR/$1.fifo"
}
_lock_init() {
mkdir -p "$LOCK_BASEDIR" 2>/dev/null || true
mkfifo $_lockfifo 2>/dev/null || true
}
#
# use a named pipe as condition variable
# opening for read-only blocks when there's no writer.
# opening for read-write never blocks but unblocks any waiting readers.
#
_lock_wait_cv() {
eval "exec $_lockfd< $_lockfifo ; exec $_lockfd<&-"
}
_lock_signal_cv() {
eval "exec $_lockfd<> $_lockfifo ; exec $_lockfd<&-"
}
claim_lock() {
_lock_set_vars $1
_lock_init
until $SHLOCK -f $_lockfile -p $$; do
_lock_wait_cv
done
_have_lock=1
# be sure to release the lock when the shell exits
trap "release_lock $1" 0 1 2 15
}
release_lock() {
_lock_set_vars $1
[ "$_have_lock" != 0 -a -f $_lockfile ] && rm $_lockfile
_have_lock=0
_lock_signal_cv;
}
+17
View File
@@ -0,0 +1,17 @@
#!@RCD_SCRIPTS_SHELL@
#
# PROVIDE: xen-watchdog
# REQUIRE: DAEMON
#
# description: Run domain watchdog daemon
#
. /etc/rc.subr
name="xenwatchdog"
rcvar=$name
command="@PREFIX@/sbin/xenwatchdogd"
start_cmd="echo Starting ${name}. && PATH=${PATH}:@PREFIX@/sbin ${command} 30 15"
load_rc_config $name
run_rc_command "$1"
+107
View File
@@ -0,0 +1,107 @@
#!@RCD_SCRIPTS_SHELL@
#
# PROVIDE: xencommons
# REQUIRE: DAEMON
. /etc/rc.subr
name="xencommons"
rcvar=$name
start_precmd="xen_precmd"
start_cmd="xen_startcmd"
stop_cmd="xen_stop"
status_cmd="xen_status"
extra_commands="status"
required_files="/kern/xen/privcmd"
XENSTORED_PIDFILE="/var/run/xenstored.pid"
XENCONSOLED_PIDFILE="/var/run/xenconsoled.pid"
BINDIR=@PREFIX@/bin
SBINDIR=@PREFIX@/sbin
LIBEXEC_BIN=@PREFIX@/libexec/xen/bin
xen_precmd()
{
mkdir -p /var/run/xen || exit 1
mkdir -p /var/run/xenstored || exit 1
}
xen_startcmd()
{
printf "Starting xenservices: xenstored, xenconsoled.\n"
if test ! -r ${required_files}; then
warn "${required_files} is not readable."
fi
XENSTORED_ARGS=" --pid-file ${XENSTORED_PIDFILE}"
if [ -n "${XENSTORED_TRACE}" ]; then
XENSTORED_ARGS="${XENSTORED_ARGS} -T /var/log/xen/xenstored-trace.log"
fi
${SBINDIR}/xenstored ${XENSTORED_ARGS}
sleep 5
printf "Setting domain 0 name, domid and JSON config...\n"
${LIBEXEC_BIN}/xen-init-dom0
XENCONSOLED_ARGS=""
if [ -n "${XENCONSOLED_TRACE}" ]; then
XENCONSOLED_ARGS="${XENCONSOLED_ARGS} --log=${XENCONSOLED_TRACE}"
fi
${SBINDIR}/xenconsoled ${XENCONSOLED_ARGS}
}
xen_stop()
{
pids=""
printf "Stopping xencommons"
rc_pid=$(check_pidfile ${XENCONSOLED_PIDFILE} ${SBINDIR}/xenconsoled)
pids="$pids $rc_pid"
rc_pid=$(check_pidfile ${XENSTORED_PIDFILE} ${SBINDIR}/xenstored)
pids="$pids $rc_pid"
kill -${sig_stop:-TERM} $pids
wait_for_pids $pids
printf ".\n"
}
xen_status()
{
xenstored_pid=$(check_pidfile ${XENSTORED_PIDFILE} ${SBINDIR}/xenstored)
if test -n ${xenstored_pid}; then
pids="$pids $xenstored_pid"
fi
xenconsoled_pid=$(check_pidfile ${XENCONSOLED_PIDFILE} ${SBINDIR}/xenconsoled)
if test -n ${xenconsoled_pid}; then
pids="$pids $xenconsoled_pid"
fi
if test -n "$xenconsoled_pid" -a -n "$xenstored_pid";
then
echo "xencommons are running as pids $pids."
return 0
fi
if test -a -z "$xenconsoled_pid" -a -z "$xenstored_pid";
then
echo "xencommons are not running."
return 0
fi
if test -n "$xenstored_pid"; then
echo "xenstored is running as pid $xenstored_pid."
else
echo "xenstored is not running."
fi
if test -n "$xenconsoled_pid"; then
echo "xenconsoled is running as pid $xenconsoled_pid."
else
echo "xenconsoled is not running."
fi
}
load_rc_config $name
run_rc_command "$1"
+129
View File
@@ -0,0 +1,129 @@
#!@RCD_SCRIPTS_SHELL@
#
# PROVIDE: xendomains
# REQUIRE: xencommons
# KEYWORD: shutdown
#
# xendomains This required variable is a whitespace-separated
# list of domains, e.g., xendomains="dom1 dom2 dom3".
#
# xendomains_config This optional variable is a format string that
# represents the path to the configuration file for
# each domain. "%s" is substituted with the name of
# the domain. The default is "@PKG_SYSCONFDIR@/%s".
#
# xendomains_prehook This optional variable is a format string that
# represents the command to run, if it exists, before
# starting each domain. "%s" is substituted with the
# name of the domain. The default is
# "@PKG_SYSCONFDIR@/%s-pre".
#
# xendomains_posthook This optional variable is a format string that
# represents the command to run, if it exists, after
# stopping each domain. "%s" is substituted with the
# name of the domain. The default is
# "@PKG_SYSCONFDIR@/%s-post".
#
. /etc/rc.subr
name="xendomains"
ctl_command="@PREFIX@/sbin/xl"
start_cmd="xendomains_start"
stop_cmd="xendomains_stop"
list_cmd="xendomains_list"
extra_commands="list"
required_files="/kern/xen/privcmd"
xendomains_start()
{
[ -n "$xendomains" ] || return
echo "Starting xen domains."
for domain in $xendomains; do
case "$domain" in
"") continue ;;
esac
# Start off by running the pre-hook script if it's present.
if [ -n "${xendomains_prehook}" ]; then
cmdline=`printf "${xendomains_prehook}" $domain`
cmd="${cmdline%% *}"
if [ -x "$cmd" ]; then
if ! $cmdline; then
echo "Pre-hook \`\`$cmdline'' failed... skipping $domain."
continue
fi
fi
fi
# Ask xend to create the domain.
if [ -n "${xendomains_config}" ]; then
file=`printf "${xendomains_config}" $domain`
if [ -f "$file" ]; then
${ctl_command} create "$file"
fi
fi
done
}
xendomains_list() {
# Output a whitespace-separated list of live guest domains.
${ctl_command} list | awk '
(FNR <= 2) { next }
($5 !~ /s/) { s = s " " $1 }
END { sub(" *", "", s); print s }'
}
xendomains_stop()
{
# Determine an appropriate timeout waiting for all domains to
# stop -- always wait at least 60s, and add 5s per active domain.
#
numdomains=$(xendomains_list | awk '{ print NF }')
[ $numdomains -gt 0 ] || return
timeout=$((60 + numdomains * 5))
# Ask xend to stop every domain, and poll xend every 10s up to the
# timeout period to check if all the domains are stopped. We
# consider a domain in the "s" (shutdown) state to be stopped.
#
echo "Stopping xen domains."
for domain in $(xendomains_list); do
${ctl_command} shutdown -F $domain
done
while [ $timeout -gt 0 ]; do
livedomains=$(xendomains_list)
[ -n "$livedomains" ] || break
timeout=$((timeout - 10))
sleep 10
done
livedomains=$(xendomains_list)
if [ -n "$livedomains" ]; then
echo "Failed to stop: $livedomains"
else
echo "All domains stopped."
fi
# Finish off by running the post-hook script if it's present.
for domain in $xendomains; do
case "$domain" in
"") continue ;;
esac
if [ -n "${xendomains_posthook}" ]; then
cmdline=`printf "${xendomains_posthook}" $domain`
cmd="${cmdline%% *}"
if [ -x "$cmd" ]; then
$cmdline || echo "Post-hook \`\`$cmdline'' failed."
fi
fi
done
}
load_rc_config $name
: ${xendomains_config="@PKG_SYSCONFDIR@/%s"}
: ${xendomains_prehook="@PKG_SYSCONFDIR@/%s-pre"}
: ${xendomains_posthook="@PKG_SYSCONFDIR@/%s-post"}
run_rc_command "$1"
@@ -0,0 +1,34 @@
$NetBSD: patch-.._.._ipxe_src_core_settings.c,v 1.1.1.1 2016/07/04 07:30:49 jnemeth Exp $
--- ../../ipxe/src/core/settings.c.orig 2013-03-25 18:48:57.000000000 +0000
+++ ../../ipxe/src/core/settings.c
@@ -284,10 +284,12 @@ static struct settings * find_child_sett
*/
static struct settings * autovivify_child_settings ( struct settings *parent,
const char *name ) {
+ size_t nlen = strlen(name) + 1;
struct {
struct autovivified_settings autovivified;
- char name[ strlen ( name ) + 1 /* NUL */ ];
+ char name[];
} *new_child;
+ size_t tlen = sizeof(*new_child) + nlen;
struct settings *settings;
/* Return existing settings, if existent */
@@ -295,13 +297,13 @@ static struct settings * autovivify_chil
return settings;
/* Create new generic settings block */
- new_child = zalloc ( sizeof ( *new_child ) );
+ new_child = zalloc ( tlen );
if ( ! new_child ) {
DBGC ( parent, "Settings %p could not create child %s\n",
parent, name );
return NULL;
}
- memcpy ( new_child->name, name, sizeof ( new_child->name ) );
+ memcpy ( new_child->name, name, nlen );
ref_init ( &new_child->autovivified.refcnt,
autovivified_settings_free );
generic_settings_init ( &new_child->autovivified.generic,
@@ -0,0 +1,42 @@
$NetBSD: patch-.._.._ipxe_src_interface_efi_efi_snp.c,v 1.1.1.1 2016/07/04 07:30:49 jnemeth Exp $
--- ../../ipxe/src/interface/efi/efi_snp.c.orig 2015-01-25 20:37:13.000000000 +0000
+++ ../../ipxe/src/interface/efi/efi_snp.c
@@ -984,15 +984,16 @@ efi_snp_package_list ( struct efi_snp_de
struct efi_snp_formset formset;
union {
EFI_HII_STRING_PACKAGE_HDR strings;
- uint8_t pad[strings_len];
} __attribute__ (( packed )) strings;
- EFI_HII_PACKAGE_HEADER end;
} __attribute__ (( packed )) *package_list;
+ EFI_HII_PACKAGE_HEADER *end;
+ size_t plen = sizeof(*package_list) + strings_len + sizeof(*end);
/* Allocate package list */
- package_list = zalloc ( sizeof ( *package_list ) );
+ package_list = zalloc ( plen );
if ( ! package_list )
return NULL;
+ end = (char *)package_list + plen - sizeof(*end);
/* Create a unique GUID for this package list and formset */
efi_snp_formset.FormSet.FormSet.Guid.Data1++;
@@ -1001,13 +1002,13 @@ efi_snp_package_list ( struct efi_snp_de
memcpy ( &package_list->header.PackageListGuid,
&efi_snp_formset.FormSet.FormSet.Guid,
sizeof ( package_list->header.PackageListGuid ) );
- package_list->header.PackageLength = sizeof ( *package_list );
+ package_list->header.PackageLength = plen;
memcpy ( &package_list->formset, &efi_snp_formset,
sizeof ( package_list->formset ) );
efi_snp_strings ( &package_list->strings.strings,
- sizeof ( package_list->strings ), snpdev );
- package_list->end.Length = sizeof ( package_list->end );
- package_list->end.Type = EFI_HII_PACKAGE_END;
+ strings_len, snpdev );
+ end->Length = sizeof ( *end );
+ end->Type = EFI_HII_PACKAGE_END;
return &package_list->header;
}
@@ -0,0 +1,124 @@
$NetBSD: patch-.._.._ipxe_src_net_fcels.c,v 1.1.1.1 2016/07/04 07:30:50 jnemeth Exp $
--- ../../ipxe/src/net/fcels.c.orig 2015-01-25 20:27:57.000000000 +0000
+++ ../../ipxe/src/net/fcels.c
@@ -946,8 +946,11 @@ int fc_els_prli_tx ( struct fc_els *els,
struct fc_els_prli_descriptor *descriptor, void *param ) {
struct {
struct fc_prli_frame frame;
- uint8_t param[descriptor->param_len];
- } __attribute__ (( packed )) prli;
+ uint8_t param[];
+ } __attribute__ (( packed )) *prli;
+ size_t plen = sizeof(*prli) + descriptor->param_len;
+ uint8_t prli_buf[plen];
+ prli = (void *)prli_buf;
struct fc_ulp *ulp;
int rc;
@@ -960,22 +963,22 @@ int fc_els_prli_tx ( struct fc_els *els,
}
/* Build frame for transmission */
- memset ( &prli, 0, sizeof ( prli ) );
- prli.frame.command = fc_els_tx_command ( els, FC_ELS_PRLI );
- prli.frame.page_len =
- ( sizeof ( prli.frame.page ) + sizeof ( prli.param ) );
- prli.frame.len = htons ( sizeof ( prli ) );
- prli.frame.page.type = descriptor->type;
+ memset ( prli, 0, plen );
+ prli->frame.command = fc_els_tx_command ( els, FC_ELS_PRLI );
+ prli->frame.page_len =
+ ( sizeof ( prli->frame.page ) + descriptor->param_len );
+ prli->frame.len = htons ( plen );
+ prli->frame.page.type = descriptor->type;
if ( fc_els_is_request ( els ) ) {
- prli.frame.page.flags |= htons ( FC_PRLI_ESTABLISH );
+ prli->frame.page.flags |= htons ( FC_PRLI_ESTABLISH );
} else if ( fc_link_ok ( &ulp->link ) ) {
- prli.frame.page.flags |= htons ( FC_PRLI_ESTABLISH |
+ prli->frame.page.flags |= htons ( FC_PRLI_ESTABLISH |
FC_PRLI_RESPONSE_SUCCESS );
}
- memcpy ( &prli.param, param, sizeof ( prli.param ) );
+ memcpy ( &prli->param, param, descriptor->param_len );
/* Transmit frame */
- if ( ( rc = fc_els_tx ( els, &prli, sizeof ( prli ) ) ) != 0 )
+ if ( ( rc = fc_els_tx ( els, prli, plen ) ) != 0 )
goto err_tx;
/* Drop temporary reference to ULP */
@@ -1003,13 +1006,14 @@ int fc_els_prli_rx ( struct fc_els *els,
void *data, size_t len ) {
struct {
struct fc_prli_frame frame;
- uint8_t param[descriptor->param_len];
+ uint8_t param[];
} __attribute__ (( packed )) *prli = data;
+ size_t plen = sizeof(*prli) + descriptor->param_len;
struct fc_ulp *ulp;
int rc;
/* Sanity check */
- if ( len < sizeof ( *prli ) ) {
+ if ( len < plen ) {
DBGC ( els, FCELS_FMT " received underlength frame:\n",
FCELS_ARGS ( els ) );
DBGC_HDA ( els, 0, data, len );
@@ -1018,7 +1022,7 @@ int fc_els_prli_rx ( struct fc_els *els,
}
DBGC ( els, FCELS_FMT " has parameters:\n", FCELS_ARGS ( els ) );
- DBGC_HDA ( els, 0, prli->param, sizeof ( prli->param ) );
+ DBGC_HDA ( els, 0, prli->param, descriptor->param_len );
/* Get ULP */
ulp = fc_ulp_get_port_id_type ( els->port, &els->peer_port_id,
@@ -1039,7 +1043,7 @@ int fc_els_prli_rx ( struct fc_els *els,
/* Log in ULP, if applicable */
if ( prli->frame.page.flags & htons ( FC_PRLI_ESTABLISH ) ) {
if ( ( rc = fc_ulp_login ( ulp, prli->param,
- sizeof ( prli->param ),
+ descriptor->param_len,
fc_els_is_request ( els ) ) ) != 0 ){
DBGC ( els, FCELS_FMT " could not log in ULP: %s\n",
FCELS_ARGS ( els ), strerror ( rc ) );
@@ -1089,15 +1093,16 @@ int fc_els_prli_detect ( struct fc_els *
const void *data, size_t len ) {
const struct {
struct fc_prli_frame frame;
- uint8_t param[descriptor->param_len];
+ uint8_t param[];
} __attribute__ (( packed )) *prli = data;
+ size_t plen = sizeof(*prli) + descriptor->param_len;
/* Check for PRLI */
if ( prli->frame.command != FC_ELS_PRLI )
return -EINVAL;
/* Check for sufficient length to contain service parameter page */
- if ( len < sizeof ( *prli ) )
+ if ( len < plen )
return -EINVAL;
/* Check for upper-layer protocol type */
@@ -1252,15 +1257,16 @@ static int fc_els_echo_rx_request ( stru
size_t len ) {
struct {
struct fc_echo_frame_header echo;
- char payload[ len - sizeof ( struct fc_echo_frame_header ) ];
+ char payload[];
} *echo = data;
+ size_t plen = suzeif(*echo) + len - sizeof ( struct fc_echo_frame_header );
int rc;
DBGC ( els, FCELS_FMT "\n", FCELS_ARGS ( els ) );
/* Transmit response */
echo->echo.command = FC_ELS_LS_ACC;
- if ( ( rc = fc_els_tx ( els, echo, sizeof ( *echo ) ) ) != 0 )
+ if ( ( rc = fc_els_tx ( els, echo, plen ) ) != 0 )
return rc;
/* Nothing to do */
@@ -0,0 +1,70 @@
$NetBSD: patch-.._.._ipxe_src_net_tls.c,v 1.1.1.1 2016/07/04 07:30:50 jnemeth Exp $
--- ../../ipxe/src/net/tls.c.orig 2010-02-02 17:12:44.000000000 +0100
+++ ../../ipxe/src/net/tls.c 2013-05-26 20:05:24.000000000 +0200
@@ -704,18 +704,23 @@ static int tls_send_client_key_exchange
RSA_CTX *rsa_ctx;
RSA_pub_key_new ( &rsa_ctx, tls->rsa.modulus, tls->rsa.modulus_len,
tls->rsa.exponent, tls->rsa.exponent_len );
+ size_t elen = rsa_ctx->num_octets;
struct {
uint32_t type_length;
uint16_t encrypted_pre_master_secret_len;
- uint8_t encrypted_pre_master_secret[rsa_ctx->num_octets];
- } __attribute__ (( packed )) key_xchg;
-
- memset ( &key_xchg, 0, sizeof ( key_xchg ) );
- key_xchg.type_length = ( cpu_to_le32 ( TLS_CLIENT_KEY_EXCHANGE ) |
- htonl ( sizeof ( key_xchg ) -
- sizeof ( key_xchg.type_length ) ) );
- key_xchg.encrypted_pre_master_secret_len
- = htons ( sizeof ( key_xchg.encrypted_pre_master_secret ) );
+ uint8_t encrypted_pre_master_secret[];
+ } __attribute__ (( packed )) *key_xchg;
+ size_t klen = sizeof(*key_xchg) + elen;
+ char key_xchg_buf[klen];
+
+ key_xchg = (void *)key_xchg;
+
+ memset ( key_xchg, 0, klen );
+ key_xchg->type_length = ( cpu_to_le32 ( TLS_CLIENT_KEY_EXCHANGE ) |
+ htonl ( klen -
+ sizeof ( key_xchg->type_length ) ) );
+ key_xchg->encrypted_pre_master_secret_len
+ = htons ( elen );
/* FIXME: Hack alert */
DBGC ( tls, "RSA encrypting plaintext, modulus, exponent:\n" );
@@ -725,14 +730,13 @@ static int tls_send_client_key_exchange
DBGC_HD ( tls, tls->rsa.exponent, tls->rsa.exponent_len );
RSA_encrypt ( rsa_ctx, ( const uint8_t * ) &tls->pre_master_secret,
sizeof ( tls->pre_master_secret ),
- key_xchg.encrypted_pre_master_secret, 0 );
+ key_xchg->encrypted_pre_master_secret, 0 );
DBGC ( tls, "RSA encrypt done. Ciphertext:\n" );
- DBGC_HD ( tls, &key_xchg.encrypted_pre_master_secret,
- sizeof ( key_xchg.encrypted_pre_master_secret ) );
+ DBGC_HD ( tls, &key_xchg->encrypted_pre_master_secret, elen );
RSA_free ( rsa_ctx );
- return tls_send_handshake ( tls, &key_xchg, sizeof ( key_xchg ) );
+ return tls_send_handshake ( tls, key_xchg, klen );
}
/**
@@ -856,12 +860,12 @@ static int tls_new_server_hello ( struct
uint8_t session_id_len;
char next[0];
} __attribute__ (( packed )) *hello_a = data;
+ size_t slen = hello_a->session_id_len;
struct {
- uint8_t session_id[hello_a->session_id_len];
uint16_t cipher_suite;
uint8_t compression_method;
char next[0];
- } __attribute__ (( packed )) *hello_b = ( void * ) &hello_a->next;
+ } __attribute__ (( packed )) *hello_b = ( void * ) ((uint8_t *)&hello_a->next + slen);
void *end = hello_b->next;
int rc;
@@ -0,0 +1,22 @@
$NetBSD: patch-.._Config.mk,v 1.1.1.1 2016/07/04 07:30:50 jnemeth Exp $
--- ../Config.mk.orig 2015-01-12 17:53:24.000000000 +0100
+++ ../Config.mk 2015-01-19 13:16:16.000000000 +0100
@@ -38,7 +38,7 @@
# Tools to run on system hosting the build
HOSTCC = gcc
HOSTCFLAGS = -Wall -Werror -Wstrict-prototypes -O2 -fomit-frame-pointer
-HOSTCFLAGS += -fno-strict-aliasing
+HOSTCFLAGS += -fno-strict-aliasing ${EXTRA_HOSTCFLAGS}
DISTDIR ?= $(XEN_ROOT)/dist
DESTDIR ?= /
@@ -194,6 +194,8 @@
# and is a bit too fierce about unused return values
CFLAGS-$(clang) += -Wno-parentheses -Wno-format -Wno-unused-value
+CFLAGS += ${EXTRA_CFLAGS}
+
$(call cc-option-add,HOSTCFLAGS,HOSTCC,-Wdeclaration-after-statement)
$(call cc-option-add,CFLAGS,CC,-Wdeclaration-after-statement)
$(call cc-option-add,CFLAGS,CC,-Wno-unused-but-set-variable)
@@ -0,0 +1,29 @@
$NetBSD: patch-.._docs_man_xl.cfg.pod.5,v 1.1.1.1 2016/07/04 07:30:50 jnemeth Exp $
--- ../docs/man/xl.cfg.pod.5.orig 2016-02-09 14:44:19.000000000 +0000
+++ ../docs/man/xl.cfg.pod.5
@@ -4,13 +4,13 @@ xl.cfg - XL Domain Configuration File Sy
=head1 SYNOPSIS
- /etc/xen/xldomain
+ @XENDCONFDIR@/xldomain
=head1 DESCRIPTION
To create a VM (a domain in Xen terminology, sometimes called a guest)
with xl requires the provision of a domain config file. Typically
-these live in `/etc/xen/DOMAIN.cfg` where DOMAIN is the name of the
+these live in `@XENDCONFDIR@/DOMAIN.cfg` where DOMAIN is the name of the
domain.
=head1 SYNTAX
@@ -1854,7 +1854,7 @@ natively or via hardware backwards compa
=head1 FILES
-F</etc/xen/NAME.cfg>
+F<@XENDCONFDIR@/NAME.cfg>
F</var/lib/xen/dump/NAME>
=head1 BUGS
@@ -0,0 +1,30 @@
$NetBSD: patch-.._docs_man_xl.conf.pod.5,v 1.1.1.1 2016/07/04 07:30:50 jnemeth Exp $
--- ../docs/man/xl.conf.pod.5.orig 2015-01-12 17:53:24.000000000 +0100
+++ ../docs/man/xl.conf.pod.5 2015-01-19 13:18:33.000000000 +0100
@@ -1,6 +1,6 @@
=head1 NAME
-/etc/xen/xl.conf - XL Global/Host Configuration
+@XENDCONFDIR@/xl.conf - XL Global/Host Configuration
=head1 DESCRIPTION
@@ -83,7 +83,7 @@
The old B<vifscript> option is deprecated and should not be used.
-Default: C</etc/xen/scripts/vif-bridge>
+Default: C<@XENDCONFDIR@/scripts/vif-bridge>
=item B<vif.default.bridge="NAME">
@@ -109,7 +109,7 @@
Configures the default script used by Remus to setup network buffering.
-Default: C</etc/xen/scripts/remus-netbuf-setup>
+Default: C<@XENDCONFDIR@/scripts/remus-netbuf-setup>
=item B<output_format="json|sxp">
@@ -0,0 +1,44 @@
$NetBSD: patch-.._docs_man_xl.pod.1,v 1.1.1.1 2016/07/04 07:30:50 jnemeth Exp $
--- ../docs/man/xl.pod.1.orig 2015-01-12 17:53:24.000000000 +0100
+++ ../docs/man/xl.pod.1 2015-01-19 13:19:15.000000000 +0100
@@ -33,10 +33,10 @@
=over 4
-=item start the script B</etc/init.d/xencommons> at boot time
+=item start the script B</etc/rc.d/xencommons> at boot time
Most B<xl> operations rely upon B<xenstored> and B<xenconsoled>: make
-sure you start the script B</etc/init.d/xencommons> at boot time to
+sure you start the script B</etc/rc.d/xencommons> at boot time to
initialize all the daemons needed by B<xl>.
=item setup a B<xenbr0> bridge in dom0
@@ -50,7 +50,7 @@
If you specify the amount of memory dom0 has, passing B<dom0_mem> to
Xen, it is highly recommended to disable B<autoballoon>. Edit
-B</etc/xen/xl.conf> and set it to 0.
+B<@XENDCONFDIR@/xl.conf> and set it to 0.
=item run xl as B<root>
@@ -168,7 +168,7 @@
xl create DebianLenny
-This creates a domain with the file /etc/xen/DebianLenny, and returns as
+This creates a domain with the file @XENDCONFDIR@/DebianLenny, and returns as
soon as it is run.
=item I<with extra parameters>
@@ -463,7 +463,7 @@
=item B<-N> I<netbufscript>
Use <netbufscript> to setup network buffering instead of the
-default script (/etc/xen/scripts/remus-netbuf-setup).
+default script (@XENDCONFDIR@/scripts/remus-netbuf-setup).
=item B<-F>
@@ -0,0 +1,28 @@
$NetBSD: patch-.._docs_man_xlcpupool.cfg.pod.5,v 1.1.1.1 2016/07/04 07:30:50 jnemeth Exp $
--- ../docs/man/xlcpupool.cfg.pod.5.orig 2015-01-12 17:53:24.000000000 +0100
+++ ../docs/man/xlcpupool.cfg.pod.5 2015-01-19 13:16:17.000000000 +0100
@@ -4,12 +4,12 @@
=head1 SYNOPSIS
- /etc/xen/xlcpupool
+ @XENDCONFDIR@/xlcpupool
=head1 DESCRIPTION
To create a Cpupool with xl requires the provision of a cpupool config
-file. Typically these live in `/etc/xen/CPUPOOL.cfg` where CPUPOOL is
+file. Typically these live in `@XENDCONFDIR@/CPUPOOL.cfg` where CPUPOOL is
the name of the cpupool.
=head1 SYNTAX
@@ -101,7 +101,7 @@
=head1 FILES
-F</etc/xen/CPUPOOL.cfg>
+F<@XENDCONFDIR@/CPUPOOL.cfg>
=head1 BUGS
@@ -0,0 +1,13 @@
$NetBSD: patch-.._docs_misc_xl-disk-configuration.txt,v 1.1.1.1 2016/07/04 07:30:51 jnemeth Exp $
--- ../docs/misc/xl-disk-configuration.txt.orig 2015-11-03 10:11:18.000000000 +0100
+++ ../docs/misc/xl-disk-configuration.txt 2016-03-29 22:48:24.000000000 +0200
@@ -173,7 +173,7 @@
Specifies that <target> is not a normal host path, but rather
information to be interpreted by the executable program <script>,
-(looked for in /etc/xen/scripts, if it doesn't contain a slash).
+(looked for in @XENDCONFDIR@/scripts, if it doesn't contain a slash).
These scripts are normally called "block-<script>".
@@ -0,0 +1,22 @@
$NetBSD: patch-Makefile,v 1.1.1.1 2016/07/04 07:30:50 jnemeth Exp $
--- Makefile.orig 2016-02-09 14:44:19.000000000 +0000
+++ Makefile
@@ -17,7 +17,7 @@ SUBDIRS-y += xenmon
SUBDIRS-y += xenstat
SUBDIRS-$(CONFIG_Linux) += memshr
SUBDIRS-$(CONFIG_BLKTAP2) += blktap2
-SUBDIRS-$(CONFIG_NetBSD) += xenbackendd
+#XXX SUBDIRS-$(CONFIG_NetBSD) += xenbackendd
SUBDIRS-y += libfsimage
SUBDIRS-$(CONFIG_Linux) += libvchan
@@ -32,7 +32,7 @@ SUBDIRS-y += libxl
SUBDIRS-$(CONFIG_X86) += xenpaging
SUBDIRS-$(CONFIG_X86) += debugger/gdbsx
SUBDIRS-$(CONFIG_X86) += debugger/kdd
-SUBDIRS-$(CONFIG_TESTS) += tests
+#XXX SUBDIRS-$(CONFIG_TESTS) += tests
# These don't cross-compile
ifeq ($(XEN_COMPILE_ARCH),$(XEN_TARGET_ARCH))
@@ -0,0 +1,51 @@
$NetBSD: patch-Rules.mk,v 1.1.1.1 2016/07/04 07:30:50 jnemeth Exp $
--- Rules.mk.orig 2016-02-09 14:44:19.000000000 +0000
+++ Rules.mk
@@ -36,23 +36,23 @@ endif
CFLAGS_libxenctrl = -I$(XEN_LIBXC)/include $(CFLAGS_xeninclude)
LDLIBS_libxenctrl = $(XEN_LIBXC)/libxenctrl$(libextension)
-SHLIB_libxenctrl = -Wl,-rpath-link=$(XEN_LIBXC)
+SHLIB_libxenctrl = -Wl,-rpath-link,$(XEN_LIBXC)
CFLAGS_libxenguest = -I$(XEN_LIBXC)/include $(CFLAGS_xeninclude)
LDLIBS_libxenguest = $(XEN_LIBXC)/libxenguest$(libextension)
-SHLIB_libxenguest = -Wl,-rpath-link=L$(XEN_LIBXC)
+SHLIB_libxenguest = -Wl,-rpath-link,L$(XEN_LIBXC)
CFLAGS_libxenstore = -I$(XEN_XENSTORE)/include $(CFLAGS_xeninclude)
LDLIBS_libxenstore = $(XEN_XENSTORE)/libxenstore$(libextension)
-SHLIB_libxenstore = -Wl,-rpath-link=$(XEN_XENSTORE)
+SHLIB_libxenstore = -Wl,-rpath-link,$(XEN_XENSTORE)
CFLAGS_libxenstat = -I$(XEN_LIBXENSTAT)
LDLIBS_libxenstat = $(SHLIB_libxenctrl) $(SHLIB_libxenstore) $(XEN_LIBXENSTAT)/libxenstat$(libextension)
-SHLIB_libxenstat = -Wl,-rpath-link=$(XEN_LIBXENSTAT)
+SHLIB_libxenstat = -Wl,-rpath-link,$(XEN_LIBXENSTAT)
CFLAGS_libxenvchan = -I$(XEN_LIBVCHAN)
LDLIBS_libxenvchan = $(SHLIB_libxenctrl) $(SHLIB_libxenstore) $(XEN_LIBVCHAN)/libxenvchan$(libextension)
-SHLIB_libxenvchan = -Wl,-rpath-link=$(XEN_LIBVCHAN)
+SHLIB_libxenvchan = -Wl,-rpath-link,$(XEN_LIBVCHAN)
ifeq ($(debug),y)
# Disable optimizations and enable debugging information for macros
@@ -66,7 +66,7 @@ LIBXL_BLKTAP ?= $(CONFIG_BLKTAP2)
ifeq ($(LIBXL_BLKTAP),y)
CFLAGS_libblktapctl = -I$(XEN_BLKTAP2)/control -I$(XEN_BLKTAP2)/include $(CFLAGS_xeninclude)
LDLIBS_libblktapctl = $(XEN_BLKTAP2)/control/libblktapctl$(libextension)
-SHLIB_libblktapctl = -Wl,-rpath-link=$(XEN_BLKTAP2)/control
+SHLIB_libblktapctl = -Wl,-rpath-link,$(XEN_BLKTAP2)/control
else
CFLAGS_libblktapctl =
LDLIBS_libblktapctl =
@@ -75,7 +75,7 @@ endif
CFLAGS_libxenlight = -I$(XEN_XENLIGHT) $(CFLAGS_libxenctrl) $(CFLAGS_xeninclude)
LDLIBS_libxenlight = $(XEN_XENLIGHT)/libxenlight$(libextension) $(SHLIB_libxenctrl) $(SHLIB_libxenstore) $(SHLIB_libblktapctl)
-SHLIB_libxenlight = -Wl,-rpath-link=$(XEN_XENLIGHT)
+SHLIB_libxenlight = -Wl,-rpath-link,$(XEN_XENLIGHT)
CFLAGS += -D__XEN_TOOLS__
@@ -0,0 +1,48 @@
$NetBSD: patch-configure,v 1.1.1.1 2016/07/04 07:30:51 jnemeth Exp $
--- configure.orig 2016-02-09 14:44:19.000000000 +0000
+++ configure
@@ -2402,7 +2402,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
-ac_config_files="$ac_config_files ../config/Tools.mk hotplug/FreeBSD/rc.d/xencommons hotplug/FreeBSD/rc.d/xendriverdomain hotplug/Linux/init.d/sysconfig.xencommons hotplug/Linux/init.d/xen-watchdog hotplug/Linux/init.d/xencommons hotplug/Linux/init.d/xendomains hotplug/Linux/init.d/xendriverdomain hotplug/Linux/vif-setup hotplug/Linux/xen-hotplug-common.sh hotplug/Linux/xendomains hotplug/NetBSD/rc.d/xencommons hotplug/NetBSD/rc.d/xendriverdomain libxl/xenlight.pc.in libxl/xlutil.pc.in"
+ac_config_files="$ac_config_files ../config/Tools.mk ../config/Paths.mk hotplug/FreeBSD/rc.d/xencommons hotplug/FreeBSD/rc.d/xendriverdomain hotplug/Linux/init.d/sysconfig.xencommons hotplug/Linux/init.d/xen-watchdog hotplug/Linux/init.d/xencommons hotplug/Linux/init.d/xendomains hotplug/Linux/init.d/xendriverdomain hotplug/Linux/vif-setup hotplug/Linux/xen-hotplug-common.sh hotplug/Linux/xendomains hotplug/NetBSD/rc.d/xencommons hotplug/NetBSD/rc.d/xendriverdomain libxl/xenlight.pc.in libxl/xlutil.pc.in"
ac_config_headers="$ac_config_headers config.h"
@@ -3838,7 +3838,7 @@ libdir=`eval echo $libdir`
if test "x$sysconfdir" = 'x${prefix}/etc' ; then
case "$host_os" in
- *freebsd*)
+ *freebsd*|*netbsd*)
sysconfdir=$prefix/etc
;;
*solaris*)
@@ -3916,7 +3916,7 @@ XEN_RUN_DIR=$localstatedir/run/xen
XEN_LOG_DIR=$localstatedir/log/xen
-XEN_LIB_STORED=$localstatedir/lib/xenstored
+XEN_LIB_STORED=$localstatedir/run/xenstored
SHAREDIR=$prefix/share
@@ -3936,7 +3936,7 @@ XEN_SCRIPT_DIR=$XEN_CONFIG_DIR/scripts
case "$host_os" in
*freebsd*) XEN_LOCK_DIR=$localstatedir/lib ;;
-*netbsd*) XEN_LOCK_DIR=$localstatedir/lib ;;
+*netbsd*) XEN_LOCK_DIR=$localstatedir/run ;;
*) XEN_LOCK_DIR=$localstatedir/lock ;;
esac
@@ -10033,6 +10033,7 @@ for ac_config_target in $ac_config_targe
do
case $ac_config_target in
"../config/Tools.mk") CONFIG_FILES="$CONFIG_FILES ../config/Tools.mk" ;;
+ "../config/Paths.mk") CONFIG_FILES="$CONFIG_FILES ../config/Paths.mk" ;;
"hotplug/FreeBSD/rc.d/xencommons") CONFIG_FILES="$CONFIG_FILES hotplug/FreeBSD/rc.d/xencommons" ;;
"hotplug/FreeBSD/rc.d/xendriverdomain") CONFIG_FILES="$CONFIG_FILES hotplug/FreeBSD/rc.d/xendriverdomain" ;;
"hotplug/Linux/init.d/sysconfig.xencommons") CONFIG_FILES="$CONFIG_FILES hotplug/Linux/init.d/sysconfig.xencommons" ;;
@@ -0,0 +1,22 @@
$NetBSD: patch-console_daemon_utils.c,v 1.1.1.1 2016/07/04 07:30:51 jnemeth Exp $
--- console/daemon/utils.c.orig 2015-06-22 13:41:35.000000000 +0000
+++ console/daemon/utils.c
@@ -113,13 +113,15 @@ bool xen_setup(void)
xs = xs_daemon_open();
if (xs == NULL) {
dolog(LOG_ERR,
- "Failed to contact xenstore (%m). Is it running?");
+ "Failed to contact xenstore (%s). Is it running?",
+ strerror(errno));
goto out;
}
xc = xc_interface_open(0,0,0);
if (!xc) {
- dolog(LOG_ERR, "Failed to contact hypervisor (%m)");
+ dolog(LOG_ERR, "Failed to contact hypervisor (%s)",
+ strerror(errno));
goto out;
}
@@ -0,0 +1,12 @@
$NetBSD: patch-examples_Makefile,v 1.1.1.1 2016/07/04 07:30:51 jnemeth Exp $
--- examples/Makefile.orig 2015-01-12 17:53:24.000000000 +0100
+++ examples/Makefile 2015-01-19 13:37:18.000000000 +0100
@@ -1,6 +1,6 @@
XEN_ROOT = $(CURDIR)/../..
include $(XEN_ROOT)/tools/Rules.mk
-
+XEN_CONFIG_DIR=${XEN_EXAMPLES_DIR}
# Xen configuration dir and configs to go there.
XEN_READMES = README
XEN_READMES += README.incompatibilities
@@ -0,0 +1,26 @@
$NetBSD: patch-firmware_etherboot_Makefile,v 1.1.1.1 2016/07/04 07:30:51 jnemeth Exp $
--- firmware/etherboot/Makefile.orig 2015-01-12 17:53:24.000000000 +0100
+++ firmware/etherboot/Makefile 2015-01-19 13:42:54.000000000 +0100
@@ -27,18 +27,10 @@
%.rom: $D/src/arch/i386/Makefile
$(MAKE) -C $D/src bin/$(*F).rom
-$T:
- if ! $(FETCHER) _$T $(IPXE_TARBALL_URL); then \
- $(GIT) clone $(IPXE_GIT_URL) $D.git; \
- (cd $D.git && $(GIT) archive --format=tar --prefix=$D/ \
- $(IPXE_GIT_TAG) | gzip >../_$T); \
- rm -rf $D.git; \
- fi
- mv _$T $T
+$D:
+ ln -sf $(WRKSRC)/../../ipxe $D
-$D/src/arch/i386/Makefile: $T Config
- rm -rf $D
- gzip -dc $T | tar xf -
+$D/src/arch/i386/Makefile: $D Config
for i in $$(cat patches/series) ; do \
patch -d $D -p1 --quiet <patches/$$i || exit 1 ; \
done
@@ -0,0 +1,9 @@
$NetBSD: patch-firmware_etherboot_patches_series,v 1.1.1.1 2016/07/04 07:30:51 jnemeth Exp $
--- firmware/etherboot/patches/series.orig 2015-01-12 17:53:24.000000000 +0100
+++ firmware/etherboot/patches/series 2015-01-19 13:16:37.000000000 +0100
@@ -1,4 +1,3 @@
boot_prompt_option.patch
build_fix_1.patch
build_fix_2.patch
-build_fix_3.patch
@@ -0,0 +1,13 @@
$NetBSD: patch-firmware_hvmloader_Makefile,v 1.1.1.1 2016/07/04 07:30:51 jnemeth Exp $
--- firmware/hvmloader/Makefile.orig 2016-02-09 14:44:19.000000000 +0000
+++ firmware/hvmloader/Makefile
@@ -28,7 +28,7 @@ LOADADDR = 0x100000
# SMBIOS spec requires format mm/dd/yyyy
SMBIOS_REL_DATE ?= $(shell date +%m/%d/%Y)
-CFLAGS += $(CFLAGS_xeninclude)
+CFLAGS += $(CFLAGS_xeninclude) $(EXTRA_CFLAGS)
# We mustn't use tools-only public interfaces.
CFLAGS += -U__XEN_TOOLS__ -D__XEN_INTERFACE_VERSION__=__XEN_LATEST_INTERFACE_VERSION__
@@ -0,0 +1,52 @@
$NetBSD: patch-hotplug_NetBSD_Makefile,v 1.1.1.1 2016/07/04 07:30:51 jnemeth Exp $
--- hotplug/NetBSD/Makefile.orig 2016-02-09 14:44:19.000000000 +0000
+++ hotplug/NetBSD/Makefile
@@ -3,12 +3,13 @@ include $(XEN_ROOT)/tools/Rules.mk
# Xen script dir and scripts to go there.
XEN_SCRIPTS =
+XEN_SCRIPTS += locking.sh
XEN_SCRIPTS += block
XEN_SCRIPTS += vif-bridge
XEN_SCRIPTS += vif-ip
XEN_SCRIPT_DATA =
-XEN_RCD_PROG = rc.d/xencommons rc.d/xendomains rc.d/xen-watchdog rc.d/xendriverdomain
+#XEN_RCD_PROG = rc.d/xencommons rc.d/xendomains rc.d/xen-watchdog rc.d/xendriverdomain
.PHONY: all
all:
@@ -21,10 +22,11 @@ install: install-scripts install-rcd
.PHONY: install-scripts
install-scripts:
- $(INSTALL_DIR) $(DESTDIR)$(XEN_SCRIPT_DIR)
+ $(INSTALL_DIR) $(DESTDIR)$(XEN_EXAMPLES_DIR)
+ $(INSTALL_DIR) $(DESTDIR)$(XEN_EXAMPLES_DIR)/scripts
set -e; for i in $(XEN_SCRIPTS); \
do \
- $(INSTALL_PROG) $$i $(DESTDIR)$(XEN_SCRIPT_DIR); \
+ $(INSTALL_PROG) $$i $(DESTDIR)$(XEN_EXAMPLES_DIR)/scripts; \
done
set -e; for i in $(XEN_SCRIPT_DATA); \
do \
@@ -33,12 +35,12 @@ install-scripts:
.PHONY: install-rcd
install-rcd:
- $(INSTALL_DIR) $(DESTDIR)$(INITD_DIR)
- set -e; for i in $(XEN_RCD_PROG); \
- do \
- $(INSTALL_PROG) $$i $(DESTDIR)$(INITD_DIR); \
- done
- $(INSTALL_DATA) ../common/hotplugpath.sh $(DESTDIR)$(INITD_DIR)/xen-hotplugpath.sh
+# $(INSTALL_DIR) $(DESTDIR)$(INITD_DIR)
+# set -e; for i in $(XEN_RCD_PROG); \
+# do \
+# $(INSTALL_PROG) $$i $(DESTDIR)$(INITD_DIR); \
+# done
+# $(INSTALL_DATA) ../common/hotplugpath.sh $(DESTDIR)$(INITD_DIR)/xen-hotplugpath.sh
.PHONY: clean
clean:
@@ -0,0 +1,37 @@
$NetBSD: patch-hotplug_NetBSD_block,v 1.1.1.1 2016/07/04 07:30:51 jnemeth Exp $
--- hotplug/NetBSD/block.orig 2016-02-09 14:44:19.000000000 +0000
+++ hotplug/NetBSD/block
@@ -6,6 +6,7 @@
DIR=$(dirname "$0")
. "${DIR}/hotplugpath.sh"
+. "${DIR}/locking.sh"
PATH=${bindir}:${sbindir}:${LIBEXEC_BIN}:/bin:/usr/bin:/sbin:/usr/sbin
export PATH
@@ -62,6 +63,7 @@ case $xstatus in
available_disks="$available_disks $disk"
eval $disk=free
done
+ claim_lock block
# Mark the used vnd(4) devices as ``used''.
for disk in `sysctl hw.disknames`; do
case $disk in
@@ -77,6 +79,7 @@ case $xstatus in
break
fi
done
+ release_lock block
if [ x$device = x ] ; then
error "no available vnd device"
fi
@@ -86,7 +89,7 @@ case $xstatus in
device=$xparams
;;
esac
- physical_device=$(stat -f '%r' "$device")
+ physical_device=$(stat -L -f '%r' "$device")
xenstore-write $xpath/physical-device $physical_device
xenstore-write $xpath/hotplug-status connected
exit 0
@@ -0,0 +1,16 @@
$NetBSD: patch-hotplug_NetBSD_vif-bridge,v 1.1.1.1 2016/07/04 07:30:51 jnemeth Exp $
--- hotplug/NetBSD/vif-bridge.orig 2015-01-12 17:53:24.000000000 +0100
+++ hotplug/NetBSD/vif-bridge 2015-01-19 13:16:37.000000000 +0100
@@ -23,7 +23,10 @@
xbridge=$(xenstore-read "$xpath/bridge")
xfid=$(xenstore-read "$xpath/frontend-id")
xhandle=$(xenstore-read "$xpath/handle")
- iface=$(xenstore-read "$xpath/vifname")
+ iface=$(xenstore-read "$xpath/vifname") || true
+ if [ x${iface} = "x" ] ; then
+ iface=xvif$xfid.$xhandle
+ fi
ifconfig $iface up
brconfig $xbridge add $iface
xenstore-write $xpath/hotplug-status connected
@@ -0,0 +1,15 @@
$NetBSD: patch-hotplug_NetBSD_vif-ip,v 1.1.1.1 2016/07/04 07:30:51 jnemeth Exp $
--- hotplug/NetBSD/vif-ip.orig 2015-01-12 17:53:24.000000000 +0100
+++ hotplug/NetBSD/vif-ip 2015-01-19 13:16:37.000000000 +0100
@@ -24,6 +24,10 @@
xfid=$(xenstore-read "$xpath/frontend-id")
xhandle=$(xenstore-read "$xpath/handle")
iface=$(xenstore-read "$xpath/vifname")
+ iface=$(xenstore-read "$xpath/vifname") || true
+ if [ x${iface} = "x" ] ; then
+ iface=xvif$xfid.$xhandle
+ fi
ifconfig $iface $xip up
xenstore-write $xpath/hotplug-status connected
exit 0
@@ -0,0 +1,24 @@
$NetBSD: patch-hotplug_common_Makefile,v 1.1.1.1 2016/07/04 07:30:51 jnemeth Exp $
--- hotplug/common/Makefile.orig 2015-01-12 17:53:24.000000000 +0100
+++ hotplug/common/Makefile 2015-01-19 13:16:37.000000000 +0100
@@ -23,15 +23,15 @@
.PHONY: install-scripts
install-scripts: build
- [ -d $(DESTDIR)$(XEN_SCRIPT_DIR) ] || \
- $(INSTALL_DIR) $(DESTDIR)$(XEN_SCRIPT_DIR)
+ [ -d $(DESTDIR)${XEN_EXAMPLES_DIR}/scripts ] || \
+ $(INSTALL_DIR) $(DESTDIR)${XEN_EXAMPLES_DIR}/scripts
set -e; for i in $(XEN_SCRIPTS); \
do \
- $(INSTALL_PROG) $$i $(DESTDIR)$(XEN_SCRIPT_DIR); \
+ $(INSTALL_PROG) $$i $(DESTDIR)${XEN_EXAMPLES_DIR}/scripts; \
done
set -e; for i in $(XEN_SCRIPT_DATA); \
do \
- $(INSTALL_DATA) $$i $(DESTDIR)$(XEN_SCRIPT_DIR); \
+ $(INSTALL_DATA) $$i $(DESTDIR)${XEN_EXAMPLES_DIR}/scripts; \
done
.PHONY: clean
@@ -0,0 +1,110 @@
$NetBSD: patch-include_xen-sys_NetBSD_gntdev.h,v 1.1.1.1 2016/07/04 07:30:51 jnemeth Exp $
--- include/xen-sys/NetBSD/gntdev.h.orig 2015-01-19 13:16:37.000000000 +0100
+++ include/xen-sys/NetBSD/gntdev.h 2015-01-19 13:16:37.000000000 +0100
@@ -0,0 +1,105 @@
+/******************************************************************************
+ * gntdev.h
+ *
+ * Interface to /dev/xen/gntdev.
+ *
+ * Copyright (c) 2007, D G Murray
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License version 2
+ * as published by the Free Software Foundation; or, when distributed
+ * separately from the Linux kernel or incorporated into other
+ * software packages, subject to the following license:
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this source file (the "Software"), to deal in the Software without
+ * restriction, including without limitation the rights to use, copy, modify,
+ * merge, publish, distribute, sublicense, and/or sell copies of the Software,
+ * and to permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+ * IN THE SOFTWARE.
+ */
+
+#ifndef __NetBSD_PUBLIC_GNTDEV_H__
+#define __NetBSD_PUBLIC_GNTDEV_H__
+
+struct ioctl_gntdev_grant_ref {
+ /* The domain ID of the grant to be mapped. */
+ uint32_t domid;
+ /* The grant reference of the grant to be mapped. */
+ uint32_t ref;
+};
+
+/*
+ * Inserts the grant references into the mapping table of an instance
+ * of gntdev. N.B. This does not perform the mapping, which is deferred
+ * until mmap() is called with @index as the offset.
+ */
+#define IOCTL_GNTDEV_MAP_GRANT_REF \
+ _IOWR('G', 0, sizeof(struct ioctl_gntdev_map_grant_ref))
+struct ioctl_gntdev_map_grant_ref {
+ /* IN parameters */
+ /* The number of grants to be mapped. */
+ uint32_t count;
+ uint32_t pad;
+ /* OUT parameters */
+ /* The offset to be used on a subsequent call to mmap(). */
+ uint64_t index;
+ /* Variable IN parameter. */
+ /* Array of grant references, of size @count. */
+ struct ioctl_gntdev_grant_ref refs[1];
+};
+
+/*
+ * Removes the grant references from the mapping table of an instance of
+ * of gntdev. N.B. munmap() must be called on the relevant virtual address(es)
+ * before this ioctl is called, or an error will result.
+ */
+#define IOCTL_GNTDEV_UNMAP_GRANT_REF \
+ _IOW('G', 1, sizeof(struct ioctl_gntdev_unmap_grant_ref))
+struct ioctl_gntdev_unmap_grant_ref {
+ /* IN parameters */
+ /* The offset was returned by the corresponding map operation. */
+ uint64_t index;
+ /* The number of pages to be unmapped. */
+ uint32_t count;
+ uint32_t pad;
+};
+
+/*
+ * Returns the offset in the driver's address space that corresponds
+ * to @vaddr. This can be used to perform a munmap(), followed by an
+ * UNMAP_GRANT_REF ioctl, where no state about the offset is retained by
+ * the caller. The number of pages that were allocated at the same time as
+ * @vaddr is returned in @count.
+ *
+ * N.B. Where more than one page has been mapped into a contiguous range, the
+ * supplied @vaddr must correspond to the start of the range; otherwise
+ * an error will result. It is only possible to munmap() the entire
+ * contiguously-allocated range at once, and not any subrange thereof.
+ */
+#define IOCTL_GNTDEV_GET_OFFSET_FOR_VADDR \
+ _IOWR('G', 2, sizeof(struct ioctl_gntdev_get_offset_for_vaddr))
+struct ioctl_gntdev_get_offset_for_vaddr {
+ /* IN parameters */
+ /* The virtual address of the first mapped page in a range. */
+ uint64_t vaddr;
+ /* OUT parameters */
+ /* The offset that was used in the initial mmap() operation. */
+ uint64_t offset;
+ /* The number of pages mapped in the VM area that begins at @vaddr. */
+ uint32_t count;
+ uint32_t pad;
+};
+
+#endif /* __NetBSD_PUBLIC_GNTDEV_H__ */
@@ -0,0 +1,13 @@
$NetBSD: patch-libfsimage_ufs_ufs.h,v 1.1.1.1 2016/07/04 07:30:51 jnemeth Exp $
--- libfsimage/ufs/ufs.h.orig 2015-01-12 17:53:24.000000000 +0100
+++ libfsimage/ufs/ufs.h 2015-01-19 13:16:38.000000000 +0100
@@ -4,7 +4,7 @@
*/
#ifndef _GRUB_UFS_H
-#define _GRUB_UFS_H_
+#define _GRUB_UFS_H
/* ufs specific constants */
#define UFS_SBLOCK 16
@@ -0,0 +1,251 @@
$NetBSD: patch-libxc_xc__netbsd.c,v 1.1.1.1 2016/07/04 07:30:52 jnemeth Exp $
--- libxc/xc_netbsd.c.orig 2016-02-09 14:44:19.000000000 +0000
+++ libxc/xc_netbsd.c
@@ -17,13 +17,19 @@
* License along with this library; If not, see <http://www.gnu.org/licenses/>.
*/
-#include "xc_private.h"
-
-#include <xen/sys/evtchn.h>
-#include <unistd.h>
+#include <sys/mman.h>
+#include <sys/types.h>
#include <fcntl.h>
#include <malloc.h>
-#include <sys/mman.h>
+#include <unistd.h>
+
+#include <xen/memory.h>
+#include <xen/sys/evtchn.h>
+#include <xen/sys/gntdev.h>
+/* #include <xen/sys/gntalloc.h> */
+#include "xc_private.h"
+#include "xenctrl.h"
+#include "xenctrlosdep.h"
static xc_osdep_handle netbsd_privcmd_open(xc_interface *xch)
{
@@ -389,6 +395,210 @@ void *xc_memalign(xc_interface *xch, siz
return valloc(size);
}
+#if 0
+#define DEVXEN "/dev/xen/"
+
+static xc_osdep_handle
+netbsd_gnttab_open(xc_gnttab *xcg)
+{
+ int fd;
+
+ fd = open(DEVXEN "gntdev", O_RDWR);
+ if (fd == -1)
+ return XC_OSDEP_OPEN_ERROR;
+
+ return (xc_osdep_handle)fd;
+}
+
+static int
+netbsd_gnttab_close(xc_gnttab *xcg, xc_osdep_handle h)
+{
+ int fd = (int)h;
+ return close(fd);
+}
+
+static int netbsd_gnttab_set_max_grants(xc_gnttab *xch, xc_osdep_handle h,
+ uint32_t count)
+{
+ int fd = (int)h, rc;
+ struct ioctl_gntdev_set_max_grants max_grants = { .count = count };
+
+ rc = ioctl(fd, IOCTL_GNTDEV_SET_MAX_GRANTS, &max_grants);
+ if (rc) {
+ /*
+ * Newer (e.g. pv-ops) kernels don't implement this IOCTL,
+ * so ignore the resulting specific failure.
+ */
+ if (errno == ENOTTY)
+ rc = 0;
+ else
+ PERROR("netbsd_gnttab_set_max_grants: ioctl SET_MAX_GRANTS failed");
+ }
+ return rc;
+}
+
+static void *netbsd_gnttab_grant_map(xc_gnttab *xch, xc_osdep_handle h,
+ uint32_t count, int flags, int prot,
+ uint32_t *domids, uint32_t *refs,
+ uint32_t notify_offset,
+ evtchn_port_t notify_port)
+{
+ int fd = (int)h;
+ struct ioctl_gntdev_map_grant_ref *map;
+ unsigned int map_size = ROUNDUP((sizeof(*map) + (count - 1) *
+ sizeof(struct ioctl_gntdev_map_grant_ref)),
+ XC_PAGE_SHIFT);
+ void *addr = NULL;
+ int domids_stride = 1;
+ int i;
+
+ if (flags & XC_GRANT_MAP_SINGLE_DOMAIN)
+ domids_stride = 0;
+
+ if ( map_size <= XC_PAGE_SIZE )
+ map = alloca(sizeof(*map) +
+ (count - 1) * sizeof(struct ioctl_gntdev_map_grant_ref));
+ else
+ {
+ map = mmap(NULL, map_size, PROT_READ | PROT_WRITE,
+ MAP_PRIVATE | MAP_ANON | MAP_POPULATE, -1, 0);
+ if ( map == MAP_FAILED )
+ {
+ PERROR("netbsd_gnttab_grant_map: mmap of map failed");
+ return NULL;
+ }
+ }
+
+ for ( i = 0; i < count; i++ )
+ {
+ map->refs[i].domid = domids[i * domids_stride];
+ map->refs[i].ref = refs[i];
+ }
+
+ map->count = count;
+
+ if ( ioctl(fd, IOCTL_GNTDEV_MAP_GRANT_REF, map) ) {
+ PERROR("netbsd_gnttab_grant_map: ioctl MAP_GRANT_REF failed");
+ goto out;
+ }
+
+ retry:
+ addr = mmap(NULL, XC_PAGE_SIZE * count, prot, MAP_SHARED, fd,
+ map->index);
+
+ if (addr == MAP_FAILED && errno == EAGAIN)
+ {
+ /*
+ * The grant hypercall can return EAGAIN if the granted page is
+ * swapped out. Since the paging daemon may be in the same domain, the
+ * hypercall cannot block without causing a deadlock.
+ *
+ * Because there are no notificaitons when the page is swapped in, wait
+ * a bit before retrying, and hope that the page will arrive eventually.
+ */
+ usleep(1000);
+ goto retry;
+ }
+
+ if (addr != MAP_FAILED)
+ {
+ int rv = 0;
+ struct ioctl_gntdev_unmap_notify notify;
+ notify.index = map->index;
+ notify.action = 0;
+ if (notify_offset < XC_PAGE_SIZE * count) {
+ notify.index += notify_offset;
+ notify.action |= UNMAP_NOTIFY_CLEAR_BYTE;
+ }
+ if (notify_port != -1) {
+ notify.event_channel_port = notify_port;
+ notify.action |= UNMAP_NOTIFY_SEND_EVENT;
+ }
+ if (notify.action)
+ rv = ioctl(fd, IOCTL_GNTDEV_SET_UNMAP_NOTIFY, &notify);
+ if (rv) {
+ PERROR("netbsd_gnttab_grant_map: ioctl SET_UNMAP_NOTIFY failed");
+ munmap(addr, count * XC_PAGE_SIZE);
+ addr = MAP_FAILED;
+ }
+ }
+
+ if (addr == MAP_FAILED)
+ {
+ int saved_errno = errno;
+ struct ioctl_gntdev_unmap_grant_ref unmap_grant;
+
+ /* Unmap the driver slots used to store the grant information. */
+ PERROR("xc_gnttab_map_grant_refs: mmap failed");
+ unmap_grant.index = map->index;
+ unmap_grant.count = count;
+ ioctl(fd, IOCTL_GNTDEV_UNMAP_GRANT_REF, &unmap_grant);
+ errno = saved_errno;
+ addr = NULL;
+ }
+
+ out:
+ if ( map_size > XC_PAGE_SIZE )
+ munmap(map, map_size);
+
+ return addr;
+}
+
+static int
+netbsd_gnttab_munmap(xc_gnttab *xcg, xc_osdep_handle h,
+ void *start_address, uint32_t count)
+{
+ int fd = (int)h;
+ struct ioctl_gntdev_get_offset_for_vaddr get_offset;
+ struct ioctl_gntdev_unmap_grant_ref unmap_grant;
+ int rc;
+
+ if ( start_address == NULL )
+ {
+ errno = EINVAL;
+ return -1;
+ }
+
+ /* First, it is necessary to get the offset which was initially used to
+ * mmap() the pages.
+ */
+ get_offset.vaddr = (unsigned long)start_address;
+ rc = ioctl(fd, IOCTL_GNTDEV_GET_OFFSET_FOR_VADDR, &get_offset);
+ if ( rc )
+ return rc;
+
+ if ( get_offset.count != count )
+ {
+ errno = EINVAL;
+ return -1;
+ }
+
+ /* Next, unmap the memory. */
+ rc = munmap(start_address, count * getpagesize());
+ if ( rc )
+ return rc;
+
+ /* Finally, unmap the driver slots used to store the grant information. */
+ unmap_grant.index = get_offset.offset;
+ unmap_grant.count = count;
+ rc = ioctl(fd, IOCTL_GNTDEV_UNMAP_GRANT_REF, &unmap_grant);
+ if ( rc )
+ return rc;
+ return 0;
+}
+
+static struct xc_osdep_ops netbsd_gnttab_ops = {
+ .open = &netbsd_gnttab_open,
+ .close = &netbsd_gnttab_close,
+
+ .u.gnttab = {
+ .set_max_grants = netbsd_gnttab_set_max_grants,
+ .grant_map = &netbsd_gnttab_grant_map,
+ .munmap = &netbsd_gnttab_munmap,
+ },
+};
+#endif
+
static struct xc_osdep_ops *netbsd_osdep_init(xc_interface *xch, enum xc_osdep_type type)
{
switch ( type )
@@ -397,6 +607,10 @@ static struct xc_osdep_ops *netbsd_osdep
return &netbsd_privcmd_ops;
case XC_OSDEP_EVTCHN:
return &netbsd_evtchn_ops;
+#if 0
+ case XC_OSDEP_GNTTAB:
+ return &netbsd_gnttab_ops;
+#endif
default:
return NULL;
}
@@ -0,0 +1,22 @@
$NetBSD: patch-libxl_Makefile,v 1.1.1.1 2016/07/04 07:30:52 jnemeth Exp $
--- libxl/Makefile.orig 2016-02-09 14:44:19.000000000 +0000
+++ libxl/Makefile
@@ -276,7 +276,7 @@ install: all
$(INSTALL_DIR) $(DESTDIR)$(sbindir)
$(INSTALL_DIR) $(DESTDIR)$(libdir)
$(INSTALL_DIR) $(DESTDIR)$(includedir)
- $(INSTALL_DIR) $(DESTDIR)$(BASH_COMPLETION_DIR)
+ $(INSTALL_DIR) $(DESTDIR)$(XEN_EXAMPLES_DIR)
$(INSTALL_DIR) $(DESTDIR)$(LIBEXEC_BIN)
$(INSTALL_DIR) $(DESTDIR)$(SHAREDIR)/pkgconfig
$(INSTALL_PROG) xl $(DESTDIR)$(sbindir)
@@ -291,7 +291,7 @@ install: all
$(SYMLINK_SHLIB) libxlutil.so.$(XLUMAJOR) $(DESTDIR)$(libdir)/libxlutil.so
$(INSTALL_DATA) libxlutil.a $(DESTDIR)$(libdir)
$(INSTALL_DATA) libxl.h libxl_event.h libxl_json.h _libxl_types.h _libxl_types_json.h _libxl_list.h libxl_utils.h libxl_uuid.h libxlutil.h $(DESTDIR)$(includedir)
- $(INSTALL_DATA) bash-completion $(DESTDIR)$(BASH_COMPLETION_DIR)/xl.sh
+ $(INSTALL_DATA) bash-completion $(DESTDIR)$(XEN_EXAMPLES_DIR)/xl.sh
$(INSTALL_DATA) xenlight.pc $(DESTDIR)$(SHAREDIR)/pkgconfig/
$(INSTALL_DATA) xlutil.pc $(DESTDIR)$(SHAREDIR)/pkgconfig/
@@ -0,0 +1,40 @@
$NetBSD: patch-libxl_libxl__create.c,v 1.1.1.1 2016/07/04 07:30:52 jnemeth Exp $
--- libxl/libxl_create.c.orig 2015-01-12 17:53:24.000000000 +0100
+++ libxl/libxl_create.c 2015-01-19 14:08:19.000000000 +0100
@@ -432,7 +432,7 @@
vments[2] = "image/ostype";
vments[3] = "hvm";
vments[4] = "start_time";
- vments[5] = libxl__sprintf(gc, "%lu.%02d", start_time.tv_sec,(int)start_time.tv_usec/10000);
+ vments[5] = libxl__sprintf(gc, "%jd.%02d", start_time.tv_sec,(int)start_time.tv_usec/10000);
localents = libxl__calloc(gc, 9, sizeof(char *));
i = 0;
@@ -469,7 +469,7 @@
vments[i++] = "image/kernel";
vments[i++] = (char *) state->pv_kernel.path;
vments[i++] = "start_time";
- vments[i++] = libxl__sprintf(gc, "%lu.%02d", start_time.tv_sec,(int)start_time.tv_usec/10000);
+ vments[i++] = libxl__sprintf(gc, "%jd.%02d", (intmax_t)start_time.tv_sec, (int)start_time.tv_usec/10000);
if (state->pv_ramdisk.path) {
vments[i++] = "image/ramdisk";
vments[i++] = (char *) state->pv_ramdisk.path;
@@ -1061,7 +1061,7 @@
vments[2] = "image/ostype";
vments[3] = "hvm";
vments[4] = "start_time";
- vments[5] = libxl__sprintf(gc, "%lu.%02d", start_time.tv_sec,(int)start_time.tv_usec/10000);
+ vments[5] = libxl__sprintf(gc, "%jd.%02d", (intmax_t)start_time.tv_sec, (int)start_time.tv_usec/10000);
break;
case LIBXL_DOMAIN_TYPE_PV:
vments = libxl__calloc(gc, 11, sizeof(char *));
@@ -1071,7 +1071,7 @@
vments[i++] = "image/kernel";
vments[i++] = (char *) state->pv_kernel.path;
vments[i++] = "start_time";
- vments[i++] = libxl__sprintf(gc, "%lu.%02d", start_time.tv_sec,(int)start_time.tv_usec/10000);
+ vments[i++] = libxl__sprintf(gc, "%jd.%02d", (intmax_t)start_time.tv_sec, (int)start_time.tv_usec/10000);
if (state->pv_ramdisk.path) {
vments[i++] = "image/ramdisk";
vments[i++] = (char *) state->pv_ramdisk.path;
@@ -0,0 +1,30 @@
$NetBSD: patch-libxl_libxl__netbsd.c,v 1.1.1.1 2016/07/04 07:30:53 jnemeth Exp $
--- libxl/libxl_netbsd.c.orig 2016-06-20 12:08:22.000000000 +0000
+++ libxl/libxl_netbsd.c
@@ -68,7 +68,25 @@ int libxl__get_hotplug_script_info(libxl
switch (dev->backend_kind) {
case LIBXL__DEVICE_KIND_VBD:
+ if (num_exec != 0) {
+ LOG(DEBUG, "num_exec %d, not running hotplug scripts", num_exec);
+ rc = 0;
+ goto out;
+ }
+ rc = libxl__hotplug(gc, dev, args, action);
+ if (!rc) rc = 1;
+ break;
case LIBXL__DEVICE_KIND_VIF:
+ /*
+ * If domain has a stubdom we don't have to execute hotplug scripts
+ * for emulated interfaces
+ */
+ if ((num_exec != 0) ||
+ (libxl_get_stubdom_id(CTX, dev->domid) && num_exec)) {
+ LOG(DEBUG, "num_exec %d, not running hotplug scripts", num_exec);
+ rc = 0;
+ goto out;
+ }
rc = libxl__hotplug(gc, dev, args, action);
if (!rc) rc = 1;
break;
@@ -0,0 +1,12 @@
$NetBSD: patch-libxl_libxl__save__helper.c,v 1.1.1.1 2016/07/04 07:30:52 jnemeth Exp $
--- libxl/libxl_save_helper.c.orig 2015-01-25 21:04:31.000000000 +0000
+++ libxl/libxl_save_helper.c
@@ -49,6 +49,7 @@
/*----- logger -----*/
+__attribute__((__format__(__printf__, 5, 0)))
static void tellparent_vmessage(xentoollog_logger *logger_in,
xentoollog_level level,
int errnoval,
@@ -0,0 +1,22 @@
$NetBSD: patch-libxl_libxl_uuid.c,v 1.1.1.1 2016/07/04 07:30:52 jnemeth Exp $
--- libxl/libxl_uuid.c.orig 2015-01-19 17:05:02.000000000 +0100
+++ libxl/libxl_uuid.c 2015-01-19 17:18:47.000000000 +0100
@@ -77,7 +77,7 @@
assert(status == uuid_s_ok);
}
-#ifdef __FreeBSD__
+#if defined(__FreeBSD__) || defined(__NetBSD__)
int libxl_uuid_from_string(libxl_uuid *uuid, const char *in)
{
uint32_t status;
@@ -112,7 +112,7 @@
memset(&uuid->uuid, 0, sizeof(uuid->uuid));
}
-#ifdef __FreeBSD__
+#if defined(__FreeBSD__) || defined(__NetBSD__)
int libxl_uuid_compare(const libxl_uuid *uuid1, const libxl_uuid *uuid2)
{
@@ -0,0 +1,13 @@
$NetBSD: patch-libxl_xl__cmdtable.c,v 1.1.1.1 2016/07/04 07:30:53 jnemeth Exp $
--- libxl/xl_cmdtable.c.orig 2015-11-03 09:11:18.000000000 +0000
+++ libxl/xl_cmdtable.c
@@ -507,7 +507,7 @@ struct cmd_spec cmd_table[] = {
"-e Do not wait in the background (on <host>) for the death\n"
" of the domain.\n"
"-N <netbufscript> Use netbufscript to setup network buffering instead of the\n"
- " default script (/etc/xen/scripts/remus-netbuf-setup).\n"
+ " default script (@XENDCONFDIR@/scripts/remus-netbuf-setup).\n"
"-F Enable unsafe configurations [-b|-n|-d flags]. Use this option\n"
" with caution as failover may not work as intended.\n"
"-b Replicate memory checkpoints to /dev/null (blackhole).\n"
@@ -0,0 +1,13 @@
$NetBSD: patch-ocaml_common.make,v 1.1.1.1 2016/07/04 07:30:52 jnemeth Exp $
--- ocaml/common.make.orig 2015-01-12 17:53:24.000000000 +0100
+++ ocaml/common.make 2015-01-19 13:16:38.000000000 +0100
@@ -3,7 +3,7 @@
CC ?= gcc
OCAMLOPT ?= ocamlopt
OCAMLC ?= ocamlc
-OCAMLMKLIB ?= ocamlmklib
+OCAMLMKLIB ?= ocamlmklib -elfmode
OCAMLDEP ?= ocamldep
OCAMLLEX ?= ocamllex
OCAMLYACC ?= ocamlyacc
@@ -0,0 +1,12 @@
$NetBSD: patch-ocaml_xenstored_Makefile,v 1.1.1.1 2016/07/04 07:30:52 jnemeth Exp $
--- ocaml/xenstored/Makefile.orig 2016-02-09 14:44:19.000000000 +0000
+++ ocaml/xenstored/Makefile
@@ -1,6 +1,7 @@
XEN_ROOT = $(CURDIR)/../../..
OCAML_TOPLEVEL = $(CURDIR)/..
include $(OCAML_TOPLEVEL)/common.make
+XEN_CONFIG_DIR=${XEN_EXAMPLES_DIR}
# Include configure output (config.h)
CFLAGS += -include $(XEN_ROOT)/tools/config.h
@@ -0,0 +1,20 @@
$NetBSD: patch-ocaml_xenstored_define.ml,v 1.1.1.1 2016/07/04 07:30:52 jnemeth Exp $
--- ocaml/xenstored/define.ml.orig 2015-01-12 17:53:24.000000000 +0100
+++ ocaml/xenstored/define.ml 2015-01-19 13:16:38.000000000 +0100
@@ -17,13 +17,13 @@
let xenstored_major = 1
let xenstored_minor = 0
-let xenstored_proc_kva = "/proc/xen/xsd_kva"
+let xenstored_proc_kva = "@PROCDEV@/xsd_kva"
let xenstored_proc_port = "/proc/xen/xsd_port"
let xs_daemon_socket = "/var/run/xenstored/socket"
let xs_daemon_socket_ro = "/var/run/xenstored/socket_ro"
-let default_config_dir = "/etc/xen"
+let default_config_dir = "@XENDCONFDIR@"
let maxwatch = ref (50)
let maxtransaction = ref (20)
@@ -0,0 +1,13 @@
$NetBSD: patch-ocaml_xenstored_utils.ml,v 1.1.1.1 2016/07/04 07:30:52 jnemeth Exp $
--- ocaml/xenstored/utils.ml.orig 2015-01-12 17:53:24.000000000 +0100
+++ ocaml/xenstored/utils.ml 2015-01-19 13:16:38.000000000 +0100
@@ -94,7 +94,7 @@
let buf = String.make 20 (char_of_int 0) in
let sz = Unix.read fd buf 0 20 in
Unix.close fd;
- int_of_string (String.sub buf 0 sz)
+ int_of_string (String.trim (String.sub buf 0 sz))
let path_complete path connection_path =
if String.get path 0 <> '/' then
@@ -0,0 +1,13 @@
$NetBSD: patch-pygrub_Makefile,v 1.1.1.1 2016/07/04 07:30:52 jnemeth Exp $
--- pygrub/Makefile.orig 2016-02-09 14:44:19.000000000 +0000
+++ pygrub/Makefile
@@ -17,7 +17,7 @@ install: all
--install-scripts=$(LIBEXEC_BIN) --force
set -e; if [ $(bindir) != $(LIBEXEC_BIN) -a \
"`readlink -f $(DESTDIR)/$(bindir)`" != \
- "`readlink -f $(LIBEXEC_BIN)`" ]; then \
+ "`readlink -f $(DESTDIR)/$(LIBEXEC_BIN)`" ]; then \
ln -sf $(LIBEXEC_BIN)/pygrub $(DESTDIR)/$(bindir); \
fi
@@ -0,0 +1,84 @@
$NetBSD: patch-qemu-xen-traditional_Makefile,v 1.1.1.1 2016/07/04 07:30:52 jnemeth Exp $
--- qemu-xen-traditional/Makefile.orig 2014-10-06 17:50:24.000000000 +0200
+++ qemu-xen-traditional/Makefile 2015-01-19 14:16:12.000000000 +0100
@@ -1,7 +1,7 @@
# Makefile for QEMU.
-include config-host.mak
-include $(SRC_PATH)/rules.mak
+-include config-host.mak
+-include $(SRC_PATH)/rules.mak
.PHONY: all clean cscope distclean dvi html info install install-doc \
recurse-all speed tar tarbin test
@@ -231,30 +231,30 @@
endif
install-doc: $(DOCS)
- mkdir -p "$(DESTDIR)$(docdir)"
- $(INSTALL) -m 644 qemu-doc.html qemu-tech.html "$(DESTDIR)$(docdir)"
+ $(INSTALL_DIR) "$(DESTDIR)$(docdir)"
+ $(INSTALL_DATA) qemu-doc.html qemu-tech.html "$(DESTDIR)$(docdir)"
ifndef CONFIG_WIN32
- mkdir -p "$(DESTDIR)$(mandir)/man1"
- $(INSTALL) -m 644 qemu.1 qemu-img.1 "$(DESTDIR)$(mandir)/man1"
- mkdir -p "$(DESTDIR)$(mandir)/man8"
- $(INSTALL) -m 644 qemu-nbd.8 "$(DESTDIR)$(mandir)/man8"
+ $(INSTALL_DIR) "$(DESTDIR)$(mandir)/man1"
+ $(INSTALL_DATA) qemu.1 qemu-img.1 "$(DESTDIR)$(mandir)/man1"
+ $(INSTALL_DIR) "$(DESTDIR)$(mandir)/man8"
+ $(INSTALL_DATA) qemu-nbd.8 "$(DESTDIR)$(mandir)/man8"
endif
install: all $(if $(BUILD_DOCS),install-doc)
- mkdir -p "$(DESTDIR)$(bindir)"
+ $(INSTALL_DIR) "$(DESTDIR)$(bindir)"
ifneq ($(TOOLS),)
$(INSTALL_PROG) $(STRIP_OPT) $(TOOLS) "$(DESTDIR)$(bindir)"
endif
ifneq ($(BLOBS),)
- mkdir -p "$(DESTDIR)$(datadir)"
+ $(INSTALL_DIR) "$(DESTDIR)$(datadir)"
set -e; for x in $(BLOBS); do \
- $(INSTALL) -m 644 $(SRC_PATH)/pc-bios/$$x "$(DESTDIR)$(datadir)"; \
+ $(INSTALL_DATA) $(SRC_PATH)/pc-bios/$$x "$(DESTDIR)$(datadir)"; \
done
endif
ifndef CONFIG_WIN32
- mkdir -p "$(DESTDIR)$(datadir)/keymaps"
+ $(INSTALL_DIR) "$(DESTDIR)$(datadir)/keymaps"
set -e; for x in $(KEYMAPS); do \
- $(INSTALL) -m 644 $(SRC_PATH)/keymaps/$$x "$(DESTDIR)$(datadir)/keymaps"; \
+ $(INSTALL_DATA) $(SRC_PATH)/keymaps/$$x "$(DESTDIR)$(datadir)/keymaps"; \
done
endif
for d in $(TARGET_DIRS); do \
@@ -275,7 +275,7 @@
# documentation
%.html: %.texi
- texi2html -monolithic -number $<
+ texi2html -monolithic -number-sections $<
%.info: %.texi
makeinfo $< -o $@
@@ -284,15 +284,15 @@
texi2dvi $<
qemu.1: qemu-doc.texi
- $(SRC_PATH)/texi2pod.pl $< qemu.pod
+ perl $(SRC_PATH)/texi2pod.pl $< qemu.pod
pod2man --section=1 --center=" " --release=" " qemu.pod > $@
qemu-img.1: qemu-img.texi
- $(SRC_PATH)/texi2pod.pl $< qemu-img.pod
+ perl $(SRC_PATH)/texi2pod.pl $< qemu-img.pod
pod2man --section=1 --center=" " --release=" " qemu-img.pod > $@
qemu-nbd.8: qemu-nbd.texi
- $(SRC_PATH)/texi2pod.pl $< qemu-nbd.pod
+ perl $(SRC_PATH)/texi2pod.pl $< qemu-nbd.pod
pod2man --section=8 --center=" " --release=" " qemu-nbd.pod > $@
info: qemu-doc.info qemu-tech.info
@@ -0,0 +1,62 @@
$NetBSD: patch-qemu-xen-traditional_block-raw-posix.c,v 1.1.1.1 2016/07/04 07:30:53 jnemeth Exp $
- if given a block device, use the character device instead.
--- qemu-xen-traditional/block-raw-posix.c.orig 2014-10-06 17:50:24.000000000 +0200
+++ qemu-xen-traditional/block-raw-posix.c 2015-01-19 13:16:38.000000000 +0100
@@ -65,6 +65,7 @@
#include <sys/disklabel.h>
#include <sys/dkio.h>
#include <sys/disk.h>
+#include <sys/param.h>
#endif
#ifdef __OpenBSD__
@@ -72,6 +73,13 @@
#include <sys/disklabel.h>
#include <sys/dkio.h>
#endif
+#if defined(__NetBSD__)
+#include <sys/ioctl.h>
+#include <sys/disklabel.h>
+#include <sys/dkio.h>
+#define SLIST_ENTRY(x) int /*XXXX !*/
+#include <sys/disk.h>
+#endif
//#define DEBUG_FLOPPY
@@ -1008,6 +1016,33 @@
{
BDRVRawState *s = bs->opaque;
int fd, open_flags, ret;
+#ifdef __NetBSD__
+ struct stat sb;
+ static char namebuf[MAXPATHLEN];
+ const char *dp;
+
+ if (lstat(filename, &sb) < 0) {
+ fprintf(stderr, "%s: stat failed: %s\n", filename, strerror(errno));
+ return -errno;
+ }
+ if (S_ISLNK(sb.st_mode)) {
+ fprintf(stderr, "%s: symolink links not supported by qemu-dm\n",
+ filename);
+ return -EINVAL;
+ }
+ if (S_ISBLK(sb.st_mode)) {
+ dp = strrchr(filename, '/');
+ if (dp == NULL) {
+ snprintf(namebuf, MAXPATHLEN, "r%s", filename);
+ } else {
+ snprintf(namebuf, MAXPATHLEN, "%.*s/r%s",
+ (int)(dp - filename), filename, dp + 1);
+ }
+ fprintf(stderr, "%s is a block device", filename);
+ filename = namebuf;
+ fprintf(stderr, ", using %s\n", filename);
+ }
+#endif
posix_aio_init();
@@ -0,0 +1,41 @@
$NetBSD: patch-qemu-xen-traditional_configure,v 1.1.1.1 2016/07/04 07:30:53 jnemeth Exp $
--- qemu-xen-traditional/configure.orig 2014-10-06 17:50:24.000000000 +0200
+++ qemu-xen-traditional/configure 2015-01-20 22:58:07.000000000 +0100
@@ -1089,7 +1089,7 @@
# Check if tools are available to build documentation.
if [ -x "`which texi2html 2>/dev/null`" ] && \
[ -x "`which pod2man 2>/dev/null`" ]; then
- build_docs="yes"
+# build_docs="yes"
fi
##########################################
@@ -1124,7 +1124,7 @@
if test -z "$prefix" ; then
prefix="/usr/local"
fi
- mansuffix="/share/man"
+ mansuffix="/man"
datasuffix="/share/qemu"
docsuffix="/share/doc/qemu"
binsuffix="/bin"
@@ -1216,6 +1216,8 @@
echo "MAKE=$make" >> $config_mak
echo "INSTALL=$install" >> $config_mak
echo "INSTALL_PROG=$install -m 0755" >> $config_mak
+echo "INSTALL_DATA=$install -m0644" >> $config_mak
+echo "INSTALL_DIR=$install -d -m0755 -p" >> $config_mak
echo "CC=$cc" >> $config_mak
echo "HOST_CC=$host_cc" >> $config_mak
echo "AR=$ar" >> $config_mak
@@ -1493,7 +1495,9 @@
# XXX: suppress that
if [ "$bsd" = "yes" ] ; then
echo "#define O_LARGEFILE 0" >> $config_h
+ echo "#ifndef MAP_ANONYMOUS" >> $config_h
echo "#define MAP_ANONYMOUS MAP_ANON" >> $config_h
+ echo "#endif" >> $config_h
echo "#define _BSD 1" >> $config_h
fi
@@ -0,0 +1,34 @@
$NetBSD: patch-qemu-xen-traditional_hw_e1000.c,v 1.1.1.1 2016/07/04 07:30:53 jnemeth Exp $
From sysutils/xentools33/patches/patch-ak.
qemu-0.13.x will include this fix:
http://git.qemu.org/qemu.git/commit/?id=9651ac55e5de0e1534d898316cc851af6ffc4334
--- qemu-xen-traditional/hw/e1000.c.orig 2014-10-06 17:50:24.000000000 +0200
+++ qemu-xen-traditional/hw/e1000.c 2015-01-19 13:16:38.000000000 +0100
@@ -265,16 +265,20 @@
s->eecd_state.old_eecd = val & (E1000_EECD_SK | E1000_EECD_CS |
E1000_EECD_DI|E1000_EECD_FWE_MASK|E1000_EECD_REQ);
+ if (!(E1000_EECD_CS & val)) // CS inactive; nothing to do
+ return;
+ if (E1000_EECD_CS & (val ^ oldval)) { // CS rise edge; reset state
+ s->eecd_state.val_in = 0;
+ s->eecd_state.bitnum_in = 0;
+ s->eecd_state.bitnum_out = 0;
+ s->eecd_state.reading = 0;
+ }
if (!(E1000_EECD_SK & (val ^ oldval))) // no clock edge
return;
if (!(E1000_EECD_SK & val)) { // falling edge
s->eecd_state.bitnum_out++;
return;
}
- if (!(val & E1000_EECD_CS)) { // rising, no CS (EEPROM reset)
- memset(&s->eecd_state, 0, sizeof s->eecd_state);
- return;
- }
s->eecd_state.val_in <<= 1;
if (val & E1000_EECD_DI)
s->eecd_state.val_in |= 1;
@@ -0,0 +1,37 @@
$NetBSD: patch-qemu-xen-traditional_hw_ide.c,v 1.1.1.1 2016/07/04 07:30:53 jnemeth Exp $
--- qemu-xen-traditional/hw/ide.c.orig 2014-01-09 13:44:42.000000000 +0100
+++ qemu-xen-traditional/hw/ide.c 2015-06-11 16:15:49.000000000 +0200
@@ -757,10 +757,15 @@
put_le16(p + 58, oldsize >> 16);
if (s->mult_sectors)
put_le16(p + 59, 0x100 | s->mult_sectors);
- put_le16(p + 60, s->nb_sectors);
- put_le16(p + 61, s->nb_sectors >> 16);
+ if (s->nb_sectors > 0x10000000)
+ oldsize = 0x10000000; /* report only 128GB */
+ else
+ oldsize = s->nb_sectors;
+ put_le16(p + 60, oldsize);
+ put_le16(p + 61, oldsize >> 16);
put_le16(p + 62, 0x07); /* single word dma0-2 supported */
put_le16(p + 63, 0x07); /* mdma0-2 supported */
+ put_le16(p + 64, 0x03); /* pio3-4 supported */
put_le16(p + 65, 120);
put_le16(p + 66, 120);
put_le16(p + 67, 120);
@@ -812,13 +817,12 @@
put_le16(p + 53, 7); /* words 64-70, 54-58, 88 valid */
put_le16(p + 62, 7); /* single word dma0-2 supported */
put_le16(p + 63, 7); /* mdma0-2 supported */
- put_le16(p + 64, 0x3f); /* PIO modes supported */
#else
put_le16(p + 49, 1 << 9); /* LBA supported, no DMA */
put_le16(p + 53, 3); /* words 64-70, 54-58 valid */
put_le16(p + 63, 0x103); /* DMA modes XXX: may be incorrect */
- put_le16(p + 64, 1); /* PIO modes */
#endif
+ put_le16(p + 64, 3); /* pio3-4 supported */
put_le16(p + 65, 0xb4); /* minimum DMA multiword tx cycle time */
put_le16(p + 66, 0xb4); /* recommended DMA multiword tx cycle time */
put_le16(p + 67, 0x12c); /* minimum PIO cycle time without flow control */
@@ -0,0 +1,13 @@
$NetBSD: patch-qemu-xen-traditional_hw_pass-through.c,v 1.1.1.1 2016/07/04 07:30:53 jnemeth Exp $
--- qemu-xen-traditional/hw/pass-through.c.orig 2014-10-06 17:50:24.000000000 +0200
+++ qemu-xen-traditional/hw/pass-through.c 2015-01-19 13:16:38.000000000 +0100
@@ -84,8 +84,6 @@
*/
#include "pass-through.h"
-#include "pci/header.h"
-#include "pci/pci.h"
#include "pt-msi.h"
#include "qemu-xen.h"
#include "iomulti.h"
@@ -0,0 +1,18 @@
$NetBSD: patch-qemu-xen-traditional_hw_pass-through.h,v 1.1.1.1 2016/07/04 07:30:53 jnemeth Exp $
--- qemu-xen-traditional/hw/pass-through.h.orig 2014-10-06 17:50:24.000000000 +0200
+++ qemu-xen-traditional/hw/pass-through.h 2015-01-19 13:16:38.000000000 +0100
@@ -20,8 +20,13 @@
#include "hw.h"
#include "pci.h"
+#ifdef __NetBSD__
+#include "pciutils/header.h"
+#include "pciutils/pci.h"
+#else
#include "pci/header.h"
#include "pci/pci.h"
+#endif
#include "exec-all.h"
#include "sys-queue.h"
#include "qemu-timer.h"
@@ -0,0 +1,17 @@
$NetBSD: patch-qemu-xen-traditional_hw_piix4acpi.c,v 1.1.1.1 2016/07/04 07:30:53 jnemeth Exp $
--- qemu-xen-traditional/hw/piix4acpi.c.orig 2014-10-06 17:50:24.000000000 +0200
+++ qemu-xen-traditional/hw/piix4acpi.c 2015-01-19 13:16:38.000000000 +0100
@@ -41,8 +41,12 @@
#define PIIX4ACPI_LOG(level, fmt, ...) do { if (level <= PIIX4ACPI_LOGLEVEL) qemu_log(fmt, ## __VA_ARGS__); } while (0)
#ifdef CONFIG_PASSTHROUGH
+#ifdef __NetBSD__
+#include <pciutils/header.h>
+#else
#include <pci/header.h>
#endif
+#endif
/* PM1a_CNT bits, as defined in the ACPI specification. */
#define SCI_EN (1 << 0)
@@ -0,0 +1,13 @@
$NetBSD: patch-qemu-xen-traditional_hw_pt-graphics.c,v 1.1.1.1 2016/07/04 07:30:53 jnemeth Exp $
--- qemu-xen-traditional/hw/pt-graphics.c.orig 2015-01-19 16:14:46.000000000 +0100
+++ qemu-xen-traditional/hw/pt-graphics.c 2015-01-19 16:14:51.000000000 +0100
@@ -4,8 +4,6 @@
#include "pass-through.h"
#include "pci.h"
-#include "pci/header.h"
-#include "pci/pci.h"
#include <unistd.h>
#include <sys/ioctl.h>
@@ -0,0 +1,15 @@
$NetBSD: patch-qemu-xen-traditional_hw_pt-msi.c,v 1.1.1.1 2016/07/04 07:30:53 jnemeth Exp $
--- qemu-xen-traditional/hw/pt-msi.c.orig 2014-10-06 17:50:24.000000000 +0200
+++ qemu-xen-traditional/hw/pt-msi.c 2015-01-19 13:16:38.000000000 +0100
@@ -22,6 +22,10 @@
#include "pt-msi.h"
#include <sys/mman.h>
+#ifdef __NetBSD__
+#define MAP_LOCKED MAP_WIRED
+#endif
+
void msi_set_enable(struct pt_dev *dev, int en)
{
uint16_t val = 0;
@@ -0,0 +1,12 @@
$NetBSD: patch-qemu-xen-traditional_hw_pt-msi.h,v 1.1.1.1 2016/07/04 07:30:53 jnemeth Exp $
--- qemu-xen-traditional/hw/pt-msi.h.orig 2014-10-06 17:50:24.000000000 +0200
+++ qemu-xen-traditional/hw/pt-msi.h 2015-01-19 13:16:38.000000000 +0100
@@ -1,7 +1,6 @@
#ifndef _PT_MSI_H
#define _PT_MSI_H
-#include "pci/pci.h"
#include "pass-through.h"
#define PCI_CAP_ID_MSI 0x05 /* Message Signalled Interrupts */
@@ -0,0 +1,12 @@
$NetBSD: patch-qemu-xen-traditional_i386-dm_hookstarget.mak,v 1.1.1.1 2016/07/04 07:30:53 jnemeth Exp $
--- qemu-xen-traditional/i386-dm/hookstarget.mak.orig 2014-10-06 17:50:24.000000000 +0200
+++ qemu-xen-traditional/i386-dm/hookstarget.mak 2015-01-19 13:16:38.000000000 +0100
@@ -2,5 +2,5 @@
install-hook:
$(INSTALL_DIR) "$(DESTDIR)/$(bindir)"
- $(INSTALL_DIR) "$(DESTDIR)/$(configdir)"
- $(INSTALL_PROG) $(QEMU_ROOT)/i386-dm/qemu-ifup-$(IOEMU_OS) "$(DESTDIR)/$(configdir)/qemu-ifup"
+ $(INSTALL_DIR) "$(DESTDIR)/$(XEN_EXAMPLES_DIR)/scripts"
+ $(INSTALL_PROG) $(QEMU_ROOT)/i386-dm/qemu-ifup-$(IOEMU_OS) "$(DESTDIR)/$(XEN_EXAMPLES_DIR)/scripts/qemu-ifup"
@@ -0,0 +1,34 @@
$NetBSD: patch-qemu-xen-traditional_xen-hooks.mak,v 1.1.1.1 2016/07/04 07:30:53 jnemeth Exp $
enable PCI passthrough when pciutils is present
--- qemu-xen-traditional/xen-hooks.mak.orig 2014-10-06 17:50:24.000000000 +0200
+++ qemu-xen-traditional/xen-hooks.mak 2015-01-19 13:16:38.000000000 +0100
@@ -59,17 +59,25 @@
ifdef CONFIG_STUBDOM
CONFIG_PASSTHROUGH=1
else
- ifeq (,$(wildcard /usr/include/pci))
+ ifeq ($(CONFIG_NetBSD), y)
+CONFIG_PASSTHROUGH=1
+ else
+ ifeq (,$(wildcard /usr/include/pci))
$(warning === pciutils-dev package not found - missing /usr/include/pci)
$(warning === PCI passthrough capability has been disabled)
- else
+ else
CONFIG_PASSTHROUGH=1
+ endif
endif
endif
ifdef CONFIG_PASSTHROUGH
OBJS+= pass-through.o pt-msi.o pt-graphics.o
+ifeq ($(CONFIG_NetBSD), y)
+LIBS += -lpciutils -lpci
+else
LIBS += -lpci
+endif
CFLAGS += -DCONFIG_PASSTHROUGH
$(info === PCI passthrough capability has been enabled ===)
endif
@@ -0,0 +1,12 @@
$NetBSD: patch-qemu-xen_audio_audio.c,v 1.1.1.1 2016/07/04 07:30:53 jnemeth Exp $
--- qemu-xen/audio/audio.c.orig 2014-12-02 11:41:02.000000000 +0100
+++ qemu-xen/audio/audio.c 2015-01-19 13:16:38.000000000 +0100
@@ -1173,6 +1173,7 @@
return 0;
}
+#undef read
bytes = sw->hw->pcm_ops->read (sw, buf, size);
return bytes;
}
@@ -0,0 +1,15 @@
$NetBSD: patch-qemu-xen_qemu-doc.texi,v 1.1.1.1 2016/07/04 07:30:53 jnemeth Exp $
Avoid encoding issues in pod2man.
--- qemu-xen/qemu-doc.texi.orig 2014-12-02 11:41:02.000000000 +0100
+++ qemu-xen/qemu-doc.texi 2015-01-19 14:24:23.000000000 +0100
@@ -220,7 +220,7 @@
QEMU uses YM3812 emulation by Tatsuyuki Satoh.
QEMU uses GUS emulation (GUSEMU32 @url{http://www.deinmeister.de/gusemu/})
-by Tibor "TS" Schütz.
+by Tibor "TS" Schuetz.
Note that, by default, GUS shares IRQ(7) with parallel ports and so
QEMU must be told to not have parallel ports to have working GUS.
@@ -0,0 +1,13 @@
$NetBSD: patch-qemu-xen_xen-hvm.c,v 1.1.1.1 2016/07/04 07:30:53 jnemeth Exp $
--- qemu-xen/xen-hvm.c.orig 2016-01-06 16:42:43.000000000 +0000
+++ qemu-xen/xen-hvm.c
@@ -612,7 +612,7 @@ static void xen_sync_dirty_bitmap(XenIOS
for (i = 0; i < ARRAY_SIZE(bitmap); i++) {
unsigned long map = bitmap[i];
while (map != 0) {
- j = ctzl(map);
+ j = __builtin_ctzl(map);
map &= ~(1ul << j);
memory_region_set_dirty(framebuffer,
(i * width + j) * TARGET_PAGE_SIZE,
@@ -0,0 +1,18 @@
$NetBSD: patch-xenpaging_xenpaging.c,v 1.1.1.1 2016/07/04 07:30:51 jnemeth Exp $
--- xenpaging/xenpaging.c.orig 2016-06-20 12:08:22.000000000 +0000
+++ xenpaging/xenpaging.c
@@ -182,10 +182,11 @@ static int xenpaging_get_tot_pages(struc
static void *init_page(void)
{
void *buffer;
+ int rc;
/* Allocated page memory */
- errno = posix_memalign(&buffer, PAGE_SIZE, PAGE_SIZE);
- if ( errno != 0 )
+ rc = posix_memalign(&buffer, PAGE_SIZE, PAGE_SIZE);
+ if ( rc != 0 )
return NULL;
/* Lock buffer in memory so it can't be paged out */
@@ -0,0 +1,18 @@
$NetBSD: patch-xenstore_xc.c,v 1.1.1.1 2016/07/04 07:30:51 jnemeth Exp $
--- xenstore/xs.c.orig 2015-01-19 15:40:00.000000000 +0100
+++ xenstore/xs.c 2015-01-19 15:46:56.000000000 +0100
@@ -725,9 +725,13 @@
#ifdef USE_PTHREAD
#define DEFAULT_THREAD_STACKSIZE (16 * 1024)
+#ifndef PTHREAD_STACK_MIN
+#define READ_THREAD_STACKSIZE DEFAULT_THREAD_STACKSIZE
+#else
#define READ_THREAD_STACKSIZE \
((DEFAULT_THREAD_STACKSIZE < PTHREAD_STACK_MIN) ? \
PTHREAD_STACK_MIN : DEFAULT_THREAD_STACKSIZE)
+#endif
/* We dynamically create a reader thread on demand. */
mutex_lock(&h->request_mutex);
@@ -0,0 +1,13 @@
$NetBSD: patch-xentrace_xentrace.c,v 1.1.1.1 2016/07/04 07:30:51 jnemeth Exp $
--- xentrace/xentrace.c.orig 2016-02-09 14:44:19.000000000 +0000
+++ xentrace/xentrace.c
@@ -945,7 +945,7 @@ static int parse_cpumask_range(const cha
{
unsigned int a, b;
int nmaskbits;
- char c;
+ unsigned char c;
int in_range;
const char *s;