Index: head/sysutils/xen-tools/Makefile =================================================================== --- head/sysutils/xen-tools/Makefile (revision 495785) +++ head/sysutils/xen-tools/Makefile (revision 495786) @@ -1,99 +1,99 @@ # $FreeBSD$ PORTNAME= xen PKGNAMESUFFIX= -tools PORTVERSION= 4.11.1 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= sysutils emulators MASTER_SITES= http://downloads.xenproject.org/release/xen/${PORTVERSION}/ MAINTAINER= royger@FreeBSD.org COMMENT= Xen management tools LICENSE= GPLv2 LGPL3 LICENSE_COMB= multi LIB_DEPENDS= libyajl.so:devel/yajl \ liblzo2.so:archivers/lzo2 \ libpixman-1.so:x11/pixman \ libargp.so:devel/argp-standalone BUILD_DEPENDS= seabios>0:misc/seabios RUN_DEPENDS= seabios>0:misc/seabios DOCS_BUILD_DEPENDS=markdown:textproc/markdown OPTIONS_DEFINE= DOCS SPICE OPTIONS_DEFAULT= DOCS OPTIONS_SUB= yes SPICE_DESC= Enable SPICE protocol for QEMU SPICE_CONFIGURE_WITH= extra-qemuu-configure-args="--enable-spice" SPICE_BUILD_DEPENDS= spice-protocol>=0.12.10:devel/spice-protocol SPICE_LIB_DEPENDS= libspice-server.so:devel/libspice-server ONLY_FOR_ARCHS= amd64 ONLY_FOR_ARCHS_REASON= "not yet ported to anything other than amd64" USES= cpe gettext gmake libtool localbase:ldflags perl5 pkgconfig \ python:2.7 shebangfix USE_GNOME= glib20 USE_LDCONFIG= yes HAS_CONFIGURE= yes # Set ARCH=x86_64 in order to overwrite the environment ARCH=amd64 MAKE_ARGS= clang=y ARCH=x86_64 # Set correct include paths taking /usr/local into account. EXTRA_PATCHES= ${FILESDIR}/0001-build-fix-include-paths-in-FreeBSD.patch:-p1 # Build with lld (LLVM linker) EXTRA_PATCHES+= ${FILESDIR}/0001-x86-replace-usage-in-the-linker-script.patch:-p1 # Fix docs build EXTRA_PATCHES+= ${FILESDIR}/0001-docs-use-the-make-wildcard-function-instead-of-find.patch:-p1 # Fix hvmloader build with LLVM LD EXTRA_PATCHES+= ${FILESDIR}/0001-hvmloader-fix-build-with-LLVM-Linker.patch:-p1 CONFIGURE_ARGS+= --with-system-seabios=${LOCALBASE}/share/seabios/bios.bin \ --mandir=${MANPREFIX}/man SHEBANG_FILES= tools/misc/xen-ringwatch \ tools/misc/xencov_split \ tools/python/scripts/convert-legacy-stream \ tools/python/scripts/verify-stream-v2 \ tools/xenmon/xenmon.py ALL_TARGET= tools DOCS_ALL_TARGET= docs INSTALL_TARGET= install-tools DOCS_INSTALL_TARGET= install-docs .include .if ${OPSYS} != FreeBSD IGNORE= only supported on FreeBSD .endif .if ${OSVERSION} < 1200074 IGNORE= only supported on FreeBSD 12.0 or newer .endif .if ${PORT_OPTIONS:MSPICE} && ${OSVERSION} < 1300008 BROKEN= SPICE support requires FreeBSD version 13.0 or higher .endif post-patch: @for p in `ls ${FILESDIR}/*qemuu*.patch 2>/dev/null`; do \ ${ECHO_CMD} "====> Applying $${p##*/}" ; \ ${PATCH} -s -p1 -i $${p} -d ${WRKSRC}/tools/qemu-xen ; \ done # The ports native 'build' target cannot be used because it sets CFLAGS, and # that breaks the Xen kernel build system that's used by the tools in order to # build the pv-shim. do-build: ${MAKE_CMD} -j${MAKE_JOBS_NUMBER} -C ${WRKSRC} ${MAKE_ARGS} ${ALL_TARGET} do-install: ${MAKE_CMD} -j${MAKE_JOBS_NUMBER} -C ${WRKSRC} ${MAKE_ARGS} ${INSTALL_TARGET} post-install: ${MKDIR} ${STAGEDIR}/var/run/xen .include Index: head/sysutils/xen-tools/files/0001-xen-mapcache-use-MAP_FIXED-flag-so-the-mmap-address-qemuu.patch =================================================================== --- head/sysutils/xen-tools/files/0001-xen-mapcache-use-MAP_FIXED-flag-so-the-mmap-address-qemuu.patch (nonexistent) +++ head/sysutils/xen-tools/files/0001-xen-mapcache-use-MAP_FIXED-flag-so-the-mmap-address-qemuu.patch (revision 495786) @@ -0,0 +1,56 @@ +From f3069a581c0f96b62c59b06a43b57561f7418813 Mon Sep 17 00:00:00 2001 +From: Roger Pau Monne +Date: Fri, 15 Mar 2019 09:27:19 +0100 +Subject: [PATCH] xen-mapcache: use MAP_FIXED flag so the mmap address hint is + always honored +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Or if it's not possible to honor the hinted address an error is returned +instead. This makes it easier to spot the actual failure, instead of +failing later on when the caller of xen_remap_bucket realizes the +mapping has not been created at the requested address. + +Also note that at least on FreeBSD using MAP_FIXED will cause mmap to +try harder to honor the passed address. + +Signed-off-by: Roger Pau Monné +--- +Cc: Stefano Stabellini +Cc: Anthony Perard +Cc: Paul Durrant +Cc: Igor Druzhinin +Cc: Paolo Bonzini +Cc: Richard Henderson +Cc: Eduardo Habkost +Cc: "Michael S. Tsirkin" +Cc: Marcel Apfelbaum +Cc: xen-devel@lists.xenproject.org +--- + hw/i386/xen/xen-mapcache.c | 8 +++++++- + 1 file changed, 7 insertions(+), 1 deletion(-) + +diff --git a/hw/i386/xen/xen-mapcache.c b/hw/i386/xen/xen-mapcache.c +index 349f72d00c..0e2870b320 100644 +--- a/hw/i386/xen/xen-mapcache.c ++++ b/hw/i386/xen/xen-mapcache.c +@@ -185,8 +185,14 @@ static void xen_remap_bucket(MapCacheEntry *entry, + } + + if (!dummy) { ++ /* ++ * If the caller has requested the mapping at a specific address use ++ * MAP_FIXED to make sure it's honored. Note that with MAP_FIXED at ++ * least FreeBSD will try harder to honor the passed address. ++ */ + vaddr_base = xenforeignmemory_map2(xen_fmem, xen_domid, vaddr, +- PROT_READ | PROT_WRITE, 0, ++ PROT_READ | PROT_WRITE, ++ vaddr ? MAP_FIXED : 0, + nb_pfn, pfns, err); + if (vaddr_base == NULL) { + perror("xenforeignmemory_map2"); +-- +2.17.2 (Apple Git-113) + Property changes on: head/sysutils/xen-tools/files/0001-xen-mapcache-use-MAP_FIXED-flag-so-the-mmap-address-qemuu.patch ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property