From owner-svn-ports-all@freebsd.org Sun Dec 9 08:25:53 2018 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 847401312D7A; Sun, 9 Dec 2018 08:25:53 +0000 (UTC) (envelope-from novel@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 270FC80507; Sun, 9 Dec 2018 08:25:53 +0000 (UTC) (envelope-from novel@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 04E9C6CDC; Sun, 9 Dec 2018 08:25:53 +0000 (UTC) (envelope-from novel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wB98Pqvw017907; Sun, 9 Dec 2018 08:25:52 GMT (envelope-from novel@FreeBSD.org) Received: (from novel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wB98PqU3017906; Sun, 9 Dec 2018 08:25:52 GMT (envelope-from novel@FreeBSD.org) Message-Id: <201812090825.wB98PqU3017906@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: novel set sender to novel@FreeBSD.org using -f From: Roman Bogorodskiy Date: Sun, 9 Dec 2018 08:25:52 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-branches@freebsd.org Subject: svn commit: r487030 - in branches/2018Q4/emulators/qemu: . files X-SVN-Group: ports-branches X-SVN-Commit-Author: novel X-SVN-Commit-Paths: in branches/2018Q4/emulators/qemu: . files X-SVN-Commit-Revision: 487030 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 270FC80507 X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; NEURAL_HAM_SHORT(-0.96)[-0.963,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-0.99)[-0.991,0] X-Rspamd-Server: mx1.freebsd.org 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: Sun, 09 Dec 2018 08:25:53 -0000 Author: novel Date: Sun Dec 9 08:25:52 2018 New Revision: 487030 URL: https://svnweb.freebsd.org/changeset/ports/487030 Log: MFH: r484695 emulators/qemu: fix build on 12 and -CURRENT Build fails with: hw/rdma/vmw/pvrdma_cmd.c:19:10: fatal error: 'linux/types.h' file not found Add two upstream commits to fix this issue: * 72221d03b85fcfba27a47a2af08ee59150550ced to not include linux/types.h * 21ab34c9543fe1b6d31b3edbd01a397e7e090d00 to split PVRDMA from RDMA as pvrdma device can't be used on FreeBSD as mremap() system call is missing PR: 232968 Reported by: Trond.Endrestol@ximalas.info Approved by: portmgr (build fix blanket) Obtained from: upstream Approved by: ports-secteam (miwi) Added: branches/2018Q4/emulators/qemu/files/patch-rdma-pvrdma-split - copied unchanged from r484695, head/emulators/qemu/files/patch-rdma-pvrdma-split Modified: branches/2018Q4/emulators/qemu/Makefile Directory Properties: branches/2018Q4/ (props changed) Modified: branches/2018Q4/emulators/qemu/Makefile ============================================================================== --- branches/2018Q4/emulators/qemu/Makefile Sun Dec 9 08:13:09 2018 (r487029) +++ branches/2018Q4/emulators/qemu/Makefile Sun Dec 9 08:25:52 2018 (r487030) @@ -3,7 +3,7 @@ PORTNAME= qemu PORTVERSION= 2.12.0 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= emulators MASTER_SITES= http://wiki.qemu.org/download/ DIST_SUBDIR= qemu/${PORTVERSION} Copied: branches/2018Q4/emulators/qemu/files/patch-rdma-pvrdma-split (from r484695, head/emulators/qemu/files/patch-rdma-pvrdma-split) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ branches/2018Q4/emulators/qemu/files/patch-rdma-pvrdma-split Sun Dec 9 08:25:52 2018 (r487030, copy of r484695, head/emulators/qemu/files/patch-rdma-pvrdma-split) @@ -0,0 +1,123 @@ +diff --git configure configure +index 457684a7e6..3da60d8436 100755 +--- configure ++++ configure +@@ -353,6 +353,7 @@ hax="no" + hvf="no" + whpx="no" + rdma="" ++pvrdma="" + gprof="no" + debug_tcg="no" + debug="no" +@@ -1308,6 +1309,10 @@ for opt do + ;; + --disable-rdma) rdma="no" + ;; ++ --enable-pvrdma) pvrdma="yes" ++ ;; ++ --disable-pvrdma) pvrdma="no" ++ ;; + --with-gtkabi=*) gtkabi="$optarg" + ;; + --disable-vte) vte="no" +@@ -1593,7 +1598,8 @@ disabled with --disable-FEATURE, default is enabled if available: + hax HAX acceleration support + hvf Hypervisor.framework acceleration support + whpx Windows Hypervisor Platform acceleration support +- rdma Enable RDMA-based migration and PVRDMA support ++ rdma Enable RDMA-based migration ++ pvrdma Enable PVRDMA support + vde support for vde network + netmap support for netmap network + linux-aio Linux AIO support +@@ -2971,6 +2977,48 @@ EOF + fi + fi + ++########################################## ++# PVRDMA detection ++ ++cat > $TMPC < ++ ++int ++main(void) ++{ ++ char buf = 0; ++ void *addr = &buf; ++ addr = mremap(addr, 0, 1, MREMAP_MAYMOVE | MREMAP_FIXED); ++ ++ return 0; ++} ++EOF ++ ++if test "$rdma" = "yes" ; then ++ case "$pvrdma" in ++ "") ++ if compile_prog "" ""; then ++ pvrdma="yes" ++ else ++ pvrdma="no" ++ fi ++ ;; ++ "yes") ++ if ! compile_prog "" ""; then ++ error_exit "PVRDMA is not supported since mremap is not implemented" ++ fi ++ pvrdma="yes" ++ ;; ++ "no") ++ pvrdma="no" ++ ;; ++ esac ++else ++ if test "$pvrdma" = "yes" ; then ++ error_exit "PVRDMA requires rdma suppport" ++ fi ++ pvrdma="no" ++fi + + ########################################## + # VNC SASL detection +@@ -5820,6 +5868,7 @@ if test "$tcg" = "yes" ; then + fi + echo "malloc trim support $malloc_trim" + echo "RDMA support $rdma" ++echo "PVRDMA support $pvrdma" + echo "fdt support $fdt" + echo "membarrier $membarrier" + echo "preadv support $preadv" +@@ -6568,6 +6617,10 @@ if test "$rdma" = "yes" ; then + echo "RDMA_LIBS=$rdma_libs" >> $config_host_mak + fi + ++if test "$pvrdma" = "yes" ; then ++ echo "CONFIG_PVRDMA=y" >> $config_host_mak ++fi ++ + if test "$have_rtnetlink" = "yes" ; then + echo "CONFIG_RTNETLINK=y" >> $config_host_mak + fi +diff --git hw/rdma/Makefile.objs hw/rdma/Makefile.objs +index 3504c39d21..bd36cbf51c 100644 +--- hw/rdma/Makefile.objs ++++ hw/rdma/Makefile.objs +@@ -1,4 +1,4 @@ +-ifeq ($(CONFIG_RDMA),y) ++ifeq ($(CONFIG_PVRDMA),y) + obj-$(CONFIG_PCI) += rdma_utils.o rdma_backend.o rdma_rm.o + obj-$(CONFIG_PCI) += vmw/pvrdma_dev_ring.o vmw/pvrdma_cmd.o \ + vmw/pvrdma_qp_ops.o vmw/pvrdma_main.o +diff --git hw/rdma/vmw/pvrdma_cmd.c hw/rdma/vmw/pvrdma_cmd.c +index 99019d8741..bd14b4bc47 100644 +--- hw/rdma/vmw/pvrdma_cmd.c ++++ hw/rdma/vmw/pvrdma_cmd.c +@@ -16,7 +16,6 @@ + #include "qemu/osdep.h" + #include "qemu/error-report.h" + #include "cpu.h" +-#include + #include "hw/hw.h" + #include "hw/pci/pci.h" + #include "hw/pci/pci_ids.h"