From patchwork Tue Jan 7 12:53:59 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kamil Rytarowski X-Patchwork-Id: 1218800 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=gmx.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; secure) header.d=gmx.net header.i=@gmx.net header.b="KSha5Lcj"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 47sZNX0q6dz9sRh for ; Wed, 8 Jan 2020 01:23:07 +1100 (AEDT) Received: from localhost ([::1]:49638 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iopl9-0004Pt-SS for incoming@patchwork.ozlabs.org; Tue, 07 Jan 2020 09:23:04 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:35900) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iooNt-0003jU-1u for qemu-devel@nongnu.org; Tue, 07 Jan 2020 07:54:58 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iooNr-0000z3-Dt for qemu-devel@nongnu.org; Tue, 07 Jan 2020 07:54:56 -0500 Received: from mout.gmx.net ([212.227.15.15]:36531) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iooNr-0000xO-3p for qemu-devel@nongnu.org; Tue, 07 Jan 2020 07:54:55 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1578401684; bh=MNe65IX81php0msP6hBmroHHZoRYTXqyhunZqXPS9uk=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=KSha5Lcj98BJiycOGEot7524k7lEY9j/56sF8kouCxxiuquwZ0jIkoDJAyhTvH6bb gm2Y00VrnNhRoytocEVTZoQ9bYPLkWb/fe7GiE8oAAoDTbmel7trKD0Z4tFqw1S815 aDEIf6m4YIkHIpWrLlI584WoGTvU5L5vvjqelrqo= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from localhost.localdomain ([89.71.135.231]) by mail.gmx.com (mrgmx005 [212.227.17.184]) with ESMTPSA (Nemesis) id 1MTiPv-1jGT5a44Uv-00TySy; Tue, 07 Jan 2020 13:54:44 +0100 From: Kamil Rytarowski To: qemu-devel@nongnu.org Subject: [PATCH 2/4] Add the NetBSD Virtual Machine Monitor accelerator. Date: Tue, 7 Jan 2020 13:53:59 +0100 Message-Id: <20200107125401.18126-3-n54@gmx.com> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20200107125401.18126-1-n54@gmx.com> References: <20200107125401.18126-1-n54@gmx.com> MIME-Version: 1.0 X-Provags-ID: V03:K1:Va58LnAqGNV5aMYRzW+KSTjJlXVucQcpbQU7cQEiD5oWpMCFvkq EwH/w7ih5DBhEDWLBikLLj8wTg6GdNfKwjURQCOeFI5BJJyMwjFyNiS8Lw2UXZ1GHeGFb5f ka2Noz5/V3G4hP6gksCZTxQg9Fd2L6wnUimUiBcY65YZbIBpjzAQX6f9O2xle1KOnN2dR7A dCTBzFet37HhWtecvagyQ== X-UI-Out-Filterresults: notjunk:1; V03:K0:otGnVlpPJlY=:stqlQCrGUYHWbt+5GoOHfG ZmFH4ED7afmuGmD1Jrxkt3vXZ1UMJHn+JHfpXzsyiVvFeFA/wp2p8RKfQQU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xYaVsNSDBgTiubGwnXv25wPaKsz9Fvc6QJM24PezgOkYtpv gJV+usXqi1WhQJjVZz4ci9sGbB1lJI7CpuMuPRXM7JxNUWF/xk2EXlssF00PLNpb3h73WNDEn URY5xY9oKGJSLafTcXU5eupAlUNBwj4JxTV8SYw== X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 212.227.15.15 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: pbonzini@redhat.com, Kamil Rytarowski , Maxime Villard , peter.maydell@linaro.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Maxime Villard Introduces the configure support for the new NetBSD Virtual Machine Monitor that allows for hypervisor acceleration from usermode components on the NetBSD platform. Signed-off-by: Maxime Villard Signed-off-by: Kamil Rytarowski --- configure | 36 ++++++++++++++++++++++++++++++++++++ qemu-options.hx | 4 ++-- 2 files changed, 38 insertions(+), 2 deletions(-) -- 2.24.0 diff --git a/configure b/configure index 0ce2c0354a..eb456a271e 100755 --- a/configure +++ b/configure @@ -241,6 +241,17 @@ supported_whpx_target() { return 1 } +supported_nvmm_target() { + test "$nvmm" = "yes" || return 1 + glob "$1" "*-softmmu" || return 1 + case "${1%-softmmu}" in + i386|x86_64) + return 0 + ;; + esac + return 1 +} + supported_target() { case "$1" in *-softmmu) @@ -268,6 +279,7 @@ supported_target() { supported_hax_target "$1" && return 0 supported_hvf_target "$1" && return 0 supported_whpx_target "$1" && return 0 + supported_nvmm_target "$1" && return 0 print_error "TCG disabled, but hardware accelerator not available for '$target'" return 1 } @@ -387,6 +399,7 @@ kvm="no" hax="no" hvf="no" whpx="no" +nvmm="no" rdma="" pvrdma="" gprof="no" @@ -1168,6 +1181,10 @@ for opt do ;; --enable-whpx) whpx="yes" ;; + --disable-nvmm) nvmm="no" + ;; + --enable-nvmm) nvmm="yes" + ;; --disable-tcg-interpreter) tcg_interpreter="no" ;; --enable-tcg-interpreter) tcg_interpreter="yes" @@ -1768,6 +1785,7 @@ disabled with --disable-FEATURE, default is enabled if available: hax HAX acceleration support hvf Hypervisor.framework acceleration support whpx Windows Hypervisor Platform acceleration support + nvmm NetBSD Virtual Machine Monitor acceleration support rdma Enable RDMA-based migration pvrdma Enable PVRDMA support vde support for vde network @@ -2757,6 +2775,20 @@ if test "$whpx" != "no" ; then fi fi +########################################## +# NetBSD Virtual Machine Monitor (NVMM) accelerator check +if test "$nvmm" != "no" ; then + if check_include "nvmm.h" ; then + nvmm="yes" + LIBS="-lnvmm $LIBS" + else + if test "$nvmm" = "yes"; then + feature_not_found "NVMM" "NVMM is not available" + fi + nvmm="no" + fi +fi + ########################################## # Sparse probe if test "$sparse" != "no" ; then @@ -6495,6 +6527,7 @@ echo "KVM support $kvm" echo "HAX support $hax" echo "HVF support $hvf" echo "WHPX support $whpx" +echo "NVMM support $nvmm" echo "TCG support $tcg" if test "$tcg" = "yes" ; then echo "TCG debug enabled $debug_tcg" @@ -7771,6 +7804,9 @@ fi if test "$target_aligned_only" = "yes" ; then echo "TARGET_ALIGNED_ONLY=y" >> $config_target_mak fi +if supported_nvmm_target $target; then + echo "CONFIG_NVMM=y" >> $config_target_mak +fi if test "$target_bigendian" = "yes" ; then echo "TARGET_WORDS_BIGENDIAN=y" >> $config_target_mak fi diff --git a/qemu-options.hx b/qemu-options.hx index e9d6231438..f2dbac68ef 100644 --- a/qemu-options.hx +++ b/qemu-options.hx @@ -31,7 +31,7 @@ DEF("machine", HAS_ARG, QEMU_OPTION_machine, \ "-machine [type=]name[,prop[=value][,...]]\n" " selects emulated machine ('-machine help' for list)\n" " property accel=accel1[:accel2[:...]] selects accelerator\n" - " supported accelerators are kvm, xen, hax, hvf, whpx or tcg (default: tcg)\n" + " supported accelerators are kvm, xen, hax, hvf, nvmm, whpx or tcg (default: tcg)\n" " vmport=on|off|auto controls emulation of vmport (default: auto)\n" " dump-guest-core=on|off include guest memory in a core dump (default=on)\n" " mem-merge=on|off controls memory merge support (default: on)\n" @@ -63,7 +63,7 @@ Supported machine properties are: @table @option @item accel=@var{accels1}[:@var{accels2}[:...]] This is used to enable an accelerator. Depending on the target architecture, -kvm, xen, hax, hvf, whpx or tcg can be available. By default, tcg is used. If there is +kvm, xen, hax, hvf, nvmm, whpx or tcg can be available. By default, tcg is used. If there is more than one accelerator specified, the next one is used if the previous one fails to initialize. @item vmport=on|off|auto