From nobody Mon Feb 9 19:30:05 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1601886935; cv=none; d=zohomail.com; s=zohoarc; b=T1zTmcrnFkcComllC1fQCB2AHltFbn16NF0IqUwbtTEBDw3hHmz874/BMjkKnRt91BYtLsyRnDINeeBVqiG80Ek6jeGvjAN80EH326dLBbEsW9nRuKfwNqsdrQ6718Vq+ss0aEyNdJVCyheeHszc2/Mrgmm9AvY6E2DPKLBkADk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1601886935; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=Bu9de6cm0lH2qBcSdIQtYOK10gRljsxlzbM3pPqqQYI=; b=e2xBpsthNcfyOmNR1Ej1Q05PeUo680t3QGXmhtL2GK1Z8CjLFF/hViX6dTd9sdzFvj1Qh5tsf8mkMlzf+D26xOdEDH2u3BP0r0NNn5PqzFq4Zu15GuuJKZo7Z1+nKd2pE4f9sVD/HzwyIcyVM1e9vd1qG9QLm/BB+bTmPhSgSpE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1601886935963884.696660099281; Mon, 5 Oct 2020 01:35:35 -0700 (PDT) Received: from localhost ([::1]:53774 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kPLy2-0003af-LK for importer@patchew.org; Mon, 05 Oct 2020 04:35:34 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36872) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kPLmm-0007x3-IX for qemu-devel@nongnu.org; Mon, 05 Oct 2020 04:23:56 -0400 Received: from mail-wr1-x441.google.com ([2a00:1450:4864:20::441]:43331) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kPLmi-0007J0-Lc for qemu-devel@nongnu.org; Mon, 05 Oct 2020 04:23:54 -0400 Received: by mail-wr1-x441.google.com with SMTP id g12so3044135wrp.10 for ; Mon, 05 Oct 2020 01:23:52 -0700 (PDT) Received: from localhost.localdomain ([2001:b07:6468:f312:2e86:3d8b:8b70:920c]) by smtp.gmail.com with ESMTPSA id z15sm11931434wrv.94.2020.10.05.01.23.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Oct 2020 01:23:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Bu9de6cm0lH2qBcSdIQtYOK10gRljsxlzbM3pPqqQYI=; b=SQlOZgKmlmMsXOcvE0YvNbKp+BbjMJfHq9yUybc7WoRq9p5HQxEBC+qX7H96suDFFR J99reupOSZ1U0LO2H29EMWrEU7Zw32zV5mzfhTzVHDtI0wAPHnSExSsXuWb3sOopLZRK sFH20AKbe76Rs6kJiosktdbXlzIab9XhKM/z+i8XP57UEIGj+qk2tGCbOq2LdEoMNyPS rQxeV1F3x2eCY0EY2FkSXl2ABoy4KaUbu82Itpvo29X3JTj7hPEMAM/eG7XPowYTfUWb L0ewu23hncDJpptkLd31/3S5QUUGAonYm71jEP9JbQ6HUrAZFtdbWb3vpOX/mymGNOpB EhnQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=Bu9de6cm0lH2qBcSdIQtYOK10gRljsxlzbM3pPqqQYI=; b=jcMMxa6kZLR9kM1aju2Ttz14dhny8hqjvhT7wE3xh1r2gTBrensvhouEeSIIOsdwZl EqAelNPUvXWDQbLA7slDTHn++1XE4ioAOQyEolJI8x9JB/gry4dw8cQgnvwgMXBNkFBm ulkggcvLy3BdthyZhEvVhy1T01EqPQJpoe19MOemMGlult9ZMSvTQR+wX/vk7pertOBm +clZmWHlsOdG5SgXOYAyx3MQbVGGAD9nIdZ2cpkh1qbdriFsGHTXQ6IaZkFmk4DGR7HV S+ita0P9NBYXzu/SFjbddiwow60ZVv5HSHDidGb9tkQ0TuqAQweMQ31yeQ4im23phoov b9Pg== X-Gm-Message-State: AOAM532E1AmIHQnhV9VWFy4JelCPJ/clFgIBnKDw/83ocfix2H5M50+b D1yxgSFnGiyKUF9Y+gZP+HyShT/rtgs= X-Google-Smtp-Source: ABdhPJwTBbCV7xlw5Eqtp7BIaGZgnCT0PeQfOMTvym/sKtUxMfNeChowX3CVPAsJ0aTf6ICdIY/iOw== X-Received: by 2002:adf:ee07:: with SMTP id y7mr6437535wrn.229.1601886230945; Mon, 05 Oct 2020 01:23:50 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 03/19] configure: convert accelerator variables to meson options Date: Mon, 5 Oct 2020 10:23:33 +0200 Message-Id: <20201005082349.354095-4-pbonzini@redhat.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20201005082349.354095-1-pbonzini@redhat.com> References: <20201005082349.354095-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::441; envelope-from=paolo.bonzini@gmail.com; helo=mail-wr1-x441.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.248, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action 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: Richard Henderson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Prepare for moving the tests to meson. For now they only have enabled/disabled as the possible values when meson is invoked, but "auto" will be a possibility later, when configure will only parse the command line options. Reviewed-by: Richard Henderson Signed-off-by: Paolo Bonzini --- configure | 132 +++++++++++++++++++++++----------------------- meson_options.txt | 15 ++++++ tests/meson.build | 2 +- 3 files changed, 83 insertions(+), 66 deletions(-) diff --git a/configure b/configure index 1981f58aa9..5cbfab9968 100755 --- a/configure +++ b/configure @@ -220,7 +220,7 @@ glob() { } =20 supported_hax_target() { - test "$hax" =3D "yes" || return 1 + test "$hax" =3D "enabled" || return 1 glob "$1" "*-softmmu" || return 1 case "${1%-softmmu}" in i386|x86_64) @@ -231,7 +231,7 @@ supported_hax_target() { } =20 supported_kvm_target() { - test "$kvm" =3D "yes" || return 1 + test "$kvm" =3D "enabled" || return 1 glob "$1" "*-softmmu" || return 1 case "${1%-softmmu}:$cpu" in aarch64:aarch64 | \ @@ -247,7 +247,7 @@ supported_kvm_target() { } =20 supported_xen_target() { - test "$xen" =3D "yes" || return 1 + test "$xen" =3D "enabled" || return 1 glob "$1" "*-softmmu" || return 1 # Only i386 and x86_64 provide the xenpv machine. case "${1%-softmmu}" in @@ -259,7 +259,7 @@ supported_xen_target() { } =20 supported_hvf_target() { - test "$hvf" =3D "yes" || return 1 + test "$hvf" =3D "enabled" || return 1 glob "$1" "*-softmmu" || return 1 case "${1%-softmmu}" in x86_64) @@ -270,7 +270,7 @@ supported_hvf_target() { } =20 supported_whpx_target() { - test "$whpx" =3D "yes" || return 1 + test "$whpx" =3D "enabled" || return 1 glob "$1" "*-softmmu" || return 1 case "${1%-softmmu}" in i386|x86_64) @@ -310,7 +310,7 @@ supported_target() { add_to deprecated_features $1 fi =20 - test "$tcg" =3D "yes" && return 0 + test "$tcg" =3D "enabled" && return 0 supported_kvm_target "$1" && return 0 supported_xen_target "$1" && return 0 supported_hax_target "$1" && return 0 @@ -413,14 +413,14 @@ vnc_png=3D"auto" xkbcommon=3D"auto" xen=3D"" xen_ctrl_version=3D"" -xen_pci_passthrough=3D"" +xen_pci_passthrough=3D"auto" linux_aio=3D"" linux_io_uring=3D"" cap_ng=3D"" attr=3D"" libattr=3D"" xfs=3D"" -tcg=3D"yes" +tcg=3D"enabled" membarrier=3D"" vhost_net=3D"" vhost_crypto=3D"" @@ -428,10 +428,10 @@ vhost_scsi=3D"" vhost_vsock=3D"" vhost_user=3D"" vhost_user_fs=3D"" -kvm=3D"no" -hax=3D"no" -hvf=3D"no" -whpx=3D"no" +kvm=3D"disabled" +hax=3D"disabled" +hvf=3D"disabled" +whpx=3D"disabled" rdma=3D"" pvrdma=3D"" gprof=3D"no" @@ -817,8 +817,8 @@ HOST_VARIANT_DIR=3D"" case $targetos in MINGW32*) mingw32=3D"yes" - hax=3D"yes" - whpx=3D"" + hax=3D"enabled" + whpx=3D"auto" vhost_user=3D"no" audio_possible_drivers=3D"dsound sdl" if check_include dsound.h; then @@ -852,7 +852,7 @@ DragonFly) ;; NetBSD) bsd=3D"yes" - hax=3D"yes" + hax=3D"enabled" make=3D"${MAKE-gmake}" audio_drv_list=3D"oss try-sdl" audio_possible_drivers=3D"oss sdl" @@ -869,8 +869,8 @@ OpenBSD) Darwin) bsd=3D"yes" darwin=3D"yes" - hax=3D"yes" - hvf=3D"" + hax=3D"enabled" + hvf=3D"auto" if [ "$cpu" =3D "x86_64" ] ; then QEMU_CFLAGS=3D"-arch x86_64 $QEMU_CFLAGS" QEMU_LDFLAGS=3D"-arch x86_64 $QEMU_LDFLAGS" @@ -906,7 +906,7 @@ Linux) audio_possible_drivers=3D"oss alsa sdl pa" linux=3D"yes" linux_user=3D"yes" - kvm=3D"yes" + kvm=3D"enabled" QEMU_INCLUDES=3D"-isystem ${source_path}/linux-headers -Ilinux-headers $= QEMU_INCLUDES" ;; esac @@ -1188,33 +1188,33 @@ for opt do ;; --enable-netmap) netmap=3D"yes" ;; - --disable-xen) xen=3D"no" + --disable-xen) xen=3D"disabled" ;; - --enable-xen) xen=3D"yes" + --enable-xen) xen=3D"enabled" ;; - --disable-xen-pci-passthrough) xen_pci_passthrough=3D"no" + --disable-xen-pci-passthrough) xen_pci_passthrough=3D"disabled" ;; - --enable-xen-pci-passthrough) xen_pci_passthrough=3D"yes" + --enable-xen-pci-passthrough) xen_pci_passthrough=3D"enabled" ;; --disable-brlapi) brlapi=3D"no" ;; --enable-brlapi) brlapi=3D"yes" ;; - --disable-kvm) kvm=3D"no" + --disable-kvm) kvm=3D"disabled" ;; - --enable-kvm) kvm=3D"yes" + --enable-kvm) kvm=3D"enabled" ;; - --disable-hax) hax=3D"no" + --disable-hax) hax=3D"disabled" ;; - --enable-hax) hax=3D"yes" + --enable-hax) hax=3D"enabled" ;; - --disable-hvf) hvf=3D"no" + --disable-hvf) hvf=3D"disabled" ;; - --enable-hvf) hvf=3D"yes" + --enable-hvf) hvf=3D"enabled" ;; - --disable-whpx) whpx=3D"no" + --disable-whpx) whpx=3D"disabled" ;; - --enable-whpx) whpx=3D"yes" + --enable-whpx) whpx=3D"enabled" ;; --disable-tcg-interpreter) tcg_interpreter=3D"no" ;; @@ -1224,9 +1224,9 @@ for opt do ;; --enable-cap-ng) cap_ng=3D"yes" ;; - --disable-tcg) tcg=3D"no" + --disable-tcg) tcg=3D"disabled" ;; - --enable-tcg) tcg=3D"yes" + --enable-tcg) tcg=3D"enabled" ;; --disable-malloc-trim) malloc_trim=3D"disabled" ;; @@ -1711,7 +1711,7 @@ if [ "$ARCH" =3D "unknown" ]; then fi =20 if [ "$bsd_user" =3D "no" -a "$linux_user" =3D "no" -a "$softmmu" =3D "no"= ] ; then - tcg=3D"no" + tcg=3D"disabled" fi =20 default_target_list=3D"" @@ -2668,7 +2668,7 @@ fi ########################################## # xen probe =20 -if test "$xen" !=3D "no" ; then +if test "$xen" !=3D "disabled" ; then # Check whether Xen library path is specified via --extra-ldflags to avo= id # overriding this setting with pkg-config output. If not, try pkg-config # to obtain all needed flags. @@ -2677,7 +2677,7 @@ if test "$xen" !=3D "no" ; then $pkg_config --exists xencontrol ; then xen_ctrl_version=3D"$(printf '%d%02d%02d' \ $($pkg_config --modversion xencontrol | sed 's/\./ /g') )" - xen=3Dyes + xen=3Denabled xen_pc=3D"xencontrol xenstore xenguest xenforeignmemory xengnttab" xen_pc=3D"$xen_pc xenevtchn xendevicemodel" if $pkg_config --exists xentoolcore; then @@ -2703,10 +2703,10 @@ int main(void) { EOF if ! compile_prog "" "$xen_libs" ; then # Xen not found - if test "$xen" =3D "yes" ; then + if test "$xen" =3D "enabled" ; then feature_not_found "xen" "Install xen devel" fi - xen=3Dno + xen=3Ddisabled =20 # Xen unstable elif @@ -2732,7 +2732,7 @@ EOF then xen_stable_libs=3D"-lxendevicemodel $xen_stable_libs -lxentoolcore" xen_ctrl_version=3D41100 - xen=3Dyes + xen=3Denabled elif cat > $TMPC < $TMPC < $TMPC < $TMPC < $TMPC < $TMPC << EOF #include int main() { return 0;} EOF if ! compile_object ""; then - if test "$hvf" =3D "yes"; then + if test "$hvf" =3D "enabled"; then error_exit "Hypervisor.framework not available" fi - hvf=3D'no' + hvf=3D'disabled' else - hvf=3D'yes' + hvf=3D'enabled' fi fi =20 @@ -6192,7 +6192,7 @@ if test "$mingw32" =3D "yes" ; then fi =20 # Disable OpenBSD W^X if available -if test "$tcg" =3D "yes" && test "$targetos" =3D "OpenBSD"; then +if test "$tcg" =3D "enabled" && test "$targetos" =3D "OpenBSD"; then cat > $TMPC <> $config_host_mak echo "VIRGL_LIBS=3D$virgl_libs" >> $config_host_mak fi -if test "$xen" =3D "yes" ; then +if test "$xen" =3D "enabled" ; then echo "CONFIG_XEN_BACKEND=3Dy" >> $config_host_mak echo "CONFIG_XEN_CTRL_INTERFACE_VERSION=3D$xen_ctrl_version" >> $config_= host_mak echo "XEN_CFLAGS=3D$xen_cflags" >> $config_host_mak @@ -6823,7 +6823,7 @@ fi if test "$optreset" =3D "yes" ; then echo "HAVE_OPTRESET=3Dy" >> $config_host_mak fi -if test "$tcg" =3D "yes"; then +if test "$tcg" =3D "enabled"; then echo "CONFIG_TCG=3Dy" >> $config_host_mak if test "$tcg_interpreter" =3D "yes" ; then echo "CONFIG_TCG_INTERPRETER=3Dy" >> $config_host_mak @@ -7606,7 +7606,7 @@ fi =20 if supported_xen_target $target; then echo "CONFIG_XEN=3Dy" >> $config_target_mak - if test "$xen_pci_passthrough" =3D yes; then + if test "$xen_pci_passthrough" =3D enabled; then echo "CONFIG_XEN_PCI_PASSTHROUGH=3Dy" >> "$config_target_mak" fi fi @@ -7844,6 +7844,8 @@ NINJA=3D${ninja:-$PWD/ninjatool} $meson setup \ -Db_pie=3D$(if test "$pie" =3D yes; then echo true; else echo fals= e; fi) \ -Db_coverage=3D$(if test "$gcov" =3D yes; then echo true; else ech= o false; fi) \ -Dmalloc=3D$malloc -Dmalloc_trim=3D$malloc_trim \ + -Dkvm=3D$kvm -Dhax=3D$hax -Dwhpx=3D$whpx -Dhvf=3D$hvf \ + -Dxen=3D$xen -Dxen_pci_passthrough=3D$xen_pci_passthrough -Dtcg=3D$tcg \ -Dcocoa=3D$cocoa -Dmpath=3D$mpath -Dsdl=3D$sdl -Dsdl_image=3D$sdl_image \ -Dvnc=3D$vnc -Dvnc_sasl=3D$vnc_sasl -Dvnc_jpeg=3D$vnc_jpeg -Dvnc_png=3D$v= nc_png \ -Dgettext=3D$gettext -Dxkbcommon=3D$xkbcommon -Du2f=3D$u2f\ diff --git a/meson_options.txt b/meson_options.txt index 46ea1d889a..05adc7a179 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -11,6 +11,21 @@ option('malloc_trim', type : 'feature', value : 'auto', option('malloc', type : 'combo', choices : ['system', 'tcmalloc', 'jemallo= c'], value: 'system', description: 'choose memory allocator to use') =20 +option('kvm', type: 'feature', value: 'auto', + description: 'KVM acceleration support') +option('hax', type: 'feature', value: 'auto', + description: 'HAX acceleration support') +option('whpx', type: 'feature', value: 'auto', + description: 'WHPX acceleration support') +option('hvf', type: 'feature', value: 'auto', + description: 'HVF acceleration support') +option('xen', type: 'feature', value: 'auto', + description: 'Xen backend support') +option('xen_pci_passthrough', type: 'feature', value: 'auto', + description: 'Xen PCI passthrough support') +option('tcg', type: 'feature', value: 'auto', + description: 'TCG support') + option('cocoa', type : 'feature', value : 'auto', description: 'Cocoa user interface (macOS only)') option('mpath', type : 'feature', value : 'auto', diff --git a/tests/meson.build b/tests/meson.build index 3c2969092d..bf47a38c74 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -269,7 +269,7 @@ test('decodetree', sh, =20 subdir('fp') =20 -if 'CONFIG_TCG' in config_host +if not get_option('tcg').disabled() if 'CONFIG_PLUGIN' in config_host subdir('plugin') endif --=20 2.26.2