From owner-svn-ports-all@freebsd.org Fri Mar 15 12:37:56 2019 Return-Path: Delivered-To: svn-ports-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EB83515488F2; Fri, 15 Mar 2019 12:37:55 +0000 (UTC) (envelope-from royger@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8ED6095E2E; Fri, 15 Mar 2019 12:37:55 +0000 (UTC) (envelope-from royger@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 78346A271; Fri, 15 Mar 2019 12:37:55 +0000 (UTC) (envelope-from royger@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2FCbttD007543; Fri, 15 Mar 2019 12:37:55 GMT (envelope-from royger@FreeBSD.org) Received: (from royger@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2FCbtS6007541; Fri, 15 Mar 2019 12:37:55 GMT (envelope-from royger@FreeBSD.org) Message-Id: <201903151237.x2FCbtS6007541@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: royger set sender to royger@FreeBSD.org using -f From: =?UTF-8?Q?Roger_Pau_Monn=c3=a9?= Date: Fri, 15 Mar 2019 12:37:55 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r495786 - in head/sysutils/xen-tools: . files X-SVN-Group: ports-head X-SVN-Commit-Author: royger X-SVN-Commit-Paths: in head/sysutils/xen-tools: . files X-SVN-Commit-Revision: 495786 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 8ED6095E2E X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.95)[-0.950,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Mar 2019 12:37:56 -0000 Author: royger (src committer) Date: Fri Mar 15 12:37:54 2019 New Revision: 495786 URL: https://svnweb.freebsd.org/changeset/ports/495786 Log: sysutils/xen-tools: add QEMU migration fix Add a QEMU fix to make migration more reliable. Sponsored by: Citrix Systems R&D Reviewed by: novel Differential revision: https://reviews.freebsd.org/D19591 Added: head/sysutils/xen-tools/files/0001-xen-mapcache-use-MAP_FIXED-flag-so-the-mmap-address-qemuu.patch (contents, props changed) Modified: head/sysutils/xen-tools/Makefile Modified: head/sysutils/xen-tools/Makefile ============================================================================== --- head/sysutils/xen-tools/Makefile Fri Mar 15 10:44:31 2019 (r495785) +++ head/sysutils/xen-tools/Makefile Fri Mar 15 12:37:54 2019 (r495786) @@ -3,7 +3,7 @@ PORTNAME= xen PKGNAMESUFFIX= -tools PORTVERSION= 4.11.1 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= sysutils emulators MASTER_SITES= http://downloads.xenproject.org/release/xen/${PORTVERSION}/ Added: head/sysutils/xen-tools/files/0001-xen-mapcache-use-MAP_FIXED-flag-so-the-mmap-address-qemuu.patch ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sysutils/xen-tools/files/0001-xen-mapcache-use-MAP_FIXED-flag-so-the-mmap-address-qemuu.patch Fri Mar 15 12:37:54 2019 (r495786) @@ -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) +