From patchwork Thu Aug 16 09:06:04 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marcel Apfelbaum X-Patchwork-Id: 10567221 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id ED2F4921 for ; Thu, 16 Aug 2018 09:13:21 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D554C286D0 for ; Thu, 16 Aug 2018 09:13:21 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C7CB8287F5; Thu, 16 Aug 2018 09:13:21 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 63B76286D0 for ; Thu, 16 Aug 2018 09:13:21 +0000 (UTC) Received: from localhost ([::1]:54455 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fqELI-00011b-NB for patchwork-qemu-devel@patchwork.kernel.org; Thu, 16 Aug 2018 05:13:20 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57555) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fqEEO-0000yO-DN for qemu-devel@nongnu.org; Thu, 16 Aug 2018 05:06:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fqEEK-0003uq-Du for qemu-devel@nongnu.org; Thu, 16 Aug 2018 05:06:12 -0400 Received: from mail-wm0-x242.google.com ([2a00:1450:400c:c09::242]:35089) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fqEEK-0003tr-78 for qemu-devel@nongnu.org; Thu, 16 Aug 2018 05:06:08 -0400 Received: by mail-wm0-x242.google.com with SMTP id o18-v6so3646463wmc.0 for ; Thu, 16 Aug 2018 02:06:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=iSOteZQMnBDvH/Cl7bIxlggFzPLYY9l94DNED9CJx1A=; b=ZaGgylil2stvDEistIIAWI7eUeY4Sm1C3ZoguvC9g7HOJ3q8nlDwG13wsa3whr/MsN hy3fWseQq6N8uQS+tNN+RlB+/slhyRANncvtY/vVpFALwgxkr0YIhHXW814NLu48RFDI yQQiP+AlPevMWdpnu5Y84tEC8gAVpXA6PZtidEYkptkx35q+LcZsugFeQRpyF9/P48eP gpIYS0jO6kHqB/p06NiTBmavw3odq0cQCewI5mAp5KThQlpNZyWByyNNiLiLtDVsHXMZ rgQw/K7NILkDKtNlQjW/fn0lWVfx8lAsx8NLrYiE67HZBRmEBNCfbd3BwPo9djTeDQlD efGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=iSOteZQMnBDvH/Cl7bIxlggFzPLYY9l94DNED9CJx1A=; b=JMbrLjrqg/3ugT9Kv9D4OR1VTShAGwzYom/kd85iaatCiqpVf5Gv1QagYt0EodXie0 hAQwcYZ77K9YTjpgtKyjyk4iTKT55a/myoDDLKt8W+xgvByYGjtbPuJOAjvoQOClO2y1 i3/Ep0rDYOkGTvziDXDUM+26uLsA4//gAOsTAWFtorJiK128lbeYLDWPxa7FLg8SAgDM tj0CkfvZ9DI5+H+BEWkH/2H6sgwRDoi0R51GGzGOomFgkC/gqR/htOjEyIC+FjYAw9ur 6AWZNfLFi7Ac0TbU3PMeb+yYRfG6xqQHvc4ilHfx/UadJCJzsi2vDxwi5wbEkVQlFmhj FlFg== X-Gm-Message-State: AOUpUlFHypFdiqxFJwEMM6jrDyZOg9Qe98UuLzT+XqJcosxhs4ZgvVfi kJn3ZJBwkjVWulPP5MHF3LyRrP9o X-Google-Smtp-Source: AA+uWPxpgj3Pj1S/4v0jyHRXEIw1yhqEyiFv800G9oTxUHRfxmIe7yU2C4VTJVhT3IA4g9zVKHlOdA== X-Received: by 2002:a1c:1802:: with SMTP id 2-v6mr14861601wmy.81.1534410366896; Thu, 16 Aug 2018 02:06:06 -0700 (PDT) Received: from localhost.localdomain ([176.228.154.53]) by smtp.gmail.com with ESMTPSA id g7-v6sm18099721wrw.30.2018.08.16.02.06.05 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 16 Aug 2018 02:06:06 -0700 (PDT) From: Marcel Apfelbaum To: qemu-devel@nongnu.org Date: Thu, 16 Aug 2018 12:06:04 +0300 Message-Id: <20180816090604.3970-1-marcel.apfelbaum@gmail.com> X-Mailer: git-send-email 2.17.1 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c09::242 Subject: [Qemu-devel] [PATCH] config: split PVRDMA from RDMA X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: rebecca@bluestop.org, thuth@redhat.com, yuval.shaia@oracle.com, peter.maydell@linaro.org Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP In some BSD systems RDMA migration is possible while the pvrdma device can't be compiled because the mremap system call is missing. Reported-by: Rebecca Cran Signed-off-by: Marcel Apfelbaum --- configure | 41 ++++++++++++++++++++++++++++++++++++++++- hw/rdma/Makefile.objs | 2 +- 2 files changed, 41 insertions(+), 2 deletions(-) diff --git a/configure b/configure index 2a7796ea80..92591302d7 100755 --- a/configure +++ b/configure @@ -375,6 +375,7 @@ hax="no" hvf="no" whpx="no" rdma="" +pvrdma="" gprof="no" debug_tcg="no" debug="no" @@ -1363,6 +1364,10 @@ for opt do ;; --disable-rdma) rdma="no" ;; + --enable-pvrdma) pvrdma="yes" + ;; + --disable-pvrdma) pvrdma="no" + ;; --with-gtkabi=*) gtkabi="$optarg" ;; --disable-vte) vte="no" @@ -1669,7 +1674,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 @@ -3064,6 +3070,34 @@ EOF fi fi +########################################## +# PVRDMA detection + +if test "$rdma" = "yes" ; then + case "$pvrdma" in + "") + if test "$bsd" = "yes"; then + pvrdma="no" + else + pvrdma="yes" + fi + ;; + "yes") + if test "$bsd" = "yes"; then + error_exit "PVRDMA is not supported for bsd" + 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 @@ -5952,6 +5986,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" @@ -6708,6 +6743,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 a/hw/rdma/Makefile.objs b/hw/rdma/Makefile.objs index 3504c39d21..bd36cbf51c 100644 --- a/hw/rdma/Makefile.objs +++ b/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