From nobody Thu May 2 03:23:26 2024 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1650469177780829.1714085210956; Wed, 20 Apr 2022 08:39:37 -0700 (PDT) Received: from localhost ([::1]:56646 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nhCQa-00013R-Qv for importer@patchew.org; Wed, 20 Apr 2022 11:39:36 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42460) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nhCLR-000122-FT for qemu-devel@nongnu.org; Wed, 20 Apr 2022 11:34:17 -0400 Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]:53807) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nhCLO-0000t1-IQ for qemu-devel@nongnu.org; Wed, 20 Apr 2022 11:34:15 -0400 Received: by mail-wm1-x330.google.com with SMTP id p189so1457358wmp.3 for ; Wed, 20 Apr 2022 08:34:14 -0700 (PDT) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id n68-20020a1c2747000000b0038e6b4d5395sm130401wmn.16.2022.04.20.08.34.12 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Apr 2022 08:34:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=8tkEVewhctd9//NgUzvVRR5ShxlRUXerOnNd4wGrF2I=; b=bG2RL2WqKdtsBRXmcFH8UOSUIHzVsoQsr7/DuNEsCnMq00B8EpjFeQZVZisGt+GgI1 RrC6pp4bp36RHkrmEvvyRfUpWLiLklwYeRsRDq9pa2l3UoRKjGlBKSbVilkOKBl7m/zs yePkjUNvh61RhbCXhLHpcDYrDdqA63jl/LF06OwIdk5aXKaX98ujLvWOMpHBPpov7HDF Jmxo+0uoIymDZzjK0Sw9lVXXKRXtmlKxL+9Dh+ozR79/NUu7FRnguTLBqR+X9bEhNpYT 8F+bQiqtperhcJwicef4ERjKtU3h3NkTvZ3Zoj8X8CYZ4AEnJHMG17od+7JHIKYJlpYY viBA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=8tkEVewhctd9//NgUzvVRR5ShxlRUXerOnNd4wGrF2I=; b=tvIFigTsjwOA2Uzi/gUKrpJ3DMyezwcCSH916zLoWZ/5W6NLhh336s/79dj4zlNEo1 ewLVHl65STYa0VJeHnHosGZDM/IVY+HXeuPKG0qD5z0xmWFcNd55Bhs7GjklgJl/MqTV FX9vRkDSzHQdkXf14uCTBVsl1ktWj8Ac9FfU+CafyguhZUeWdl9se9XnmhFHJvbNGCj3 lCfkNA/lTy7qmuFO9wszY4jVuAcBgbjTWMpgqPNV81xuOwmcu8d0Km9IrigXX0vreIPR q2gzQSLczcsgvvY/qeiACslrDFWnM+gsww9KYeITaNoFLA7TGUMFLW/CCYACRApd8z3d O1zQ== X-Gm-Message-State: AOAM532prPIAUOk4rKMAyiS6ZwdTx53d8S1ExXkvGcioTwNfI3fI5PZ6 kGdM0LpVctfdMuAfwOOHfLFasGwzgqBsYQ== X-Google-Smtp-Source: ABdhPJxRo9OgBKfzKBgRa+M4aoZ9WGuBfItWEo1A6ojxOjDIxIJNYF2itThRKFHwquq9jgilJGWdxQ== X-Received: by 2002:a05:600c:4e12:b0:391:18da:1883 with SMTP id b18-20020a05600c4e1200b0039118da1883mr4340018wmq.101.1650468852774; Wed, 20 Apr 2022 08:34:12 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 01/34] meson: show final set of compiler flags Date: Wed, 20 Apr 2022 17:33:34 +0200 Message-Id: <20220420153407.73926-2-pbonzini@redhat.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220420153407.73926-1-pbonzini@redhat.com> References: <20220420153407.73926-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::330; envelope-from=paolo.bonzini@gmail.com; helo=mail-wm1-x330.google.com 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.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1650469178551100001 Content-Type: text/plain; charset="utf-8" The actual set of compiler flags can grow beyond what is found by the confi= gure script, for example if gprof is used. Show the full set in the summary. Signed-off-by: Paolo Bonzini Reviewed-by: Marc-Andr=C3=A9 Lureau --- meson.build | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 6ba60950c8..cf3b1b39cf 100644 --- a/meson.build +++ b/meson.build @@ -3521,10 +3521,10 @@ link_args =3D get_option(link_language + '_link_arg= s') if link_args.length() > 0 summary_info +=3D {'LDFLAGS': ' '.join(link_args)} endif -summary_info +=3D {'QEMU_CFLAGS': config_host['QEMU_CFLAGS']} -summary_info +=3D {'QEMU_CXXFLAGS': config_host['QEMU_CXXFLAGS']} -summary_info +=3D {'QEMU_OBJCFLAGS': config_host['QEMU_OBJCFLAGS']} -summary_info +=3D {'QEMU_LDFLAGS': config_host['QEMU_LDFLAGS']} +summary_info +=3D {'QEMU_CFLAGS': ' '.join(qemu_cflags)} +summary_info +=3D {'QEMU_CXXFLAGS': ' '.join(qemu_cxxflags)} +summary_info +=3D {'QEMU_OBJCFLAGS': ' '.join(qemu_objcflags)} +summary_info +=3D {'QEMU_LDFLAGS': ' '.join(qemu_ldflags)} summary_info +=3D {'profiler': get_option('profiler')} summary_info +=3D {'link-time optimization (LTO)': get_option('b_lto')} summary_info +=3D {'PIE': get_option('b_pie')} --=20 2.35.1 From nobody Thu May 2 03:23:26 2024 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1650469558067692.0382558959407; Wed, 20 Apr 2022 08:45:58 -0700 (PDT) Received: from localhost ([::1]:45732 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nhCWi-0004nx-W1 for importer@patchew.org; Wed, 20 Apr 2022 11:45:57 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42486) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nhCLS-00016K-R4 for qemu-devel@nongnu.org; Wed, 20 Apr 2022 11:34:18 -0400 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]:38737) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nhCLQ-0000t8-8h for qemu-devel@nongnu.org; Wed, 20 Apr 2022 11:34:18 -0400 Received: by mail-wm1-x333.google.com with SMTP id r187-20020a1c44c4000000b0038ccb70e239so3953330wma.3 for ; Wed, 20 Apr 2022 08:34:15 -0700 (PDT) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id n68-20020a1c2747000000b0038e6b4d5395sm130401wmn.16.2022.04.20.08.34.12 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Apr 2022 08:34:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=5g0ARLKIY1y/ttR8zFbP5fhBI16ZJzJ38rCmGJLpx9w=; b=dTzLzrNtPYN8WVSQ/KenQCEiyPVin+rCpedVmdOVdZ8YJGwBlvagk/hazZLBDlGnVF HIvd6NEf8dXAzLFBxGfHxe1N7iml95dpsYV6KlQ0/LJSYSCGzrgAAZ1T/7wsOEIiz3f2 F752quDTYPU7NJ+3oHrUeKiqVrsodN+z1MxklI26kaeoMW2mJO3TrKZT77/ZINvvYiU9 UzoWY4losXL3AiAqSjx2bD/rVFHwCPaUeA0MlxGaajHxfKZTFH7mG5zWSybHxBr9CKBw rNl8F6tlq891ApFp0CGMkL0ebJqy5eFnZGHSdIebnnVj1jk+OZ0WDBeQVsc/SosuTINw idhw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=5g0ARLKIY1y/ttR8zFbP5fhBI16ZJzJ38rCmGJLpx9w=; b=32X0yiAF+AyxQNtHe+FBkLXFhjy/ZzBRCTBFp1/OYchoaeznueYKNEioXLNOeL+IKQ 5bbyNyh+O3CWSYkzZNpcv9/NDr+TjAF+LGm00qfTKAjYclXi6b3xBXtWUb0UdS3uHLA3 QvsLqUwjhaMB/NX6s3D9u7+895eUYQXdxkeQf+o+h9U0GM33MtfKsdtDkGmNM+oYP8Cm AatbaTD5M6S6Djg4l7upVnyUqpvLUkJ0WU+GwcFjq4XqhFEXT8x7I6VZICWNtMBDhHmZ qbOks16U4raO3p83V1K3pz3FplQCPJUwXCraN1OesRxHQy6THxFNpg2H/Kw6cwhQxLmO CX3Q== X-Gm-Message-State: AOAM532UQptZhZEC3eJ0UWg3u37JmwHElsdGLK+H2JDdWDHxdpnWR+hG wkuhSqPftjelVc05tYO9Af/GZiTe+I3Rhw== X-Google-Smtp-Source: ABdhPJyMZhMr0AjXsmRVOBpk76hGg1YxjfYzWWLedNRiF5GnD4Oi2yZC/7LiY0vzvLgR/3AYPumrlA== X-Received: by 2002:a05:600c:3d88:b0:391:7aa1:792b with SMTP id bi8-20020a05600c3d8800b003917aa1792bmr4340305wmb.8.1650468853991; Wed, 20 Apr 2022 08:34:13 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 02/34] configure: remove dead code Date: Wed, 20 Apr 2022 17:33:35 +0200 Message-Id: <20220420153407.73926-3-pbonzini@redhat.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220420153407.73926-1-pbonzini@redhat.com> References: <20220420153407.73926-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::333; envelope-from=paolo.bonzini@gmail.com; helo=mail-wm1-x333.google.com 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.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1650469559484100001 Content-Type: text/plain; charset="utf-8" tcg_interpreter is never written, it is purely a meson option; trace_backends is never read. And SeaBIOS is only build from the source tree with roms/Makefile, so the config.mak file is unused. Signed-off-by: Paolo Bonzini Reviewed-by: Marc-Andr=C3=A9 Lureau --- configure | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/configure b/configure index 7c08c18358..2fc860ed9a 100755 --- a/configure +++ b/configure @@ -320,7 +320,6 @@ linux_user=3D"" bsd_user=3D"" pkgversion=3D"" pie=3D"" -trace_backends=3D"log" trace_file=3D"trace" opengl=3D"$default_feature" coroutine=3D"" @@ -391,7 +390,6 @@ for opt do cross_cc_vars=3D"$cross_cc_vars cross_cc_cflags_${cc= _arch}" ;; --cross-cc-*) cc_arch=3D${opt#--cross-cc-}; cc_arch=3D${cc_arch%%=3D*} - cc_archs=3D"$cc_archs $cc_arch" eval "cross_cc_${cc_arch}=3D\$optarg" cross_cc_vars=3D"$cross_cc_vars cross_cc_${cc_arch}" ;; @@ -2881,9 +2879,6 @@ fi if test "$vhost_user_fs" =3D "yes" ; then echo "CONFIG_VHOST_USER_FS=3Dy" >> $config_host_mak fi -if test "$tcg" =3D "enabled" -a "$tcg_interpreter" =3D "true" ; then - echo "CONFIG_TCG_INTERPRETER=3Dy" >> $config_host_mak -fi =20 if test "$opengl" =3D "yes" ; then echo "CONFIG_OPENGL=3Dy" >> $config_host_mak @@ -3025,7 +3020,6 @@ LINKS=3D"Makefile" LINKS=3D"$LINKS tests/tcg/Makefile.target" LINKS=3D"$LINKS pc-bios/optionrom/Makefile" LINKS=3D"$LINKS pc-bios/s390-ccw/Makefile" -LINKS=3D"$LINKS roms/seabios/Makefile" LINKS=3D"$LINKS pc-bios/qemu-icon.bmp" LINKS=3D"$LINKS .gdbinit scripts" # scripts needed by relative path in .gd= binit LINKS=3D"$LINKS tests/avocado tests/data" @@ -3060,24 +3054,6 @@ done export target_list source_path use_containers cpu $source_path/tests/tcg/configure.sh) =20 -# temporary config to build submodules -if test -f $source_path/roms/seabios/Makefile; then - for rom in seabios; do - config_mak=3Droms/$rom/config.mak - echo "# Automatically generated by configure - do not modify" > $confi= g_mak - echo "SRC_PATH=3D$source_path/roms/$rom" >> $config_mak - echo "AS=3D$as" >> $config_mak - echo "CCAS=3D$ccas" >> $config_mak - echo "CC=3D$cc" >> $config_mak - echo "BCC=3Dbcc" >> $config_mak - echo "CPP=3D$cpp" >> $config_mak - echo "OBJCOPY=3Dobjcopy" >> $config_mak - echo "IASL=3D$iasl" >> $config_mak - echo "LD=3D$ld" >> $config_mak - echo "RANLIB=3D$ranlib" >> $config_mak - done -fi - config_mak=3Dpc-bios/optionrom/config.mak echo "# Automatically generated by configure - do not modify" > $config_mak echo "TOPSRC_DIR=3D$source_path" >> $config_mak --=20 2.35.1 From nobody Thu May 2 03:23:26 2024 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1650469086269672.7925187329126; Wed, 20 Apr 2022 08:38:06 -0700 (PDT) Received: from localhost ([::1]:53990 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nhCP7-0007dl-82 for importer@patchew.org; Wed, 20 Apr 2022 11:38:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42520) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nhCLU-0001Am-O3 for qemu-devel@nongnu.org; Wed, 20 Apr 2022 11:34:21 -0400 Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]:41673) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nhCLR-0000tR-Hg for qemu-devel@nongnu.org; Wed, 20 Apr 2022 11:34:20 -0400 Received: by mail-wr1-x42e.google.com with SMTP id e21so2774558wrc.8 for ; Wed, 20 Apr 2022 08:34:17 -0700 (PDT) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id n68-20020a1c2747000000b0038e6b4d5395sm130401wmn.16.2022.04.20.08.34.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Apr 2022 08:34:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=bl5Z1tGN6bAdcGAXv9pgBgtN/4cVjBI/taIq0mznbug=; b=P/5mpN/skoyqVvZy3A9Fmn157spOeStivojnNJQnK4G4Fg9cC9r56iqBXJLpTx4SDA Dlf0rPkByxiehG6fMfBldnnXC1/xIKDcTmtaNDhDDIb2o07yVqzk6dInsjRYJLLH0Gan gLfrzS22rGFiDYB1dyMIpy6EvmexCGZRgEnpVwPcYNtFBQaCKvFAd97wAMBRyjTO2G5M n8h7cAeeeMST0BOn+9oRrBrOhBk/nWLCRQ5PrHFIqGfQHkUaWVZfj8ud+Df50yCFHTpP 276KZmUi7p6KK6nwGnqRSvfs3ngqXix1rOw6PLy1x0BZeTAm4PEAtwnkr1Tm7eDepFPA dSGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=bl5Z1tGN6bAdcGAXv9pgBgtN/4cVjBI/taIq0mznbug=; b=wdLEQAEzALXdCmDiOHCFks3xhscLgiCfPBRxSLz7j5HvNC3VYqZ/ZrIv8Z26Kq5Hi2 0pRiUtiUk1un9m6tJ+L16xEQlQDGwBdnA6OL6RDy9aOa3oDVGb/oeFvwEEDwSSuxDAUb RmgMQQZf9e6nTrNrLi5FwO30qeai6h/oJX7eVueCACjwFqXwdPjS6ypFmgo1103AqDqN B+Xs9fJeO/fjbg5mioegGV0GxoWh2e+/gA1NuXyxIov3ZFiNF3C8Ga33g4ZbE57s/uUb V/wjYCjFe9xikB+T6Yd8i4bnNOGqQLn7/qo570doaVpNUYv7I+WWlXXL5IyhqaI4rj1R GDMg== X-Gm-Message-State: AOAM533F/0MreUhkxTtRtDdWBxwbFI+mmqUwz+uD7Ldl6tH61S50sOro m+Cut90NB/ULF4duxfgqQfCpF15cvBPn2A== X-Google-Smtp-Source: ABdhPJxpH9/drYrU03xU+GZ/MM6VVtx9pd4/fLgsr00IiILCRPPbq8kBFhyCP/+KFhn/AZD6HHpJcw== X-Received: by 2002:adf:e10a:0:b0:20a:86a3:d06f with SMTP id t10-20020adfe10a000000b0020a86a3d06fmr16333424wrz.249.1650468856031; Wed, 20 Apr 2022 08:34:16 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 03/34] qga: wixl: get path to sysroot from pkg-config as intended Date: Wed, 20 Apr 2022 17:33:36 +0200 Message-Id: <20220420153407.73926-4-pbonzini@redhat.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220420153407.73926-1-pbonzini@redhat.com> References: <20220420153407.73926-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::42e; envelope-from=paolo.bonzini@gmail.com; helo=mail-wr1-x42e.google.com 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.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1650469087916100001 Content-Type: text/plain; charset="utf-8" The .wxs file uses $(var.Mingw_bin) while configure/meson have always used Mingw_dlls. Fix them to match what was probably intended. Signed-off-by: Paolo Bonzini Reviewed-by: Konstantin Kostiuk Reviewed-by: Marc-Andr=C3=A9 Lureau --- configure | 4 ++-- qga/meson.build | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/configure b/configure index 2fc860ed9a..2bc5a0b84f 100755 --- a/configure +++ b/configure @@ -2702,7 +2702,7 @@ if test "$QEMU_GA_VERSION" =3D ""; then QEMU_GA_VERSION=3D$(cat $source_path/VERSION) fi =20 -QEMU_GA_MSI_MINGW_DLL_PATH=3D"$($pkg_config --variable=3Dprefix glib-2.0)/= bin" +QEMU_GA_MSI_MINGW_BIN_PATH=3D"$($pkg_config --variable=3Dprefix glib-2.0)/= bin" =20 # Mac OS X ships with a broken assembler roms=3D @@ -2790,7 +2790,7 @@ if test "$debug_tcg" =3D "yes" ; then fi if test "$mingw32" =3D "yes" ; then echo "CONFIG_WIN32=3Dy" >> $config_host_mak - echo "QEMU_GA_MSI_MINGW_DLL_PATH=3D${QEMU_GA_MSI_MINGW_DLL_PATH}" >> $co= nfig_host_mak + echo "QEMU_GA_MSI_MINGW_BIN_PATH=3D${QEMU_GA_MSI_MINGW_BIN_PATH}" >> $co= nfig_host_mak echo "QEMU_GA_MANUFACTURER=3D${QEMU_GA_MANUFACTURER}" >> $config_host_mak echo "QEMU_GA_DISTRO=3D${QEMU_GA_DISTRO}" >> $config_host_mak echo "QEMU_GA_VERSION=3D${QEMU_GA_VERSION}" >> $config_host_mak diff --git a/qga/meson.build b/qga/meson.build index 392d560941..6d9f39bb32 100644 --- a/qga/meson.build +++ b/qga/meson.build @@ -129,7 +129,7 @@ if targetos =3D=3D 'windows' wixl, '-o', '@OUTPUT0@', '@INPUT0@', qemu_ga_msi_arch[cpu], qemu_ga_msi_vss, - '-D', 'Mingw_dlls=3D' + config_host['QEMU_GA= _MSI_MINGW_DLL_PATH'], + '-D', 'Mingw_bin=3D' + config_host['QEMU_GA_= MSI_MINGW_BIN_PATH'], ]) all_qga +=3D [qga_msi] alias_target('msi', qga_msi) --=20 2.35.1 From nobody Thu May 2 03:23:26 2024 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1650469478354786.565311441826; Wed, 20 Apr 2022 08:44:38 -0700 (PDT) Received: from localhost ([::1]:40626 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nhCVR-0001NG-6N for importer@patchew.org; Wed, 20 Apr 2022 11:44:37 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42528) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nhCLV-0001BV-7B for qemu-devel@nongnu.org; Wed, 20 Apr 2022 11:34:21 -0400 Received: from mail-wr1-x42d.google.com ([2a00:1450:4864:20::42d]:45048) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nhCLS-0000tf-Qn for qemu-devel@nongnu.org; Wed, 20 Apr 2022 11:34:20 -0400 Received: by mail-wr1-x42d.google.com with SMTP id b19so2754722wrh.11 for ; Wed, 20 Apr 2022 08:34:18 -0700 (PDT) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id n68-20020a1c2747000000b0038e6b4d5395sm130401wmn.16.2022.04.20.08.34.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Apr 2022 08:34:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=naEAB3p73JH+poeN9mZadWNCsi8lUD4sUKcP4Qz3f10=; b=k+Ol71GM7DfxpGhN8k92+QtrTOwtv6jcI99mBHT5RGqbud+fbYwtn8nVtYg8YWglSG YwN8Kli88pEHonSLUxosqqv+VGeoK8gtsQ/QWd5wJ9SxmVHP7hhNSSRk3gM+XbDwogFl +y7VJo1OcP38NCTKZ1zPpibg/Bl94FEc4mSdXZyZu+TliTRcrKEiK7VtU4n2LDyjvGyL LN04pm9TYMqrOTjeU9dZdE2IcXLHNEXPB8i1DK+FaHvKmtltqyttrJsECOG3zRnBFPXV qnqdq5Bj+froEeQLZtOcUtRsr3dCsV22BLsWZ6xVHD/hGIPtqZBVYAYEtF/sVx47RbWH kiAA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=naEAB3p73JH+poeN9mZadWNCsi8lUD4sUKcP4Qz3f10=; b=JMq10W3ehS+2FABsmnUaQUQ8TcLjnzABZklRThc9jhVjCVFNBB8iMzWLevpSEe0ArC AzoDnVOsQ28BOGPf8NhyVHMyE2P7gOBJXsFzjL3Ad7eLBQM2gdRB1w0Zz2vsLA5rOvz6 iyNlQMm4jtEsCht/ebTDIWTdEJFpNSFyUkI77ZDK5LnzPzirWJaPhFuGSTpo1wOmu06H S9MhngFfkCytqBeRf+wQjTSZ9YpGCAgA7lEm6uw4vurMInej+msd43fH9LDeTendR4yf Fmq7zt3kuoFZiXzDfYSeGdVc5iXMc5uUbGSBRvkvRQt9XBk8V8xtXjFAvNrMkHR9pf6/ SwDg== X-Gm-Message-State: AOAM530/NSBoA6tlgfRXwZiMOOjH5rW5D9K/xNshVMOhts1ZjIwJbdw9 1YYCO+smmgZ5rkilw8/vnsVZDRRVEC8dVw== X-Google-Smtp-Source: ABdhPJwzFkX46gRRkyLIkWgyRorDXiNFoC8TBRd9tSgcPwFkQALQWVSB3ojwYmKqzJMHJKWGXlGi/Q== X-Received: by 2002:a05:6000:18ae:b0:20a:a549:d38a with SMTP id b14-20020a05600018ae00b0020aa549d38amr7480322wri.247.1650468857153; Wed, 20 Apr 2022 08:34:17 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 04/34] configure: pc-bios/qemu-icon.bmp does not exist Date: Wed, 20 Apr 2022 17:33:37 +0200 Message-Id: <20220420153407.73926-5-pbonzini@redhat.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220420153407.73926-1-pbonzini@redhat.com> References: <20220420153407.73926-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::42d; envelope-from=paolo.bonzini@gmail.com; helo=mail-wr1-x42d.google.com 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.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1650469479298100001 Content-Type: text/plain; charset="utf-8" The file has been removed in commit a8260d3876 ("ui: install logo icons to $prefix/share/icons", 2019-01-21), do not try to symlink it in the build tr= ee. Signed-off-by: Paolo Bonzini Reviewed-by: Marc-Andr=C3=A9 Lureau Reviewed-by: Thomas Huth --- configure | 1 - 1 file changed, 1 deletion(-) diff --git a/configure b/configure index 2bc5a0b84f..7a89cb4123 100755 --- a/configure +++ b/configure @@ -3020,7 +3020,6 @@ LINKS=3D"Makefile" LINKS=3D"$LINKS tests/tcg/Makefile.target" LINKS=3D"$LINKS pc-bios/optionrom/Makefile" LINKS=3D"$LINKS pc-bios/s390-ccw/Makefile" -LINKS=3D"$LINKS pc-bios/qemu-icon.bmp" LINKS=3D"$LINKS .gdbinit scripts" # scripts needed by relative path in .gd= binit LINKS=3D"$LINKS tests/avocado tests/data" LINKS=3D"$LINKS tests/qemu-iotests/check" --=20 2.35.1 From nobody Thu May 2 03:23:26 2024 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1650469866102551.8317541640542; Wed, 20 Apr 2022 08:51:06 -0700 (PDT) Received: from localhost ([::1]:34640 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nhCbg-00081z-Gf for importer@patchew.org; Wed, 20 Apr 2022 11:51:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42562) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nhCLW-0001F6-BR for qemu-devel@nongnu.org; Wed, 20 Apr 2022 11:34:22 -0400 Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]:43529) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nhCLU-0000tz-Ba for qemu-devel@nongnu.org; Wed, 20 Apr 2022 11:34:22 -0400 Received: by mail-wm1-x32a.google.com with SMTP id n40-20020a05600c3ba800b0038ff1939b16so1489622wms.2 for ; Wed, 20 Apr 2022 08:34:19 -0700 (PDT) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id n68-20020a1c2747000000b0038e6b4d5395sm130401wmn.16.2022.04.20.08.34.17 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Apr 2022 08:34:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=w+6vVe44Ze6Zp52ur673XaROVI4p8cy+qC9SEHaHUS4=; b=DDSknHsCs/yJ9ldF4pDd5Z+QSxi/xMNiGUBghoXw/9sTmshDN0yyLhgazc/eNTkUyd Xh0rJNVtF8CY/V3hKqfrKBtlWd0Z3wNt6uZMovdDKyyIOmMmIvcUla+0ws7thu+x3Lxk 1IFTIQcCJfbz5HUtkMNyhVuUfKmVCpGmNpR1eeCJw7tZaNsCxQXGgicyEZSbF8F9hgBI acHzI2OBRijWku9OhtmdbeOG3Ad38tQOTkFhzTEacOiePRdAdOLuOsFX4ZZSM6QAfYL3 JTzplwfJV/ciLfUuJARJGjEiPy2g1D8sTJnUvdJTp5sI+CO16jvzt7mAozjFgzOUqfQf eVHQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=w+6vVe44Ze6Zp52ur673XaROVI4p8cy+qC9SEHaHUS4=; b=ekkQqNbU+MZbroAosWk1JhZtEDbYhOA9nl1s9a+9eqD9uLX49MvjaKuZw+EWnwm1Tr lNEq3NBLDbupWrkN/J+u7XiEygmlK7k4fNJ9CGwU7OxZhKCv6UJNhrFZrr0LXHjv0m7R KzR4EZuCiiQzOvYSqjxs+at9ii0UTIAkQM/VlkoL8Vtf7MaKjA2jNV/pHWuLljJEpwKj EW3CJMAx0SYBhe/MOfw+5chD/Eaq0u8tXsBNksG+y1i+8U8yZFD6C4I1Z4k69j1U6UJe tOCJr4saTp7o0uavTubHUxObnKQKsXJUia1oOS6gEiYU6yWf6spLuoR1qnH6qSaDCbBt fkNQ== X-Gm-Message-State: AOAM531R3ngQEq85Vz7BcvE4+h3sx0asJew47Unf9Ad35BlWR8z72iKc Y6/RtbgCzfP57P7zsOvDEFq8piZ/4LIh5Q== X-Google-Smtp-Source: ABdhPJwy+WvOyJzsPIFAMf6CmP+hdKe7U31fBRTrxfSWsOu9Gvr4FLZvxew/EwDANejT/9aPhE+ZOA== X-Received: by 2002:a05:600c:4fc9:b0:392:8906:7e5d with SMTP id o9-20020a05600c4fc900b0039289067e5dmr4156968wmq.179.1650468858294; Wed, 20 Apr 2022 08:34:18 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 05/34] configure: gcov should not exclude fortify-source Date: Wed, 20 Apr 2022 17:33:38 +0200 Message-Id: <20220420153407.73926-6-pbonzini@redhat.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220420153407.73926-1-pbonzini@redhat.com> References: <20220420153407.73926-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::32a; envelope-from=paolo.bonzini@gmail.com; helo=mail-wm1-x32a.google.com 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.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1650469867293100001 Content-Type: text/plain; charset="utf-8" There is no reason other than history (dating back to commit 1d728c3946, "t= ests: add gcov support", 2013-01-06) for this, remove this unnecessary conditional. Signed-off-by: Paolo Bonzini Reviewed-by: Marc-Andr=C3=A9 Lureau --- configure | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/configure b/configure index 7a89cb4123..48ae18f47f 100755 --- a/configure +++ b/configure @@ -2625,9 +2625,7 @@ fi =20 write_c_skeleton =20 -if test "$gcov" =3D "yes" ; then - : -elif test "$fortify_source" =3D "yes" ; then +if test "$fortify_source" =3D "yes" ; then QEMU_CFLAGS=3D"-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3D2 $QEMU_CFLAGS" debug=3Dno fi --=20 2.35.1 From nobody Thu May 2 03:23:26 2024 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1650469269736113.44812178123846; Wed, 20 Apr 2022 08:41:09 -0700 (PDT) Received: from localhost ([::1]:34348 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nhCS4-0005QJ-BH for importer@patchew.org; Wed, 20 Apr 2022 11:41:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42572) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nhCLX-0001HO-09 for qemu-devel@nongnu.org; Wed, 20 Apr 2022 11:34:23 -0400 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]:40713) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nhCLV-0000u3-5H for qemu-devel@nongnu.org; Wed, 20 Apr 2022 11:34:22 -0400 Received: by mail-wr1-x434.google.com with SMTP id q3so2780351wrj.7 for ; Wed, 20 Apr 2022 08:34:20 -0700 (PDT) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id n68-20020a1c2747000000b0038e6b4d5395sm130401wmn.16.2022.04.20.08.34.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Apr 2022 08:34:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=69Benn7RO1xIp2afo9GkcAzM/ddXV6mj86NlD1orfxI=; b=d/Vsz9CruWn69wOD1ALTpYxBpZD5/8o0tyS/pDaZLFmRla4ebwgz6tcbV1XpkO8UkI yg7SuK0JJLyk/Ow1F0OfkMYGlTDe5Km0KKdu7mbRSfzaLweJRVoR6c97YosGLrW1ZO2F o/fUWKRsYWXmde7ESwWdLEzC56XtfbdzLDt2aS9mlDTLp3DWtVrRiPFEvHqGDSsdW7xc jFxo0uQgaKlFjv2J6rDhBoU8R6dasNGrNGYuHH0oBcgEP+yMV1B3uAM0IAagppGWr7ZU FkbgiQmHN8JSs9ND4gHMUH2mR7hIlBYWSab1ra4MfnJn7Tq4ngmhfyLhm3ks6pEXowbt pj8w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=69Benn7RO1xIp2afo9GkcAzM/ddXV6mj86NlD1orfxI=; b=XwvH3ZHyt3rbSrpqUL9FAbpZXd5HSTRinXJB/NNaT8khQNtJRusgeKJ8tbEtRrIktr cJDz4oTZ1vAd3S+Yo0HanGZvTbQV5CtX574RZkYyekCkA2sxGRE70opYg65bTkYzMpkk 0tSwzjPvsE3VLfiVcSIRGBD8ZGfKetOF2YNvPNL2DZV3xBLMxsBiRU5h6k1i5un0IJQ6 iKNq8cMMNn0+EaEf9WHQg9mXdL//fR6MafAsv0asyLhZnMJN3uvyJMKWrUrDlYykuUOk NHBrnH/d90j3fNiYicbYVCpx4QgNJKZWXnILAcY+v974Qz6pcM6bYL5wfsd6hkvgXI1y 2v9A== X-Gm-Message-State: AOAM53275a4KEmN410978m2YOFqxkcByZQR6b5MBc1tUVaQnA1jdtty/ +SrpdPraCDFRVvg1NuxAJYdNtrwRg24N/w== X-Google-Smtp-Source: ABdhPJzlLbKpP1QaLHsmMUELDuR0mQTSlW4MWNrbvOpfOXyiFEzyPxcHt8995R7XyOnJ3lwKYRroQQ== X-Received: by 2002:a5d:6d8d:0:b0:20a:a8b0:98e0 with SMTP id l13-20020a5d6d8d000000b0020aa8b098e0mr6389260wrs.88.1650468858910; Wed, 20 Apr 2022 08:34:18 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 06/34] configure: move --enable/--disable-debug-info to second option parsing pass Date: Wed, 20 Apr 2022 17:33:39 +0200 Message-Id: <20220420153407.73926-7-pbonzini@redhat.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220420153407.73926-1-pbonzini@redhat.com> References: <20220420153407.73926-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::434; envelope-from=paolo.bonzini@gmail.com; helo=mail-wr1-x434.google.com 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.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1650469269951100001 Content-Type: text/plain; charset="utf-8" $debug_info is not needed anywhere except in the final meson invocation, no need to special case it. Signed-off-by: Paolo Bonzini Reviewed-by: Marc-Andr=C3=A9 Lureau Reviewed-by: Thomas Huth --- configure | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/configure b/configure index 48ae18f47f..07053e7b27 100755 --- a/configure +++ b/configure @@ -244,7 +244,6 @@ audio_drv_list=3D"default" block_drv_rw_whitelist=3D"" block_drv_ro_whitelist=3D"" host_cc=3D"cc" -debug_info=3D"yes" lto=3D"false" stack_protector=3D"" safe_stack=3D"" @@ -304,6 +303,7 @@ vhost_user_fs=3D"$default_feature" vhost_vdpa=3D"$default_feature" rdma=3D"$default_feature" pvrdma=3D"$default_feature" +debug_info=3D"yes" debug_tcg=3D"no" debug=3D"no" sanitizers=3D"no" @@ -379,10 +379,6 @@ for opt do ;; --extra-ldflags=3D*) EXTRA_LDFLAGS=3D"$EXTRA_LDFLAGS $optarg" ;; - --enable-debug-info) debug_info=3D"yes" - ;; - --disable-debug-info) debug_info=3D"no" - ;; --cross-cc-*[!a-zA-Z0-9_-]*=3D*) error_exit "Passed bad --cross-cc-FOO o= ption" ;; --cross-cc-cflags-*) cc_arch=3D${opt#--cross-cc-cflags-}; cc_arch=3D${cc= _arch%%=3D*} @@ -759,12 +755,12 @@ for opt do ;; --extra-ldflags=3D*) ;; - --enable-debug-info) - ;; - --disable-debug-info) - ;; --cross-cc-*) ;; + --enable-debug-info) debug_info=3D"yes" + ;; + --disable-debug-info) debug_info=3D"no" + ;; --enable-modules) modules=3D"yes" ;; --=20 2.35.1 From nobody Thu May 2 03:23:26 2024 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1650470071752915.624924846003; Wed, 20 Apr 2022 08:54:31 -0700 (PDT) Received: from localhost ([::1]:43364 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nhCf0-0005ev-LV for importer@patchew.org; Wed, 20 Apr 2022 11:54:30 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42584) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nhCLY-0001Jf-Ie for qemu-devel@nongnu.org; Wed, 20 Apr 2022 11:34:24 -0400 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]:42921) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nhCLV-0000uE-RX for qemu-devel@nongnu.org; Wed, 20 Apr 2022 11:34:23 -0400 Received: by mail-wr1-x434.google.com with SMTP id bv16so2766704wrb.9 for ; Wed, 20 Apr 2022 08:34:21 -0700 (PDT) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id n68-20020a1c2747000000b0038e6b4d5395sm130401wmn.16.2022.04.20.08.34.19 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Apr 2022 08:34:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=XhrdeiKj02c3gBYuRWsYQjOaWaBq0dPxvx1dOjZ3FZ8=; b=jHhgvZCW7SHH+Sdha8F/Sng3V7VZLxkxwovpVS2uh5byQX64Ax9vdqn4w6v6YXyIP3 2Yi8UL60nKRGSDvPrVgx2GskNVd5Wwp3JTso6FugxBAcbH0gAqTA2yHxI0rsvL6edpon tmWhlOyWWXrHCl+SajY/CZkoW1+2ztBohOjYzKz4rlLhdke8brK01OJzjOPNV5XKbuoW 9dEB+h6Zt3vTlfqoiqqxnQ/8Ztpv2zYmuNx8+I+85BR3OiJCTdXayDdbcj0Fea9FdghP ZNg8N50P/TOqSr8YxmJb0hnMo1C+/3exDcaEAKClpYwYgvl3x2NUsRaB1ewAmcEdLyOM erjA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=XhrdeiKj02c3gBYuRWsYQjOaWaBq0dPxvx1dOjZ3FZ8=; b=T2M+szd3YNYfAD4VDM4aPreNWSpBTBz/lMMqpt6/tLdkZJQvdoKR0Z9Um4xFG5XRSU mguuHqAIwcVShhLMTqpH2JAgfso3IbQZslEUpIVxY/OMnwwVrf3dwfLxbfilNjnQBt0y PWcuIWdZLvYZnN8OXb7rAmBZIW78V2hlbfmm64wMZAXkhHXdqfC6B4kZjqMJ3hMOgGRC CrsXbSJCX70TDPDU7mbwhhCnC8cxW7KRjflVxT48CyK7b16Hi0rc+Lf0nmFTdnYcY76B 2XcDqrFGv1dOOSy+Hxr7CG6vl5iDyUHJBez+Ehaj/h8Bfb87kVItf/Muq57+y+brtpfE tOXg== X-Gm-Message-State: AOAM530ggP3Z40EI3q4T6VwFuyEXYiGkODsdr2AWsau5XSrdHqc4LP1j x/B8tlyiz4grCBEbPD4xR9iO7kSztaB1cw== X-Google-Smtp-Source: ABdhPJyL1sv4P+PmXy4poNO81HU228qVZ8uuEvmfYdE+EfQAUnaLFPowQDmfGVKVJlrNlDWV2IsgtA== X-Received: by 2002:a5d:5847:0:b0:20a:ae08:8d42 with SMTP id i7-20020a5d5847000000b0020aae088d42mr3444625wrf.650.1650468860063; Wed, 20 Apr 2022 08:34:20 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 07/34] configure, meson: move OpenGL check to meson Date: Wed, 20 Apr 2022 17:33:40 +0200 Message-Id: <20220420153407.73926-8-pbonzini@redhat.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220420153407.73926-1-pbonzini@redhat.com> References: <20220420153407.73926-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::434; envelope-from=paolo.bonzini@gmail.com; helo=mail-wr1-x434.google.com 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.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1650470072233100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Paolo Bonzini Reviewed-by: Marc-Andr=C3=A9 Lureau --- configure | 40 ----------------------------------- meson.build | 16 +++++++++----- meson_options.txt | 2 ++ scripts/meson-buildoptions.sh | 3 +++ ui/meson.build | 17 ++++++++------- 5 files changed, 25 insertions(+), 53 deletions(-) diff --git a/configure b/configure index 07053e7b27..c9be6eb04d 100755 --- a/configure +++ b/configure @@ -321,7 +321,6 @@ bsd_user=3D"" pkgversion=3D"" pie=3D"" trace_file=3D"trace" -opengl=3D"$default_feature" coroutine=3D"" tls_priority=3D"NORMAL" plugins=3D"$default_feature" @@ -960,10 +959,6 @@ for opt do ;; --enable-vhost-user-fs) vhost_user_fs=3D"yes" ;; - --disable-opengl) opengl=3D"no" - ;; - --enable-opengl) opengl=3D"yes" - ;; --disable-zlib-test) ;; --disable-virtio-blk-data-plane|--enable-virtio-blk-data-plane) @@ -1258,7 +1253,6 @@ cat << EOF vhost-kernel vhost kernel backend support vhost-user vhost-user backend support vhost-vdpa vhost-vdpa kernel backend support - opengl opengl support gio libgio support =20 NOTE: The object files are built at the place where configure is launched @@ -2278,34 +2272,6 @@ case "$fdt" in esac =20 ########################################## -# opengl probe (for sdl2, gtk) - -if test "$opengl" !=3D "no" ; then - epoxy=3Dno - if $pkg_config epoxy; then - cat > $TMPC << EOF -#include -int main(void) { return 0; } -EOF - if compile_prog "" "" ; then - epoxy=3Dyes - fi - fi - - if test "$epoxy" =3D "yes" ; then - opengl_cflags=3D"$($pkg_config --cflags epoxy)" - opengl_libs=3D"$($pkg_config --libs epoxy)" - opengl=3Dyes - else - if test "$opengl" =3D "yes" ; then - feature_not_found "opengl" "Please install epoxy with EGL" - fi - opengl_cflags=3D"" - opengl_libs=3D"" - opengl=3Dno - fi -fi - # check for usbfs have_usbfs=3Dno if test "$linux_user" =3D "yes"; then @@ -2874,12 +2840,6 @@ if test "$vhost_user_fs" =3D "yes" ; then echo "CONFIG_VHOST_USER_FS=3Dy" >> $config_host_mak fi =20 -if test "$opengl" =3D "yes" ; then - echo "CONFIG_OPENGL=3Dy" >> $config_host_mak - echo "OPENGL_CFLAGS=3D$opengl_cflags" >> $config_host_mak - echo "OPENGL_LIBS=3D$opengl_libs" >> $config_host_mak -fi - # XXX: suppress that if [ "$bsd" =3D "yes" ] ; then echo "CONFIG_BSD=3Dy" >> $config_host_mak diff --git a/meson.build b/meson.build index cf3b1b39cf..f53fd66716 100644 --- a/meson.build +++ b/meson.build @@ -1000,9 +1000,14 @@ if not get_option('coreaudio').auto() or (targetos = =3D=3D 'darwin' and have_system) endif =20 opengl =3D not_found -if 'CONFIG_OPENGL' in config_host - opengl =3D declare_dependency(compile_args: config_host['OPENGL_CFLAGS']= .split(), - link_args: config_host['OPENGL_LIBS'].split(= )) +if not get_option('opengl').auto() or have_system or have_vhost_user_gpu + epoxy =3D dependency('epoxy', method: 'pkg-config', + required: get_option('opengl'), kwargs: static_kwarg= s) + if cc.has_header('epoxy/egl.h', dependencies: epoxy) + opengl =3D epoxy + elif get_option('opengl').enabled() + error('epoxy/egl.h not found') + endif endif gbm =3D not_found if (have_system or have_tools) and (virgl.found() or opengl.found()) @@ -1544,6 +1549,7 @@ config_host_data.set('CONFIG_LINUX_AIO', libaio.found= ()) config_host_data.set('CONFIG_LINUX_IO_URING', linux_io_uring.found()) config_host_data.set('CONFIG_LIBPMEM', libpmem.found()) config_host_data.set('CONFIG_NUMA', numa.found()) +config_host_data.set('CONFIG_OPENGL', opengl.found()) config_host_data.set('CONFIG_PROFILER', get_option('profiler')) config_host_data.set('CONFIG_RBD', rbd.found()) config_host_data.set('CONFIG_SDL', sdl.found()) @@ -2079,7 +2085,7 @@ host_kconfig =3D \ (have_tpm ? ['CONFIG_TPM=3Dy'] : []) + \ (spice.found() ? ['CONFIG_SPICE=3Dy'] : []) + \ (have_ivshmem ? ['CONFIG_IVSHMEM=3Dy'] : []) + \ - ('CONFIG_OPENGL' in config_host ? ['CONFIG_OPENGL=3Dy'] : []) + \ + (opengl.found() ? ['CONFIG_OPENGL=3Dy'] : []) + \ (x11.found() ? ['CONFIG_X11=3Dy'] : []) + \ ('CONFIG_VHOST_USER' in config_host ? ['CONFIG_VHOST_USER=3Dy'] : []) + \ ('CONFIG_VHOST_VDPA' in config_host ? ['CONFIG_VHOST_VDPA=3Dy'] : []) + \ @@ -3694,7 +3700,7 @@ summary_info +=3D {'smartcard support': cacard} summary_info +=3D {'U2F support': u2f} summary_info +=3D {'libusb': libusb} summary_info +=3D {'usb net redir': usbredir} -summary_info +=3D {'OpenGL support': config_host.has_key('CONFIG_OPENGL= ')} +summary_info +=3D {'OpenGL support (epoxy)': opengl} summary_info +=3D {'GBM': gbm} summary_info +=3D {'libiscsi support': libiscsi} summary_info +=3D {'libnfs support': libnfs} diff --git a/meson_options.txt b/meson_options.txt index 52b11cead4..bd8efe4fbf 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -149,6 +149,8 @@ option('lzo', type : 'feature', value : 'auto', description: 'lzo compression support') option('rbd', type : 'feature', value : 'auto', description: 'Ceph block device driver') +option('opengl', type : 'feature', value : 'auto', + description: 'OpenGL support') option('gtk', type : 'feature', value : 'auto', description: 'GTK+ user interface') option('sdl', type : 'feature', value : 'auto', diff --git a/scripts/meson-buildoptions.sh b/scripts/meson-buildoptions.sh index 1e26f4571e..f91bd9231b 100644 --- a/scripts/meson-buildoptions.sh +++ b/scripts/meson-buildoptions.sh @@ -91,6 +91,7 @@ meson_options_help() { printf "%s\n" ' nettle nettle cryptography support' printf "%s\n" ' numa libnuma support' printf "%s\n" ' nvmm NVMM acceleration support' + printf "%s\n" ' opengl OpenGL support' printf "%s\n" ' oss OSS sound support' printf "%s\n" ' pa PulseAudio sound support' printf "%s\n" ' parallels parallels image format support' @@ -271,6 +272,8 @@ _meson_option_parse() { --disable-numa) printf "%s" -Dnuma=3Ddisabled ;; --enable-nvmm) printf "%s" -Dnvmm=3Denabled ;; --disable-nvmm) printf "%s" -Dnvmm=3Ddisabled ;; + --enable-opengl) printf "%s" -Dopengl=3Denabled ;; + --disable-opengl) printf "%s" -Dopengl=3Ddisabled ;; --enable-oss) printf "%s" -Doss=3Denabled ;; --disable-oss) printf "%s" -Doss=3Ddisabled ;; --enable-pa) printf "%s" -Dpa=3Denabled ;; diff --git a/ui/meson.build b/ui/meson.build index 64286ba150..b21d3d1534 100644 --- a/ui/meson.build +++ b/ui/meson.build @@ -1,5 +1,6 @@ softmmu_ss.add(pixman) specific_ss.add(when: ['CONFIG_SOFTMMU'], if_true: pixman) # for the inc= lude path +specific_ss.add(when: ['CONFIG_SOFTMMU'], if_true: opengl) # for the inc= lude path =20 softmmu_ss.add(files( 'clipboard.c', @@ -43,7 +44,6 @@ vnc_ss.add(zlib, png, jpeg, gnutls) vnc_ss.add(when: sasl, if_true: files('vnc-auth-sasl.c')) softmmu_ss.add_all(when: vnc, if_true: vnc_ss) softmmu_ss.add(when: vnc, if_false: files('vnc-stubs.c')) -specific_ss.add(when: ['CONFIG_SOFTMMU'], if_true: opengl) =20 ui_modules =3D {} =20 @@ -53,17 +53,18 @@ if curses.found() ui_modules +=3D {'curses' : curses_ss} endif =20 -if config_host.has_key('CONFIG_OPENGL') +softmmu_ss.add(opengl) +if opengl.found() opengl_ss =3D ss.source_set() opengl_ss.add(gbm) - opengl_ss.add(when: [opengl, pixman, 'CONFIG_OPENGL'], + opengl_ss.add(when: [opengl, pixman], if_true: files('shader.c', 'console-gl.c', 'egl-helpers.c',= 'egl-context.c')) ui_modules +=3D {'opengl' : opengl_ss} endif =20 -if config_host.has_key('CONFIG_OPENGL') and gbm.found() +if opengl.found() and gbm.found() egl_headless_ss =3D ss.source_set() - egl_headless_ss.add(when: [opengl, gbm, pixman, 'CONFIG_OPENGL'], + egl_headless_ss.add(when: [opengl, gbm, pixman], if_true: files('egl-headless.c')) ui_modules +=3D {'egl-headless' : egl_headless_ss} endif @@ -98,8 +99,8 @@ if gtk.found() gtk_ss =3D ss.source_set() gtk_ss.add(gtk, vte, pixman, files('gtk.c', 'gtk-clipboard.c')) gtk_ss.add(when: x11, if_true: files('x_keymap.c')) - gtk_ss.add(when: [opengl, 'CONFIG_OPENGL'], if_true: files('gtk-gl-area.= c')) - gtk_ss.add(when: [x11, opengl, 'CONFIG_OPENGL'], if_true: files('gtk-egl= .c')) + gtk_ss.add(when: opengl, if_true: files('gtk-gl-area.c')) + gtk_ss.add(when: [x11, opengl], if_true: files('gtk-egl.c')) ui_modules +=3D {'gtk' : gtk_ss} endif =20 @@ -112,7 +113,7 @@ if sdl.found() 'sdl2-input.c', 'sdl2.c', )) - sdl_ss.add(when: [opengl, 'CONFIG_OPENGL'], if_true: files('sdl2-gl.c')) + sdl_ss.add(when: opengl, if_true: files('sdl2-gl.c')) sdl_ss.add(when: x11, if_true: files('x_keymap.c')) ui_modules +=3D {'sdl' : sdl_ss} endif --=20 2.35.1 From nobody Thu May 2 03:23:26 2024 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1650470242429914.0131855060397; Wed, 20 Apr 2022 08:57:22 -0700 (PDT) Received: from localhost ([::1]:52234 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nhChk-0003GS-SC for importer@patchew.org; Wed, 20 Apr 2022 11:57:20 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42638) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nhCLa-0001OL-Rc for qemu-devel@nongnu.org; Wed, 20 Apr 2022 11:34:28 -0400 Received: from mail-wr1-x42d.google.com ([2a00:1450:4864:20::42d]:46903) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nhCLY-0000up-JD for qemu-devel@nongnu.org; Wed, 20 Apr 2022 11:34:26 -0400 Received: by mail-wr1-x42d.google.com with SMTP id i20so2759458wrb.13 for ; Wed, 20 Apr 2022 08:34:23 -0700 (PDT) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id n68-20020a1c2747000000b0038e6b4d5395sm130401wmn.16.2022.04.20.08.34.20 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Apr 2022 08:34:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=dMmLyPEMJFhXMiwddv7XiGr35mHd2ocyFc3nuqu0yBs=; b=Bk00JfVL4g7r+jRdURQqgHRU0kUIWRV3NoL8XwfOuf9FLD3xdeygM0U+b7JnRaRrw2 OvyEKvuz7yGVI89IgE64qyizD+YbwXT/xfueoj8JbjopPASXsOTa+rH5kMbXhfAbL3Mm r06DkNqLbavwl1rjjvsneuPeO9cmEvMpEj3Z/z2EQJxhO0DNQbnW2zmdUvzTgNa56yk/ enCe8/80p4LE2FwooWz9atpl9/blcOZMw/7soqqFadE8DG5hCXLRLBo4nuVRgirtlQUk eBDCQsKXAhJn0kqbhtDHHQxhk9O1IA1SNed5aeVYjPfGhGwfKMNZPlJc9oX+QYZNGT1O nQ0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=dMmLyPEMJFhXMiwddv7XiGr35mHd2ocyFc3nuqu0yBs=; b=2EKaEthZdwGgvSwYfPl/zpSAT7g9UiwoKYaqRHdJboV8dTAq3ca+lIFtb61Z6lI0rq E7TneOjeCZ8Xy2fdLWdhQMfN16pChQ8wfcQ5wCXCMQ4sWhuyL4FdqsfzV8zsCyvXccF8 LrIzqo190Oa3fny0FDj8tLKO/sOrE+8lEe4nVCqqLqJIm25fZ4z2ARI6XJGMtF4pIN5i DTmdrysw4XO4oBmIYAjx4ynf6ppsamkqax1sgpFD+bDIvWaVbAkAywxYSSow6g0uviXf XPz4qSdSlHhIF4zLU+0fJa6JXkq0OpgEZ28DYN+ocqs5l/080//sWWgp+GVrodXOQRd8 x4jQ== X-Gm-Message-State: AOAM530B5VwMEYHWgvbgdcyAF40NVmjtUiyOsEyFmATGNAUhOWW9ia/G pNQ6iwZZT79WZX+AgNG+KChcRYnNxUgbAg== X-Google-Smtp-Source: ABdhPJxgOBn2IAkIMzj7q/JqMqjl4IhIMnRKiJ5spJRVUxglPcpjIximbZZpfBpQ2VEbuRge69knLw== X-Received: by 2002:a5d:6983:0:b0:207:a226:df4b with SMTP id g3-20020a5d6983000000b00207a226df4bmr15992827wru.192.1650468861705; Wed, 20 Apr 2022 08:34:21 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 08/34] meson, configure: move RDMA options to meson Date: Wed, 20 Apr 2022 17:33:41 +0200 Message-Id: <20220420153407.73926-9-pbonzini@redhat.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220420153407.73926-1-pbonzini@redhat.com> References: <20220420153407.73926-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::42d; envelope-from=paolo.bonzini@gmail.com; helo=mail-wr1-x42d.google.com 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.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1650470242980100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Paolo Bonzini Reviewed-by: Marc-Andr=C3=A9 Lureau --- configure | 115 --------------------------------- contrib/rdmacm-mux/meson.build | 4 +- meson.build | 56 ++++++++++++++-- meson_options.txt | 4 ++ migration/meson.build | 2 +- scripts/meson-buildoptions.sh | 6 ++ 6 files changed, 62 insertions(+), 125 deletions(-) diff --git a/configure b/configure index c9be6eb04d..cfd15c3518 100755 --- a/configure +++ b/configure @@ -301,8 +301,6 @@ vhost_vsock=3D"$default_feature" vhost_user=3D"no" vhost_user_fs=3D"$default_feature" vhost_vdpa=3D"$default_feature" -rdma=3D"$default_feature" -pvrdma=3D"$default_feature" debug_info=3D"yes" debug_tcg=3D"no" debug=3D"no" @@ -972,14 +970,6 @@ for opt do ;; --tls-priority=3D*) tls_priority=3D"$optarg" ;; - --enable-rdma) rdma=3D"yes" - ;; - --disable-rdma) rdma=3D"no" - ;; - --enable-pvrdma) pvrdma=3D"yes" - ;; - --disable-pvrdma) pvrdma=3D"no" - ;; --disable-vhost-user) vhost_user=3D"no" ;; --enable-vhost-user) vhost_user=3D"yes" @@ -1244,8 +1234,6 @@ cat << EOF lto Enable Link-Time Optimization. safe-stack SafeStack Stack Smash Protection. Depends on clang/llvm >=3D 3.7 and requires coroutine backend ucont= ext. - rdma Enable RDMA-based migration - pvrdma Enable PVRDMA support vhost-net vhost-net kernel acceleration support vhost-vsock virtio sockets device support vhost-scsi vhost-scsi kernel target support @@ -2037,100 +2025,6 @@ EOF fi fi =20 -########################################## -# RDMA needs OpenFabrics libraries -if test "$rdma" !=3D "no" ; then - cat > $TMPC < -int main(void) { return 0; } -EOF - rdma_libs=3D"-lrdmacm -libverbs -libumad" - if compile_prog "" "$rdma_libs" ; then - rdma=3D"yes" - else - if test "$rdma" =3D "yes" ; then - error_exit \ - " OpenFabrics librdmacm/libibverbs/libibumad not present." \ - " Your options:" \ - " (1) Fast: Install infiniband packages (devel) from your dis= tro." \ - " (2) Cleanest: Install libraries from www.openfabrics.org" \ - " (3) Also: Install softiwarp if you don't have RDMA hardware" - fi - rdma=3D"no" - fi -fi - -########################################## -# PVRDMA detection - -cat > $TMPC < - -int -main(void) -{ - char buf =3D 0; - void *addr =3D &buf; - addr =3D mremap(addr, 0, 1, MREMAP_MAYMOVE | MREMAP_FIXED); - - return 0; -} -EOF - -if test "$rdma" =3D "yes" ; then - case "$pvrdma" in - "") - if compile_prog "" ""; then - pvrdma=3D"yes" - else - pvrdma=3D"no" - fi - ;; - "yes") - if ! compile_prog "" ""; then - error_exit "PVRDMA is not supported since mremap is not implem= ented" - fi - pvrdma=3D"yes" - ;; - "no") - pvrdma=3D"no" - ;; - esac -else - if test "$pvrdma" =3D "yes" ; then - error_exit "PVRDMA requires rdma suppport" - fi - pvrdma=3D"no" -fi - -# Let's see if enhanced reg_mr is supported -if test "$pvrdma" =3D "yes" ; then - -cat > $TMPC < - -int -main(void) -{ - struct ibv_mr *mr; - struct ibv_pd *pd =3D NULL; - size_t length =3D 10; - uint64_t iova =3D 0; - int access =3D 0; - void *addr =3D NULL; - - mr =3D ibv_reg_mr_iova(pd, addr, length, iova, access); - - ibv_dereg_mr(mr); - - return 0; -} -EOF - if ! compile_prog "" "-libverbs"; then - QEMU_CFLAGS=3D"$QEMU_CFLAGS -DLEGACY_RDMA_REG_MR" - fi -fi - ########################################## # glib support probe =20 @@ -2855,15 +2749,6 @@ if test "$have_tsan" =3D "yes" && test "$have_tsan_i= face_fiber" =3D "yes" ; then echo "CONFIG_TSAN=3Dy" >> $config_host_mak fi =20 -if test "$rdma" =3D "yes" ; then - echo "CONFIG_RDMA=3Dy" >> $config_host_mak - echo "RDMA_LIBS=3D$rdma_libs" >> $config_host_mak -fi - -if test "$pvrdma" =3D "yes" ; then - echo "CONFIG_PVRDMA=3Dy" >> $config_host_mak -fi - if test "$plugins" =3D "yes" ; then echo "CONFIG_PLUGIN=3Dy" >> $config_host_mak fi diff --git a/contrib/rdmacm-mux/meson.build b/contrib/rdmacm-mux/meson.build index 7674f54cc5..36c9c89630 100644 --- a/contrib/rdmacm-mux/meson.build +++ b/contrib/rdmacm-mux/meson.build @@ -1,7 +1,5 @@ -if 'CONFIG_PVRDMA' in config_host - # if not found, CONFIG_PVRDMA should not be set +if have_pvrdma # FIXME: broken on big endian architectures - libumad =3D cc.find_library('ibumad', required: true) executable('rdmacm-mux', files('main.c'), genh, dependencies: [glib, libumad], build_by_default: false, diff --git a/meson.build b/meson.build index f53fd66716..bdee186702 100644 --- a/meson.build +++ b/meson.build @@ -1217,9 +1217,22 @@ if numa.found() and not cc.links(''' endif =20 rdma =3D not_found -if 'CONFIG_RDMA' in config_host - rdma =3D declare_dependency(link_args: config_host['RDMA_LIBS'].split()) +if not get_option('rdma').auto() or have_system + libumad =3D cc.find_library('ibumad', required: get_option('rdma')) + rdma_libs =3D [cc.find_library('rdmacm', has_headers: ['rdma/rdma_cma.h'= ], + required: get_option('rdma'), + kwargs: static_kwargs), + cc.find_library('ibverbs', required: get_option('rdma'), + kwargs: static_kwargs), + libumad] + rdma =3D declare_dependency(dependencies: rdma_libs) + foreach lib: rdma_libs + if not lib.found() + rdma =3D not_found + endif + endforeach endif + xen =3D not_found if 'CONFIG_XEN_BACKEND' in config_host xen =3D declare_dependency(compile_args: config_host['XEN_CFLAGS'].split= (), @@ -1552,6 +1565,7 @@ config_host_data.set('CONFIG_NUMA', numa.found()) config_host_data.set('CONFIG_OPENGL', opengl.found()) config_host_data.set('CONFIG_PROFILER', get_option('profiler')) config_host_data.set('CONFIG_RBD', rbd.found()) +config_host_data.set('CONFIG_RDMA', rdma.found()) config_host_data.set('CONFIG_SDL', sdl.found()) config_host_data.set('CONFIG_SDL_IMAGE', sdl_image.found()) config_host_data.set('CONFIG_SECCOMP', seccomp.found()) @@ -1650,7 +1664,7 @@ config_host_data.set('HAVE_SYSTEM_FUNCTION', cc.has_f= unction('system', prefix: ' if rdma.found() config_host_data.set('HAVE_IBV_ADVISE_MR', cc.has_function('ibv_advise_mr', - args: config_host['RDMA_LIBS'].spli= t(), + dependencies: rdma, prefix: '#include ')) endif =20 @@ -1970,6 +1984,36 @@ config_host_data.set('CONFIG_AVX512F_OPT', get_optio= n('avx512f') \ int main(int argc, char *argv[]) { return bar(argv[0]); } '''), error_message: 'AVX512F not available').allowed()) =20 +have_pvrdma =3D get_option('pvrdma') \ + .require(rdma.found(), error_message: 'PVRDMA requires OpenFabrics libra= ries') \ + .require(cc.compiles(''' + int main(void) + { + char buf =3D 0; + void *addr =3D &buf; + addr =3D mremap(addr, 0, 1, MREMAP_MAYMOVE | MREMAP_FIXED); + + return 0; + }'''), error_message: 'PVRDMA requires mremap').allowed() + +if have_pvrdma + config_host_data.set('LEGACY_RDMA_REG_MR', not cc.compiles(''' + #include + int main(void) + { + struct ibv_mr *mr; + struct ibv_pd *pd =3D NULL; + size_t length =3D 10; + uint64_t iova =3D 0; + int access =3D 0; + void *addr =3D NULL; + + mr =3D ibv_reg_mr_iova(pd, addr, length, iova, access); + ibv_dereg_mr(mr); + return 0; + }''')) +endif + if get_option('membarrier').disabled() have_membarrier =3D false elif targetos =3D=3D 'windows' @@ -2092,7 +2136,7 @@ host_kconfig =3D \ ('CONFIG_VHOST_KERNEL' in config_host ? ['CONFIG_VHOST_KERNEL=3Dy'] : []= ) + \ (have_virtfs ? ['CONFIG_VIRTFS=3Dy'] : []) + \ ('CONFIG_LINUX' in config_host ? ['CONFIG_LINUX=3Dy'] : []) + \ - ('CONFIG_PVRDMA' in config_host ? ['CONFIG_PVRDMA=3Dy'] : []) + \ + (have_pvrdma ? ['CONFIG_PVRDMA=3Dy'] : []) + \ (multiprocess_allowed ? ['CONFIG_MULTIPROCESS_ALLOWED=3Dy'] : []) =20 ignored =3D [ 'TARGET_XML_FILES', 'TARGET_ABI_DIR', 'TARGET_ARCH' ] @@ -3686,8 +3730,8 @@ summary_info +=3D {'l2tpv3 support': have_l2tpv3} summary_info +=3D {'Linux AIO support': libaio} summary_info +=3D {'Linux io_uring support': linux_io_uring} summary_info +=3D {'ATTR/XATTR support': libattr} -summary_info +=3D {'RDMA support': config_host.has_key('CONFIG_RDMA')} -summary_info +=3D {'PVRDMA support': config_host.has_key('CONFIG_PVRDMA= ')} +summary_info +=3D {'RDMA support': rdma} +summary_info +=3D {'PVRDMA support': have_pvrdma} summary_info +=3D {'fdt support': fdt_opt =3D=3D 'disabled' ? false = : fdt_opt} summary_info +=3D {'libcap-ng support': libcap_ng} summary_info +=3D {'bpf support': libbpf} diff --git a/meson_options.txt b/meson_options.txt index bd8efe4fbf..c00e0866e9 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -151,6 +151,10 @@ option('rbd', type : 'feature', value : 'auto', description: 'Ceph block device driver') option('opengl', type : 'feature', value : 'auto', description: 'OpenGL support') +option('rdma', type : 'feature', value : 'auto', + description: 'Enable RDMA-based migration') +option('pvrdma', type : 'feature', value : 'auto', + description: 'Enable PVRDMA support') option('gtk', type : 'feature', value : 'auto', description: 'GTK+ user interface') option('sdl', type : 'feature', value : 'auto', diff --git a/migration/meson.build b/migration/meson.build index 8b5ca5c047..6880b61b10 100644 --- a/migration/meson.build +++ b/migration/meson.build @@ -27,7 +27,7 @@ softmmu_ss.add(files( 'tls.c', ), gnutls) =20 -softmmu_ss.add(when: ['CONFIG_RDMA', rdma], if_true: files('rdma.c')) +softmmu_ss.add(when: rdma, if_true: files('rdma.c')) if get_option('live_block_migration').allowed() softmmu_ss.add(files('block.c')) endif diff --git a/scripts/meson-buildoptions.sh b/scripts/meson-buildoptions.sh index f91bd9231b..cd922614e8 100644 --- a/scripts/meson-buildoptions.sh +++ b/scripts/meson-buildoptions.sh @@ -95,10 +95,12 @@ meson_options_help() { printf "%s\n" ' oss OSS sound support' printf "%s\n" ' pa PulseAudio sound support' printf "%s\n" ' parallels parallels image format support' + printf "%s\n" ' pvrdma Enable PVRDMA support' printf "%s\n" ' qcow1 qcow1 image format support' printf "%s\n" ' qed qed image format support' printf "%s\n" ' qga-vss build QGA VSS support (broken with MinG= W)' printf "%s\n" ' rbd Ceph block device driver' + printf "%s\n" ' rdma Enable RDMA-based migration' printf "%s\n" ' replication replication support' printf "%s\n" ' sdl SDL user interface' printf "%s\n" ' sdl-image SDL Image support for icons' @@ -282,6 +284,8 @@ _meson_option_parse() { --disable-parallels) printf "%s" -Dparallels=3Ddisabled ;; --enable-profiler) printf "%s" -Dprofiler=3Dtrue ;; --disable-profiler) printf "%s" -Dprofiler=3Dfalse ;; + --enable-pvrdma) printf "%s" -Dpvrdma=3Denabled ;; + --disable-pvrdma) printf "%s" -Dpvrdma=3Ddisabled ;; --enable-qcow1) printf "%s" -Dqcow1=3Denabled ;; --disable-qcow1) printf "%s" -Dqcow1=3Ddisabled ;; --enable-qed) printf "%s" -Dqed=3Denabled ;; @@ -292,6 +296,8 @@ _meson_option_parse() { --disable-qom-cast-debug) printf "%s" -Dqom_cast_debug=3Dfalse ;; --enable-rbd) printf "%s" -Drbd=3Denabled ;; --disable-rbd) printf "%s" -Drbd=3Ddisabled ;; + --enable-rdma) printf "%s" -Drdma=3Denabled ;; + --disable-rdma) printf "%s" -Drdma=3Ddisabled ;; --enable-replication) printf "%s" -Dreplication=3Denabled ;; --disable-replication) printf "%s" -Dreplication=3Ddisabled ;; --enable-rng-none) printf "%s" -Drng_none=3Dtrue ;; --=20 2.35.1 From nobody Thu May 2 03:23:26 2024 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 165046951620170.3867151400276; Wed, 20 Apr 2022 08:45:16 -0700 (PDT) Received: from localhost ([::1]:43056 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nhCW0-00030S-Bf for importer@patchew.org; Wed, 20 Apr 2022 11:45:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42632) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nhCLa-0001OD-D0 for qemu-devel@nongnu.org; Wed, 20 Apr 2022 11:34:28 -0400 Received: from mail-wr1-x436.google.com ([2a00:1450:4864:20::436]:38415) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nhCLY-0000ui-GF for qemu-devel@nongnu.org; Wed, 20 Apr 2022 11:34:26 -0400 Received: by mail-wr1-x436.google.com with SMTP id p18so2792299wru.5 for ; Wed, 20 Apr 2022 08:34:23 -0700 (PDT) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id n68-20020a1c2747000000b0038e6b4d5395sm130401wmn.16.2022.04.20.08.34.21 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Apr 2022 08:34:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=IswL544krc2bs9Blk4cXA0C6mPdV4B6VvXc9SDPTH08=; b=Sxr0683d1JhqqlZlhuWYo63cfDQrM952gDdTUsacfE+ThEY/O3fESPzi3CUVfyt3+h v616OSkzTG3kf8aw31trWjBX0khagvfWWx/RJ4pGoSv0UcyGWM0XB4RriG0s3m5kNZCS kMqBY4e378NC9ROVXNd4vcHJypWWeiyU0XFXoVb/kkKfl+0YYNNRykz2FoLkHpZrAG11 9ghUsG1kxEQnrxLzCM4vEIVU06ypdYa3JfT4eRW+zab/DnGfBJYuwKitbx/4AhDriNN1 G2tUi387Yxrw98n2XibeQTWcxqZ63lRWdV+F3DWfShfENHVPQL93PxwqsbYPqpVPP4Y6 8EFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=IswL544krc2bs9Blk4cXA0C6mPdV4B6VvXc9SDPTH08=; b=L0HXkBjy8scnRoNYXxzq/FDaIpYi8ESHNY2apcdYzIwbSeQYaX9YE/0+A62Ue0IJJT NxsTc+v7h/5KZ5/u1xIyGZnMp+7d4wAPn4bh6QeZ58pzOI81Sy2brs+ynGfhL3+UZkvZ IiPD/136ic9nImIYrRI0hpCBAVi1322incOwe+mUO4ecN72i1zxUinjCvYLlZqETVag6 Nt5UQQN+4sZnFQJ2yn1F5HJkNPnWgZ5TM3jIJZQZumD+zGPv1PEuKwtOdmNNlSPcl21t 05Yjddpl2dYzvqo0UBV4JUeQnCXVmsFmBroYBMuwAKbJfmA6dbBG0x/RQj7zY350GBEo 63YQ== X-Gm-Message-State: AOAM533wVtN//iQsdt3ErBB0aXSkzXf9TsKHn/eZWlyXw7HKf7E4Dea6 r3YGJ4vj3xZc9hSeSsNXmdmoJOCkOk2b9A== X-Google-Smtp-Source: ABdhPJzdQrPhQ+XE5XzW0ml+li2SJzRx8xgj0rRYtYhv9TsXawQ8xDcbQsbG3W2dumqIldUVdzwdjA== X-Received: by 2002:a5d:5248:0:b0:207:a421:1a26 with SMTP id k8-20020a5d5248000000b00207a4211a26mr15889852wrc.271.1650468862294; Wed, 20 Apr 2022 08:34:22 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 09/34] meson, configure: move keyctl test to meson Date: Wed, 20 Apr 2022 17:33:42 +0200 Message-Id: <20220420153407.73926-10-pbonzini@redhat.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220420153407.73926-1-pbonzini@redhat.com> References: <20220420153407.73926-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::436; envelope-from=paolo.bonzini@gmail.com; helo=mail-wr1-x436.google.com 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.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1650469517493100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Paolo Bonzini Reviewed-by: Marc-Andr=C3=A9 Lureau --- configure | 44 ----------------------------------- crypto/meson.build | 4 +++- meson.build | 15 +++++++++++- meson_options.txt | 2 ++ scripts/meson-buildoptions.sh | 3 +++ 5 files changed, 22 insertions(+), 46 deletions(-) diff --git a/configure b/configure index cfd15c3518..1c74d2c5f2 100755 --- a/configure +++ b/configure @@ -322,7 +322,6 @@ trace_file=3D"trace" coroutine=3D"" tls_priority=3D"NORMAL" plugins=3D"$default_feature" -secret_keyring=3D"$default_feature" meson=3D"" meson_args=3D"" ninja=3D"" @@ -1009,10 +1008,6 @@ for opt do ;; --gdb=3D*) gdb_bin=3D"$optarg" ;; - --enable-keyring) secret_keyring=3D"yes" - ;; - --disable-keyring) secret_keyring=3D"no" - ;; --enable-gio) gio=3Dyes ;; --disable-gio) gio=3Dno @@ -2440,41 +2435,6 @@ case "$slirp" in ;; esac =20 -########################################## -# check for usable __NR_keyctl syscall - -if test "$linux" =3D "yes" ; then - - have_keyring=3Dno - cat > $TMPC << EOF -#include -#include -#include -#include -int main(void) { - return syscall(__NR_keyctl, KEYCTL_READ, 0, NULL, NULL, 0); -} -EOF - if compile_prog "" "" ; then - have_keyring=3Dyes - fi -fi -if test "$secret_keyring" !=3D "no" -then - if test "$have_keyring" =3D "yes" - then - secret_keyring=3Dyes - else - if test "$secret_keyring" =3D "yes" - then - error_exit "syscall __NR_keyctl requested, \ -but not implemented on your system" - else - secret_keyring=3Dno - fi - fi -fi - ########################################## # End of CC checks # After here, no more $cc or $ld runs @@ -2760,10 +2720,6 @@ if test -n "$gdb_bin"; then fi fi =20 -if test "$secret_keyring" =3D "yes" ; then - echo "CONFIG_SECRET_KEYRING=3Dy" >> $config_host_mak -fi - echo "ROMS=3D$roms" >> $config_host_mak echo "MAKE=3D$make" >> $config_host_mak echo "PYTHON=3D$python" >> $config_host_mak diff --git a/crypto/meson.build b/crypto/meson.build index 19c44bea89..f065f2f277 100644 --- a/crypto/meson.build +++ b/crypto/meson.build @@ -34,7 +34,9 @@ else crypto_ss.add(files('hash-glib.c', 'hmac-glib.c', 'pbkdf-stub.c')) endif =20 -crypto_ss.add(when: 'CONFIG_SECRET_KEYRING', if_true: files('secret_keyrin= g.c')) +if have_keyring + crypto_ss.add(files('secret_keyring.c')) +endif if have_afalg crypto_ss.add(if_true: files('afalg.c', 'cipher-afalg.c', 'hash-afalg.c'= )) endif diff --git a/meson.build b/meson.build index bdee186702..066bb69174 100644 --- a/meson.build +++ b/meson.build @@ -1938,6 +1938,19 @@ config_host_data.set('CONFIG_GETAUXVAL', cc.links(gn= u_source_prefix + ''' return getauxval(AT_HWCAP) =3D=3D 0; }''')) =20 +have_keyring =3D get_option('keyring') \ + .require(targetos =3D=3D 'linux', error_message: 'keyring is only availa= ble on Linux') \ + .require(cc.compiles(''' + #include + #include + #include + #include + #include + int main(void) { + return syscall(__NR_keyctl, KEYCTL_READ, 0, NULL, NULL, 0); + }'''), error_message: 'keyctl syscall not available on this system').a= llowed() +config_host_data.set('CONFIG_SECRET_KEYRING', have_keyring) + have_cpuid_h =3D cc.links(''' #include int main(void) { @@ -3684,7 +3697,7 @@ if nettle.found() endif summary_info +=3D {'AF_ALG support': have_afalg} summary_info +=3D {'rng-none': get_option('rng_none')} -summary_info +=3D {'Linux keyring': config_host.has_key('CONFIG_SECRET= _KEYRING')} +summary_info +=3D {'Linux keyring': have_keyring} summary(summary_info, bool_yn: true, section: 'Crypto') =20 # Libraries diff --git a/meson_options.txt b/meson_options.txt index c00e0866e9..d58c69315c 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -90,6 +90,8 @@ option('avx2', type: 'feature', value: 'auto', description: 'AVX2 optimizations') option('avx512f', type: 'feature', value: 'disabled', description: 'AVX512F optimizations') +option('keyring', type: 'feature', value: 'auto', + description: 'Linux keyring support') =20 option('attr', type : 'feature', value : 'auto', description: 'attr/xattr support') diff --git a/scripts/meson-buildoptions.sh b/scripts/meson-buildoptions.sh index cd922614e8..0daeb11fd3 100644 --- a/scripts/meson-buildoptions.sh +++ b/scripts/meson-buildoptions.sh @@ -68,6 +68,7 @@ meson_options_help() { printf "%s\n" ' hvf HVF acceleration support' printf "%s\n" ' iconv Font glyph conversion support' printf "%s\n" ' jack JACK sound support' + printf "%s\n" ' keyring Linux keyring support' printf "%s\n" ' kvm KVM acceleration support' printf "%s\n" ' l2tpv3 l2tpv3 network backend support' printf "%s\n" ' libdaxctl libdaxctl support' @@ -229,6 +230,8 @@ _meson_option_parse() { --disable-install-blobs) printf "%s" -Dinstall_blobs=3Dfalse ;; --enable-jack) printf "%s" -Djack=3Denabled ;; --disable-jack) printf "%s" -Djack=3Ddisabled ;; + --enable-keyring) printf "%s" -Dkeyring=3Denabled ;; + --disable-keyring) printf "%s" -Dkeyring=3Ddisabled ;; --enable-kvm) printf "%s" -Dkvm=3Denabled ;; --disable-kvm) printf "%s" -Dkvm=3Ddisabled ;; --enable-l2tpv3) printf "%s" -Dl2tpv3=3Denabled ;; --=20 2.35.1 From nobody Thu May 2 03:23:26 2024 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1650469687305263.26431525773535; Wed, 20 Apr 2022 08:48:07 -0700 (PDT) Received: from localhost ([::1]:51742 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nhCYo-0000bl-9g for importer@patchew.org; Wed, 20 Apr 2022 11:48:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42652) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nhCLb-0001ON-Mt for qemu-devel@nongnu.org; Wed, 20 Apr 2022 11:34:28 -0400 Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]:45705) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nhCLY-0000uz-Us for qemu-devel@nongnu.org; Wed, 20 Apr 2022 11:34:27 -0400 Received: by mail-wm1-x329.google.com with SMTP id 123-20020a1c1981000000b0038b3616a71aso1477314wmz.4 for ; Wed, 20 Apr 2022 08:34:24 -0700 (PDT) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id n68-20020a1c2747000000b0038e6b4d5395sm130401wmn.16.2022.04.20.08.34.22 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Apr 2022 08:34:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=dJFWLBx1qgTPO4K//YqBRHJ2aHyd4vG27x4r9P8ldo8=; b=APDmze/rvttgA63RpVyvrDsUKh3YVi8FG3dnu9JWdeYtAkWruyo32IPK9lYvnVY4eS 4wVanzGIGYiGgDlTYdslDcWNIsT5Il9Vtnn8Qz0PCo3xjNDiTstMHyx/wOgCqoWvzkzE cYNiGxcU68PZbNARrmbBbtRwTtTuDVY/6cT+JTyfuPao6nMixbBUroGRmWAWkhVnncXT yAub8ASb0kKAdxTVSSvmdvCNPknohdJU6eC4y04JvgA11z5RGXq1OLorXhkc4ttfPhw9 4jD19KgcisWFrz3yJjptpoWIUUpkgdVWOudoWyDS1JIjyQ/XQb7aLyG8kR17UTVJMFRU EExQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=dJFWLBx1qgTPO4K//YqBRHJ2aHyd4vG27x4r9P8ldo8=; b=h1JRvJzsKzGYmMmmpJPw2p/BV11HpPW/9+M/TBiHyB5vwMBL8MUW6vp+q/p5X3ef2N GgFHhwlz4lZEWltbUgGNEgBZl7ssX0T6q5CT5l/LGcTgMEe06wfjipWXspHR7THUaNM3 Rr34N4a3XLyz4K9YSfcxvyxaecY9Jy2O1HGGjBxiOtESgEahAp/Kp9zTtKsGdCi63I+n 8pLfFrKWGhnYJe57fdmwFymdOukD/7/ammr8pSRzvYsheoBTib0N5zKz/NeYnJGpRLjD TUWfdW864BQhMAP9L5AK5O/j7TcvlnmpHqxjXc9qJ4OGOnTnLQDoUsfbd12ex++kitia JkLg== X-Gm-Message-State: AOAM5325BUQFJfQ+tpvW9i8fRf/6UZ1hTMFUILUJir1czniLYHOdro44 0AzdXLOoRxRqbM4T+LpV/Wb6pO4PFds1dw== X-Google-Smtp-Source: ABdhPJxtXcvIJVFMyr8jtyuou1+XtoKhJ+IuWdHqBIn1aQY/YO71WoNpFsZ6EkuykTgtoxDfzhVOwg== X-Received: by 2002:a05:600c:5006:b0:392:3077:789c with SMTP id n6-20020a05600c500600b003923077789cmr4324145wmr.50.1650468863311; Wed, 20 Apr 2022 08:34:23 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 10/34] meson, configure: move usbfs test to meson Date: Wed, 20 Apr 2022 17:33:43 +0200 Message-Id: <20220420153407.73926-11-pbonzini@redhat.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220420153407.73926-1-pbonzini@redhat.com> References: <20220420153407.73926-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::329; envelope-from=paolo.bonzini@gmail.com; helo=mail-wm1-x329.google.com 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.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1650469688059100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Paolo Bonzini Reviewed-by: Marc-Andr=C3=A9 Lureau --- configure | 28 ---------------------------- meson.build | 13 +++++++++++++ 2 files changed, 13 insertions(+), 28 deletions(-) diff --git a/configure b/configure index 1c74d2c5f2..d4d7c001f6 100755 --- a/configure +++ b/configure @@ -2160,31 +2160,6 @@ case "$fdt" in ;; esac =20 -########################################## -# check for usbfs -have_usbfs=3Dno -if test "$linux_user" =3D "yes"; then - cat > $TMPC << EOF -#include - -#ifndef USBDEVFS_GET_CAPABILITIES -#error "USBDEVFS_GET_CAPABILITIES undefined" -#endif - -#ifndef USBDEVFS_DISCONNECT_CLAIM -#error "USBDEVFS_DISCONNECT_CLAIM undefined" -#endif - -int main(void) -{ - return 0; -} -EOF - if compile_prog "" ""; then - have_usbfs=3Dyes - fi -fi - ########################################## # capstone =20 @@ -2641,9 +2616,6 @@ fi if test "$module_upgrades" =3D "yes"; then echo "CONFIG_MODULE_UPGRADES=3Dy" >> $config_host_mak fi -if test "$have_usbfs" =3D "yes" ; then - echo "CONFIG_USBFS=3Dy" >> $config_host_mak -fi if test "$gio" =3D "yes" ; then echo "CONFIG_GIO=3Dy" >> $config_host_mak echo "GIO_CFLAGS=3D$gio_cflags" >> $config_host_mak diff --git a/meson.build b/meson.build index 066bb69174..c0b2838d2e 100644 --- a/meson.build +++ b/meson.build @@ -1938,6 +1938,19 @@ config_host_data.set('CONFIG_GETAUXVAL', cc.links(gn= u_source_prefix + ''' return getauxval(AT_HWCAP) =3D=3D 0; }''')) =20 +config_host_data.set('CONFIG_USBFS', have_linux_user and cc.compiles(''' + #include + + #ifndef USBDEVFS_GET_CAPABILITIES + #error "USBDEVFS_GET_CAPABILITIES undefined" + #endif + + #ifndef USBDEVFS_DISCONNECT_CLAIM + #error "USBDEVFS_DISCONNECT_CLAIM undefined" + #endif + + int main(void) { return 0; }''')) + have_keyring =3D get_option('keyring') \ .require(targetos =3D=3D 'linux', error_message: 'keyring is only availa= ble on Linux') \ .require(cc.compiles(''' --=20 2.35.1 From nobody Thu May 2 03:23:26 2024 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1650469789971690.3139742311292; Wed, 20 Apr 2022 08:49:49 -0700 (PDT) Received: from localhost ([::1]:60338 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nhCaS-0006Ko-Tv for importer@patchew.org; Wed, 20 Apr 2022 11:49:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42656) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nhCLc-0001Pt-Cx for qemu-devel@nongnu.org; Wed, 20 Apr 2022 11:34:29 -0400 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]:44564) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nhCLZ-0000vK-NU for qemu-devel@nongnu.org; Wed, 20 Apr 2022 11:34:28 -0400 Received: by mail-wm1-x333.google.com with SMTP id r4-20020a05600c35c400b0039295dc1fc3so1485488wmq.3 for ; Wed, 20 Apr 2022 08:34:25 -0700 (PDT) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id n68-20020a1c2747000000b0038e6b4d5395sm130401wmn.16.2022.04.20.08.34.23 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Apr 2022 08:34:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=W5vNaSX8+OigZv3Q7HUpTYMNwZnMz5lHrgHcds6A2Yo=; b=NaCA/FzNR6E9DKds9O2K6bLNTjwH5RnvE6oL7weR/BlfgHEARB9wbAN19tjYWgrAgT T5kpuZFr1NW++NuJbfb59PMHLuYdN7VkjjYaoE76R+cZzd0xppfJSQU/Fn+YmqllmNN1 Erlo0hXsndUCrkSWXXawrP/arhp2vY6+PUJbj0WAqJQL+L+lUlzrchiIrA9D02eFYg66 BvZc0jyWdgOKeeCB5RoawldhFpq+Cq593P7xXPFNhKRkCR9UH0SFLf1pQP8pjv7tVgbk gevnKvK9GHpFJrjeETjSVLlfrJ00vC6m++EkACOrD2hGjGjO9iKj1zHXTJZWWPv0foxY YDYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=W5vNaSX8+OigZv3Q7HUpTYMNwZnMz5lHrgHcds6A2Yo=; b=VWVEe1Nrj9zOi5KQsvyEyeTnG/4NyQQum4soSB3uZI3Ei2mDwznLXBcVweB0oq5nyq LcigpFNiF4Oms93Bbiud4k8onMxEHcYfH/WtOKAM7yvH6Y/qizexZUJDUVMMHm0u6+oi eZvgoQYdTL6zQimefYSR/Zx1Quyw4DMrDrAj6YZw4/jiwNIjZuOrEnzm1kGgswO4rlKO aZbXtcpFlQoZFBsS/or97lROQPoy0undYdk3K5NN84kS4/HyF2L9gYVUbTW4eygtpq2C 5KiDlUUMQunD6bdUxwtWzFOl9v4F3Ihz4gRWIWIXarpQzzVOIBKHXZDICQDBSvfo3j+Y BhKQ== X-Gm-Message-State: AOAM533O3rsgg8RXJNGakx6o3sUDIrGO2Au6sm6QtbZ8D1R/hfBpr34l 7iY2uKJ/DrEPrEEhNw5k3uBtCbiPQKfJ4w== X-Google-Smtp-Source: ABdhPJwVimUbEsaWE1KeI/X8XoJuFJSqmWbLYRLh95dtweglxxZoYQWmJdG09bNFDYXjj6XRjtATcg== X-Received: by 2002:a1c:3846:0:b0:392:a3e7:3798 with SMTP id f67-20020a1c3846000000b00392a3e73798mr4339101wma.80.1650468864455; Wed, 20 Apr 2022 08:34:24 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 11/34] meson, configure: move libgio test to meson Date: Wed, 20 Apr 2022 17:33:44 +0200 Message-Id: <20220420153407.73926-12-pbonzini@redhat.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220420153407.73926-1-pbonzini@redhat.com> References: <20220420153407.73926-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::333; envelope-from=paolo.bonzini@gmail.com; helo=mail-wm1-x333.google.com 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.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1650469790764100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Paolo Bonzini Reviewed-by: Marc-Andr=C3=A9 Lureau --- backends/meson.build | 2 +- configure | 58 ----------------------------------- meson.build | 32 ++++++++++++++++--- meson_options.txt | 2 ++ scripts/meson-buildoptions.sh | 3 ++ tests/qtest/meson.build | 5 ++- ui/meson.build | 7 ++--- util/meson.build | 2 +- 8 files changed, 39 insertions(+), 72 deletions(-) diff --git a/backends/meson.build b/backends/meson.build index 6e68945528..535c3ca7dd 100644 --- a/backends/meson.build +++ b/backends/meson.build @@ -15,7 +15,7 @@ softmmu_ss.add(when: 'CONFIG_LINUX', if_true: files('host= mem-memfd.c')) softmmu_ss.add(when: ['CONFIG_VHOST_USER', 'CONFIG_VIRTIO'], if_true: file= s('vhost-user.c')) softmmu_ss.add(when: 'CONFIG_VIRTIO_CRYPTO', if_true: files('cryptodev-vho= st.c')) softmmu_ss.add(when: ['CONFIG_VIRTIO_CRYPTO', 'CONFIG_VHOST_CRYPTO'], if_t= rue: files('cryptodev-vhost-user.c')) -softmmu_ss.add(when: 'CONFIG_GIO', if_true: [files('dbus-vmstate.c'), gio]) +softmmu_ss.add(when: gio, if_true: files('dbus-vmstate.c')) softmmu_ss.add(when: 'CONFIG_SGX', if_true: files('hostmem-epc.c')) =20 subdir('tpm') diff --git a/configure b/configure index d4d7c001f6..75e8b1e7aa 100755 --- a/configure +++ b/configure @@ -325,7 +325,6 @@ plugins=3D"$default_feature" meson=3D"" meson_args=3D"" ninja=3D"" -gio=3D"$default_feature" skip_meson=3Dno =20 # The following Meson options are handled manually (still they @@ -1008,10 +1007,6 @@ for opt do ;; --gdb=3D*) gdb_bin=3D"$optarg" ;; - --enable-gio) gio=3Dyes - ;; - --disable-gio) gio=3Dno - ;; # backwards compatibility options --enable-trace-backend=3D*) meson_option_parse "--enable-trace-backends= =3D$optarg" "$optarg" ;; @@ -1236,7 +1231,6 @@ cat << EOF vhost-kernel vhost kernel backend support vhost-user vhost-user backend support vhost-vdpa vhost-vdpa kernel backend support - gio libgio support =20 NOTE: The object files are built at the place where configure is launched EOF @@ -2047,50 +2041,6 @@ if test "$static" =3D yes && test "$mingw32" =3D yes= ; then glib_cflags=3D"-DGLIB_STATIC_COMPILATION $glib_cflags" fi =20 -if ! test "$gio" =3D "no"; then - pass=3Dno - if $pkg_config --atleast-version=3D$glib_req_ver gio-2.0; then - gio_cflags=3D$($pkg_config --cflags gio-2.0) - gio_libs=3D$($pkg_config --libs gio-2.0) - gdbus_codegen=3D$($pkg_config --variable=3Dgdbus_codegen gio-2.0) - if ! has "$gdbus_codegen"; then - gdbus_codegen=3D - fi - # Check that the libraries actually work -- Ubuntu 18.04 ships - # with pkg-config --static --libs data for gio-2.0 that is missing - # -lblkid and will give a link error. - cat > $TMPC < -int main(void) -{ - g_dbus_proxy_new_sync(0, 0, 0, 0, 0, 0, 0, 0); - return 0; -} -EOF - if compile_prog "$gio_cflags" "$gio_libs" ; then - pass=3Dyes - else - pass=3Dno - fi - - if test "$pass" =3D "yes" && - $pkg_config --atleast-version=3D$glib_req_ver gio-unix-2.0; th= en - gio_cflags=3D"$gio_cflags $($pkg_config --cflags gio-unix-2.0)" - gio_libs=3D"$gio_libs $($pkg_config --libs gio-unix-2.0)" - fi - fi - - if test "$pass" =3D "no"; then - if test "$gio" =3D "yes"; then - feature_not_found "gio" "Install libgio >=3D 2.0" - else - gio=3Dno - fi - else - gio=3Dyes - fi -fi - # Sanity check that the current size_t matches the # size that glib thinks it should be. This catches # problems on multi-arch where people try to build @@ -2616,14 +2566,6 @@ fi if test "$module_upgrades" =3D "yes"; then echo "CONFIG_MODULE_UPGRADES=3Dy" >> $config_host_mak fi -if test "$gio" =3D "yes" ; then - echo "CONFIG_GIO=3Dy" >> $config_host_mak - echo "GIO_CFLAGS=3D$gio_cflags" >> $config_host_mak - echo "GIO_LIBS=3D$gio_libs" >> $config_host_mak -fi -if test "$gdbus_codegen" !=3D "" ; then - echo "GDBUS_CODEGEN=3D$gdbus_codegen" >> $config_host_mak -fi echo "CONFIG_TLS_PRIORITY=3D\"$tls_priority\"" >> $config_host_mak =20 if test "$xen" =3D "enabled" ; then diff --git a/meson.build b/meson.build index c0b2838d2e..b8046efcf1 100644 --- a/meson.build +++ b/meson.build @@ -448,11 +448,32 @@ glib =3D declare_dependency(compile_args: config_host= ['GLIB_CFLAGS'].split(), meson.override_dependency('glib-2.0', glib) =20 gio =3D not_found -if 'CONFIG_GIO' in config_host - gio =3D declare_dependency(compile_args: config_host['GIO_CFLAGS'].split= (), - link_args: config_host['GIO_LIBS'].split(), - version: config_host['GLIB_VERSION']) +gdbus_codegen =3D not_found +if not get_option('gio').auto() or have_system + gio =3D dependency('gio-2.0', required: get_option('gio'), + method: 'pkg-config', kwargs: static_kwargs) + if gio.found() and not cc.links(''' + #include + int main(void) + { + g_dbus_proxy_new_sync(0, 0, 0, 0, 0, 0, 0, 0); + return 0; + }''', dependencies: [glib, gio]) + if get_option('gio').enabled() + error('The installed libgio is broken for static linking') + endif + gio =3D not_found + endif + if gio.found() + gdbus_codegen =3D find_program(gio.get_variable('gdbus_codegen'), + required: get_option('gio')) + gio_unix =3D dependency('gio-unix-2.0', required: get_option('gio'), + method: 'pkg-config', kwargs: static_kwargs) + gio =3D declare_dependency(dependencies: [gio, gio_unix], + version: gio.version()) + endif endif + lttng =3D not_found if 'ust' in get_option('trace_backends') lttng =3D dependency('lttng-ust', required: true, version: '>=3D 2.1', @@ -1478,7 +1499,7 @@ dbus_display =3D get_option('dbus_display') \ error_message: '-display dbus requires glib>=3D2.64') \ .require(enable_modules, error_message: '-display dbus requires --enable-modules') \ - .require(config_host.has_key('GDBUS_CODEGEN'), + .require(gdbus_codegen.found(), error_message: '-display dbus requires gdbus-codegen') \ .allowed() =20 @@ -1540,6 +1561,7 @@ config_host_data.set('CONFIG_MPATH_NEW_API', mpathper= sist_new_api) config_host_data.set('CONFIG_CURL', curl.found()) config_host_data.set('CONFIG_CURSES', curses.found()) config_host_data.set('CONFIG_GBM', gbm.found()) +config_host_data.set('CONFIG_GIO', gio.found()) config_host_data.set('CONFIG_GLUSTERFS', glusterfs.found()) if glusterfs.found() config_host_data.set('CONFIG_GLUSTERFS_XLATOR_OPT', glusterfs.version().= version_compare('>=3D4')) diff --git a/meson_options.txt b/meson_options.txt index d58c69315c..d140c0ef89 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -109,6 +109,8 @@ option('cocoa', type : 'feature', value : 'auto', description: 'Cocoa user interface (macOS only)') option('curl', type : 'feature', value : 'auto', description: 'CURL block device driver') +option('gio', type : 'feature', value : 'auto', + description: 'use libgio for D-Bus support') option('glusterfs', type : 'feature', value : 'auto', description: 'Glusterfs block device driver') option('libiscsi', type : 'feature', value : 'auto', diff --git a/scripts/meson-buildoptions.sh b/scripts/meson-buildoptions.sh index 0daeb11fd3..92be3e6187 100644 --- a/scripts/meson-buildoptions.sh +++ b/scripts/meson-buildoptions.sh @@ -59,6 +59,7 @@ meson_options_help() { printf "%s\n" ' fuse-lseek SEEK_HOLE/SEEK_DATA support for FUSE ex= ports' printf "%s\n" ' gcrypt libgcrypt cryptography support' printf "%s\n" ' gettext Localization of the GTK+ user interface' + printf "%s\n" ' gio use libgio for D-Bus support' printf "%s\n" ' glusterfs Glusterfs block device driver' printf "%s\n" ' gnutls GNUTLS cryptography support' printf "%s\n" ' gtk GTK+ user interface' @@ -208,6 +209,8 @@ _meson_option_parse() { --disable-gcrypt) printf "%s" -Dgcrypt=3Ddisabled ;; --enable-gettext) printf "%s" -Dgettext=3Denabled ;; --disable-gettext) printf "%s" -Dgettext=3Ddisabled ;; + --enable-gio) printf "%s" -Dgio=3Denabled ;; + --disable-gio) printf "%s" -Dgio=3Ddisabled ;; --enable-glusterfs) printf "%s" -Dglusterfs=3Denabled ;; --disable-glusterfs) printf "%s" -Dglusterfs=3Ddisabled ;; --enable-gnutls) printf "%s" -Dgnutls=3Denabled ;; diff --git a/tests/qtest/meson.build b/tests/qtest/meson.build index d25f82bb5a..69f97b8992 100644 --- a/tests/qtest/meson.build +++ b/tests/qtest/meson.build @@ -99,14 +99,13 @@ if dbus_display endif =20 dbus_daemon =3D find_program('dbus-daemon', required: false) -if dbus_daemon.found() and config_host.has_key('GDBUS_CODEGEN') +if dbus_daemon.found() and gdbus_codegen.found() # Temporarily disabled due to Patchew failures: #qtests_i386 +=3D ['dbus-vmstate-test'] dbus_vmstate1 =3D custom_target('dbus-vmstate description', output: ['dbus-vmstate1.h', 'dbus-vmstate1= .c'], input: meson.project_source_root() / 'back= ends/dbus-vmstate1.xml', - command: [config_host['GDBUS_CODEGEN'], - '@INPUT@', + command: [gdbus_codegen, '@INPUT@', '--interface-prefix', 'org.qemu', '--generate-c-code', '@BASENAME@= ']).to_list() else diff --git a/ui/meson.build b/ui/meson.build index b21d3d1534..eba93b41e3 100644 --- a/ui/meson.build +++ b/ui/meson.build @@ -74,14 +74,13 @@ if dbus_display dbus_display1 =3D custom_target('dbus-display gdbus-codegen', output: ['dbus-display1.h', 'dbus-display1= .c'], input: files('dbus-display1.xml'), - command: [config_host['GDBUS_CODEGEN'], - '@INPUT@', + command: [gdbus_codegen, '@INPUT@', '--glib-min-required', '2.64', '--output-directory', meson.curr= ent_build_dir(), '--interface-prefix', 'org.qemu.= ', '--c-namespace', 'QemuDBus', '--generate-c-code', '@BASENAME@= ']) - dbus_ss.add(when: [gio, pixman, opengl, 'CONFIG_GIO'], + dbus_ss.add(when: [gio, pixman, opengl], if_true: [files( 'dbus-chardev.c', 'dbus-clipboard.c', @@ -128,7 +127,7 @@ if spice.found() ui_modules +=3D {'spice-core' : spice_core_ss} endif =20 -if spice.found() and config_host.has_key('CONFIG_GIO') +if spice.found() and gio.found() spice_ss =3D ss.source_set() spice_ss.add(spice, gio, pixman, files('spice-app.c')) ui_modules +=3D {'spice-app': spice_ss} diff --git a/util/meson.build b/util/meson.build index 82eec004e2..8f16018cd4 100644 --- a/util/meson.build +++ b/util/meson.build @@ -61,7 +61,7 @@ endif =20 if have_system util_ss.add(files('crc-ccitt.c')) - util_ss.add(when: 'CONFIG_GIO', if_true: [files('dbus.c'), gio]) + util_ss.add(when: gio, if_true: files('dbus.c')) util_ss.add(when: 'CONFIG_LINUX', if_true: files('userfaultfd.c')) endif =20 --=20 2.35.1 From nobody Thu May 2 03:23:26 2024 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1650470642186780.8893004691625; Wed, 20 Apr 2022 09:04:02 -0700 (PDT) Received: from localhost ([::1]:41220 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nhCoD-0006r4-3j for importer@patchew.org; Wed, 20 Apr 2022 12:04:01 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42716) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nhCLh-0001RL-4H for qemu-devel@nongnu.org; Wed, 20 Apr 2022 11:34:33 -0400 Received: from mail-wr1-x429.google.com ([2a00:1450:4864:20::429]:38405) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nhCLe-0000w8-Ml for qemu-devel@nongnu.org; Wed, 20 Apr 2022 11:34:32 -0400 Received: by mail-wr1-x429.google.com with SMTP id p18so2792773wru.5 for ; Wed, 20 Apr 2022 08:34:30 -0700 (PDT) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id n68-20020a1c2747000000b0038e6b4d5395sm130401wmn.16.2022.04.20.08.34.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Apr 2022 08:34:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=PxqOzTdzbmYgDPvvFz8BwuvQY09siAutF2++Lp4ib4o=; b=QFhJbGSp+6ImLvEm88HTn+CXv8eKgPpYZXiWfnq+9ZfLlOdOH0kNDxeD7KOMuN86i2 z5oJVqhxMw7U1VbcN7kl0eCnwiJBNnHBe3KZ8pqxcLPmVgf9nEe/7Jj6rscoU9FwJPmv pUCGEvJxTrTLR0k9CKoTZPGB24vek8tjJYQFrog4j6mf/xLtdh/E8EhK/zmEWUHDtlMz cx38UpSsuaKO7tYQO2H4NdfHPcSB0Z2SBXPblvtLy9gtRtKpyrjlMd9poJC3yp+Y/Uvz ZQN4f0P9ltDr9P88C6BlW/xYHiZdBWXJcAH25RoOYOqM+P9bxHyTTmXOIgzDaYwCLM6o v/bg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=PxqOzTdzbmYgDPvvFz8BwuvQY09siAutF2++Lp4ib4o=; b=TfUIDmQ1SnedxQHwF2KArWAxs1jKKTEaD0CJODI5Ks8cHt5yfjBVow2dsopeLfUzDo BY6g0bXHlYWWKMvEcHjkGEVKRCn71yqnZbzm456srvrLhIhVlJK0hIChOyrRk0vR/8Rx ETZ8GDnzDFCliQCOEcExno9qqeHB1amzi95j5FkahkQlCMRfR+VYQcmYxEc6aSoBtArG vZI4d7XtOBkBDbAuyuj9mAahQi5zf2hj4/sj7Qe4ajAe2mhxy33TuFcOsBKmfgs0E37A c4d/gNN4mPXaYq99zyW1DAs06XMG/6uD3uD6db+qO+xVuqf1AdFkR8ebKRy/1VU1yCi4 POiA== X-Gm-Message-State: AOAM532YMOqKbYEzsBvXPtASe+Dx+Ir94UWmcEA+GpfDLRUo3YLizCVP LDgXCDD16BJWli1p+yqvP3C0I52rzQhXbw== X-Google-Smtp-Source: ABdhPJxITre6WKg5JLJ98bDM07XY5bpx0FHv81cW5GyY1CqGrjkMfivgs4Zyf43ldpeg28wwuzYbaA== X-Received: by 2002:a5d:4882:0:b0:207:97dd:111c with SMTP id g2-20020a5d4882000000b0020797dd111cmr17194809wrq.115.1650468869370; Wed, 20 Apr 2022 08:34:29 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 12/34] meson: move CONFIG_XEN_PCI_PASSTHROUGH to config-host.h Date: Wed, 20 Apr 2022 17:33:45 +0200 Message-Id: <20220420153407.73926-13-pbonzini@redhat.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220420153407.73926-1-pbonzini@redhat.com> References: <20220420153407.73926-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::429; envelope-from=paolo.bonzini@gmail.com; helo=mail-wr1-x429.google.com 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.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1650470643511100001 Content-Type: text/plain; charset="utf-8" CONFIG_XEN_PCI_PASSTHROUGH is just a global configuration option; the selec= tion of the actual files in hw/xen/meson.build is also conditional on CONFIG_XEN, so there is no need to put CONFIG_XEN_PCI_PASSTHROUGH in config-target.h. This inaccuracy was copied over from the configure script in commit 8a19980e3f ("configure: move accelerator logic to meson", 2020-10-03). Signed-off-by: Paolo Bonzini --- hw/xen/meson.build | 20 ++++++++++++-------- meson.build | 3 +-- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/hw/xen/meson.build b/hw/xen/meson.build index 076954b89c..08dc1f6857 100644 --- a/hw/xen/meson.build +++ b/hw/xen/meson.build @@ -8,13 +8,17 @@ softmmu_ss.add(when: ['CONFIG_XEN', xen], if_true: files( )) =20 xen_specific_ss =3D ss.source_set() -xen_specific_ss.add(when: 'CONFIG_XEN_PCI_PASSTHROUGH', if_true: files( - 'xen-host-pci-device.c', - 'xen_pt.c', - 'xen_pt_config_init.c', - 'xen_pt_graphics.c', - 'xen_pt_load_rom.c', - 'xen_pt_msi.c', -), if_false: files('xen_pt_stub.c')) +if have_xen_pci_passthrough + xen_specific_ss.add(files( + 'xen-host-pci-device.c', + 'xen_pt.c', + 'xen_pt_config_init.c', + 'xen_pt_graphics.c', + 'xen_pt_load_rom.c', + 'xen_pt_msi.c', + )) +else + xen_specific_ss.add('xen_pt_stub.c') +endif =20 specific_ss.add_all(when: ['CONFIG_XEN', xen], if_true: xen_specific_ss) diff --git a/meson.build b/meson.build index b8046efcf1..84156df809 100644 --- a/meson.build +++ b/meson.build @@ -1627,6 +1627,7 @@ config_host_data.set('CONFIG_X11', x11.found()) config_host_data.set('CONFIG_DBUS_DISPLAY', dbus_display) config_host_data.set('CONFIG_CFI', get_option('cfi')) config_host_data.set('CONFIG_SELINUX', selinux.found()) +config_host_data.set('CONFIG_XEN_PCI_PASSTHROUGH', have_xen_pci_passthroug= h) config_host_data.set('QEMU_VERSION', '"@0@"'.format(meson.project_version(= ))) config_host_data.set('QEMU_VERSION_MAJOR', meson.project_version().split('= .')[0]) config_host_data.set('QEMU_VERSION_MINOR', meson.project_version().split('= .')[1]) @@ -2228,8 +2229,6 @@ foreach target : target_dirs config_all +=3D { sym: 'y' } if sym =3D=3D 'CONFIG_TCG' and tcg_arch =3D=3D 'tci' config_target +=3D { 'CONFIG_TCG_INTERPRETER': 'y' } - elif sym =3D=3D 'CONFIG_XEN' and have_xen_pci_passthrough - config_target +=3D { 'CONFIG_XEN_PCI_PASSTHROUGH': 'y' } endif if target in modular_tcg config_target +=3D { 'CONFIG_TCG_MODULAR': 'y' } --=20 2.35.1 From nobody Thu May 2 03:23:26 2024 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1650470186925330.14269086500553; Wed, 20 Apr 2022 08:56:26 -0700 (PDT) Received: from localhost ([::1]:49450 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nhCgr-0001PI-Nn for importer@patchew.org; Wed, 20 Apr 2022 11:56:25 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42734) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nhCLi-0001SU-JD for qemu-devel@nongnu.org; Wed, 20 Apr 2022 11:34:35 -0400 Received: from mail-wm1-x336.google.com ([2a00:1450:4864:20::336]:51981) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nhCLf-0000wI-Rf for qemu-devel@nongnu.org; Wed, 20 Apr 2022 11:34:34 -0400 Received: by mail-wm1-x336.google.com with SMTP id q20so1466763wmq.1 for ; Wed, 20 Apr 2022 08:34:31 -0700 (PDT) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id n68-20020a1c2747000000b0038e6b4d5395sm130401wmn.16.2022.04.20.08.34.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Apr 2022 08:34:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=1Lv5dQ8P3un+jwEbZUgvImxqI5ppzL6YawEqsjlx02M=; b=p0hjM/QTmVV+l5vkPMg3sbfRRIlA0J2RHGpaDNviYQyd02g3XhnBwYlgqrZYvfgMP2 ZaRtaS7RNHt6ViKLEHTdWdNltsDnw9V3DbyhNxvr3slIiY8DdfKHnLQD2fagOmYPc6PA GEkCN/148yhbRmpNKFyiq+l2++t6pQhLeTy0Klm7MZl4xhDL9MANzyt9hj12oMwgY5kl 3joSqZyc6VXHpMt1LWYC0itozfkBlaz2fiiyHN8ffGrH9JhI0EL0JxcdsCZCXs4d8lKo QKQxHxE4fBrUwxLcxzbeOqMfECw//Z5S2PzMqMHF41Md4XyGkYxckXMpYSiVAUT2mJh6 UoQQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=1Lv5dQ8P3un+jwEbZUgvImxqI5ppzL6YawEqsjlx02M=; b=RRqv3iBCts2LG0XZe1gY4on1rJOKrZbmJQEVPy0qbbmAHZvaeFTxGBkojpAOqiNWwx oGGZFlyFHmTJ4SXta3Ly3pY+q/glRa7nIDhQBexCVIKnRgugwmu0LK4jJ++Fe8pKaBXu FxZegP6VoGc6IBOnOfM/TAUDa/PmpuzdwlFfUfayoYx89i2TscRxhSxcFvvlwtrz7Aa5 EdjxjCLeiuHChFsBjMHn06YbFJVrXKR+4ObxUWl04UrniV2vr/bdaI6RXjGyRSIcd68O HES08N7DrGI6dJIEdX13jw8Z4vbwrYoh/p1/tyq9QpNB5uqPD8ZT0UFthjI/A8zJz8ju YiHA== X-Gm-Message-State: AOAM530QxZ3uRT76FhOV1Haj8saQ8LtTbebG2tcA7CewRiFppBOSbeJJ cr9WDkWHrV849ZcylI7ZRN87+1PvqDpLgw== X-Google-Smtp-Source: ABdhPJxB/BDCrIt4IvMc5+UulNhWLvO8Kb1Acg1Yjylz5JXNeeAUw+oXqxauWB1oa7PSm0f4u1hXrg== X-Received: by 2002:a05:600c:6011:b0:38e:bc5f:5197 with SMTP id az17-20020a05600c601100b0038ebc5f5197mr4326257wmb.37.1650468869967; Wed, 20 Apr 2022 08:34:29 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 13/34] meson, configure: move --enable-module-upgrades to meson Date: Wed, 20 Apr 2022 17:33:46 +0200 Message-Id: <20220420153407.73926-14-pbonzini@redhat.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220420153407.73926-1-pbonzini@redhat.com> References: <20220420153407.73926-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::336; envelope-from=paolo.bonzini@gmail.com; helo=mail-wm1-x336.google.com 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.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1650470188912100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Paolo Bonzini Reviewed-by: Marc-Andr=C3=A9 Lureau --- configure | 14 -------------- meson.build | 7 ++++++- meson_options.txt | 2 ++ scripts/meson-buildoptions.sh | 4 ++++ 4 files changed, 12 insertions(+), 15 deletions(-) diff --git a/configure b/configure index 75e8b1e7aa..d4d51eff06 100755 --- a/configure +++ b/configure @@ -310,7 +310,6 @@ fortify_source=3D"$default_feature" gcov=3D"no" EXESUF=3D"" modules=3D"no" -module_upgrades=3D"no" prefix=3D"/usr/local" qemu_suffix=3D"qemu" softmmu=3D"yes" @@ -762,10 +761,6 @@ for opt do --disable-modules) modules=3D"no" ;; - --disable-module-upgrades) module_upgrades=3D"no" - ;; - --enable-module-upgrades) module_upgrades=3D"yes" - ;; --cpu=3D*) ;; --target-list=3D*) target_list=3D"$optarg" @@ -1218,7 +1213,6 @@ cat << EOF bsd-user all BSD usermode emulation targets pie Position Independent Executables modules modules support (non-Windows) - module-upgrades try to load modules from alternate paths for upgrades debug-tcg TCG debugging (default is disabled) debug-info debugging information lto Enable Link-Time Optimization. @@ -1487,11 +1481,6 @@ if test "$modules" =3D "yes" && test "$mingw32" =3D = "yes" ; then error_exit "Modules are not available for Windows" fi =20 -# module_upgrades is only reasonable if modules are enabled -if test "$modules" =3D "no" && test "$module_upgrades" =3D "yes" ; then - error_exit "Can't enable module-upgrades as Modules are not enabled" -fi - # Static linking is not possible with plugins, modules or PIE if test "$static" =3D "yes" ; then if test "$modules" =3D "yes" ; then @@ -2563,9 +2552,6 @@ if test "$modules" =3D "yes"; then echo "CONFIG_STAMP=3D_$( (echo $qemu_version; echo $pkgversion; cat $0) = | $shacmd - | cut -f1 -d\ )" >> $config_host_mak echo "CONFIG_MODULES=3Dy" >> $config_host_mak fi -if test "$module_upgrades" =3D "yes"; then - echo "CONFIG_MODULE_UPGRADES=3Dy" >> $config_host_mak -fi echo "CONFIG_TLS_PRIORITY=3D\"$tls_priority\"" >> $config_host_mak =20 if test "$xen" =3D "enabled" ; then diff --git a/meson.build b/meson.build index 84156df809..3c47d82180 100644 --- a/meson.build +++ b/meson.build @@ -1548,6 +1548,11 @@ endif =20 config_host_data.set('HOST_' + host_arch.to_upper(), 1) =20 +if get_option('module_upgrades') and not enable_modules + error('Cannot enable module-upgrades as modules are not enabled') +endif +config_host_data.set('CONFIG_MODULE_UPGRADES', get_option('module_upgrades= ')) + config_host_data.set('CONFIG_ATTR', libattr.found()) config_host_data.set('CONFIG_BDRV_WHITELIST_TOOLS', get_option('block_drv_= whitelist_in_tools')) config_host_data.set('CONFIG_BRLAPI', brlapi.found()) @@ -3563,7 +3568,7 @@ summary_info +=3D {'block layer': have_block} summary_info +=3D {'Install blobs': get_option('install_blobs')} summary_info +=3D {'module support': config_host.has_key('CONFIG_MODULE= S')} if config_host.has_key('CONFIG_MODULES') - summary_info +=3D {'alternative module path': config_host.has_key('CONFI= G_MODULE_UPGRADES')} + summary_info +=3D {'alternative module path': get_option('module_upgrade= s')} endif summary_info +=3D {'fuzzing support': get_option('fuzzing')} if have_system diff --git a/meson_options.txt b/meson_options.txt index d140c0ef89..cf18663833 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -34,6 +34,8 @@ option('fuzzing', type : 'boolean', value: false, description: 'build fuzzing targets') option('gettext', type : 'feature', value : 'auto', description: 'Localization of the GTK+ user interface') +option('module_upgrades', type : 'boolean', value : false, + description: 'try to load modules from alternate paths for upgrades= ') option('install_blobs', type : 'boolean', value : true, description: 'install provided firmware blobs') option('sparse', type : 'feature', value : 'auto', diff --git a/scripts/meson-buildoptions.sh b/scripts/meson-buildoptions.sh index 92be3e6187..a269534394 100644 --- a/scripts/meson-buildoptions.sh +++ b/scripts/meson-buildoptions.sh @@ -19,6 +19,8 @@ meson_options_help() { printf "%s\n" ' --disable-install-blobs install provided firmware blob= s' printf "%s\n" ' --enable-malloc=3DCHOICE choose memory allocator to u= se [system] (choices:' printf "%s\n" ' jemalloc/system/tcmalloc)' + printf "%s\n" ' --enable-module-upgrades try to load modules from alter= nate paths for' + printf "%s\n" ' upgrades' printf "%s\n" ' --enable-profiler profiler support' printf "%s\n" ' --enable-qom-cast-debug cast debugging support' printf "%s\n" ' --enable-rng-none dummy RNG, avoid using /dev/(u= )random and' @@ -268,6 +270,8 @@ _meson_option_parse() { --disable-malloc-trim) printf "%s" -Dmalloc_trim=3Ddisabled ;; --enable-membarrier) printf "%s" -Dmembarrier=3Denabled ;; --disable-membarrier) printf "%s" -Dmembarrier=3Ddisabled ;; + --enable-module-upgrades) printf "%s" -Dmodule_upgrades=3Dtrue ;; + --disable-module-upgrades) printf "%s" -Dmodule_upgrades=3Dfalse ;; --enable-mpath) printf "%s" -Dmpath=3Denabled ;; --disable-mpath) printf "%s" -Dmpath=3Ddisabled ;; --enable-multiprocess) printf "%s" -Dmultiprocess=3Denabled ;; --=20 2.35.1 From nobody Thu May 2 03:23:26 2024 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1650470947571612.2712116231861; Wed, 20 Apr 2022 09:09:07 -0700 (PDT) Received: from localhost ([::1]:49904 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nhCt7-0004PL-U2 for importer@patchew.org; Wed, 20 Apr 2022 12:09:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42758) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nhCLj-0001Tv-IU for qemu-devel@nongnu.org; Wed, 20 Apr 2022 11:34:35 -0400 Received: from mail-wr1-x42a.google.com ([2a00:1450:4864:20::42a]:42914) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nhCLg-0000wU-SV for qemu-devel@nongnu.org; Wed, 20 Apr 2022 11:34:35 -0400 Received: by mail-wr1-x42a.google.com with SMTP id bv16so2767417wrb.9 for ; Wed, 20 Apr 2022 08:34:32 -0700 (PDT) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id n68-20020a1c2747000000b0038e6b4d5395sm130401wmn.16.2022.04.20.08.34.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Apr 2022 08:34:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=oO9ZTeeQU7cn0uqWTOuAehkK0lhF2o7wsmIifpDsN0M=; b=HvuZGiTDrmIIoEl16hHPRmVfJupEd+xNfLIelmGXdd98VOICdHiY8ZQRFMsm7WK87X lWxILV5ZID35TmaxfTRce8G61XfDQpVSQJXSP6WfFb9lGr1ejrfT/Ob5r2n5S0MZlNuJ /nTX5IUGWdB8uP9gRwdRtw+LVQruW+79hFGY9/Xp6bywZOJSFw7wQ1Noyx1pTRjede5I xGnBsaXVYQbVtjZj7Inhn4pGRm0m08VxpB72tlyBgviZrjrVdD8ntupVkC7gsBF2lX03 2WoO6rThhy7VohBSeNM7b4w5qBwEC69P+NY5crjJT9agG1/D+8lOJgzSivH1fxxsY4+Y wCtQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=oO9ZTeeQU7cn0uqWTOuAehkK0lhF2o7wsmIifpDsN0M=; b=aHeF4GUlNHHyDNjxAS1sDWRGHOTu1w7fVKRIIMPUHgykM52qBLugNaE3I4MTj02O4C R7GNfNllTyPm5kJjjXrHGbKSthFAsaThAjgwYF38qc2HSGvY18fOdRGoG1ABaCA3VFl6 1VMzd0Hpk4C4nOGg84bay09Fed/3A0uBMOK2WI/6emeLduUGf7PK3r0460DBCPl4IqHn h8NOn1TgkPxe+OCPRXAj4OAAKqp/vYln1amrLzR3QApNNLxN/id1x/LrOUD0p5/tXKJa ABpDsoMTDNAx/qrKrfM611qEaFGj6cjIjJ7cEmDNulq9p8412mO4TtAXp5L5ctfOvJly K3tA== X-Gm-Message-State: AOAM5323VNIJCeY1Tw6XTAnt8Rr1naQ+9b6HQfSUkPZtrFra6brJC3qk ZisYFa/a41NFlZa9Dll6r8CwudPQ6ZVrCQ== X-Google-Smtp-Source: ABdhPJxO/C/w+4S63hpi64KGPEzWjbxzNv+TGWwl4jC6Q/PsajO0n3mtCbg4SGRoHYnV67sDH88tsw== X-Received: by 2002:a5d:6da9:0:b0:20a:8d08:9977 with SMTP id u9-20020a5d6da9000000b0020a8d089977mr13947909wrs.24.1650468870856; Wed, 20 Apr 2022 08:34:30 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 14/34] meson, configure: move Xen detection to meson Date: Wed, 20 Apr 2022 17:33:47 +0200 Message-Id: <20220420153407.73926-15-pbonzini@redhat.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220420153407.73926-1-pbonzini@redhat.com> References: <20220420153407.73926-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::42a; envelope-from=paolo.bonzini@gmail.com; helo=mail-wr1-x42a.google.com 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.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1650470948051100003 Content-Type: text/plain; charset="utf-8" This is quite a complicated check. I moved all the test programs to a single file in scripts/, picking the right program with #if and a -D flag in meson.build's cc.links() invocation. Signed-off-by: Paolo Bonzini --- configure | 322 +------------------------------------------ meson.build | 114 ++++++++++++--- scripts/xen-detect.c | 203 +++++++++++++++++++++++++++ 3 files changed, 297 insertions(+), 342 deletions(-) create mode 100644 scripts/xen-detect.c diff --git a/configure b/configure index d4d51eff06..11d3cc19ca 100755 --- a/configure +++ b/configure @@ -292,7 +292,6 @@ EXTRA_CXXFLAGS=3D"" EXTRA_OBJCFLAGS=3D"" EXTRA_LDFLAGS=3D"" =20 -xen_ctrl_version=3D"$default_feature" vhost_kernel=3D"$default_feature" vhost_net=3D"$default_feature" vhost_crypto=3D"$default_feature" @@ -346,9 +345,6 @@ default_devices=3D"true" tcg=3D"enabled" cfi=3D"false" =20 -# 4. Detection partly done in configure -xen=3D${default_feature:+disabled} - # parse CC options second for opt do optarg=3D$(expr "x$opt" : 'x[^=3D]*=3D\(.*\)') @@ -866,10 +862,6 @@ for opt do ;; --enable-slirp=3D*) slirp=3D"$optarg" ;; - --disable-xen) xen=3D"disabled" - ;; - --enable-xen) xen=3D"enabled" - ;; --disable-tcg) tcg=3D"disabled" plugins=3D"no" ;; @@ -1697,312 +1689,6 @@ if ! has "$pkg_config_exe"; then error_exit "pkg-config binary '$pkg_config_exe' not found" fi =20 -########################################## -# xen probe - -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. - - if ! echo $EXTRA_LDFLAGS | grep tools/libxc > /dev/null && \ - $pkg_config --exists xencontrol ; then - xen_ctrl_version=3D"$(printf '%d%02d%02d' \ - $($pkg_config --modversion xencontrol | sed 's/\./ /g') )" - xen=3Denabled - xen_pc=3D"xencontrol xenstore xenforeignmemory xengnttab" - xen_pc=3D"$xen_pc xenevtchn xendevicemodel" - if $pkg_config --exists xentoolcore; then - xen_pc=3D"$xen_pc xentoolcore" - fi - xen_cflags=3D"$($pkg_config --cflags $xen_pc)" - xen_libs=3D"$($pkg_config --libs $xen_pc)" - else - - xen_libs=3D"-lxenstore -lxenctrl" - xen_stable_libs=3D"-lxenforeignmemory -lxengnttab -lxenevtchn" - - # First we test whether Xen headers and libraries are available. - # If no, we are done and there is no Xen support. - # If yes, more tests are run to detect the Xen version. - - # Xen (any) - cat > $TMPC < -int main(void) { - return 0; -} -EOF - if ! compile_prog "" "$xen_libs" ; then - # Xen not found - if test "$xen" =3D "enabled" ; then - feature_not_found "xen" "Install xen devel" - fi - xen=3Ddisabled - - # Xen unstable - elif - cat > $TMPC < -#include -int main(void) { - xendevicemodel_handle *xd; - xenforeignmemory_handle *xfmem; - - xd =3D xendevicemodel_open(0, 0); - xendevicemodel_pin_memory_cacheattr(xd, 0, 0, 0, 0); - - xfmem =3D xenforeignmemory_open(0, 0); - xenforeignmemory_map_resource(xfmem, 0, 0, 0, 0, 0, NULL, 0, 0); - - return 0; -} -EOF - compile_prog "" "$xen_libs -lxendevicemodel $xen_stable_libs -lxen= toolcore" - then - xen_stable_libs=3D"-lxendevicemodel $xen_stable_libs -lxentoolcore" - xen_ctrl_version=3D41100 - xen=3Denabled - elif - cat > $TMPC < -#include -int main(void) { - xenforeignmemory_handle *xfmem; - - xfmem =3D xenforeignmemory_open(0, 0); - xenforeignmemory_map2(xfmem, 0, 0, 0, 0, 0, 0, 0); - xentoolcore_restrict_all(0); - - return 0; -} -EOF - compile_prog "" "$xen_libs -lxendevicemodel $xen_stable_libs -lxen= toolcore" - then - xen_stable_libs=3D"-lxendevicemodel $xen_stable_libs -lxentoolcore" - xen_ctrl_version=3D41000 - xen=3Denabled - elif - cat > $TMPC < -int main(void) { - xendevicemodel_handle *xd; - - xd =3D xendevicemodel_open(0, 0); - xendevicemodel_close(xd); - - return 0; -} -EOF - compile_prog "" "$xen_libs -lxendevicemodel $xen_stable_libs" - then - xen_stable_libs=3D"-lxendevicemodel $xen_stable_libs" - xen_ctrl_version=3D40900 - xen=3Denabled - elif - cat > $TMPC < -#include -#include -#include -#include -#include -#include -#if !defined(HVM_MAX_VCPUS) -# error HVM_MAX_VCPUS not defined -#endif -int main(void) { - xc_interface *xc =3D NULL; - xenforeignmemory_handle *xfmem; - xenevtchn_handle *xe; - xengnttab_handle *xg; - xengnttab_grant_copy_segment_t* seg =3D NULL; - - xs_daemon_open(); - - xc =3D xc_interface_open(0, 0, 0); - xc_hvm_set_mem_type(0, 0, HVMMEM_ram_ro, 0, 0); - xc_domain_add_to_physmap(0, 0, XENMAPSPACE_gmfn, 0, 0); - xc_hvm_inject_msi(xc, 0, 0xf0000000, 0x00000000); - xc_hvm_create_ioreq_server(xc, 0, HVM_IOREQSRV_BUFIOREQ_ATOMIC, NULL); - - xfmem =3D xenforeignmemory_open(0, 0); - xenforeignmemory_map(xfmem, 0, 0, 0, 0, 0); - - xe =3D xenevtchn_open(0, 0); - xenevtchn_fd(xe); - - xg =3D xengnttab_open(0, 0); - xengnttab_grant_copy(xg, 0, seg); - - return 0; -} -EOF - compile_prog "" "$xen_libs $xen_stable_libs" - then - xen_ctrl_version=3D40800 - xen=3Denabled - elif - cat > $TMPC < -#include -#include -#include -#include -#include -#include -#if !defined(HVM_MAX_VCPUS) -# error HVM_MAX_VCPUS not defined -#endif -int main(void) { - xc_interface *xc =3D NULL; - xenforeignmemory_handle *xfmem; - xenevtchn_handle *xe; - xengnttab_handle *xg; - - xs_daemon_open(); - - xc =3D xc_interface_open(0, 0, 0); - xc_hvm_set_mem_type(0, 0, HVMMEM_ram_ro, 0, 0); - xc_domain_add_to_physmap(0, 0, XENMAPSPACE_gmfn, 0, 0); - xc_hvm_inject_msi(xc, 0, 0xf0000000, 0x00000000); - xc_hvm_create_ioreq_server(xc, 0, HVM_IOREQSRV_BUFIOREQ_ATOMIC, NULL); - - xfmem =3D xenforeignmemory_open(0, 0); - xenforeignmemory_map(xfmem, 0, 0, 0, 0, 0); - - xe =3D xenevtchn_open(0, 0); - xenevtchn_fd(xe); - - xg =3D xengnttab_open(0, 0); - xengnttab_map_grant_ref(xg, 0, 0, 0); - - return 0; -} -EOF - compile_prog "" "$xen_libs $xen_stable_libs" - then - xen_ctrl_version=3D40701 - xen=3Denabled - - # Xen 4.6 - elif - cat > $TMPC < -#include -#include -#include -#if !defined(HVM_MAX_VCPUS) -# error HVM_MAX_VCPUS not defined -#endif -int main(void) { - xc_interface *xc; - xs_daemon_open(); - xc =3D xc_interface_open(0, 0, 0); - xc_hvm_set_mem_type(0, 0, HVMMEM_ram_ro, 0, 0); - xc_gnttab_open(NULL, 0); - xc_domain_add_to_physmap(0, 0, XENMAPSPACE_gmfn, 0, 0); - xc_hvm_inject_msi(xc, 0, 0xf0000000, 0x00000000); - xc_hvm_create_ioreq_server(xc, 0, HVM_IOREQSRV_BUFIOREQ_ATOMIC, NULL); - xc_reserved_device_memory_map(xc, 0, 0, 0, 0, NULL, 0); - return 0; -} -EOF - compile_prog "" "$xen_libs" - then - xen_ctrl_version=3D40600 - xen=3Denabled - - # Xen 4.5 - elif - cat > $TMPC < -#include -#include -#include -#if !defined(HVM_MAX_VCPUS) -# error HVM_MAX_VCPUS not defined -#endif -int main(void) { - xc_interface *xc; - xs_daemon_open(); - xc =3D xc_interface_open(0, 0, 0); - xc_hvm_set_mem_type(0, 0, HVMMEM_ram_ro, 0, 0); - xc_gnttab_open(NULL, 0); - xc_domain_add_to_physmap(0, 0, XENMAPSPACE_gmfn, 0, 0); - xc_hvm_inject_msi(xc, 0, 0xf0000000, 0x00000000); - xc_hvm_create_ioreq_server(xc, 0, 0, NULL); - return 0; -} -EOF - compile_prog "" "$xen_libs" - then - xen_ctrl_version=3D40500 - xen=3Denabled - - elif - cat > $TMPC < -#include -#include -#include -#if !defined(HVM_MAX_VCPUS) -# error HVM_MAX_VCPUS not defined -#endif -int main(void) { - xc_interface *xc; - xs_daemon_open(); - xc =3D xc_interface_open(0, 0, 0); - xc_hvm_set_mem_type(0, 0, HVMMEM_ram_ro, 0, 0); - xc_gnttab_open(NULL, 0); - xc_domain_add_to_physmap(0, 0, XENMAPSPACE_gmfn, 0, 0); - xc_hvm_inject_msi(xc, 0, 0xf0000000, 0x00000000); - return 0; -} -EOF - compile_prog "" "$xen_libs" - then - xen_ctrl_version=3D40200 - xen=3Denabled - - else - if test "$xen" =3D "enabled" ; then - feature_not_found "xen (unsupported version)" \ - "Install a supported xen (xen 4.2 or newer)" - fi - xen=3Ddisabled - fi - - if test "$xen" =3D enabled; then - if test $xen_ctrl_version -ge 40701 ; then - xen_libs=3D"$xen_libs $xen_stable_libs " - fi - fi - fi -fi - ########################################## # glib support probe =20 @@ -2554,12 +2240,6 @@ if test "$modules" =3D "yes"; then fi echo "CONFIG_TLS_PRIORITY=3D\"$tls_priority\"" >> $config_host_mak =20 -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 - echo "XEN_LIBS=3D$xen_libs" >> $config_host_mak -fi if test "$vhost_scsi" =3D "yes" ; then echo "CONFIG_VHOST_SCSI=3Dy" >> $config_host_mak fi @@ -2838,7 +2518,7 @@ if test "$skip_meson" =3D no; then -Dwerror=3D$(if test "$werror" =3D yes; then echo true; else echo = false; fi) \ -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) \ - -Db_lto=3D$lto -Dcfi=3D$cfi -Dtcg=3D$tcg -Dxen=3D$xen \ + -Db_lto=3D$lto -Dcfi=3D$cfi -Dtcg=3D$tcg \ -Dcapstone=3D$capstone -Dfdt=3D$fdt -Dslirp=3D$slirp \ $(test -n "${LIB_FUZZING_ENGINE+xxx}" && echo "-Dfuzzing_engine=3D= $LIB_FUZZING_ENGINE") \ $(if test "$default_feature" =3D no; then echo "-Dauto_features=3D= disabled"; fi) \ diff --git a/meson.build b/meson.build index 3c47d82180..7cbb771393 100644 --- a/meson.build +++ b/meson.build @@ -348,12 +348,6 @@ accelerators =3D [] if get_option('kvm').allowed() and targetos =3D=3D 'linux' accelerators +=3D 'CONFIG_KVM' endif -if get_option('xen').allowed() and 'CONFIG_XEN_BACKEND' in config_host - accelerators +=3D 'CONFIG_XEN' - have_xen_pci_passthrough =3D get_option('xen_pci_passthrough').allowed()= and targetos =3D=3D 'linux' -else - have_xen_pci_passthrough =3D false -endif if get_option('whpx').allowed() and targetos =3D=3D 'windows' if get_option('whpx').enabled() and host_machine.cpu() !=3D 'x86_64' error('WHPX requires 64-bit host') @@ -425,13 +419,6 @@ endif if 'CONFIG_WHPX' not in accelerators and get_option('whpx').enabled() error('WHPX not available on this platform') endif -if not have_xen_pci_passthrough and get_option('xen_pci_passthrough').enab= led() - if 'CONFIG_XEN' in accelerators - error('Xen PCI passthrough not available on this platform') - else - error('Xen PCI passthrough requested but Xen not enabled') - endif -endif =20 ################ # Dependencies # @@ -1255,10 +1242,86 @@ if not get_option('rdma').auto() or have_system endif =20 xen =3D not_found -if 'CONFIG_XEN_BACKEND' in config_host - xen =3D declare_dependency(compile_args: config_host['XEN_CFLAGS'].split= (), - link_args: config_host['XEN_LIBS'].split()) +if get_option('xen').enabled() or (get_option('xen').auto() and have_syste= m) + xencontrol =3D dependency('xencontrol', required: false, + method: 'pkg-config', kwargs: static_kwargs) + if xencontrol.found() + xen_pc =3D declare_dependency(version: xencontrol.version(), + dependencies: [ + xencontrol, + # disabler: true makes xen_pc.found() return false if any is not f= ound + dependency('xenstore', required: false, + method: 'pkg-config', kwargs: static_kwargs, + disabler: true), + dependency('xenforeignmemory', required: false, + method: 'pkg-config', kwargs: static_kwargs, + disabler: true), + dependency('xengnttab', required: false, + method: 'pkg-config', kwargs: static_kwargs, + disabler: true), + dependency('xenevtchn', required: false, + method: 'pkg-config', kwargs: static_kwargs, + disabler: true), + dependency('xendevicemodel', required: false, + method: 'pkg-config', kwargs: static_kwargs, + disabler: true), + # optional, no "disabler: true" + dependency('xentoolcore', required: false, + method: 'pkg-config', kwargs: static_kwargs)]) + if xen_pc.found() + xen =3D xen_pc + endif + endif + if not xen.found() + xen_tests =3D [ '4.11.0', '4.10.0', '4.9.0', '4.8.0', '4.7.1', '4.6.0'= , '4.5.0', '4.2.0' ] + xen_libs =3D { + '4.11.0': [ 'xenstore', 'xenctrl', 'xendevicemodel', 'xenforeignmemo= ry', 'xengnttab', 'xenevtchn', 'xentoolcore' ], + '4.10.0': [ 'xenstore', 'xenctrl', 'xendevicemodel', 'xenforeignmemo= ry', 'xengnttab', 'xenevtchn', 'xentoolcore' ], + '4.9.0': [ 'xenstore', 'xenctrl', 'xendevicemodel', 'xenforeignmemor= y', 'xengnttab', 'xenevtchn' ], + '4.8.0': [ 'xenstore', 'xenctrl', 'xenforeignmemory', 'xengnttab', '= xenevtchn' ], + '4.7.1': [ 'xenstore', 'xenctrl', 'xenforeignmemory', 'xengnttab', '= xenevtchn' ], + '4.6.0': [ 'xenstore', 'xenctrl' ], + '4.5.0': [ 'xenstore', 'xenctrl' ], + '4.2.0': [ 'xenstore', 'xenctrl' ], + } + xen_deps =3D {} + foreach ver: xen_tests + # cache the various library tests to avoid polluting the logs + xen_test_deps =3D [] + foreach l: xen_libs[ver] + if l not in xen_deps + xen_deps +=3D { l: cc.find_library(l, required: false) } + endif + xen_test_deps +=3D xen_deps[l] + endforeach + + # Use -D to pick just one of the test programs in scripts/xen-detect= .c + xen_version =3D ver.split('.') + xen_ctrl_version =3D xen_version[0] + \ + ('0' + xen_version[1]).substring(-2) + \ + ('0' + xen_version[2]).substring(-2) + if cc.links(files('scripts/xen-detect.c'), + args: '-DCONFIG_XEN_CTRL_INTERFACE_VERSION=3D' + xen_ctr= l_version, + dependencies: xen_test_deps) + xen =3D declare_dependency(version: ver, dependencies: xen_test_de= ps) + break + endif + endforeach + endif + if xen.found() + accelerators +=3D 'CONFIG_XEN' + elif get_option('xen').enabled() + error('could not compile and link Xen test program') + endif endif +have_xen_pci_passthrough =3D get_option('xen_pci_passthrough') \ + .require(xen.found(), + error_message: 'Xen PCI passthrough requested but Xen not enabl= ed') \ + .require(targetos =3D=3D 'linux', + error_message: 'Xen PCI passthrough not available on this platf= orm') \ + .allowed() + + cacard =3D not_found if not get_option('smartcard').auto() or have_system cacard =3D dependency('libcacard', required: get_option('smartcard'), @@ -1632,7 +1695,16 @@ config_host_data.set('CONFIG_X11', x11.found()) config_host_data.set('CONFIG_DBUS_DISPLAY', dbus_display) config_host_data.set('CONFIG_CFI', get_option('cfi')) config_host_data.set('CONFIG_SELINUX', selinux.found()) -config_host_data.set('CONFIG_XEN_PCI_PASSTHROUGH', have_xen_pci_passthroug= h) +config_host_data.set('CONFIG_XEN_BACKEND', xen.found()) +if xen.found() + # protect from xen.version() having less than three components + xen_version =3D xen.version().split('.') + ['0', '0'] + xen_ctrl_version =3D xen_version[0] + \ + ('0' + xen_version[1]).substring(-2) + \ + ('0' + xen_version[2]).substring(-2) + config_host_data.set('CONFIG_XEN_CTRL_INTERFACE_VERSION', xen_ctrl_versi= on) + config_host_data.set('CONFIG_XEN_PCI_PASSTHROUGH', have_xen_pci_passthro= ugh) +endif config_host_data.set('QEMU_VERSION', '"@0@"'.format(meson.project_version(= ))) config_host_data.set('QEMU_VERSION_MAJOR', meson.project_version().split('= .')[0]) config_host_data.set('QEMU_VERSION_MINOR', meson.project_version().split('= .')[1]) @@ -2345,7 +2417,7 @@ config_all +=3D config_all_devices config_all +=3D config_host config_all +=3D config_all_disas config_all +=3D { - 'CONFIG_XEN': config_host.has_key('CONFIG_XEN_BACKEND'), + 'CONFIG_XEN': xen.found(), 'CONFIG_SOFTMMU': have_system, 'CONFIG_USER_ONLY': have_user, 'CONFIG_ALL': true, @@ -3676,9 +3748,9 @@ if have_system summary_info +=3D {'HVF support': config_all.has_key('CONFIG_HVF')} summary_info +=3D {'WHPX support': config_all.has_key('CONFIG_WHPX'= )} summary_info +=3D {'NVMM support': config_all.has_key('CONFIG_NVMM'= )} - summary_info +=3D {'Xen support': config_host.has_key('CONFIG_XEN_= BACKEND')} - if config_host.has_key('CONFIG_XEN_BACKEND') - summary_info +=3D {'xen ctrl version': config_host['CONFIG_XEN_CTRL_I= NTERFACE_VERSION']} + summary_info +=3D {'Xen support': xen.found()} + if xen.found() + summary_info +=3D {'xen ctrl version': xen.version()} endif endif summary_info +=3D {'TCG support': config_all.has_key('CONFIG_TCG')} diff --git a/scripts/xen-detect.c b/scripts/xen-detect.c new file mode 100644 index 0000000000..85e8206490 --- /dev/null +++ b/scripts/xen-detect.c @@ -0,0 +1,203 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ + +/* Test programs for various Xen versions that QEMU supports. */ +#if CONFIG_XEN_CTRL_INTERFACE_VERSION =3D=3D 41100 + #undef XC_WANT_COMPAT_DEVICEMODEL_API + #define __XEN_TOOLS__ + #include + #include + int main(void) { + xendevicemodel_handle *xd; + xenforeignmemory_handle *xfmem; + + xd =3D xendevicemodel_open(0, 0); + xendevicemodel_pin_memory_cacheattr(xd, 0, 0, 0, 0); + + xfmem =3D xenforeignmemory_open(0, 0); + xenforeignmemory_map_resource(xfmem, 0, 0, 0, 0, 0, NULL, 0, 0); + + return 0; + } + +#elif CONFIG_XEN_CTRL_INTERFACE_VERSION =3D=3D 41000 + #undef XC_WANT_COMPAT_MAP_FOREIGN_API + #include + #include + int main(void) { + xenforeignmemory_handle *xfmem; + + xfmem =3D xenforeignmemory_open(0, 0); + xenforeignmemory_map2(xfmem, 0, 0, 0, 0, 0, 0, 0); + xentoolcore_restrict_all(0); + + return 0; + } + +#elif CONFIG_XEN_CTRL_INTERFACE_VERSION =3D=3D 40900 + #undef XC_WANT_COMPAT_DEVICEMODEL_API + #define __XEN_TOOLS__ + #include + int main(void) { + xendevicemodel_handle *xd; + + xd =3D xendevicemodel_open(0, 0); + xendevicemodel_close(xd); + + return 0; + } + +#elif CONFIG_XEN_CTRL_INTERFACE_VERSION =3D=3D 40800 + /* + * If we have stable libs the we don't want the libxc compat + * layers, regardless of what CFLAGS we may have been given. + * + * Also, check if xengnttab_grant_copy_segment_t is defined and + * grant copy operation is implemented. + */ + #undef XC_WANT_COMPAT_EVTCHN_API + #undef XC_WANT_COMPAT_GNTTAB_API + #undef XC_WANT_COMPAT_MAP_FOREIGN_API + #include + #include + #include + #include + #include + #include + #include + #if !defined(HVM_MAX_VCPUS) + # error HVM_MAX_VCPUS not defined + #endif + int main(void) { + xc_interface *xc =3D NULL; + xenforeignmemory_handle *xfmem; + xenevtchn_handle *xe; + xengnttab_handle *xg; + xengnttab_grant_copy_segment_t* seg =3D NULL; + + xs_daemon_open(); + + xc =3D xc_interface_open(0, 0, 0); + xc_hvm_set_mem_type(0, 0, HVMMEM_ram_ro, 0, 0); + xc_domain_add_to_physmap(0, 0, XENMAPSPACE_gmfn, 0, 0); + xc_hvm_inject_msi(xc, 0, 0xf0000000, 0x00000000); + xc_hvm_create_ioreq_server(xc, 0, HVM_IOREQSRV_BUFIOREQ_ATOMIC, NULL); + + xfmem =3D xenforeignmemory_open(0, 0); + xenforeignmemory_map(xfmem, 0, 0, 0, 0, 0); + + xe =3D xenevtchn_open(0, 0); + xenevtchn_fd(xe); + + xg =3D xengnttab_open(0, 0); + xengnttab_grant_copy(xg, 0, seg); + + return 0; + } + +#elif CONFIG_XEN_CTRL_INTERFACE_VERSION =3D=3D 40701 + /* + * If we have stable libs the we don't want the libxc compat + * layers, regardless of what CFLAGS we may have been given. + */ + #undef XC_WANT_COMPAT_EVTCHN_API + #undef XC_WANT_COMPAT_GNTTAB_API + #undef XC_WANT_COMPAT_MAP_FOREIGN_API + #include + #include + #include + #include + #include + #include + #include + #if !defined(HVM_MAX_VCPUS) + # error HVM_MAX_VCPUS not defined + #endif + int main(void) { + xc_interface *xc =3D NULL; + xenforeignmemory_handle *xfmem; + xenevtchn_handle *xe; + xengnttab_handle *xg; + + xs_daemon_open(); + + xc =3D xc_interface_open(0, 0, 0); + xc_hvm_set_mem_type(0, 0, HVMMEM_ram_ro, 0, 0); + xc_domain_add_to_physmap(0, 0, XENMAPSPACE_gmfn, 0, 0); + xc_hvm_inject_msi(xc, 0, 0xf0000000, 0x00000000); + xc_hvm_create_ioreq_server(xc, 0, HVM_IOREQSRV_BUFIOREQ_ATOMIC, NULL); + + xfmem =3D xenforeignmemory_open(0, 0); + xenforeignmemory_map(xfmem, 0, 0, 0, 0, 0); + + xe =3D xenevtchn_open(0, 0); + xenevtchn_fd(xe); + + xg =3D xengnttab_open(0, 0); + xengnttab_map_grant_ref(xg, 0, 0, 0); + + return 0; + } + +#elif CONFIG_XEN_CTRL_INTERFACE_VERSION =3D=3D 40600 + #include + #include + #include + #include + #if !defined(HVM_MAX_VCPUS) + # error HVM_MAX_VCPUS not defined + #endif + int main(void) { + xc_interface *xc; + xs_daemon_open(); + xc =3D xc_interface_open(0, 0, 0); + xc_hvm_set_mem_type(0, 0, HVMMEM_ram_ro, 0, 0); + xc_gnttab_open(NULL, 0); + xc_domain_add_to_physmap(0, 0, XENMAPSPACE_gmfn, 0, 0); + xc_hvm_inject_msi(xc, 0, 0xf0000000, 0x00000000); + xc_hvm_create_ioreq_server(xc, 0, HVM_IOREQSRV_BUFIOREQ_ATOMIC, NULL); + xc_reserved_device_memory_map(xc, 0, 0, 0, 0, NULL, 0); + return 0; + } + +#elif CONFIG_XEN_CTRL_INTERFACE_VERSION =3D=3D 40500 + #include + #include + #include + #include + #if !defined(HVM_MAX_VCPUS) + # error HVM_MAX_VCPUS not defined + #endif + int main(void) { + xc_interface *xc; + xs_daemon_open(); + xc =3D xc_interface_open(0, 0, 0); + xc_hvm_set_mem_type(0, 0, HVMMEM_ram_ro, 0, 0); + xc_gnttab_open(NULL, 0); + xc_domain_add_to_physmap(0, 0, XENMAPSPACE_gmfn, 0, 0); + xc_hvm_inject_msi(xc, 0, 0xf0000000, 0x00000000); + xc_hvm_create_ioreq_server(xc, 0, 0, NULL); + return 0; + } + +#elif CONFIG_XEN_CTRL_INTERFACE_VERSION =3D=3D 40200 + #include + #include + #include + #include + #if !defined(HVM_MAX_VCPUS) + # error HVM_MAX_VCPUS not defined + #endif + int main(void) { + xc_interface *xc; + xs_daemon_open(); + xc =3D xc_interface_open(0, 0, 0); + xc_hvm_set_mem_type(0, 0, HVMMEM_ram_ro, 0, 0); + xc_gnttab_open(NULL, 0); + xc_domain_add_to_physmap(0, 0, XENMAPSPACE_gmfn, 0, 0); + xc_hvm_inject_msi(xc, 0, 0xf0000000, 0x00000000); + return 0; + } + +#else +#error invalid CONFIG_XEN_CTRL_INTERFACE_VERSION +#endif --=20 2.35.1 From nobody Thu May 2 03:23:26 2024 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1650470241730217.34795265546813; Wed, 20 Apr 2022 08:57:21 -0700 (PDT) Received: from localhost ([::1]:52164 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nhChk-0003DQ-MN for importer@patchew.org; Wed, 20 Apr 2022 11:57:20 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42768) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nhCLk-0001Up-5M for qemu-devel@nongnu.org; Wed, 20 Apr 2022 11:34:37 -0400 Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]:36659) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nhCLi-0000wg-8y for qemu-devel@nongnu.org; Wed, 20 Apr 2022 11:34:35 -0400 Received: by mail-wr1-x42e.google.com with SMTP id u3so2803346wrg.3 for ; Wed, 20 Apr 2022 08:34:33 -0700 (PDT) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id n68-20020a1c2747000000b0038e6b4d5395sm130401wmn.16.2022.04.20.08.34.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Apr 2022 08:34:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=TnT37L9uJA7IvDjcWLI5ltU9Tg1bdp6nI/3gG4y0CI4=; b=CVQ6NeyqNrGvm738Kr0QalVA4QTt/97YAZk7JhVfOt2JonEd71yLeiYTG1Nq00EJnG TKnlPKodYya0Nhse6ecovnEAhs+Y7hQlljHV7ZqcjrW5uusJm9PNFlBk5YPjfsViSJYk R81Cz/rh628ugoFgNbHX/HBxVPUfm0SCI4+P00aAwXXmPuEgR2yCIwV0tTU2hV772m5H 8FrQmbpj+id2Ycc8h9m5ipxDiCx6j2dxwH7DOJP/hDTJP9pMs2z0rOuc4IMyw7uTu+KP X6hn0rHHZsZs15eiksGFsRxpBoq/MvRzk3vFNPik6STDqhqg1jkA5bMnBrmdnudl0yRT L11w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=TnT37L9uJA7IvDjcWLI5ltU9Tg1bdp6nI/3gG4y0CI4=; b=R2cc0/p+4oY4/93LLg1XH0d8DV707W6b0JL4lBGzB91u+0vtEL5aOXYepSGprbzvxT TgEt36KcnODqGSBOuM0uEyiqHCH5ZRLLVGX+17t3wM/PmL9rHUZcmF+K7yMQ4a4hMd3g KnGDZ1w7K+TXfpoJfsDHJqwA0feDn6jh4uHbbuIMqdZetinrRpq5gXw7+fkIa+cv35In 4i/1OG3kwsBQMa45D3/fRNqRHY9LzOt5ZI7ZDkxUN58Fiz1QN5+Q9i4W7U8LimzZICQ5 CMjRHnNd0ygav4zASHPw55jdH/zTlDEw3cOTWJAvtbnKbAVQKDSExrcaVTM4LYefvhqJ 2a3g== X-Gm-Message-State: AOAM531uTycGahOJimifdk/4Hd11rslq6+80f4nZIIgfIyJjI/k65Hh3 d7b3wwPZqqfG+QXsQ7YCnxpYa4q1afY+pA== X-Google-Smtp-Source: ABdhPJzyZC1rnqMzD8SWK02ycH1u4k/LUnCSPqwqwSogu6dF59oq9PLoGVyNlwwioGpE4nhwa0ZZFg== X-Received: by 2002:a05:6000:1e0e:b0:207:bb61:78d0 with SMTP id bj14-20020a0560001e0e00b00207bb6178d0mr16501420wrb.512.1650468872866; Wed, 20 Apr 2022 08:34:32 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 15/34] meson-buildoptions: add support for string options Date: Wed, 20 Apr 2022 17:33:48 +0200 Message-Id: <20220420153407.73926-16-pbonzini@redhat.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220420153407.73926-1-pbonzini@redhat.com> References: <20220420153407.73926-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::42e; envelope-from=paolo.bonzini@gmail.com; helo=mail-wr1-x42e.google.com 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.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1650470242996100002 Content-Type: text/plain; charset="utf-8" Allow using the buildoptions.json file for more options, namely anything that is not a boolean or multiple-choice. The mapping between configure and meson is messy for string options, so allow configure to use to something other than the name in meson_options.txt. This will come in handy anyway for builtin Meson options such as b_lto or b_coverage. Signed-off-by: Paolo Bonzini Tested-by: Marc-Andr=C3=A9 Lureau --- meson_options.txt | 2 +- scripts/meson-buildoptions.py | 65 ++++++++++++++++++++++++++++++----- scripts/meson-buildoptions.sh | 6 ++-- 3 files changed, 60 insertions(+), 13 deletions(-) diff --git a/meson_options.txt b/meson_options.txt index cf18663833..415fcc448e 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -11,7 +11,7 @@ option('qemu_firmwarepath', type : 'string', value : '', option('smbd', type : 'string', value : '', description: 'Path to smbd for slirp networking') option('sphinx_build', type : 'string', value : '', - description: 'Use specified sphinx-build [$sphinx_build] for buildi= ng document (default to be empty)') + description: 'Use specified sphinx-build for building document') option('iasl', type : 'string', value : '', description: 'Path to ACPI disassembler') option('default_devices', type : 'boolean', value : true, diff --git a/scripts/meson-buildoptions.py b/scripts/meson-buildoptions.py index 693be7b966..4af8d6e732 100755 --- a/scripts/meson-buildoptions.py +++ b/scripts/meson-buildoptions.py @@ -38,6 +38,11 @@ "trace_file", } =20 +OPTION_NAMES =3D { + "malloc": "enable-malloc", + "trace_backends": "enable-trace-backends", +} + BUILTIN_OPTIONS =3D { "strip", } @@ -75,7 +80,7 @@ def help_line(left, opt, indent, long): right =3D f'{opt["description"]}' if long: value =3D value_to_help(opt["value"]) - if value !=3D "auto": + if value !=3D "auto" and value !=3D "": right +=3D f" [{value}]" if "choices" in opt and long: choices =3D "/".join(sorted(opt["choices"])) @@ -96,6 +101,18 @@ def allow_arg(opt): return not (set(opt["choices"]) <=3D {"auto", "disabled", "enabled"}) =20 =20 +# Return whether the option (a dictionary) can be used without +# arguments. Booleans can only be used without arguments; +# combos require an argument if they accept neither "enabled" +# nor "disabled" +def require_arg(opt): + if opt["type"] =3D=3D "boolean": + return False + if opt["type"] !=3D "combo": + return True + return not ({"enabled", "disabled"}.intersection(opt["choices"])) + + def filter_options(json): if ":" in json["name"]: return False @@ -110,20 +127,48 @@ def load_options(json): return sorted(json, key=3Dlambda x: x["name"]) =20 =20 +def cli_option(opt): + name =3D opt["name"] + if name in OPTION_NAMES: + return OPTION_NAMES[name] + return name.replace("_", "-") + + +def cli_help_key(opt): + key =3D cli_option(opt) + if require_arg(opt): + return key + if opt["type"] =3D=3D "boolean" and opt["value"]: + return f"disable-{key}" + return f"enable-{key}" + + +def cli_metavar(opt): + if opt["type"] =3D=3D "string": + return "VALUE" + if opt["type"] =3D=3D "array": + return "CHOICES" + return "CHOICE" + + def print_help(options): print("meson_options_help() {") - for opt in options: - key =3D opt["name"].replace("_", "-") + for opt in sorted(options, key=3Dcli_help_key): + key =3D cli_help_key(opt) # The first section includes options that have an arguments, # and booleans (i.e., only one of enable/disable makes sense) - if opt["type"] =3D=3D "boolean": - left =3D f"--disable-{key}" if opt["value"] else f"--enable-{k= ey}" + if require_arg(opt): + metavar =3D cli_metavar(opt) + left =3D f"--{key}=3D{metavar}" + help_line(left, opt, 27, True) + elif opt["type"] =3D=3D "boolean": + left =3D f"--{key}" help_line(left, opt, 27, False) elif allow_arg(opt): if opt["type"] =3D=3D "combo" and "enabled" in opt["choices"]: - left =3D f"--enable-{key}[=3DCHOICE]" + left =3D f"--{key}[=3DCHOICE]" else: - left =3D f"--enable-{key}=3DCHOICE" + left =3D f"--{key}=3DCHOICE" help_line(left, opt, 27, True) =20 sh_print() @@ -142,9 +187,11 @@ def print_parse(options): print("_meson_option_parse() {") print(" case $1 in") for opt in options: - key =3D opt["name"].replace("_", "-") + key =3D cli_option(opt) name =3D opt["name"] - if opt["type"] =3D=3D "boolean": + if require_arg(opt): + print(f' --{key}=3D*) quote_sh "-D{name}=3D$2" ;;') + elif opt["type"] =3D=3D "boolean": print(f' --enable-{key}) printf "%s" -D{name}=3Dtrue ;;') print(f' --disable-{key}) printf "%s" -D{name}=3Dfalse ;;') else: diff --git a/scripts/meson-buildoptions.sh b/scripts/meson-buildoptions.sh index a269534394..5a06b7915c 100644 --- a/scripts/meson-buildoptions.sh +++ b/scripts/meson-buildoptions.sh @@ -1,5 +1,7 @@ # This file is generated by meson-buildoptions.py, do not edit! meson_options_help() { + printf "%s\n" ' --disable-coroutine-pool coroutine freelist (better per= formance)' + printf "%s\n" ' --disable-install-blobs install provided firmware blob= s' printf "%s\n" ' --enable-block-drv-whitelist-in-tools' printf "%s\n" ' use block whitelist also in to= ols instead of only' printf "%s\n" ' QEMU' @@ -8,7 +10,6 @@ meson_options_help() { printf "%s\n" ' (choices: auto/disabled/enable= d/internal/system)' printf "%s\n" ' --enable-cfi Control-Flow Integrity (CFI)' printf "%s\n" ' --enable-cfi-debug Verbose errors in case of CFI = violation' - printf "%s\n" ' --disable-coroutine-pool coroutine freelist (better per= formance)' printf "%s\n" ' --enable-debug-mutex mutex debugging support' printf "%s\n" ' --enable-debug-stack-usage' printf "%s\n" ' measure coroutine stack usage' @@ -16,7 +17,6 @@ meson_options_help() { printf "%s\n" ' (choices: auto/disabled/enable= d/internal/system)' printf "%s\n" ' --enable-fuzzing build fuzzing targets' printf "%s\n" ' --enable-gprof QEMU profiling with gprof' - printf "%s\n" ' --disable-install-blobs install provided firmware blob= s' printf "%s\n" ' --enable-malloc=3DCHOICE choose memory allocator to u= se [system] (choices:' printf "%s\n" ' jemalloc/system/tcmalloc)' printf "%s\n" ' --enable-module-upgrades try to load modules from alter= nate paths for' @@ -29,7 +29,7 @@ meson_options_help() { printf "%s\n" ' (choices: auto/disabled/enable= d/internal/system)' printf "%s\n" ' --enable-strip Strip targets on install' printf "%s\n" ' --enable-tcg-interpreter TCG with bytecode interpreter = (slow)' - printf "%s\n" ' --enable-trace-backends=3DCHOICE' + printf "%s\n" ' --enable-trace-backends=3DCHOICES' printf "%s\n" ' Set available tracing backends= [log] (choices:' printf "%s\n" ' dtrace/ftrace/log/nop/simple/s= yslog/ust)' printf "%s\n" '' --=20 2.35.1 From nobody Thu May 2 03:23:26 2024 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1650470072014931.5420569396853; Wed, 20 Apr 2022 08:54:32 -0700 (PDT) Received: from localhost ([::1]:43516 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nhCf1-0005l3-0T for importer@patchew.org; Wed, 20 Apr 2022 11:54:31 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42772) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nhCLk-0001Uq-DJ for qemu-devel@nongnu.org; Wed, 20 Apr 2022 11:34:37 -0400 Received: from mail-wr1-x42f.google.com ([2a00:1450:4864:20::42f]:36660) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nhCLi-0000wj-PF for qemu-devel@nongnu.org; Wed, 20 Apr 2022 11:34:36 -0400 Received: by mail-wr1-x42f.google.com with SMTP id u3so2803379wrg.3 for ; Wed, 20 Apr 2022 08:34:34 -0700 (PDT) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id n68-20020a1c2747000000b0038e6b4d5395sm130401wmn.16.2022.04.20.08.34.32 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Apr 2022 08:34:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=oFhOJ2oEOYPIMxyhC4C3gtr5BJGhpLVFlV1F6OwU/AM=; b=MoWElpHqPaG6RnAJLKRtgKpOa5TT7LwIOcdOo84ZdY+iZsIm82sM8Q4xlEqoBj9vW7 MwJzcOh2+3G3EjlhJTzVncFsstRfMKYaltGJRtw3PhuJWwat1DGbjfHCrSvyH+qCnAzy KkaxkooKvpRYG2YYlIemtrGdp8qHyNEUZ5jkwJjYWoVVUfyyg09SR3onXfXKXVHXlq2A yDL9bvfeP0lqG6dpY9sRp+lC/yA2RX9Bjlb048RceshpYwW7YBPEYM1SRCGGgCTQT8uz o8gHtZb4n6jQY3nJ1NVRfsJgthPU++V82FyNlpxlQAKsCvnxbhwDJvNXPEjN1WcuGqJT hBtQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=oFhOJ2oEOYPIMxyhC4C3gtr5BJGhpLVFlV1F6OwU/AM=; b=nXqAlRrp82RXkQJT4WsPgkP0rMBA9nSOoYGNkE7NEEjxPZ90QuPk2tjXPwap1EmCxj 8BOjfe2bZCWHjK50n3rLYM20kLawtgpBxWqDvj/LbI/v2QOEJVsHs1uTevOOfjzsIAWT V6l7TMh0iF4zfeuk3lr9wMkJwNfYQChSoT2BajL7NdtrD6hUfsRMBE2F9Y7q22hIcO24 WKnkMn9J3MRYqwJwUkrLM/U05yQ41saFsSj3Oh3tuw38vCW7bE63+Z9kllwYaUtL0e7W hGKJwA2DXXbE7It6ucXg0c2MMfD8cgNHiw8mVTmmzFLDR67DC4ggGt4wwIUPjn9jqSGk CgMA== X-Gm-Message-State: AOAM532hsdXdCZRQmuPLVVsKNFsixQ6R/H60UOigoSZFACsti6rENle3 jm/5f/7X3wXQMYnVHYj9rqx/h75+xMOADw== X-Google-Smtp-Source: ABdhPJw22AhFOChJEfECIgjVFpw8Coda4CtSypN0n9nKa6dYgVnJzjIYW3j1uor88IqvdwOrLGXtZQ== X-Received: by 2002:adf:f611:0:b0:207:ac80:73f5 with SMTP id t17-20020adff611000000b00207ac8073f5mr16084718wrp.623.1650468873497; Wed, 20 Apr 2022 08:34:33 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 16/34] configure, meson: move iasl detection to meson Date: Wed, 20 Apr 2022 17:33:49 +0200 Message-Id: <20220420153407.73926-17-pbonzini@redhat.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220420153407.73926-1-pbonzini@redhat.com> References: <20220420153407.73926-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::42f; envelope-from=paolo.bonzini@gmail.com; helo=mail-wr1-x42f.google.com 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.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1650470074195100003 Content-Type: text/plain; charset="utf-8" Signed-off-by: Paolo Bonzini Reviewed-by: Marc-Andr=C3=A9 Lureau --- configure | 2 +- meson.build | 16 +++++++++------- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/configure b/configure index 11d3cc19ca..772714d386 100755 --- a/configure +++ b/configure @@ -2507,7 +2507,7 @@ if test "$skip_meson" =3D no; then -Daudio_drv_list=3D$audio_drv_list \ -Ddefault_devices=3D$default_devices \ -Ddocdir=3D"$docdir" \ - -Diasl=3D"$($iasl -h >/dev/null 2>&1 && printf %s "$iasl")" \ + -Diasl=3D"$iasl" \ -Dqemu_firmwarepath=3D"$firmwarepath" \ -Dqemu_suffix=3D"$qemu_suffix" \ -Dsmbd=3D"$smbd" \ diff --git a/meson.build b/meson.build index 7cbb771393..d255facbfd 100644 --- a/meson.build +++ b/meson.build @@ -167,6 +167,12 @@ if 'dtrace' in get_option('trace_backends') endif endif =20 +if get_option('iasl') =3D=3D '' + iasl =3D find_program('iasl', required: false) +else + iasl =3D find_program(get_option('iasl'), required: true) +endif + ################## # Compiler flags # ################## @@ -1582,8 +1588,8 @@ foreach k : get_option('trace_backends') config_host_data.set('CONFIG_TRACE_' + k.to_upper(), true) endforeach config_host_data.set_quoted('CONFIG_TRACE_FILE', get_option('trace_file')) -if get_option('iasl') !=3D '' - config_host_data.set_quoted('CONFIG_IASL', get_option('iasl')) +if iasl.found() + config_host_data.set_quoted('CONFIG_IASL', iasl.full_path()) endif config_host_data.set_quoted('CONFIG_BINDIR', get_option('prefix') / get_op= tion('bindir')) config_host_data.set_quoted('CONFIG_PREFIX', get_option('prefix')) @@ -3617,11 +3623,7 @@ summary_info +=3D {'sphinx-build': sphinx_build} if config_host.has_key('HAVE_GDB_BIN') summary_info +=3D {'gdb': config_host['HAVE_GDB_BIN']} endif -if get_option('iasl') !=3D '' - summary_info +=3D {'iasl': get_option('iasl')} -else - summary_info +=3D {'iasl': false} -endif +summary_info +=3D {'iasl': iasl} summary_info +=3D {'genisoimage': config_host['GENISOIMAGE']} if targetos =3D=3D 'windows' and have_ga summary_info +=3D {'wixl': wixl} --=20 2.35.1 From nobody Thu May 2 03:23:26 2024 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 165047038630483.46179002171232; Wed, 20 Apr 2022 08:59:46 -0700 (PDT) Received: from localhost ([::1]:60812 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nhCk5-0000tF-1u for importer@patchew.org; Wed, 20 Apr 2022 11:59:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42782) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nhCLl-0001Us-KM for qemu-devel@nongnu.org; Wed, 20 Apr 2022 11:34:37 -0400 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]:36665) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nhCLj-0000y2-Rp for qemu-devel@nongnu.org; Wed, 20 Apr 2022 11:34:37 -0400 Received: by mail-wr1-x434.google.com with SMTP id u3so2803455wrg.3 for ; Wed, 20 Apr 2022 08:34:35 -0700 (PDT) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id n68-20020a1c2747000000b0038e6b4d5395sm130401wmn.16.2022.04.20.08.34.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Apr 2022 08:34:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=gY77bwNkMdDmjfm+JoMSrch14sfN3pM52znQg3cyUIw=; b=EjzD0IklTT9RKqjv9KW7zNLpYATpxq2Ij0RG1tfAsSG04BTXJYo2xsZ4t/EES4gpvu 0qC/y/U2rmHAtT4rq2HJY1RL741huYZmrmBj0WjsZIQtR0kL2h/gBQW0ef5oNNrTiejg d3Pa8KpEnms+/XxoFOLEV9CqRW+1WLpM4bGvIMpYbvVb6CyLgLzR7PWDNtxPaPy6F96o xuJB1uUDvjmoxsqks13ed/HVxyqQTDAnH23eZpLM/M5lqr2tiRkEle5Bw233Hfh4QU28 OBQjlC8KcxJv38A/3WTpufq61Ot8SWV4OmxB69cCAPxZCifSyP5WZgpzFd9EdIjCPkl9 GXsQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=gY77bwNkMdDmjfm+JoMSrch14sfN3pM52znQg3cyUIw=; b=VnSIBeLtjqqwiIdASoo7XO9C+/kekPia+x/tHdeCDlA8ywkeQ/2XdHe+UKDlqpOUEV CgLWnDMBGUmvFM5OZaoQjE6sChX+7+f78rkzIhgsiPwIeNmLT6mVufOW9/i66y+OWVGU u0aIweFW5foB9mzHkIRgeqT4juyqy8KfKLsgtUeEoqWXf6dgyMdyPsiPpgtMySTLbuLx t+AX5h6HWn8ybaC8IsPLF7yLNk5wS7nGv3bSqj1k/4Raw/KtwOFoMrawV8bvJ4tC9PoS KxaoL38fQD+WG3qAOgyyHjywWclRbEu4SWFuA7dbX9RDztRGd4bIjivYMEC9QQ7Omm2L S/nQ== X-Gm-Message-State: AOAM533igkxkY8cqm45aQLZDpigG3K4QxUTba8Mr2yyjEOmm48i2SWGP fqNz3QNuO+TaSwpUFlQYulpGrXMempZnJQ== X-Google-Smtp-Source: ABdhPJxkZRP7TjdyM+RoZyxstKOXDOd//Is9o2oVYuQVV2ehSeITx3kSXqgaSszjEqKi3FGTdAJdaA== X-Received: by 2002:adf:f046:0:b0:207:a457:5e52 with SMTP id t6-20020adff046000000b00207a4575e52mr15931792wro.708.1650468874578; Wed, 20 Apr 2022 08:34:34 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 17/34] configure: move Windows flags detection to meson Date: Wed, 20 Apr 2022 17:33:50 +0200 Message-Id: <20220420153407.73926-18-pbonzini@redhat.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220420153407.73926-1-pbonzini@redhat.com> References: <20220420153407.73926-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::434; envelope-from=paolo.bonzini@gmail.com; helo=mail-wr1-x434.google.com 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.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1650470387815100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Paolo Bonzini --- configure | 20 -------------------- meson.build | 8 ++++++++ 2 files changed, 8 insertions(+), 20 deletions(-) diff --git a/configure b/configure index 772714d386..87ceb33917 100755 --- a/configure +++ b/configure @@ -224,10 +224,6 @@ glob() { eval test -z '"${1#'"$2"'}"' } =20 -ld_has() { - $ld --help 2>/dev/null | grep ".$1" >/dev/null 2>&1 -} - if printf %s\\n "$source_path" "$PWD" | grep -q "[[:space:]:]"; then error_exit "main directory cannot contain spaces nor colons" @@ -2088,22 +2084,6 @@ if test "$solaris" =3D "no" && test "$tsan" =3D "no"= ; then fi fi =20 -# Use ASLR, no-SEH and DEP if available -if test "$mingw32" =3D "yes" ; then - flags=3D"--no-seh --nxcompat" - - # Disable ASLR for debug builds to allow debugging with gdb - if test "$debug" =3D "no" ; then - flags=3D"--dynamicbase $flags" - fi - - for flag in $flags; do - if ld_has $flag ; then - QEMU_LDFLAGS=3D"-Wl,$flag $QEMU_LDFLAGS" - fi - done -fi - # Guest agent Windows MSI package =20 if test "$QEMU_GA_MANUFACTURER" =3D ""; then diff --git a/meson.build b/meson.build index d255facbfd..ffca473fbc 100644 --- a/meson.build +++ b/meson.build @@ -182,6 +182,14 @@ qemu_cxxflags =3D config_host['QEMU_CXXFLAGS'].split() qemu_objcflags =3D config_host['QEMU_OBJCFLAGS'].split() qemu_ldflags =3D config_host['QEMU_LDFLAGS'].split() =20 +if targetos =3D=3D 'windows' + qemu_ldflags +=3D cc.get_supported_link_arguments('-Wl,--no-seh', '-Wl,-= -nxcompat') + # Disable ASLR for debug builds to allow debugging with gdb + if get_option('optimization') =3D=3D 0 + qemu_ldflags +=3D cc.get_supported_link_arguments('-Wl,--dynamicbase') + endif +endif + if get_option('gprof') qemu_cflags +=3D ['-p'] qemu_cxxflags +=3D ['-p'] --=20 2.35.1 From nobody Thu May 2 03:23:26 2024 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1650470642524839.361806212763; Wed, 20 Apr 2022 09:04:02 -0700 (PDT) Received: from localhost ([::1]:41230 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nhCoD-0006rM-AJ for importer@patchew.org; Wed, 20 Apr 2022 12:04:01 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42810) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nhCLn-0001Wt-M9 for qemu-devel@nongnu.org; Wed, 20 Apr 2022 11:34:41 -0400 Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]:51981) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nhCLl-0000yM-Tu for qemu-devel@nongnu.org; Wed, 20 Apr 2022 11:34:39 -0400 Received: by mail-wm1-x335.google.com with SMTP id q20so1466956wmq.1 for ; Wed, 20 Apr 2022 08:34:37 -0700 (PDT) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id n68-20020a1c2747000000b0038e6b4d5395sm130401wmn.16.2022.04.20.08.34.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Apr 2022 08:34:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=+pFdnHYez6FG1+gMSjss9lN947m4DK6aL4zlGZJr2IQ=; b=TRoN63vDouHBE7beZF2ptjickn8aGuVh8P2WSwajLltVt9cr5qW9oJBQLOPBFrPfte UXdiq7N0f8ro/Rr67gqKX8+fAm6Yl8UxsG0Ng5n3vDvPv9lb0nkP3h3OR3esk62LUIrM E2OY6gvuET7RNKXeigRQmN7X9E8Isy5ZVFx1kZjswcbnh6YHk0fwJI/Sq6AlJvJvm3Da QU3dX1nnrl7IoSELlZkp8SAQXkjXK4N8IYs3C3YzfymMvnPANqI1If2dsdFnXIGCt0Ve 95s/4fazoIAPDOdg6hy/gpZa4QOalH4OxOq+xP16mQSuqSUuVt6YjX0Za3GcqXvEz7fH X7kA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=+pFdnHYez6FG1+gMSjss9lN947m4DK6aL4zlGZJr2IQ=; b=kOSwN1feKvWSTSoA8sq5YTuZkArEGetTrAlmRusTCdMIf+ESjj65YbTaFZ4+VQinJi gV7TrVPD0ehg8/xXw6+AF1u/gZ9b3r2vidpZoqXZTQCzvruF8Apk9hqA4CgLuVJrhbWs iLZs67n0MxjtTfq8vgm96tfJvfbxy5+88IwxLcGyRI0BlOgPVa/+1JND3eyzJYDrnQlz m7/Ih6QvqQ63agBjXOWsVq4TF1XiKFXVxvKP1FHO4EYxgomkaEtOwPW5hqKwRq6ZPwuL djbRwvex7uvJJUiJmPLHrxhZt6q03C7T3MNGNidu2MWGXq+eJGiYMVQDTNvlX15TXrx1 p2Hg== X-Gm-Message-State: AOAM533GSuR1yis1tQmwwr4gUgE9d3LyVfbefmhfuUvP1PWhwv0jBPmo Ao3mNBm97hbVvJx0nOmjs0rBEBuP6tP/Ag== X-Google-Smtp-Source: ABdhPJxwcDJw0Yha+YUr4ft7CKb6cMuQ+ajfjxt1XQzSabHlhaTcWjnnP2WxLnpYHx1+vm37WOFqVQ== X-Received: by 2002:a1c:a301:0:b0:392:9bc5:203c with SMTP id m1-20020a1ca301000000b003929bc5203cmr4317811wme.67.1650468876251; Wed, 20 Apr 2022 08:34:36 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 18/34] configure: switch string options to automatic parsing Date: Wed, 20 Apr 2022 17:33:51 +0200 Message-Id: <20220420153407.73926-19-pbonzini@redhat.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220420153407.73926-1-pbonzini@redhat.com> References: <20220420153407.73926-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::335; envelope-from=paolo.bonzini@gmail.com; helo=mail-wm1-x335.google.com 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.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1650470643541100003 Content-Type: text/plain; charset="utf-8" Signed-off-by: Paolo Bonzini Reviewed-by: Marc-Andr=C3=A9 Lureau --- configure | 24 +----------------------- scripts/meson-buildoptions.py | 5 +---- scripts/meson-buildoptions.sh | 9 +++++++++ 3 files changed, 11 insertions(+), 27 deletions(-) diff --git a/configure b/configure index 87ceb33917..8f34f2a061 100755 --- a/configure +++ b/configure @@ -231,12 +231,10 @@ fi =20 # default parameters cpu=3D"" -iasl=3D"iasl" interp_prefix=3D"/usr/gnemul/qemu-%M" static=3D"no" cross_compile=3D"no" cross_prefix=3D"" -audio_drv_list=3D"default" block_drv_rw_whitelist=3D"" block_drv_ro_whitelist=3D"" host_cc=3D"cc" @@ -312,7 +310,6 @@ linux_user=3D"" bsd_user=3D"" pkgversion=3D"" pie=3D"" -trace_file=3D"trace" coroutine=3D"" tls_priority=3D"NORMAL" plugins=3D"$default_feature" @@ -713,8 +710,6 @@ for opt do ;; --cxx=3D*) ;; - --iasl=3D*) iasl=3D"$optarg" - ;; --objcc=3D*) objcc=3D"$optarg" ;; --make=3D*) make=3D"$optarg" @@ -723,8 +718,6 @@ for opt do ;; --python=3D*) python=3D"$optarg" ; explicit_python=3Dyes ;; - --sphinx-build=3D*) sphinx_build=3D"$optarg" - ;; --skip-meson) skip_meson=3Dyes ;; --meson=3D*) meson=3D"$optarg" @@ -765,8 +758,6 @@ for opt do error_exit "Can't mix --target-list-exclude with --= target-list" fi ;; - --with-trace-file=3D*) trace_file=3D"$optarg" - ;; --with-default-devices) default_devices=3D"true" ;; --without-default-devices) default_devices=3D"false" @@ -825,8 +816,6 @@ for opt do # configure to be used by RPM and similar macros that set # lots of directory switches by default. ;; - --audio-drv-list=3D*) audio_drv_list=3D"$optarg" - ;; --block-drv-rw-whitelist=3D*|--block-drv-whitelist=3D*) block_drv_rw_whi= telist=3D$(echo "$optarg" | sed -e 's/,/ /g') ;; --block-drv-ro-whitelist=3D*) block_drv_ro_whitelist=3D$(echo "$optarg" = | sed -e 's/,/ /g') @@ -1000,12 +989,7 @@ for opt do --enable-jemalloc) meson_option_parse --enable-malloc=3Djemalloc jemalloc ;; # everything else has the same name in configure and meson - --enable-* | --disable-*) meson_option_parse "$opt" "$optarg" - ;; - *) - echo "ERROR: unknown option $opt" - echo "Try '$0 --help' for more information" - exit 1 + --*) meson_option_parse "$opt" "$optarg" ;; esac done @@ -1128,7 +1112,6 @@ $(echo Available targets: $default_target_list | \ Advanced options (experts only): --cross-prefix=3DPREFIX use PREFIX for compile tools, PREFIX can be b= lank [$cross_prefix] --cc=3DCC use C compiler CC [$cc] - --iasl=3DIASL use ACPI compiler IASL [$iasl] --host-cc=3DCC use C compiler CC [$host_cc] for code run at build time --cxx=3DCXX use C++ compiler CXX [$cxx] @@ -1141,7 +1124,6 @@ Advanced options (experts only): --cross-cc-cflags-ARCH=3D use compiler flags when building ARCH guest t= ests --make=3DMAKE use specified make [$make] --python=3DPYTHON use specified python [$python] - --sphinx-build=3DSPHINX use specified sphinx-build [$sphinx_build] --meson=3DMESON use specified meson [$meson] --ninja=3DNINJA use specified ninja [$ninja] --smbd=3DSMBD use specified smbd [$smbd] @@ -2484,15 +2466,11 @@ if test "$skip_meson" =3D no; then --sysconfdir "$sysconfdir" \ --localedir "$localedir" \ --localstatedir "$local_statedir" \ - -Daudio_drv_list=3D$audio_drv_list \ -Ddefault_devices=3D$default_devices \ -Ddocdir=3D"$docdir" \ - -Diasl=3D"$iasl" \ -Dqemu_firmwarepath=3D"$firmwarepath" \ -Dqemu_suffix=3D"$qemu_suffix" \ -Dsmbd=3D"$smbd" \ - -Dsphinx_build=3D"$sphinx_build" \ - -Dtrace_file=3D"$trace_file" \ -Doptimization=3D$(if test "$debug" =3D yes; then echo 0; else ech= o 2; fi) \ -Ddebug=3D$(if test "$debug_info" =3D yes; then echo true; else ec= ho false; fi) \ -Dwerror=3D$(if test "$werror" =3D yes; then echo true; else echo = false; fi) \ diff --git a/scripts/meson-buildoptions.py b/scripts/meson-buildoptions.py index 4af8d6e732..3e540e8bb3 100755 --- a/scripts/meson-buildoptions.py +++ b/scripts/meson-buildoptions.py @@ -26,21 +26,18 @@ import sys =20 SKIP_OPTIONS =3D { - "audio_drv_list", "default_devices", "docdir", "fuzzing_engine", - "iasl", "qemu_firmwarepath", "qemu_suffix", "smbd", - "sphinx_build", - "trace_file", } =20 OPTION_NAMES =3D { "malloc": "enable-malloc", "trace_backends": "enable-trace-backends", + "trace_file": "with-trace-file", } =20 BUILTIN_OPTIONS =3D { diff --git a/scripts/meson-buildoptions.sh b/scripts/meson-buildoptions.sh index 5a06b7915c..63f2f1abcf 100644 --- a/scripts/meson-buildoptions.sh +++ b/scripts/meson-buildoptions.sh @@ -1,5 +1,7 @@ # This file is generated by meson-buildoptions.py, do not edit! meson_options_help() { + printf "%s\n" ' --audio-drv-list=3DCHOICES Set audio driver list [defau= lt] (choices:' + printf "%s\n" ' alsa/coreaudio/default/dsound/= jack/oss/pa/sdl)' printf "%s\n" ' --disable-coroutine-pool coroutine freelist (better per= formance)' printf "%s\n" ' --disable-install-blobs install provided firmware blob= s' printf "%s\n" ' --enable-block-drv-whitelist-in-tools' @@ -32,6 +34,9 @@ meson_options_help() { printf "%s\n" ' --enable-trace-backends=3DCHOICES' printf "%s\n" ' Set available tracing backends= [log] (choices:' printf "%s\n" ' dtrace/ftrace/log/nop/simple/s= yslog/ust)' + printf "%s\n" ' --iasl=3DVALUE Path to ACPI disassembler' + printf "%s\n" ' --sphinx-build=3DVALUE Use specified sphinx-build f= or building document' + printf "%s\n" ' --with-trace-file=3DVALUE Trace file prefix for simple= backend [trace]' printf "%s\n" '' printf "%s\n" 'Optional features, enabled with --enable-FEATURE and' printf "%s\n" 'disabled with --disable-FEATURE, default is enabled if av= ailable' @@ -147,6 +152,7 @@ _meson_option_parse() { --disable-alsa) printf "%s" -Dalsa=3Ddisabled ;; --enable-attr) printf "%s" -Dattr=3Denabled ;; --disable-attr) printf "%s" -Dattr=3Ddisabled ;; + --audio-drv-list=3D*) quote_sh "-Daudio_drv_list=3D$2" ;; --enable-auth-pam) printf "%s" -Dauth_pam=3Denabled ;; --disable-auth-pam) printf "%s" -Dauth_pam=3Ddisabled ;; --enable-avx2) printf "%s" -Davx2=3Denabled ;; @@ -229,6 +235,7 @@ _meson_option_parse() { --disable-hax) printf "%s" -Dhax=3Ddisabled ;; --enable-hvf) printf "%s" -Dhvf=3Denabled ;; --disable-hvf) printf "%s" -Dhvf=3Ddisabled ;; + --iasl=3D*) quote_sh "-Diasl=3D$2" ;; --enable-iconv) printf "%s" -Diconv=3Denabled ;; --disable-iconv) printf "%s" -Diconv=3Ddisabled ;; --enable-install-blobs) printf "%s" -Dinstall_blobs=3Dtrue ;; @@ -331,6 +338,7 @@ _meson_option_parse() { --disable-snappy) printf "%s" -Dsnappy=3Ddisabled ;; --enable-sparse) printf "%s" -Dsparse=3Denabled ;; --disable-sparse) printf "%s" -Dsparse=3Ddisabled ;; + --sphinx-build=3D*) quote_sh "-Dsphinx_build=3D$2" ;; --enable-spice) printf "%s" -Dspice=3Denabled ;; --disable-spice) printf "%s" -Dspice=3Ddisabled ;; --enable-spice-protocol) printf "%s" -Dspice_protocol=3Denabled ;; @@ -346,6 +354,7 @@ _meson_option_parse() { --enable-tpm) printf "%s" -Dtpm=3Denabled ;; --disable-tpm) printf "%s" -Dtpm=3Ddisabled ;; --enable-trace-backends=3D*) quote_sh "-Dtrace_backends=3D$2" ;; + --with-trace-file=3D*) quote_sh "-Dtrace_file=3D$2" ;; --enable-u2f) printf "%s" -Du2f=3Denabled ;; --disable-u2f) printf "%s" -Du2f=3Ddisabled ;; --enable-usb-redir) printf "%s" -Dusb_redir=3Denabled ;; --=20 2.35.1 From nobody Thu May 2 03:23:26 2024 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 165046964176142.91874969554863; Wed, 20 Apr 2022 08:47:21 -0700 (PDT) Received: from localhost ([::1]:49284 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nhCY2-0007GV-HZ for importer@patchew.org; Wed, 20 Apr 2022 11:47:19 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42822) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nhCLo-0001Wv-KA for qemu-devel@nongnu.org; Wed, 20 Apr 2022 11:34:41 -0400 Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]:35391) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nhCLn-0000yY-1H for qemu-devel@nongnu.org; Wed, 20 Apr 2022 11:34:40 -0400 Received: by mail-wm1-x335.google.com with SMTP id c190-20020a1c35c7000000b0038e37907b5bso3987793wma.0 for ; Wed, 20 Apr 2022 08:34:38 -0700 (PDT) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id n68-20020a1c2747000000b0038e6b4d5395sm130401wmn.16.2022.04.20.08.34.36 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Apr 2022 08:34:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=b2djDUGICcrNyEwR4fl8U6oezbrWS28+BKVjaVOlJt0=; b=U7ZdGbglOC7NGKbiLjN52lLLXty3Nb+vU1Cdp4MJq/zXIV4vWkiQSD+tGWldhZ/9ko 2N/Pn1I7RD58n0qvmz0Mtj1aUHJgcc1Z/CHLEz4ENICFxXAO/g+Ps7N4d60znQJ9l8uG urnz/o86EMf9Oy6+43I4h7h1HbH3VRo/eprySuwf+v8FyYECyBciR4t7m+YvsRaFj46/ zz5t2kes7aQmuakAtOum0A/sFBSpmbkwDTA85uf+I6JNaOhpomQTEDdzs2t1b1g2YJjY n6hI+bCjZkzK/WtBDNutVSa1p7qzDCYUnvrcEQUE7n1CdJU50779jQGxXZrjJ01XPlWy 9j/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=b2djDUGICcrNyEwR4fl8U6oezbrWS28+BKVjaVOlJt0=; b=4q4xUNxIq61rAHYwQDD4RLzAtP+UDb285WH7dbelw8IrUNCqKsePE7aao95BZ9q1UN Vh8NuRfhIG4v0F0h0TfUM+eLK6B0Rd32HK4yOjcv7TQxNzwrmbYdRBHJM+zMvysEd9a7 pGZrVMhYB0BbLMVsCHW2FvcdhkgxoYK1rC14N48eNTwzsUQCin31cAqk+yiVG1M9whcP E1ujtKjLRsNAc7lqWNDlDGc/yyzYfQOT5Hj24cdiIQVUwl2yxNYFoEA/c5VVMRX0TDRE oJ5ghdjHx2VeM8gbYHK8K7ZeO89X9KOGyKpxYTJf3CdmMBPHD8VklAqiDFS9ZKn6+iKw NgRg== X-Gm-Message-State: AOAM5315RN9xZofRtkpU7xuOhdK8qzxj4SS45KcdeUeWNnHX5RHUvx4i 2rwEoGWuhzxIMScsMX6bi/d56KdgoAQHFQ== X-Google-Smtp-Source: ABdhPJwYyw5DBFbenRstUVMJdrZLzaHzeyCl4YlUxtRedoEdxG1Yax/6LulubPEeBB4Ul/+qmX+z5g== X-Received: by 2002:a1c:acc4:0:b0:392:9dd4:fbcc with SMTP id v187-20020a1cacc4000000b003929dd4fbccmr4230639wme.78.1650468877786; Wed, 20 Apr 2022 08:34:37 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 19/34] meson, configure: move --tls-priority to meson Date: Wed, 20 Apr 2022 17:33:52 +0200 Message-Id: <20220420153407.73926-20-pbonzini@redhat.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220420153407.73926-1-pbonzini@redhat.com> References: <20220420153407.73926-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::335; envelope-from=paolo.bonzini@gmail.com; helo=mail-wm1-x335.google.com 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.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1650469643823100001 Content-Type: text/plain; charset="utf-8" Use the new support for string option parsing. Signed-off-by: Paolo Bonzini Reviewed-by: Marc-Andr=C3=A9 Lureau --- configure | 5 ----- meson.build | 3 ++- meson_options.txt | 2 ++ scripts/meson-buildoptions.sh | 3 +++ 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/configure b/configure index 8f34f2a061..3327a4887a 100755 --- a/configure +++ b/configure @@ -311,7 +311,6 @@ bsd_user=3D"" pkgversion=3D"" pie=3D"" coroutine=3D"" -tls_priority=3D"NORMAL" plugins=3D"$default_feature" meson=3D"" meson_args=3D"" @@ -938,8 +937,6 @@ for opt do --enable-uuid|--disable-uuid) echo "$0: $opt is obsolete, UUID support is always built" >&2 ;; - --tls-priority=3D*) tls_priority=3D"$optarg" - ;; --disable-vhost-user) vhost_user=3D"no" ;; --enable-vhost-user) vhost_user=3D"yes" @@ -1169,7 +1166,6 @@ Advanced options (experts only): --with-coroutine=3DBACKEND coroutine backend. Supported options: ucontext, sigaltstack, windows --enable-gcov enable test coverage analysis with gcov - --tls-priority default TLS protocol/cipher priority string --enable-plugins enable plugins via shared library loading --disable-containers don't use containers for cross-building @@ -2200,7 +2196,6 @@ if test "$modules" =3D "yes"; then echo "CONFIG_STAMP=3D_$( (echo $qemu_version; echo $pkgversion; cat $0) = | $shacmd - | cut -f1 -d\ )" >> $config_host_mak echo "CONFIG_MODULES=3Dy" >> $config_host_mak fi -echo "CONFIG_TLS_PRIORITY=3D\"$tls_priority\"" >> $config_host_mak =20 if test "$vhost_scsi" =3D "yes" ; then echo "CONFIG_VHOST_SCSI=3Dy" >> $config_host_mak diff --git a/meson.build b/meson.build index ffca473fbc..8a7e4ab5c7 100644 --- a/meson.build +++ b/meson.build @@ -1596,6 +1596,7 @@ foreach k : get_option('trace_backends') config_host_data.set('CONFIG_TRACE_' + k.to_upper(), true) endforeach config_host_data.set_quoted('CONFIG_TRACE_FILE', get_option('trace_file')) +config_host_data.set_quoted('CONFIG_TLS_PRIORITY', get_option('tls_priorit= y')) if iasl.found() config_host_data.set_quoted('CONFIG_IASL', iasl.full_path()) endif @@ -3806,7 +3807,7 @@ summary(summary_info, bool_yn: true, section: 'Block = layer support') =20 # Crypto summary_info =3D {} -summary_info +=3D {'TLS priority': config_host['CONFIG_TLS_PRIORITY']} +summary_info +=3D {'TLS priority': get_option('tls_priority')} summary_info +=3D {'GNUTLS support': gnutls} if gnutls.found() summary_info +=3D {' GNUTLS crypto': gnutls_crypto.found()} diff --git a/meson_options.txt b/meson_options.txt index 415fcc448e..891c0ec130 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -14,6 +14,8 @@ option('sphinx_build', type : 'string', value : '', description: 'Use specified sphinx-build for building document') option('iasl', type : 'string', value : '', description: 'Path to ACPI disassembler') +option('tls_priority', type : 'string', value : 'NORMAL', + description: 'Default TLS protocol/cipher priority string') option('default_devices', type : 'boolean', value : true, description: 'Include a default selection of devices in emulators') option('audio_drv_list', type: 'array', value: ['default'], diff --git a/scripts/meson-buildoptions.sh b/scripts/meson-buildoptions.sh index 63f2f1abcf..0e0548aa87 100644 --- a/scripts/meson-buildoptions.sh +++ b/scripts/meson-buildoptions.sh @@ -36,6 +36,8 @@ meson_options_help() { printf "%s\n" ' dtrace/ftrace/log/nop/simple/s= yslog/ust)' printf "%s\n" ' --iasl=3DVALUE Path to ACPI disassembler' printf "%s\n" ' --sphinx-build=3DVALUE Use specified sphinx-build f= or building document' + printf "%s\n" ' --tls-priority=3DVALUE Default TLS protocol/cipher = priority string' + printf "%s\n" ' [NORMAL]' printf "%s\n" ' --with-trace-file=3DVALUE Trace file prefix for simple= backend [trace]' printf "%s\n" '' printf "%s\n" 'Optional features, enabled with --enable-FEATURE and' @@ -349,6 +351,7 @@ _meson_option_parse() { --disable-tcg) printf "%s" -Dtcg=3Ddisabled ;; --enable-tcg-interpreter) printf "%s" -Dtcg_interpreter=3Dtrue ;; --disable-tcg-interpreter) printf "%s" -Dtcg_interpreter=3Dfalse ;; + --tls-priority=3D*) quote_sh "-Dtls_priority=3D$2" ;; --enable-tools) printf "%s" -Dtools=3Denabled ;; --disable-tools) printf "%s" -Dtools=3Ddisabled ;; --enable-tpm) printf "%s" -Dtpm=3Denabled ;; --=20 2.35.1 From nobody Thu May 2 03:23:26 2024 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1650470323888176.56210785841722; Wed, 20 Apr 2022 08:58:43 -0700 (PDT) Received: from localhost ([::1]:58018 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nhCj4-0007Jn-RU for importer@patchew.org; Wed, 20 Apr 2022 11:58:42 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42840) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nhCLq-0001ZH-1E for qemu-devel@nongnu.org; Wed, 20 Apr 2022 11:34:42 -0400 Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]:38732) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nhCLo-0000ye-6R for qemu-devel@nongnu.org; Wed, 20 Apr 2022 11:34:41 -0400 Received: by mail-wm1-x32b.google.com with SMTP id r187-20020a1c44c4000000b0038ccb70e239so3954298wma.3 for ; Wed, 20 Apr 2022 08:34:39 -0700 (PDT) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id n68-20020a1c2747000000b0038e6b4d5395sm130401wmn.16.2022.04.20.08.34.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Apr 2022 08:34:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ANspI++CsYKlNkA/AD97xyt60im8FmLRuEJ+jLCBuu0=; b=cy2DbyDr7jt7TIV13cSjFGULv+m/ZNO41yoShkynZhauC/4oVNow9/XU3fQxBXzpHj cxl5uO2v6WsLKE0SwbTaNVJUmGjEUNZjJgYER2Vkrd+EP1OPbHsQqvEghetqTswc0BIL SAv/Xt8gSEyahZ20nN0fGptT5zKQkkAgtdzhVv+7pT53AIJdTOmZ/aJeBn/fjfwXHrdJ huadxiI8bMq9glCRgSbD2F2jDv4twbj5h14gCQl4W73w1EU5+iqNqmFQHZXhlyuPjnyT WizGMsftAUs55YxCvnaVIiglAW0Ydzlgix5W1+xlrxvEGrn1EUVUNWE0xUurTHtyK+1a nFqA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=ANspI++CsYKlNkA/AD97xyt60im8FmLRuEJ+jLCBuu0=; b=6H7zNJ4UgqAAmrZ2C7Zoe5+uIqfeF6UFTnGlGQ6npn5ybXIOs699pk5lv6ksxy95H7 j/tZI4izcwFt2MfSrCaP/rcODvN01DzlwG/rN1ztA5WGY+rP5i4uCusWZ/228rHKo1Q2 V6VJKSBw+yZEBrCciNI0Cx9KFGho2xeYQUffe11W+zWRenAjgV3vub6TneKVmqg7KmCp nzkJwpx1IVGn4HWGNLjrgBowWhUo/81YkZcoz+iY2sy8D5464pNWJBYjJo0ZZwiuSxcg A5M1sH6Du4KH4MwZzEPf5pifoa4jWtvUwYHbVMFICnWpXdlqSEtZ2mtuSz4hfLP/0K7d zqTQ== X-Gm-Message-State: AOAM533H6sWyEBztl6VAdAjKcUOvoSOd22K6klVjUl04O8gh4TJJ8fzZ NgrKL2U8YHO4fgx6ROFt51wrErpe6wZpCA== X-Google-Smtp-Source: ABdhPJzc37D5K0QwS1Ccuz0z7GOoNoYCTQY3uhWDq1bJFTw3gBiXIJzgPXjkGW165y9YDo24cvtcUw== X-Received: by 2002:a05:600c:4fc9:b0:392:8906:7e5d with SMTP id o9-20020a05600c4fc900b0039289067e5dmr4158454wmq.179.1650468878856; Wed, 20 Apr 2022 08:34:38 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 20/34] meson, configure: move bdrv whitelists to meson Date: Wed, 20 Apr 2022 17:33:53 +0200 Message-Id: <20220420153407.73926-21-pbonzini@redhat.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220420153407.73926-1-pbonzini@redhat.com> References: <20220420153407.73926-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::32b; envelope-from=paolo.bonzini@gmail.com; helo=mail-wm1-x32b.google.com 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.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1650470325420100001 Content-Type: text/plain; charset="utf-8" Use the new support for string option parsing. Signed-off-by: Paolo Bonzini Reviewed-by: Marc-Andr=C3=A9 Lureau --- configure | 14 -------------- meson.build | 27 ++++++++++++++++----------- meson_options.txt | 4 ++++ scripts/meson-buildoptions.sh | 8 ++++++++ 4 files changed, 28 insertions(+), 25 deletions(-) diff --git a/configure b/configure index 3327a4887a..bc15854578 100755 --- a/configure +++ b/configure @@ -235,8 +235,6 @@ interp_prefix=3D"/usr/gnemul/qemu-%M" static=3D"no" cross_compile=3D"no" cross_prefix=3D"" -block_drv_rw_whitelist=3D"" -block_drv_ro_whitelist=3D"" host_cc=3D"cc" lto=3D"false" stack_protector=3D"" @@ -815,10 +813,6 @@ for opt do # configure to be used by RPM and similar macros that set # lots of directory switches by default. ;; - --block-drv-rw-whitelist=3D*|--block-drv-whitelist=3D*) block_drv_rw_whi= telist=3D$(echo "$optarg" | sed -e 's/,/ /g') - ;; - --block-drv-ro-whitelist=3D*) block_drv_ro_whitelist=3D$(echo "$optarg" = | sed -e 's/,/ /g') - ;; --enable-debug-tcg) debug_tcg=3D"yes" ;; --disable-debug-tcg) debug_tcg=3D"no" @@ -1154,12 +1148,6 @@ Advanced options (experts only): --disable-stack-protector disable compiler-provided stack protection --audio-drv-list=3DLIST set audio drivers to try if -audiodev is not = used --block-drv-whitelist=3DL Same as --block-drv-rw-whitelist=3DL - --block-drv-rw-whitelist=3DL - set block driver read-write whitelist - (by default affects only QEMU, not tools like q= emu-img) - --block-drv-ro-whitelist=3DL - set block driver read-only whitelist - (by default affects only QEMU, not tools like q= emu-img) --with-trace-file=3DNAME Full PATH,NAME of file to store traces Default:trace- --cpu=3DCPU Build for host CPU [$cpu] @@ -2184,8 +2172,6 @@ fi if test "$static" =3D "yes" ; then echo "CONFIG_STATIC=3Dy" >> $config_host_mak fi -echo "CONFIG_BDRV_RW_WHITELIST=3D$block_drv_rw_whitelist" >> $config_host_= mak -echo "CONFIG_BDRV_RO_WHITELIST=3D$block_drv_ro_whitelist" >> $config_host_= mak qemu_version=3D$(head $source_path/VERSION) echo "PKGVERSION=3D$pkgversion" >>$config_host_mak echo "SRC_PATH=3D$source_path" >> $config_host_mak diff --git a/meson.build b/meson.build index 8a7e4ab5c7..ee96cbc64e 100644 --- a/meson.build +++ b/meson.build @@ -1592,6 +1592,19 @@ have_virtfs =3D get_option('virtfs') \ =20 have_virtfs_proxy_helper =3D targetos !=3D 'darwin' and have_virtfs and ha= ve_tools =20 +if get_option('block_drv_ro_whitelist') =3D=3D '' + config_host_data.set('CONFIG_BDRV_RO_WHITELIST', '') +else + config_host_data.set('CONFIG_BDRV_RO_WHITELIST', + '"' + get_option('block_drv_ro_whitelist').replace(',', '", "') + = '"') +endif +if get_option('block_drv_rw_whitelist') =3D=3D '' + config_host_data.set('CONFIG_BDRV_RW_WHITELIST', '') +else + config_host_data.set('CONFIG_BDRV_RO_WHITELIST', + '"' + get_option('block_drv_rw_whitelist').replace(',', '", "') + = '"') +endif + foreach k : get_option('trace_backends') config_host_data.set('CONFIG_TRACE_' + k.to_upper(), true) endforeach @@ -2207,16 +2220,8 @@ config_host_data.set('HAVE_VSS_SDK', have_vss_sdk) =20 ignored =3D ['CONFIG_QEMU_INTERP_PREFIX', # actually per-target 'HAVE_GDB_BIN'] -arrays =3D ['CONFIG_BDRV_RW_WHITELIST', 'CONFIG_BDRV_RO_WHITELIST'] foreach k, v: config_host - if ignored.contains(k) - # do nothing - elif arrays.contains(k) - if v !=3D '' - v =3D '"' + '", "'.join(v.split()) + '", ' - endif - config_host_data.set(k, v) - elif k.startswith('CONFIG_') + if k.startswith('CONFIG_') and not ignored.contains(k) config_host_data.set(k, v =3D=3D 'y' ? 1 : v) endif endforeach @@ -3786,8 +3791,8 @@ summary_info =3D {} summary_info +=3D {'coroutine backend': config_host['CONFIG_COROUTINE_BACK= END']} summary_info +=3D {'coroutine pool': have_coroutine_pool} if have_block - summary_info +=3D {'Block whitelist (rw)': config_host['CONFIG_BDRV_RW_W= HITELIST']} - summary_info +=3D {'Block whitelist (ro)': config_host['CONFIG_BDRV_RO_W= HITELIST']} + summary_info +=3D {'Block whitelist (rw)': get_option('block_drv_rw_whit= elist')} + summary_info +=3D {'Block whitelist (ro)': get_option('block_drv_ro_whit= elist')} summary_info +=3D {'Use block whitelist in tools': get_option('block_drv= _whitelist_in_tools')} summary_info +=3D {'VirtFS support': have_virtfs} summary_info +=3D {'build virtiofs daemon': have_virtiofsd} diff --git a/meson_options.txt b/meson_options.txt index 891c0ec130..ec974003b3 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -21,6 +21,10 @@ option('default_devices', type : 'boolean', value : true, option('audio_drv_list', type: 'array', value: ['default'], choices: ['alsa', 'coreaudio', 'default', 'dsound', 'jack', 'oss', = 'pa', 'sdl'], description: 'Set audio driver list') +option('block_drv_rw_whitelist', type : 'string', value : '', + description: 'set block driver read-write whitelist (by default aff= ects only QEMU, not tools like qemu-img)') +option('block_drv_ro_whitelist', type : 'string', value : '', + description: 'set block driver read-only whitelist (by default affe= cts only QEMU, not tools like qemu-img)') option('fuzzing_engine', type : 'string', value : '', description: 'fuzzing engine library for OSS-Fuzz') option('trace_file', type: 'string', value: 'trace', diff --git a/scripts/meson-buildoptions.sh b/scripts/meson-buildoptions.sh index 0e0548aa87..4c49d4af08 100644 --- a/scripts/meson-buildoptions.sh +++ b/scripts/meson-buildoptions.sh @@ -2,6 +2,12 @@ meson_options_help() { printf "%s\n" ' --audio-drv-list=3DCHOICES Set audio driver list [defau= lt] (choices:' printf "%s\n" ' alsa/coreaudio/default/dsound/= jack/oss/pa/sdl)' + printf "%s\n" ' --block-drv-ro-whitelist=3DVALUE' + printf "%s\n" ' set block driver read-only whi= telist (by default' + printf "%s\n" ' affects only QEMU, not tools l= ike qemu-img)' + printf "%s\n" ' --block-drv-rw-whitelist=3DVALUE' + printf "%s\n" ' set block driver read-write wh= itelist (by default' + printf "%s\n" ' affects only QEMU, not tools l= ike qemu-img)' printf "%s\n" ' --disable-coroutine-pool coroutine freelist (better per= formance)' printf "%s\n" ' --disable-install-blobs install provided firmware blob= s' printf "%s\n" ' --enable-block-drv-whitelist-in-tools' @@ -161,6 +167,8 @@ _meson_option_parse() { --disable-avx2) printf "%s" -Davx2=3Ddisabled ;; --enable-avx512f) printf "%s" -Davx512f=3Denabled ;; --disable-avx512f) printf "%s" -Davx512f=3Ddisabled ;; + --block-drv-ro-whitelist=3D*) quote_sh "-Dblock_drv_ro_whitelist=3D$2"= ;; + --block-drv-rw-whitelist=3D*) quote_sh "-Dblock_drv_rw_whitelist=3D$2"= ;; --enable-block-drv-whitelist-in-tools) printf "%s" -Dblock_drv_whiteli= st_in_tools=3Dtrue ;; --disable-block-drv-whitelist-in-tools) printf "%s" -Dblock_drv_whitel= ist_in_tools=3Dfalse ;; --enable-bochs) printf "%s" -Dbochs=3Denabled ;; --=20 2.35.1 From nobody Thu May 2 03:23:26 2024 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1650470943939461.72541744656496; Wed, 20 Apr 2022 09:09:03 -0700 (PDT) Received: from localhost ([::1]:49726 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nhCt4-0004IC-HA for importer@patchew.org; Wed, 20 Apr 2022 12:09:02 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42874) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nhCLr-0001gQ-Pu for qemu-devel@nongnu.org; Wed, 20 Apr 2022 11:34:43 -0400 Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]:41711) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nhCLp-0000yl-57 for qemu-devel@nongnu.org; Wed, 20 Apr 2022 11:34:43 -0400 Received: by mail-wm1-x330.google.com with SMTP id o20-20020a05600c511400b0038ebbbb2ad8so1507981wms.0 for ; Wed, 20 Apr 2022 08:34:40 -0700 (PDT) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id n68-20020a1c2747000000b0038e6b4d5395sm130401wmn.16.2022.04.20.08.34.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Apr 2022 08:34:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=hMQkuDcC39stipwBZeyv9+KMjx/kVEM6LPek0MuMuK0=; b=SjmAJyM/Qi+eg7tfh8NtZzFpEBx1z3PtWd4yJ8WxT6H3msY9rZEh2/1tRhhYCZVnqC Fy0/hp48efRaaTQSZMKrkT6mYijuiVJVdd+pqOfzHai+D1BVkUkVCpggUb1hodfm0MdR nekwMenxLOEeOW5AoeAkHk+oYGWf2QjUlib4vzfCLWYdk0jE86nDzlqlCp9MO8LAfmaN DaUhlM6X5Slxwa3srEaFZqfSRnMgVzedYFCCmRn8LgeQFKwCBWWwiM6sg0RARO7yCACE tRcEnzgiMV46KirtGIMMPIlfI2yNRoXza+Epj2ggxUBkDcXeocKEE3FJuBR1rt8IdE6m RKkw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=hMQkuDcC39stipwBZeyv9+KMjx/kVEM6LPek0MuMuK0=; b=Fr7aGlgQpnSilEjOTweTjhtoMG54ESq5tz0swdp0p5c137+TeGHSaegBmISJWHalEl uADa+CxVvQqTU25rZu0Ng6YKtee4HDUry2W1BAUCiygKMgp5lk/YrkeFcGsdbHKljX7T sihkflBPJIGIah0c39/G4YwfMCEbeXNVz7o6KK5hlXRRE+WCM7Ulmz47Qgb21BEyzNui JzRNB2K90jWI3tF9wg4QOgqnIGBLpk/SzQeCd2+ufbTDPfWBlsCVaS+nR+QYgHtkeK03 IMCrwwqvMGOUGSToGf4IIYCaioWKf8QmEQzNlKETm8LaSjDASpo8IbjOzlIXDWmzIjZL 5xfg== X-Gm-Message-State: AOAM531QXWdIJZ7L+x2RfftVUMe5Yae3P8GIaLfltyUmHZUrqyJDU9gT UNiKhswPVDAVZPuRO5D2a5Wv/9B1C4jSmA== X-Google-Smtp-Source: ABdhPJz6PJ4LFMdLxazWywSLu8LEeZfcjJSfwdPCK1DekIYmTQk2sdTNC/HfjpK9s0E7t8FU7VbONQ== X-Received: by 2002:a1c:2b41:0:b0:392:9543:9782 with SMTP id r62-20020a1c2b41000000b0039295439782mr4293128wmr.124.1650468879446; Wed, 20 Apr 2022 08:34:39 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 21/34] meson, configure: move --with-pkgversion, CONFIG_STAMP to meson Date: Wed, 20 Apr 2022 17:33:54 +0200 Message-Id: <20220420153407.73926-22-pbonzini@redhat.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220420153407.73926-1-pbonzini@redhat.com> References: <20220420153407.73926-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::330; envelope-from=paolo.bonzini@gmail.com; helo=mail-wm1-x330.google.com 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.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1650470946067100001 Content-Type: text/plain; charset="utf-8" The hash is now generated with a Python script. Signed-off-by: Paolo Bonzini Reviewed-by: Marc-Andr=C3=A9 Lureau --- configure | 23 ----------------------- docs/meson.build | 2 +- meson.build | 10 +++++++++- meson_options.txt | 2 ++ scripts/meson-buildoptions.py | 1 + scripts/meson-buildoptions.sh | 3 +++ scripts/qemu-stamp.py | 24 ++++++++++++++++++++++++ 7 files changed, 40 insertions(+), 25 deletions(-) create mode 100644 scripts/qemu-stamp.py diff --git a/configure b/configure index bc15854578..5bf0a7d69b 100755 --- a/configure +++ b/configure @@ -306,7 +306,6 @@ qemu_suffix=3D"qemu" softmmu=3D"yes" linux_user=3D"" bsd_user=3D"" -pkgversion=3D"" pie=3D"" coroutine=3D"" plugins=3D"$default_feature" @@ -896,8 +895,6 @@ for opt do ;; --enable-fdt=3D*) fdt=3D"$optarg" ;; - --with-pkgversion=3D*) pkgversion=3D"$optarg" - ;; --with-coroutine=3D*) coroutine=3D"$optarg" ;; --disable-vhost-net) vhost_net=3D"no" @@ -1135,7 +1132,6 @@ Advanced options (experts only): --firmwarepath=3DPATH search PATH for firmware files --efi-aarch64=3DPATH PATH of efi file to use for aarch64 VMs. --with-suffix=3DSUFFIX suffix for QEMU data inside datadir/libdir/sy= sconfdir/docdir [$qemu_suffix] - --with-pkgversion=3DVERS use specified string as sub-version of the pa= ckage --without-default-features default all --enable-* options to "disabled" --without-default-devices do not include any device that is not needed = to start the emulator (only use if you are includi= ng @@ -1722,21 +1718,6 @@ if ! compile_prog "$glib_cflags -Werror" "$glib_libs= " ; then fi fi =20 -########################################## -# SHA command probe for modules -if test "$modules" =3D yes; then - shacmd_probe=3D"sha1sum sha1 shasum" - for c in $shacmd_probe; do - if has $c; then - shacmd=3D"$c" - break - fi - done - if test "$shacmd" =3D ""; then - error_exit "one of the checksum commands is required to enable mod= ules: $shacmd_probe" - fi -fi - ########################################## # fdt probe =20 @@ -2173,13 +2154,9 @@ if test "$static" =3D "yes" ; then echo "CONFIG_STATIC=3Dy" >> $config_host_mak fi qemu_version=3D$(head $source_path/VERSION) -echo "PKGVERSION=3D$pkgversion" >>$config_host_mak echo "SRC_PATH=3D$source_path" >> $config_host_mak echo "TARGET_DIRS=3D$target_list" >> $config_host_mak if test "$modules" =3D "yes"; then - # $shacmd can generate a hash started with digit, which the compiler doe= sn't - # like as an symbol. So prefix it with an underscore - echo "CONFIG_STAMP=3D_$( (echo $qemu_version; echo $pkgversion; cat $0) = | $shacmd - | cut -f1 -d\ )" >> $config_host_mak echo "CONFIG_MODULES=3Dy" >> $config_host_mak fi =20 diff --git a/docs/meson.build b/docs/meson.build index 831d4aea2b..9136fed3b7 100644 --- a/docs/meson.build +++ b/docs/meson.build @@ -35,7 +35,7 @@ if sphinx_build.found() endif =20 if build_docs - SPHINX_ARGS +=3D ['-Dversion=3D' + meson.project_version(), '-Drelease= =3D' + config_host['PKGVERSION']] + SPHINX_ARGS +=3D ['-Dversion=3D' + meson.project_version(), '-Drelease= =3D' + get_option('pkgversion')] =20 man_pages =3D { 'qemu-ga.8': (have_ga ? 'man8' : ''), diff --git a/meson.build b/meson.build index ee96cbc64e..424ff454d2 100644 --- a/meson.build +++ b/meson.build @@ -1626,6 +1626,14 @@ config_host_data.set_quoted('CONFIG_QEMU_LOCALSTATED= IR', get_option('prefix') / config_host_data.set_quoted('CONFIG_QEMU_MODDIR', get_option('prefix') / q= emu_moddir) config_host_data.set_quoted('CONFIG_SYSCONFDIR', get_option('prefix') / ge= t_option('sysconfdir')) =20 +if config_host.has_key('CONFIG_MODULES') + config_host_data.set('CONFIG_STAMP', run_command( + meson.current_source_dir() / 'scripts/qemu-stamp.py', + meson.project_version(), get_option('pkgversion'), '--', + meson.current_source_dir() / 'configure', + capture: true, check: true).stdout().strip()) +endif + have_slirp_smbd =3D get_option('slirp_smbd') \ .require(targetos !=3D 'windows', error_message: 'Host smbd not supporte= d on this platform.') \ .allowed() @@ -2785,7 +2793,7 @@ tracetool_depends =3D files( =20 qemu_version_cmd =3D [find_program('scripts/qemu-version.sh'), meson.current_source_dir(), - config_host['PKGVERSION'], meson.project_version()] + get_option('pkgversion'), meson.project_version()] qemu_version =3D custom_target('qemu-version.h', output: 'qemu-version.h', command: qemu_version_cmd, diff --git a/meson_options.txt b/meson_options.txt index ec974003b3..dc6fb796c6 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -8,6 +8,8 @@ option('docdir', type : 'string', value : 'doc', description: 'Base directory for documentation installation (can be= empty)') option('qemu_firmwarepath', type : 'string', value : '', description: 'search PATH for firmware files') +option('pkgversion', type : 'string', value : '', + description: 'use specified string as sub-version of the package') option('smbd', type : 'string', value : '', description: 'Path to smbd for slirp networking') option('sphinx_build', type : 'string', value : '', diff --git a/scripts/meson-buildoptions.py b/scripts/meson-buildoptions.py index 3e540e8bb3..0f9603a7f6 100755 --- a/scripts/meson-buildoptions.py +++ b/scripts/meson-buildoptions.py @@ -36,6 +36,7 @@ =20 OPTION_NAMES =3D { "malloc": "enable-malloc", + "pkgversion": "with-pkgversion", "trace_backends": "enable-trace-backends", "trace_file": "with-trace-file", } diff --git a/scripts/meson-buildoptions.sh b/scripts/meson-buildoptions.sh index 4c49d4af08..bf9878e24f 100644 --- a/scripts/meson-buildoptions.sh +++ b/scripts/meson-buildoptions.sh @@ -44,6 +44,8 @@ meson_options_help() { printf "%s\n" ' --sphinx-build=3DVALUE Use specified sphinx-build f= or building document' printf "%s\n" ' --tls-priority=3DVALUE Default TLS protocol/cipher = priority string' printf "%s\n" ' [NORMAL]' + printf "%s\n" ' --with-pkgversion=3DVALUE use specified string as sub-= version of the' + printf "%s\n" ' package' printf "%s\n" ' --with-trace-file=3DVALUE Trace file prefix for simple= backend [trace]' printf "%s\n" '' printf "%s\n" 'Optional features, enabled with --enable-FEATURE and' @@ -309,6 +311,7 @@ _meson_option_parse() { --disable-pa) printf "%s" -Dpa=3Ddisabled ;; --enable-parallels) printf "%s" -Dparallels=3Denabled ;; --disable-parallels) printf "%s" -Dparallels=3Ddisabled ;; + --with-pkgversion=3D*) quote_sh "-Dpkgversion=3D$2" ;; --enable-profiler) printf "%s" -Dprofiler=3Dtrue ;; --disable-profiler) printf "%s" -Dprofiler=3Dfalse ;; --enable-pvrdma) printf "%s" -Dpvrdma=3Denabled ;; diff --git a/scripts/qemu-stamp.py b/scripts/qemu-stamp.py new file mode 100644 index 0000000000..7beeeb07ed --- /dev/null +++ b/scripts/qemu-stamp.py @@ -0,0 +1,24 @@ +#! /usr/bin/env python3 + +# Usage: scripts/qemu-stamp.py STRING1 STRING2... -- FILE1 FILE2... +import hashlib +import os +import sys + +sha =3D hashlib.sha1() +is_file =3D False +for arg in sys.argv[1:]: + if arg =3D=3D '--': + is_file =3D True + continue + if is_file: + with open(arg, 'rb') as f: + for chunk in iter(lambda: f.read(65536), b''): + sha.update(chunk) + else: + sha.update(os.fsencode(arg)) + sha.update(b'\n') + +# The hash can start with a digit, which the compiler doesn't +# like as an symbol. So prefix it with an underscore +print("_" + sha.hexdigest()) --=20 2.35.1 From nobody Thu May 2 03:23:26 2024 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1650469761392916.5374646156929; Wed, 20 Apr 2022 08:49:21 -0700 (PDT) Received: from localhost ([::1]:57948 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nhCa0-0004kg-BF for importer@patchew.org; Wed, 20 Apr 2022 11:49:20 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42908) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nhCLt-0001oJ-Ow for qemu-devel@nongnu.org; Wed, 20 Apr 2022 11:34:45 -0400 Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]:41713) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nhCLs-0000z7-07 for qemu-devel@nongnu.org; Wed, 20 Apr 2022 11:34:45 -0400 Received: by mail-wm1-x332.google.com with SMTP id o20-20020a05600c511400b0038ebbbb2ad8so1508070wms.0 for ; Wed, 20 Apr 2022 08:34:43 -0700 (PDT) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id n68-20020a1c2747000000b0038e6b4d5395sm130401wmn.16.2022.04.20.08.34.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Apr 2022 08:34:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=uOwOPwaL3uOrEX0319KPKBGNWZApezlxb9nD0A6Am/Q=; b=dBydlTle/vx3RATEAl5l5PFIBus44nMVLrHd30Fxt9YUnRv4lebxfr+lRpl8Gt18NF tiAYNFGy99WT+cezPhJN3Aaj/PTn1BSnkn8tANjk7Qw+RN4NPffx1PPBPFGcn84cBiBV H522A3BsZzOPN/RyRQp/HWTjhlIQDrpybSERsf4y93wBzYKIqURW2UdG3jVO6sv+8wQm KbyZRQ7wEW42KRN7sctcHEtTU0osfmynQ6WMq2BzGqOvGaSkp+3mWUGt9CcnqJCgeZic F2uRfsEfi+7RnihIfoVla+2CrTbxkIXrFI1/ybn2QtFVVN/fMJKpdcb7mTg4JWDqcYsK 0nNg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=uOwOPwaL3uOrEX0319KPKBGNWZApezlxb9nD0A6Am/Q=; b=Y6SJp3JkufYCOLF2hIMsPSLnY+5nrp2b5q8nlYLWgEDj4v1KRBc5aoX5kiTzMsvabr MypWsCYT+5pbcrkkk4CJXyRAgETNPWbDsyW23aZeR2hyc7pwszaf1GupsD7ytZ333wni jnj0fCktOizo7ddXAs0jaCSmEwZiAxhZ8r8/f7I17if1G8NjfEpuHPd06sumpIgWPjrC MV5uADb5P1Ws/x3RUe/fur8YqF59nipTHL8BkbxdNCjnevzYdwYM2ghTLvh7VH8hSdgO 0zwV+Mfxqm3IgCNt2aI/1HCsuq3FdGhRLv2x+77kuQLenA+oSMTJDj5W4lS9vYLhTPr0 b3Ng== X-Gm-Message-State: AOAM530XMzP8qExSMRUs4JTm8wqnXDlm+eYqrf7eArjjslTZskire7Xc G2reizn+Xc2LCxmedhjWot+6ohIw8uaPyQ== X-Google-Smtp-Source: ABdhPJyVLAO41ILcJFBh9wv0FiK0IUJpWTbpV/+zGoMfydPvk49KVkLiWGrkLfnPpm8bFc9oPzep6Q== X-Received: by 2002:a05:600c:b54:b0:390:82ee:e15b with SMTP id k20-20020a05600c0b5400b0039082eee15bmr4217038wmr.17.1650468882426; Wed, 20 Apr 2022 08:34:42 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 22/34] meson, configure: move --interp-prefix to meson Date: Wed, 20 Apr 2022 17:33:55 +0200 Message-Id: <20220420153407.73926-23-pbonzini@redhat.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220420153407.73926-1-pbonzini@redhat.com> References: <20220420153407.73926-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::332; envelope-from=paolo.bonzini@gmail.com; helo=mail-wm1-x332.google.com 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.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1650469762630100001 Content-Type: text/plain; charset="utf-8" This is the last CONFIG_* entry in config-host.mak that had to be special cased. Signed-off-by: Paolo Bonzini Reviewed-by: Marc-Andr=C3=A9 Lureau --- configure | 6 ------ meson.build | 6 ++---- meson_options.txt | 2 ++ scripts/meson-buildoptions.sh | 3 +++ 4 files changed, 7 insertions(+), 10 deletions(-) diff --git a/configure b/configure index 5bf0a7d69b..200ef3be23 100755 --- a/configure +++ b/configure @@ -231,7 +231,6 @@ fi =20 # default parameters cpu=3D"" -interp_prefix=3D"/usr/gnemul/qemu-%M" static=3D"no" cross_compile=3D"no" cross_prefix=3D"" @@ -696,8 +695,6 @@ for opt do ;; --prefix=3D*) prefix=3D"$optarg" ;; - --interp-prefix=3D*) interp_prefix=3D"$optarg" - ;; --cross-prefix=3D*) ;; --cc=3D*) @@ -1090,8 +1087,6 @@ Options: [defaults in brackets after descriptions] Standard options: --help print this message --prefix=3DPREFIX install in PREFIX [$prefix] - --interp-prefix=3DPREFIX where to find shared libraries, etc. - use %M for cpu name [$interp_prefix] --target-list=3DLIST set target list (default: build all) $(echo Available targets: $default_target_list | \ fold -s -w 53 | sed -e 's/^/ /') @@ -2289,7 +2284,6 @@ for target in $target_list; do esac done =20 -echo "CONFIG_QEMU_INTERP_PREFIX=3D$interp_prefix" | sed 's/%M/@0@/' >> $co= nfig_host_mak if test "$default_targets" =3D "yes"; then echo "CONFIG_DEFAULT_TARGETS=3Dy" >> $config_host_mak fi diff --git a/meson.build b/meson.build index 424ff454d2..869cc10128 100644 --- a/meson.build +++ b/meson.build @@ -2226,10 +2226,8 @@ if targetos =3D=3D 'windows' and link_language =3D= =3D 'cpp' endif config_host_data.set('HAVE_VSS_SDK', have_vss_sdk) =20 -ignored =3D ['CONFIG_QEMU_INTERP_PREFIX', # actually per-target - 'HAVE_GDB_BIN'] foreach k, v: config_host - if k.startswith('CONFIG_') and not ignored.contains(k) + if k.startswith('CONFIG_') config_host_data.set(k, v =3D=3D 'y' ? 1 : v) endif endforeach @@ -2323,7 +2321,7 @@ foreach target : target_dirs config_target +=3D { 'CONFIG_USER_ONLY': 'y', 'CONFIG_QEMU_INTERP_PREFIX': - config_host['CONFIG_QEMU_INTERP_PREFIX'].format(config_target['TAR= GET_NAME']) + get_option('interp_prefix').replace('%M', config_target['TARGET_NA= ME']) } endif =20 diff --git a/meson_options.txt b/meson_options.txt index dc6fb796c6..848426460c 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -27,6 +27,8 @@ option('block_drv_rw_whitelist', type : 'string', value := '', description: 'set block driver read-write whitelist (by default aff= ects only QEMU, not tools like qemu-img)') option('block_drv_ro_whitelist', type : 'string', value : '', description: 'set block driver read-only whitelist (by default affe= cts only QEMU, not tools like qemu-img)') +option('interp_prefix', type : 'string', value : '/usr/gnemul/qemu-%M', + description: 'where to find shared libraries etc., use %M for cpu n= ame') option('fuzzing_engine', type : 'string', value : '', description: 'fuzzing engine library for OSS-Fuzz') option('trace_file', type: 'string', value: 'trace', diff --git a/scripts/meson-buildoptions.sh b/scripts/meson-buildoptions.sh index bf9878e24f..a0c86db116 100644 --- a/scripts/meson-buildoptions.sh +++ b/scripts/meson-buildoptions.sh @@ -41,6 +41,8 @@ meson_options_help() { printf "%s\n" ' Set available tracing backends= [log] (choices:' printf "%s\n" ' dtrace/ftrace/log/nop/simple/s= yslog/ust)' printf "%s\n" ' --iasl=3DVALUE Path to ACPI disassembler' + printf "%s\n" ' --interp-prefix=3DVALUE where to find shared librari= es etc., use %M for' + printf "%s\n" ' cpu name [/usr/gnemul/qemu-%M]' printf "%s\n" ' --sphinx-build=3DVALUE Use specified sphinx-build f= or building document' printf "%s\n" ' --tls-priority=3DVALUE Default TLS protocol/cipher = priority string' printf "%s\n" ' [NORMAL]' @@ -252,6 +254,7 @@ _meson_option_parse() { --disable-iconv) printf "%s" -Diconv=3Ddisabled ;; --enable-install-blobs) printf "%s" -Dinstall_blobs=3Dtrue ;; --disable-install-blobs) printf "%s" -Dinstall_blobs=3Dfalse ;; + --interp-prefix=3D*) quote_sh "-Dinterp_prefix=3D$2" ;; --enable-jack) printf "%s" -Djack=3Denabled ;; --disable-jack) printf "%s" -Djack=3Ddisabled ;; --enable-keyring) printf "%s" -Dkeyring=3Denabled ;; --=20 2.35.1 From nobody Thu May 2 03:23:26 2024 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1650469917668134.73046571557416; Wed, 20 Apr 2022 08:51:57 -0700 (PDT) Received: from localhost ([::1]:38296 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nhCcW-00026L-Eq for importer@patchew.org; Wed, 20 Apr 2022 11:51:56 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42914) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nhCLu-0001py-Ka for qemu-devel@nongnu.org; Wed, 20 Apr 2022 11:34:46 -0400 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]:40714) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nhCLs-0000zK-VA for qemu-devel@nongnu.org; Wed, 20 Apr 2022 11:34:46 -0400 Received: by mail-wr1-x430.google.com with SMTP id q3so2782016wrj.7 for ; Wed, 20 Apr 2022 08:34:44 -0700 (PDT) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id n68-20020a1c2747000000b0038e6b4d5395sm130401wmn.16.2022.04.20.08.34.43 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Apr 2022 08:34:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=kdKcMO6vaTvNB393UuNsGUCbzGTBLou5Txn3tS0z+To=; b=Q0/bYZBAItZaCGYVZU+17DxPtixee3cEqsvOVe25QmNMFmwjCgHxKE7OPwPRTy3MUp jf9i/4qCveFydjxVaa0pmQ5wsLtUyM4MAZkgC0O1YpnlpPGlJuL/u1VKDQA5CP5bLctB e8vLcTZ0K41/pxdVBcIgi1OW1Y+jQW7XO1aB7Agg38XG9wOw4q9IWc9BWPznSl4uBHsK nuc09rp2t9E4R5rkDBNddktPN5bWTV1JGSD7HizRjXHmEd2H8L/+Xt/yKSrHEoze1TU4 IDB9+eLTCY84n3apAlk4izKhJe+KJ6bNgE+do/6+dtsZihn8OK+KD7aUybU+V5uyxx9C saHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=kdKcMO6vaTvNB393UuNsGUCbzGTBLou5Txn3tS0z+To=; b=AfvtZJrTmxlV1TGXrJ/Gpjb+8/nWG3PPGpRvT12Wd3+YsMcQt/7PhAvoylDdsEYVec z0CBaZhzBdNB46XThx4ajwO/6TyeJ2RlxsroeqxdTGXbC8HHI14NsoLwNrFtWi13BC7N zHtY+ItzIFf5wsxMPwnMVZBVAog5ERHRN2vnsL5oXkq0N0/RsZa/V0c312yd4AUC14pw p5OS/0kFIjWF/Bh+lwwDb1BZTkyuUDwzmRdAmrxeJZHMO2Wit8z92hTKOUiPixDGMXlI zOLJQuJLh7XrjHCrCTlSTgvrwskZtWIvyz5K522H4ufAPljRCscfEi9xc3KDi1PzdtcR nP5A== X-Gm-Message-State: AOAM530gL1UHYUzGGx/Sj2aGh9nY+ZX19/VALJUr02vbfoWbutljTx+o URTcW+sUtFn40Z0aiZ/SQDFFKfIEKO0Etg== X-Google-Smtp-Source: ABdhPJzfoxkU3V59xhoT2Oymhyl6L3kzcEd1vRhSz79SDtB9eBXgGHJ9/U14+7NXGWLqyMF/JllUxQ== X-Received: by 2002:a5d:6da9:0:b0:20a:8d08:9977 with SMTP id u9-20020a5d6da9000000b0020a8d089977mr13948547wrs.24.1650468883622; Wed, 20 Apr 2022 08:34:43 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 23/34] meson: always combine directories with prefix Date: Wed, 20 Apr 2022 17:33:56 +0200 Message-Id: <20220420153407.73926-24-pbonzini@redhat.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220420153407.73926-1-pbonzini@redhat.com> References: <20220420153407.73926-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::430; envelope-from=paolo.bonzini@gmail.com; helo=mail-wr1-x430.google.com 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.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1650469919649100001 Content-Type: text/plain; charset="utf-8" Meson allows directories such as "bindir" to be relative to the prefix. Ri= ght now configure is forcing an absolute path, but that is not really necessary: just make sure all uses of the directory variables are prefixed appropriate= ly. Do the same also for the options that are custom for QEMU, i.e. docdir and qemu_firmwarepath. Signed-off-by: Paolo Bonzini Reviewed-by: Marc-Andr=C3=A9 Lureau --- meson.build | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/meson.build b/meson.build index 869cc10128..2545ac2848 100644 --- a/meson.build +++ b/meson.build @@ -1618,7 +1618,7 @@ config_host_data.set_quoted('CONFIG_PREFIX', get_opti= on('prefix')) config_host_data.set_quoted('CONFIG_QEMU_CONFDIR', get_option('prefix') / = qemu_confdir) config_host_data.set_quoted('CONFIG_QEMU_DATADIR', get_option('prefix') / = qemu_datadir) config_host_data.set_quoted('CONFIG_QEMU_DESKTOPDIR', get_option('prefix')= / qemu_desktopdir) -config_host_data.set_quoted('CONFIG_QEMU_FIRMWAREPATH', get_option('qemu_f= irmwarepath')) +config_host_data.set_quoted('CONFIG_QEMU_FIRMWAREPATH', get_option('prefix= ') / get_option('qemu_firmwarepath')) config_host_data.set_quoted('CONFIG_QEMU_HELPERDIR', get_option('prefix') = / get_option('libexecdir')) config_host_data.set_quoted('CONFIG_QEMU_ICONDIR', get_option('prefix') / = qemu_icondir) config_host_data.set_quoted('CONFIG_QEMU_LOCALEDIR', get_option('prefix') = / get_option('localedir')) @@ -3615,20 +3615,20 @@ endif summary_info =3D {} summary_info +=3D {'Install prefix': get_option('prefix')} summary_info +=3D {'BIOS directory': qemu_datadir} -summary_info +=3D {'firmware path': get_option('qemu_firmwarepath')} -summary_info +=3D {'binary directory': get_option('bindir')} -summary_info +=3D {'library directory': get_option('libdir')} +summary_info +=3D {'firmware path': get_option('prefix') / get_option(= 'qemu_firmwarepath')} +summary_info +=3D {'binary directory': get_option('prefix') / get_option(= 'bindir')} +summary_info +=3D {'library directory': get_option('prefix') / get_option(= 'libdir')} summary_info +=3D {'module directory': qemu_moddir} -summary_info +=3D {'libexec directory': get_option('libexecdir')} -summary_info +=3D {'include directory': get_option('includedir')} -summary_info +=3D {'config directory': get_option('sysconfdir')} +summary_info +=3D {'libexec directory': get_option('prefix') / get_option(= 'libexecdir')} +summary_info +=3D {'include directory': get_option('prefix') / get_option(= 'includedir')} +summary_info +=3D {'config directory': get_option('prefix') / get_option(= 'sysconfdir')} if targetos !=3D 'windows' - summary_info +=3D {'local state directory': get_option('localstatedir')} - summary_info +=3D {'Manual directory': get_option('mandir')} + summary_info +=3D {'local state directory': get_option('prefix') / get_o= ption('localstatedir')} + summary_info +=3D {'Manual directory': get_option('prefix') / get_o= ption('mandir')} else summary_info +=3D {'local state directory': 'queried at runtime'} endif -summary_info +=3D {'Doc directory': get_option('docdir')} +summary_info +=3D {'Doc directory': get_option('prefix') / get_option(= 'docdir')} summary_info +=3D {'Build directory': meson.current_build_dir()} summary_info +=3D {'Source path': meson.current_source_dir()} summary_info +=3D {'GIT submodules': config_host['GIT_SUBMODULES']} --=20 2.35.1 From nobody Thu May 2 03:23:26 2024 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1650471129376635.9747172588574; Wed, 20 Apr 2022 09:12:09 -0700 (PDT) Received: from localhost ([::1]:58170 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nhCw3-0001dy-IJ for importer@patchew.org; Wed, 20 Apr 2022 12:12:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42964) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nhCLx-0001yD-Cs for qemu-devel@nongnu.org; Wed, 20 Apr 2022 11:34:49 -0400 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]:36663) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nhCLv-0000zb-BR for qemu-devel@nongnu.org; Wed, 20 Apr 2022 11:34:49 -0400 Received: by mail-wr1-x430.google.com with SMTP id u3so2804245wrg.3 for ; Wed, 20 Apr 2022 08:34:46 -0700 (PDT) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id n68-20020a1c2747000000b0038e6b4d5395sm130401wmn.16.2022.04.20.08.34.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Apr 2022 08:34:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=jxRdYJWzNGSycLSAS+vnJamXrUs82CCJ8f9Qt8EjEOw=; b=UkTNbcNWQnABELHQxIJC6V+ibFbkoDYfZFETSU49sNnr0vBXucMPGpe7Q9qstNuqdS jskl3JI71PhY2yo7nZBHfYiE4WGP+fBLud290fvmCd2X9fw1Kwjdartrpek58NE6z6f5 seFg+1F2SRGrQjo0lGHqNA3wAPxGX0lRQawoepFyxtiXf5LPn+P18JCfB9WjeNa2xv6M 8Ue7vru6ys2Ic6Na7ylxBWiz+BOaGSZanhOLVV49KTBSxhkw1Ea46f5XvPdybRT+e+G4 9yK2C4PLa4P4+9LJ43y9twzN8zOtjsvoDKGucac/rkDjMMfsD8X+YqDOlQkuWlQnRGSv +zTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=jxRdYJWzNGSycLSAS+vnJamXrUs82CCJ8f9Qt8EjEOw=; b=xW2jQXGc3RNJa2egamGIW9kpY3VUVmZ4nQig9FVOD85Mf1UBenLEugy1RzsCCiqNW+ zYA147IuIZIdfM30wk2tt49PS4n6NWJAJEcnDqt8JLwH/0HRO2vNc+fvlxMm1GLB0+rq y14MAFEZw1M39Li2LZG16d6HT/bTTxRHPs04XyrGBXchXc2xwg1G70+CCNpVvSbLwpK+ dwK1+a9XXWhR3wjrvdRsU+nlCZw2qqXxuevmSpzLGUEeZk6PgXXy4AqnRHkpI9Ja8vr3 mplqSppUmWButCs2gEQN1h54us78cDoFR6ilK/9uABAP8IUPJeG/p5AedmA3Ry3IBW5a LkSg== X-Gm-Message-State: AOAM532xkFOBIxGFty+vI+iflaJ3y1UMTQIGNNbNf5ZzyUJZAguKJEKf 7SUByyy5FoT58alPLFw7zuBNdv0nKx/4hQ== X-Google-Smtp-Source: ABdhPJzk7KhA3vkPlex7TL8000Ho9gX8m1IvBDDIklqV2wAJ3IssTzWYsOwrknrPS196d/i8908cAw== X-Received: by 2002:adf:e289:0:b0:1e3:14ad:75fe with SMTP id v9-20020adfe289000000b001e314ad75femr16191005wri.685.1650468885890; Wed, 20 Apr 2022 08:34:45 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 24/34] configure: switch directory options to automatic parsing Date: Wed, 20 Apr 2022 17:33:57 +0200 Message-Id: <20220420153407.73926-25-pbonzini@redhat.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220420153407.73926-1-pbonzini@redhat.com> References: <20220420153407.73926-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::430; envelope-from=paolo.bonzini@gmail.com; helo=mail-wr1-x430.google.com 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.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1650471130624100001 Content-Type: text/plain; charset="utf-8" While prefix, bindir and qemu_suffix needs special treatment due to differences between Windows and POSIX systems, everything else needs no extra code in configure. Signed-off-by: Paolo Bonzini --- configure | 58 ++--------------------------------- meson_options.txt | 4 +-- scripts/meson-buildoptions.py | 11 +++++-- scripts/meson-buildoptions.sh | 21 +++++++++++++ 4 files changed, 34 insertions(+), 60 deletions(-) diff --git a/configure b/configure index 200ef3be23..b704453c68 100755 --- a/configure +++ b/configure @@ -311,6 +311,7 @@ plugins=3D"$default_feature" meson=3D"" meson_args=3D"" ninja=3D"" +bindir=3D"bin" skip_meson=3Dno =20 # The following Meson options are handled manually (still they @@ -669,6 +670,7 @@ if test "$mingw32" =3D "yes" ; then CONFIGURE_CFLAGS=3D"-mthreads $CONFIGURE_CFLAGS" write_c_skeleton; prefix=3D"/qemu" + bindir=3D"" qemu_suffix=3D"" fi =20 @@ -775,30 +777,10 @@ for opt do static=3D"yes" QEMU_PKG_CONFIG_FLAGS=3D"--static $QEMU_PKG_CONFIG_FLAGS" ;; - --mandir=3D*) mandir=3D"$optarg" - ;; --bindir=3D*) bindir=3D"$optarg" ;; - --libdir=3D*) libdir=3D"$optarg" - ;; - --libexecdir=3D*) libexecdir=3D"$optarg" - ;; - --includedir=3D*) includedir=3D"$optarg" - ;; - --datadir=3D*) datadir=3D"$optarg" - ;; --with-suffix=3D*) qemu_suffix=3D"$optarg" ;; - --docdir=3D*) docdir=3D"$optarg" - ;; - --localedir=3D*) localedir=3D"$optarg" - ;; - --sysconfdir=3D*) sysconfdir=3D"$optarg" - ;; - --localstatedir=3D*) local_statedir=3D"$optarg" - ;; - --firmwarepath=3D*) firmwarepath=3D"$optarg" - ;; --host=3D*|--build=3D*|\ --disable-dependency-tracking|\ --sbindir=3D*|--sharedstatedir=3D*|\ @@ -1021,23 +1003,6 @@ case $git_submodules_action in ;; esac =20 -libdir=3D"${libdir:-$prefix/lib}" -libexecdir=3D"${libexecdir:-$prefix/libexec}" -includedir=3D"${includedir:-$prefix/include}" - -if test "$mingw32" =3D "yes" ; then - bindir=3D"${bindir:-$prefix}" -else - bindir=3D"${bindir:-$prefix/bin}" -fi -mandir=3D"${mandir:-$prefix/share/man}" -datadir=3D"${datadir:-$prefix/share}" -docdir=3D"${docdir:-$prefix/share/doc}" -sysconfdir=3D"${sysconfdir:-$prefix/etc}" -local_statedir=3D"${local_statedir:-$prefix/var}" -firmwarepath=3D"${firmwarepath:-$datadir/qemu-firmware}" -localedir=3D"${localedir:-$datadir/locale}" - if eval test -z "\${cross_cc_$cpu}"; then eval "cross_cc_${cpu}=3D\$cc" cross_cc_vars=3D"$cross_cc_vars cross_cc_${cpu}" @@ -1115,16 +1080,7 @@ Advanced options (experts only): --with-git-submodules=3Dvalidate fail if git submodules are not up to da= te --with-git-submodules=3Dignore do not update or check git submodules (= default if no .git dir) --static enable static build [$static] - --mandir=3DPATH install man pages in PATH - --datadir=3DPATH install firmware in PATH/$qemu_suffix - --localedir=3DPATH install translation in PATH/$qemu_suffix - --docdir=3DPATH install documentation in PATH/$qemu_suffix --bindir=3DPATH install binaries in PATH - --libdir=3DPATH install libraries in PATH - --libexecdir=3DPATH install helper binaries in PATH - --sysconfdir=3DPATH install config in PATH/$qemu_suffix - --localstatedir=3DPATH install local state in PATH (set at runtime o= n win32) - --firmwarepath=3DPATH search PATH for firmware files --efi-aarch64=3DPATH PATH of efi file to use for aarch64 VMs. --with-suffix=3DSUFFIX suffix for QEMU data inside datadir/libdir/sy= sconfdir/docdir [$qemu_suffix] --without-default-features default all --enable-* options to "disabled" @@ -2409,18 +2365,8 @@ if test "$skip_meson" =3D no; then run_meson() { NINJA=3D$ninja $meson setup \ --prefix "$prefix" \ - --libdir "$libdir" \ - --libexecdir "$libexecdir" \ --bindir "$bindir" \ - --includedir "$includedir" \ - --datadir "$datadir" \ - --mandir "$mandir" \ - --sysconfdir "$sysconfdir" \ - --localedir "$localedir" \ - --localstatedir "$local_statedir" \ -Ddefault_devices=3D$default_devices \ - -Ddocdir=3D"$docdir" \ - -Dqemu_firmwarepath=3D"$firmwarepath" \ -Dqemu_suffix=3D"$qemu_suffix" \ -Dsmbd=3D"$smbd" \ -Doptimization=3D$(if test "$debug" =3D yes; then echo 0; else ech= o 2; fi) \ diff --git a/meson_options.txt b/meson_options.txt index 848426460c..a76fadbd7d 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -4,9 +4,9 @@ =20 option('qemu_suffix', type : 'string', value: 'qemu', description: 'Suffix for QEMU data/modules/config directories (can = be empty)') -option('docdir', type : 'string', value : 'doc', +option('docdir', type : 'string', value : 'share/doc', description: 'Base directory for documentation installation (can be= empty)') -option('qemu_firmwarepath', type : 'string', value : '', +option('qemu_firmwarepath', type : 'string', value : 'qemu-firmware', description: 'search PATH for firmware files') option('pkgversion', type : 'string', value : '', description: 'use specified string as sub-version of the package') diff --git a/scripts/meson-buildoptions.py b/scripts/meson-buildoptions.py index 0f9603a7f6..45cda8cd84 100755 --- a/scripts/meson-buildoptions.py +++ b/scripts/meson-buildoptions.py @@ -27,9 +27,7 @@ =20 SKIP_OPTIONS =3D { "default_devices", - "docdir", "fuzzing_engine", - "qemu_firmwarepath", "qemu_suffix", "smbd", } @@ -37,12 +35,21 @@ OPTION_NAMES =3D { "malloc": "enable-malloc", "pkgversion": "with-pkgversion", + "qemu_firmwarepath": "firmwarepath", "trace_backends": "enable-trace-backends", "trace_file": "with-trace-file", } =20 BUILTIN_OPTIONS =3D { + "datadir", + "includedir", + "libdir", + "libexecdir", + "localedir", + "localstatedir", + "mandir", "strip", + "sysconfdir", } =20 LINE_WIDTH =3D 76 diff --git a/scripts/meson-buildoptions.sh b/scripts/meson-buildoptions.sh index a0c86db116..a52cc14d13 100644 --- a/scripts/meson-buildoptions.sh +++ b/scripts/meson-buildoptions.sh @@ -8,8 +8,11 @@ meson_options_help() { printf "%s\n" ' --block-drv-rw-whitelist=3DVALUE' printf "%s\n" ' set block driver read-write wh= itelist (by default' printf "%s\n" ' affects only QEMU, not tools l= ike qemu-img)' + printf "%s\n" ' --datadir=3DVALUE Data file directory [share]' printf "%s\n" ' --disable-coroutine-pool coroutine freelist (better per= formance)' printf "%s\n" ' --disable-install-blobs install provided firmware blob= s' + printf "%s\n" ' --docdir=3DVALUE Base directory for documenta= tion installation' + printf "%s\n" ' (can be empty) [share/doc]' printf "%s\n" ' --enable-block-drv-whitelist-in-tools' printf "%s\n" ' use block whitelist also in to= ols instead of only' printf "%s\n" ' QEMU' @@ -40,10 +43,18 @@ meson_options_help() { printf "%s\n" ' --enable-trace-backends=3DCHOICES' printf "%s\n" ' Set available tracing backends= [log] (choices:' printf "%s\n" ' dtrace/ftrace/log/nop/simple/s= yslog/ust)' + printf "%s\n" ' --firmwarepath=3DVALUE search PATH for firmware fil= es [qemu-firmware]' printf "%s\n" ' --iasl=3DVALUE Path to ACPI disassembler' + printf "%s\n" ' --includedir=3DVALUE Header file directory [inclu= de]' printf "%s\n" ' --interp-prefix=3DVALUE where to find shared librari= es etc., use %M for' printf "%s\n" ' cpu name [/usr/gnemul/qemu-%M]' + printf "%s\n" ' --libdir=3DVALUE Library directory [lib64]' + printf "%s\n" ' --libexecdir=3DVALUE Library executable directory= [libexec]' + printf "%s\n" ' --localedir=3DVALUE Locale data directory [share= /locale]' + printf "%s\n" ' --localstatedir=3DVALUE Localstate data directory [/= var/local]' + printf "%s\n" ' --mandir=3DVALUE Manual page directory [share= /man]' printf "%s\n" ' --sphinx-build=3DVALUE Use specified sphinx-build f= or building document' + printf "%s\n" ' --sysconfdir=3DVALUE Sysconf data directory [etc]' printf "%s\n" ' --tls-priority=3DVALUE Default TLS protocol/cipher = priority string' printf "%s\n" ' [NORMAL]' printf "%s\n" ' --with-pkgversion=3DVALUE use specified string as sub-= version of the' @@ -206,6 +217,7 @@ _meson_option_parse() { --disable-curl) printf "%s" -Dcurl=3Ddisabled ;; --enable-curses) printf "%s" -Dcurses=3Denabled ;; --disable-curses) printf "%s" -Dcurses=3Ddisabled ;; + --datadir=3D*) quote_sh "-Ddatadir=3D$2" ;; --enable-dbus-display) printf "%s" -Ddbus_display=3Denabled ;; --disable-dbus-display) printf "%s" -Ddbus_display=3Ddisabled ;; --enable-debug-mutex) printf "%s" -Ddebug_mutex=3Dtrue ;; @@ -214,6 +226,7 @@ _meson_option_parse() { --disable-debug-stack-usage) printf "%s" -Ddebug_stack_usage=3Dfalse ;; --enable-dmg) printf "%s" -Ddmg=3Denabled ;; --disable-dmg) printf "%s" -Ddmg=3Ddisabled ;; + --docdir=3D*) quote_sh "-Ddocdir=3D$2" ;; --enable-docs) printf "%s" -Ddocs=3Denabled ;; --disable-docs) printf "%s" -Ddocs=3Ddisabled ;; --enable-dsound) printf "%s" -Ddsound=3Denabled ;; @@ -252,6 +265,7 @@ _meson_option_parse() { --iasl=3D*) quote_sh "-Diasl=3D$2" ;; --enable-iconv) printf "%s" -Diconv=3Denabled ;; --disable-iconv) printf "%s" -Diconv=3Ddisabled ;; + --includedir=3D*) quote_sh "-Dincludedir=3D$2" ;; --enable-install-blobs) printf "%s" -Dinstall_blobs=3Dtrue ;; --disable-install-blobs) printf "%s" -Dinstall_blobs=3Dfalse ;; --interp-prefix=3D*) quote_sh "-Dinterp_prefix=3D$2" ;; @@ -265,6 +279,8 @@ _meson_option_parse() { --disable-l2tpv3) printf "%s" -Dl2tpv3=3Ddisabled ;; --enable-libdaxctl) printf "%s" -Dlibdaxctl=3Denabled ;; --disable-libdaxctl) printf "%s" -Dlibdaxctl=3Ddisabled ;; + --libdir=3D*) quote_sh "-Dlibdir=3D$2" ;; + --libexecdir=3D*) quote_sh "-Dlibexecdir=3D$2" ;; --enable-libiscsi) printf "%s" -Dlibiscsi=3Denabled ;; --disable-libiscsi) printf "%s" -Dlibiscsi=3Ddisabled ;; --enable-libnfs) printf "%s" -Dlibnfs=3Denabled ;; @@ -283,6 +299,8 @@ _meson_option_parse() { --disable-linux-io-uring) printf "%s" -Dlinux_io_uring=3Ddisabled ;; --enable-live-block-migration) printf "%s" -Dlive_block_migration=3Den= abled ;; --disable-live-block-migration) printf "%s" -Dlive_block_migration=3Dd= isabled ;; + --localedir=3D*) quote_sh "-Dlocaledir=3D$2" ;; + --localstatedir=3D*) quote_sh "-Dlocalstatedir=3D$2" ;; --enable-lzfse) printf "%s" -Dlzfse=3Denabled ;; --disable-lzfse) printf "%s" -Dlzfse=3Ddisabled ;; --enable-lzo) printf "%s" -Dlzo=3Denabled ;; @@ -290,6 +308,7 @@ _meson_option_parse() { --enable-malloc=3D*) quote_sh "-Dmalloc=3D$2" ;; --enable-malloc-trim) printf "%s" -Dmalloc_trim=3Denabled ;; --disable-malloc-trim) printf "%s" -Dmalloc_trim=3Ddisabled ;; + --mandir=3D*) quote_sh "-Dmandir=3D$2" ;; --enable-membarrier) printf "%s" -Dmembarrier=3Denabled ;; --disable-membarrier) printf "%s" -Dmembarrier=3Ddisabled ;; --enable-module-upgrades) printf "%s" -Dmodule_upgrades=3Dtrue ;; @@ -323,6 +342,7 @@ _meson_option_parse() { --disable-qcow1) printf "%s" -Dqcow1=3Ddisabled ;; --enable-qed) printf "%s" -Dqed=3Denabled ;; --disable-qed) printf "%s" -Dqed=3Ddisabled ;; + --firmwarepath=3D*) quote_sh "-Dqemu_firmwarepath=3D$2" ;; --enable-qga-vss) printf "%s" -Dqga_vss=3Denabled ;; --disable-qga-vss) printf "%s" -Dqga_vss=3Ddisabled ;; --enable-qom-cast-debug) printf "%s" -Dqom_cast_debug=3Dtrue ;; @@ -361,6 +381,7 @@ _meson_option_parse() { --disable-spice-protocol) printf "%s" -Dspice_protocol=3Ddisabled ;; --enable-strip) printf "%s" -Dstrip=3Dtrue ;; --disable-strip) printf "%s" -Dstrip=3Dfalse ;; + --sysconfdir=3D*) quote_sh "-Dsysconfdir=3D$2" ;; --enable-tcg) printf "%s" -Dtcg=3Denabled ;; --disable-tcg) printf "%s" -Dtcg=3Ddisabled ;; --enable-tcg-interpreter) printf "%s" -Dtcg_interpreter=3Dtrue ;; --=20 2.35.1 From nobody Thu May 2 03:23:26 2024 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 165047060460136.91804491924211; Wed, 20 Apr 2022 09:03:24 -0700 (PDT) Received: from localhost ([::1]:38548 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nhCnb-00055d-5M for importer@patchew.org; Wed, 20 Apr 2022 12:03:23 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42980) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nhCLy-0001zo-7K for qemu-devel@nongnu.org; Wed, 20 Apr 2022 11:34:50 -0400 Received: from mail-wr1-x42a.google.com ([2a00:1450:4864:20::42a]:46905) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nhCLw-0000zm-5K for qemu-devel@nongnu.org; Wed, 20 Apr 2022 11:34:49 -0400 Received: by mail-wr1-x42a.google.com with SMTP id i20so2761221wrb.13 for ; Wed, 20 Apr 2022 08:34:47 -0700 (PDT) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id n68-20020a1c2747000000b0038e6b4d5395sm130401wmn.16.2022.04.20.08.34.45 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Apr 2022 08:34:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=b5R/nikhlcYeISmwJGJooktK9uaGTLeVNhWSeQq+xjo=; b=O7G3iiI/fhlH6Zy+zoFTm209FgRtmOp1z9PfVdn1nQe/ph6Rb0X67tMQ7uwex6sro7 1SAB/kjySQZIRdK0sCGz0EbQqrxroz1HdjvaOEXSf3iw1IkCShoKMu5nlXcODwru1UVk Zp38vweqs/H8tL5aTph6g7qf10aNfJJW0yw/rjIRYh2xmRW3fEdttt240w3vwjyGXiVq kwI/4sWqF5bbun6v7FNu1M83RMXYfx3optJ1A93sN56dqGLfTTqysx0BNHZGKrO6i+Bm kZ2ZeVU2wC6q/0ULVpn4QedYRBoqXDvd6M6qxo71PMpgccSaxHq3ZT2O6hfAUIZnp77n P0sg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=b5R/nikhlcYeISmwJGJooktK9uaGTLeVNhWSeQq+xjo=; b=78Wvfzir00XkbxjGk3Weno3hhdMa1a7ST3QsrVSAq4wRjDcohryPyJ2JIihWeJMRUx OYMEz+RyaRlajuxCgJ3CEq1s6nxK9F12lBy3L0kw3c9aZKgwtuHNXtZFx02uLDxwRLVM fk1/wc5XtGOOxQD0qJnHRlW3MLLDIr2sYiPMf19HrGaLdomQPPavDnHs0JDPhpCuRsYR 6ymMHeqMav/G1q1U+jsRQiydyDL3dfe3Q4mYjqVBlyACHsqWksVQRilROiQpKmjgxUQM Bcwtf/T24AVpTDTlLhgn8Mt50O5pErgIchjq0nv1YOtzwFdcSbCy/Tz85ER8EBCIRAEM 566g== X-Gm-Message-State: AOAM532HYZ7SPnJZ9yBx55Nmt8ugBz40F145BGgZPWVdVA0FtldwCEIW CTvdPB8EwpkAEEC5fWNozWWGlMalJxZ4dQ== X-Google-Smtp-Source: ABdhPJwI/ribV0znNQvr+Rb5+Z61xs/xJt7atrc9NaNPd66ecs6TKoVTnuV1HCqdoYc0qE3pxRb8Pw== X-Received: by 2002:adf:f611:0:b0:207:ac80:73f5 with SMTP id t17-20020adff611000000b00207ac8073f5mr16085460wrp.623.1650468886756; Wed, 20 Apr 2022 08:34:46 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 25/34] meson: pass more options directly as -D Date: Wed, 20 Apr 2022 17:33:58 +0200 Message-Id: <20220420153407.73926-26-pbonzini@redhat.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220420153407.73926-1-pbonzini@redhat.com> References: <20220420153407.73926-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::42a; envelope-from=paolo.bonzini@gmail.com; helo=mail-wr1-x42a.google.com 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.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1650470606385100001 Content-Type: text/plain; charset="utf-8" If an option is not used anywhere by the configure script, it can be just added to $meson_options even if it is not parsed by the automatically generated bits in scripts/meson-buildoptions.sh. The only slightly tricky case is $debug, where the if test "$fortify_source" =3D "yes" ; then QEMU_CFLAGS=3D"-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3D2 $QEMU_CFLAGS" debug=3Dno fi assignment is dead; configure sets fortify_source=3Dno whenever debug=3Dyes. Signed-off-by: Paolo Bonzini --- configure | 39 ++++++++++------------------------- meson.build | 2 +- scripts/meson-buildoptions.py | 4 ++++ scripts/meson-buildoptions.sh | 6 ++++++ 4 files changed, 22 insertions(+), 29 deletions(-) diff --git a/configure b/configure index b704453c68..4997983b5d 100755 --- a/configure +++ b/configure @@ -235,7 +235,6 @@ static=3D"no" cross_compile=3D"no" cross_prefix=3D"" host_cc=3D"cc" -lto=3D"false" stack_protector=3D"" safe_stack=3D"" use_containers=3D"yes" @@ -291,13 +290,10 @@ vhost_vsock=3D"$default_feature" vhost_user=3D"no" vhost_user_fs=3D"$default_feature" vhost_vdpa=3D"$default_feature" -debug_info=3D"yes" debug_tcg=3D"no" -debug=3D"no" sanitizers=3D"no" tsan=3D"no" fortify_source=3D"$default_feature" -gcov=3D"no" EXESUF=3D"" modules=3D"no" prefix=3D"/usr/local" @@ -327,10 +323,7 @@ else fi fdt=3D"auto" =20 -# 2. Support --with/--without option -default_devices=3D"true" - -# 3. Automatically enable/disable other options +# 2. Automatically enable/disable other options tcg=3D"enabled" cfi=3D"false" =20 @@ -679,6 +672,9 @@ werror=3D"" . $source_path/scripts/meson-buildoptions.sh =20 meson_options=3D +meson_option_add() { + meson_options=3D"$meson_options $(quote_sh "$1")" +} meson_option_parse() { meson_options=3D"$meson_options $(_meson_option_parse "$@")" if test $? -eq 1; then @@ -731,9 +727,9 @@ for opt do ;; --cross-cc-*) ;; - --enable-debug-info) debug_info=3D"yes" + --enable-debug-info) meson_option_add -Ddebug=3Dtrue ;; - --disable-debug-info) debug_info=3D"no" + --disable-debug-info) meson_option_add -Ddebug=3Dfalse ;; --enable-modules) modules=3D"yes" @@ -753,9 +749,9 @@ for opt do error_exit "Can't mix --target-list-exclude with --= target-list" fi ;; - --with-default-devices) default_devices=3D"true" + --with-default-devices) meson_option_add -Ddefault_devices=3Dtrue ;; - --without-default-devices) default_devices=3D"false" + --without-default-devices) meson_option_add -Ddefault_devices=3Dfalse ;; --with-devices-*[!a-zA-Z0-9_-]*=3D*) error_exit "Passed bad --with-devic= es-FOO option" ;; @@ -771,8 +767,6 @@ for opt do ;; --without-default-features) # processed above ;; - --enable-gcov) gcov=3D"yes" - ;; --static) static=3D"yes" QEMU_PKG_CONFIG_FLAGS=3D"--static $QEMU_PKG_CONFIG_FLAGS" @@ -799,7 +793,7 @@ for opt do # Enable debugging options that aren't excessively noisy debug_tcg=3D"yes" meson_option_parse --enable-debug-mutex "" - debug=3D"yes" + meson_option_add -Doptimization=3D0 fortify_source=3D"no" ;; --enable-sanitizers) sanitizers=3D"yes" @@ -848,10 +842,6 @@ for opt do ;; --disable-werror) werror=3D"no" ;; - --enable-lto) lto=3D"true" - ;; - --disable-lto) lto=3D"false" - ;; --enable-stack-protector) stack_protector=3D"yes" ;; --disable-stack-protector) stack_protector=3D"no" @@ -862,7 +852,7 @@ for opt do ;; --enable-cfi) cfi=3D"true"; - lto=3D"true"; + meson_option_add -Db_lto=3Dtrue ;; --disable-cfi) cfi=3D"false" ;; @@ -1100,7 +1090,6 @@ Advanced options (experts only): --cpu=3DCPU Build for host CPU [$cpu] --with-coroutine=3DBACKEND coroutine backend. Supported options: ucontext, sigaltstack, windows - --enable-gcov enable test coverage analysis with gcov --enable-plugins enable plugins via shared library loading --disable-containers don't use containers for cross-building @@ -1116,7 +1105,6 @@ cat << EOF modules modules support (non-Windows) debug-tcg TCG debugging (default is disabled) debug-info debugging information - lto Enable Link-Time Optimization. safe-stack SafeStack Stack Smash Protection. Depends on clang/llvm >=3D 3.7 and requires coroutine backend ucont= ext. vhost-net vhost-net kernel acceleration support @@ -1937,7 +1925,6 @@ write_c_skeleton =20 if test "$fortify_source" =3D "yes" ; then QEMU_CFLAGS=3D"-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3D2 $QEMU_CFLAGS" - debug=3Dno fi =20 case "$ARCH" in @@ -2366,15 +2353,11 @@ if test "$skip_meson" =3D no; then NINJA=3D$ninja $meson setup \ --prefix "$prefix" \ --bindir "$bindir" \ - -Ddefault_devices=3D$default_devices \ -Dqemu_suffix=3D"$qemu_suffix" \ -Dsmbd=3D"$smbd" \ - -Doptimization=3D$(if test "$debug" =3D yes; then echo 0; else ech= o 2; fi) \ - -Ddebug=3D$(if test "$debug_info" =3D yes; then echo true; else ec= ho false; fi) \ -Dwerror=3D$(if test "$werror" =3D yes; then echo true; else echo = false; fi) \ -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) \ - -Db_lto=3D$lto -Dcfi=3D$cfi -Dtcg=3D$tcg \ + -Dcfi=3D$cfi -Dtcg=3D$tcg \ -Dcapstone=3D$capstone -Dfdt=3D$fdt -Dslirp=3D$slirp \ $(test -n "${LIB_FUZZING_ENGINE+xxx}" && echo "-Dfuzzing_engine=3D= $LIB_FUZZING_ENGINE") \ $(if test "$default_feature" =3D no; then echo "-Dauto_features=3D= disabled"; fi) \ diff --git a/meson.build b/meson.build index 2545ac2848..60e8c302e6 100644 --- a/meson.build +++ b/meson.build @@ -1,6 +1,6 @@ project('qemu', ['c'], meson_version: '>=3D0.59.3', default_options: ['warning_level=3D1', 'c_std=3Dgnu11', 'cpp_std= =3Dgnu++11', 'b_colorout=3Dauto', - 'b_staticpic=3Dfalse', 'stdsplit=3Dfalse'], + 'b_staticpic=3Dfalse', 'stdsplit=3Dfalse', 'opti= mization=3D2'], version: files('VERSION')) =20 add_test_setup('quick', exclude_suites: ['slow', 'thorough'], is_default: = true) diff --git a/scripts/meson-buildoptions.py b/scripts/meson-buildoptions.py index 45cda8cd84..e624c16b01 100755 --- a/scripts/meson-buildoptions.py +++ b/scripts/meson-buildoptions.py @@ -33,6 +33,8 @@ } =20 OPTION_NAMES =3D { + "b_coverage": "gcov", + "b_lto": "lto", "malloc": "enable-malloc", "pkgversion": "with-pkgversion", "qemu_firmwarepath": "firmwarepath", @@ -41,6 +43,8 @@ } =20 BUILTIN_OPTIONS =3D { + "b_coverage", + "b_lto", "datadir", "includedir", "libdir", diff --git a/scripts/meson-buildoptions.sh b/scripts/meson-buildoptions.sh index a52cc14d13..274639777e 100644 --- a/scripts/meson-buildoptions.sh +++ b/scripts/meson-buildoptions.sh @@ -27,7 +27,9 @@ meson_options_help() { printf "%s\n" ' --enable-fdt[=3DCHOICE] Whether and how to find the = libfdt library' printf "%s\n" ' (choices: auto/disabled/enable= d/internal/system)' printf "%s\n" ' --enable-fuzzing build fuzzing targets' + printf "%s\n" ' --enable-gcov Enable coverage tracking.' printf "%s\n" ' --enable-gprof QEMU profiling with gprof' + printf "%s\n" ' --enable-lto Use link time optimization' printf "%s\n" ' --enable-malloc=3DCHOICE choose memory allocator to u= se [system] (choices:' printf "%s\n" ' jemalloc/system/tcmalloc)' printf "%s\n" ' --enable-module-upgrades try to load modules from alter= nate paths for' @@ -182,6 +184,10 @@ _meson_option_parse() { --disable-avx2) printf "%s" -Davx2=3Ddisabled ;; --enable-avx512f) printf "%s" -Davx512f=3Denabled ;; --disable-avx512f) printf "%s" -Davx512f=3Ddisabled ;; + --enable-gcov) printf "%s" -Db_coverage=3Dtrue ;; + --disable-gcov) printf "%s" -Db_coverage=3Dfalse ;; + --enable-lto) printf "%s" -Db_lto=3Dtrue ;; + --disable-lto) printf "%s" -Db_lto=3Dfalse ;; --block-drv-ro-whitelist=3D*) quote_sh "-Dblock_drv_ro_whitelist=3D$2"= ;; --block-drv-rw-whitelist=3D*) quote_sh "-Dblock_drv_rw_whitelist=3D$2"= ;; --enable-block-drv-whitelist-in-tools) printf "%s" -Dblock_drv_whiteli= st_in_tools=3Dtrue ;; --=20 2.35.1 From nobody Thu May 2 03:23:26 2024 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1650471246859225.25939720727013; Wed, 20 Apr 2022 09:14:06 -0700 (PDT) Received: from localhost ([::1]:33068 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nhCxx-0003mV-Hv for importer@patchew.org; Wed, 20 Apr 2022 12:14:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42986) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nhCLy-00020F-DR for qemu-devel@nongnu.org; Wed, 20 Apr 2022 11:34:50 -0400 Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]:33312) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nhCLw-0000zw-NC for qemu-devel@nongnu.org; Wed, 20 Apr 2022 11:34:50 -0400 Received: by mail-wr1-x42e.google.com with SMTP id x18so2829383wrc.0 for ; Wed, 20 Apr 2022 08:34:48 -0700 (PDT) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id n68-20020a1c2747000000b0038e6b4d5395sm130401wmn.16.2022.04.20.08.34.46 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Apr 2022 08:34:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=eN2PNaIJxUfg9ceUBiK92oB3fGuFQedFi7c0jPCnfIc=; b=maadqJpuYm6X+pncmMoPZK4yF9G8LUeSF5Rg+5BOEfw35TnNEn3qClCIs0r8PVMT/T tUayYds9nMghjeTo7EHQgB5W6QK9p6ghwTn953ACXRKrtagpBqQo+P08WEzWXpUgt3/r k9TFgX7TP8VsvmsUrZCalpwOnk/uWJNere/RVgTuIPGi9TZSfYadev06IaywxwhOK9Ew YNyiShVVOR5ssji1DgH1M4/P15w2PVbUZVTPdpQ697JSGhodjTTtJ4xLMLDRisjfy/tr BOZCvDHoJeV1kdiygvZs+A9k0ypV7k48PsLRcYGCabwqWhhyIxfWCyspDs9xVdQ0E+b0 jKQg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=eN2PNaIJxUfg9ceUBiK92oB3fGuFQedFi7c0jPCnfIc=; b=H+CwyBX97DHb164KVv0blxqjjXc2gwzxJvRTedBRPqW3ujlNFeuchAVCIdU3PNWbQW Sq1QwKnwqd9fgqv1GT2drmMjv4xR3WB2G/5fkbS0+tV1lhP+kqZABDn6pqttQnTyiLLD 9Jd6DRLqip6OwDVV61l2P36fR3DJrR2BpgCdERE05uKM/j/mbiqxZmVwMyBjAWiIR2zU eQB4JAAyX8pLrF9jwiH2OkwBNYtFwyxkW0+Hf0XTAfT1YDRnxmwHqwjzVl5+qcTrTSlT GHLOLlu3hEWtBgu9JPJePvUKNglLFO/oNzYuD9avc50bRJZLydzinmi/KMHiQ7BUD/Ky B9Og== X-Gm-Message-State: AOAM531+btBBOr+szuRbB10Ly/2hxX5hfrck7FWpqhU5QFfWJYkIy3rk s5IJZznMpuYqWvENxPGpFGYG3PmT6oDWDw== X-Google-Smtp-Source: ABdhPJwG49+y/UqLW3fcarI0FXq86H9YqjGn32mj9o0KHt2qrG+OALdcMn8SIM2zWHidgTbjPjltYw== X-Received: by 2002:adf:f046:0:b0:207:a457:5e52 with SMTP id t6-20020adff046000000b00207a4575e52mr15932476wro.708.1650468887393; Wed, 20 Apr 2022 08:34:47 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 26/34] configure: omit options with default values from meson command line Date: Wed, 20 Apr 2022 17:33:59 +0200 Message-Id: <20220420153407.73926-27-pbonzini@redhat.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220420153407.73926-1-pbonzini@redhat.com> References: <20220420153407.73926-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::42e; envelope-from=paolo.bonzini@gmail.com; helo=mail-wr1-x42e.google.com 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.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1650471248365100001 Content-Type: text/plain; charset="utf-8" This has no functional change, it only makes the command line shorter and nicer. Signed-off-by: Paolo Bonzini --- configure | 29 +++++++++++++++++------------ meson.build | 2 +- meson_options.txt | 2 +- 3 files changed, 19 insertions(+), 14 deletions(-) diff --git a/configure b/configure index 4997983b5d..61b5acae10 100755 --- a/configure +++ b/configure @@ -2349,19 +2349,24 @@ if test "$skip_meson" =3D no; then mv $cross config-meson.cross =20 rm -rf meson-private meson-info meson-logs + + # Built-in options + test "$bindir" !=3D "bin" && meson_option_add "-Dbindir=3D$bindir" + test "$default_feature" =3D no && meson_option_add -Dauto_features=3Ddis= abled + test "$pie" =3D no && meson_option_add -Db_pie=3Dfalse + test "$werror" =3D yes && meson_option_add -Dwerror=3Dtrue + + # QEMU options + test "$capstone" !=3D auto && meson_option_add "-Dcapstone=3D$capstone" + test "$cfi" !=3D false && meson_option_add "-Dcfi=3D$cfi" + test "$fdt" !=3D auto && meson_option_add "-Dfdt=3D$fdt" + test -n "${LIB_FUZZING_ENGINE+xxx}" && meson_option_add "-Dfuzzing_engin= e=3D$LIB_FUZZING_ENGINE" + test "$qemu_suffix" !=3D qemu && meson_option_add "-Dqemu_suffix=3D$qemu= _suffix" + test "$slirp" !=3D auto && meson_option_add "-Dslirp=3D$slirp" + test "$smbd" !=3D '' && meson_option_add "-Dsmbd=3D$smbd" + test "$tcg" !=3D enabled && meson_option_add "-Dtcg=3D$tcg" run_meson() { - NINJA=3D$ninja $meson setup \ - --prefix "$prefix" \ - --bindir "$bindir" \ - -Dqemu_suffix=3D"$qemu_suffix" \ - -Dsmbd=3D"$smbd" \ - -Dwerror=3D$(if test "$werror" =3D yes; then echo true; else echo = false; fi) \ - -Db_pie=3D$(if test "$pie" =3D yes; then echo true; else echo fals= e; fi) \ - -Dcfi=3D$cfi -Dtcg=3D$tcg \ - -Dcapstone=3D$capstone -Dfdt=3D$fdt -Dslirp=3D$slirp \ - $(test -n "${LIB_FUZZING_ENGINE+xxx}" && echo "-Dfuzzing_engine=3D= $LIB_FUZZING_ENGINE") \ - $(if test "$default_feature" =3D no; then echo "-Dauto_features=3D= disabled"; fi) \ - "$@" $cross_arg "$PWD" "$source_path" + NINJA=3D$ninja $meson setup --prefix "$prefix" "$@" $cross_arg "$PWD" = "$source_path" } eval run_meson $meson_options if test "$?" -ne 0 ; then diff --git a/meson.build b/meson.build index 60e8c302e6..ff5c076805 100644 --- a/meson.build +++ b/meson.build @@ -1,6 +1,6 @@ project('qemu', ['c'], meson_version: '>=3D0.59.3', default_options: ['warning_level=3D1', 'c_std=3Dgnu11', 'cpp_std= =3Dgnu++11', 'b_colorout=3Dauto', - 'b_staticpic=3Dfalse', 'stdsplit=3Dfalse', 'opti= mization=3D2'], + 'b_staticpic=3Dfalse', 'stdsplit=3Dfalse', 'opti= mization=3D2', 'b_pie=3Dtrue'], version: files('VERSION')) =20 add_test_setup('quick', exclude_suites: ['slow', 'thorough'], is_default: = true) diff --git a/meson_options.txt b/meson_options.txt index a76fadbd7d..8efd5f520c 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -78,7 +78,7 @@ 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', +option('tcg', type: 'feature', value: 'enabled', description: 'TCG support') option('tcg_interpreter', type: 'boolean', value: false, description: 'TCG with bytecode interpreter (slow)') --=20 2.35.1 From nobody Thu May 2 03:23:26 2024 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1650471341317130.04673127754825; Wed, 20 Apr 2022 09:15:41 -0700 (PDT) Received: from localhost ([::1]:37946 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nhCzU-00077U-78 for importer@patchew.org; Wed, 20 Apr 2022 12:15:40 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42996) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nhCLz-00020v-0A for qemu-devel@nongnu.org; Wed, 20 Apr 2022 11:34:51 -0400 Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]:33022) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nhCLx-000107-EZ for qemu-devel@nongnu.org; Wed, 20 Apr 2022 11:34:50 -0400 Received: by mail-wm1-x330.google.com with SMTP id l3-20020a05600c1d0300b0038ff89c938bso2613255wms.0 for ; Wed, 20 Apr 2022 08:34:49 -0700 (PDT) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id n68-20020a1c2747000000b0038e6b4d5395sm130401wmn.16.2022.04.20.08.34.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Apr 2022 08:34:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=U1Ym0oWh6yDBjxqy2SbaqlllddfKPVs7BVcBIihMzss=; b=KbViuvRQsHbFUQ566tVoFx7cEKhVK6MytmCJJM+mXelan29Jvvl0nqC35GRZrLjwaf OW1VgXRvb0JgJ3BOta+MN2qtITUMe1Tz2uKMeyqDU8KnDDNfGSU8INPD3RQpnI08gk/W LXwV8f6koA+GRg/BlLgBn0kRj5hd2jqYBgawTLqk8bJrR9drQGMMa6dBHd37eccDYNZM Y0IdxJr7Sp+oTqaEn7mSIR2gUR9wtvNH0yObxGg2zvl9/FSIOdYO4IhBkdjzmHgl09H1 Ba3SEL6EJ8JhiJSCQJCQYZsj+G277yyQf90RtfbNNg73hqPJoW+pZ6+HLtDS7cqxZYNq Bhsg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=U1Ym0oWh6yDBjxqy2SbaqlllddfKPVs7BVcBIihMzss=; b=0kYEXWvd/3Oj04gucV3mLzucA5eGbhdYLH1vpHty7GAwhxA31RDLu2Fx8+Nc5p1xek AQb+C0RStH2+oH2BK315/ftQuDEaCRFR/+BeqshzdPWBxW0InncKI1whgLzQXZBtmC/r +dYYXnj0VEM1xC4f2fId4DE6e3v1d0YSIkXc/R2wYCdG6ICRLHDbmyubVzdkhCPvL3Un LbzCFFLwWruu9g3m4Aw7EmlVZrBnqGMvaKiFm9hzP+P04XGZTzxIhOwhVcY0QFZ9fcDJ 4VRJn5EnqT2XvL+ORByTBXajBpTEOfyudyXcqzJnDHnAQWI5q4EEI5cDFjHX1Md2K/7K LNXw== X-Gm-Message-State: AOAM533T5dv//dJczNaxbNPIIuw0WhJL8vtE8mF1Qy4e7h4MfMRfH7Si 53Y6fuHPnNAOwKFyeruFKzanAdl1pq5qVg== X-Google-Smtp-Source: ABdhPJy3p0P3yK0qAKhHZzrN+TtEMiGFj0oEbC9lDWTQo+fhDAjJeUamZ15QaVdRi35xZ8CSJUrUUg== X-Received: by 2002:a05:600c:6011:b0:38e:bc5f:5197 with SMTP id az17-20020a05600c601100b0038ebc5f5197mr4327588wmb.37.1650468888124; Wed, 20 Apr 2022 08:34:48 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 27/34] meson, virtio: place all virtio-pci devices under virtio_pci_ss Date: Wed, 20 Apr 2022 17:34:00 +0200 Message-Id: <20220420153407.73926-28-pbonzini@redhat.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220420153407.73926-1-pbonzini@redhat.com> References: <20220420153407.73926-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::330; envelope-from=paolo.bonzini@gmail.com; helo=mail-wm1-x330.google.com 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.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1650471343204100001 Content-Type: text/plain; charset="utf-8" Since a sourceset already exists for this, avoid unnecessary repeat of CONFIG_VIRTIO_PCI. Signed-off-by: Paolo Bonzini --- hw/virtio/meson.build | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/hw/virtio/meson.build b/hw/virtio/meson.build index 67dc77e00f..f371404b04 100644 --- a/hw/virtio/meson.build +++ b/hw/virtio/meson.build @@ -16,9 +16,7 @@ virtio_ss.add(when: 'CONFIG_VHOST_USER', if_true: files('= vhost-user.c')) virtio_ss.add(when: 'CONFIG_VHOST_VDPA', if_true: files('vhost-shadow-virt= queue.c', 'vhost-vdpa.c')) virtio_ss.add(when: 'CONFIG_VIRTIO_BALLOON', if_true: files('virtio-balloo= n.c')) virtio_ss.add(when: 'CONFIG_VIRTIO_CRYPTO', if_true: files('virtio-crypto.= c')) -virtio_ss.add(when: ['CONFIG_VIRTIO_CRYPTO', 'CONFIG_VIRTIO_PCI'], if_true= : files('virtio-crypto-pci.c')) virtio_ss.add(when: 'CONFIG_VHOST_USER_FS', if_true: files('vhost-user-fs.= c')) -virtio_ss.add(when: ['CONFIG_VHOST_USER_FS', 'CONFIG_VIRTIO_PCI'], if_true= : files('vhost-user-fs-pci.c')) virtio_ss.add(when: 'CONFIG_VIRTIO_PMEM', if_true: files('virtio-pmem.c')) virtio_ss.add(when: 'CONFIG_VHOST_VSOCK', if_true: files('vhost-vsock.c', = 'vhost-vsock-common.c')) virtio_ss.add(when: 'CONFIG_VHOST_USER_VSOCK', if_true: files('vhost-user-= vsock.c', 'vhost-vsock-common.c')) @@ -26,17 +24,20 @@ virtio_ss.add(when: 'CONFIG_VIRTIO_RNG', if_true: files= ('virtio-rng.c')) virtio_ss.add(when: 'CONFIG_VIRTIO_IOMMU', if_true: files('virtio-iommu.c'= )) virtio_ss.add(when: 'CONFIG_VIRTIO_MEM', if_true: files('virtio-mem.c')) virtio_ss.add(when: 'CONFIG_VHOST_USER_I2C', if_true: files('vhost-user-i2= c.c')) -virtio_ss.add(when: ['CONFIG_VIRTIO_PCI', 'CONFIG_VHOST_USER_I2C'], if_tru= e: files('vhost-user-i2c-pci.c')) virtio_ss.add(when: 'CONFIG_VHOST_USER_RNG', if_true: files('vhost-user-rn= g.c')) -virtio_ss.add(when: ['CONFIG_VHOST_USER_RNG', 'CONFIG_VIRTIO_PCI'], if_tru= e: files('vhost-user-rng-pci.c')) =20 virtio_pci_ss =3D ss.source_set() virtio_pci_ss.add(when: 'CONFIG_VHOST_VSOCK', if_true: files('vhost-vsock-= pci.c')) virtio_pci_ss.add(when: 'CONFIG_VHOST_USER_VSOCK', if_true: files('vhost-u= ser-vsock-pci.c')) virtio_pci_ss.add(when: 'CONFIG_VHOST_USER_BLK', if_true: files('vhost-use= r-blk-pci.c')) +virtio_pci_ss.add(when: 'CONFIG_VHOST_USER_I2C', if_true: files('vhost-use= r-i2c-pci.c')) virtio_pci_ss.add(when: 'CONFIG_VHOST_USER_INPUT', if_true: files('vhost-u= ser-input-pci.c')) +virtio_pci_ss.add(when: 'CONFIG_VHOST_USER_RNG', if_true: files('vhost-use= r-rng-pci.c')) virtio_pci_ss.add(when: 'CONFIG_VHOST_USER_SCSI', if_true: files('vhost-us= er-scsi-pci.c')) virtio_pci_ss.add(when: 'CONFIG_VHOST_SCSI', if_true: files('vhost-scsi-pc= i.c')) +virtio_pci_ss.add(when: 'CONFIG_VHOST_USER_FS', if_true: files('vhost-user= -fs-pci.c')) + +virtio_pci_ss.add(when: 'CONFIG_VIRTIO_CRYPTO', if_true: files('virtio-cry= pto-pci.c')) virtio_pci_ss.add(when: 'CONFIG_VIRTIO_INPUT_HOST', if_true: files('virtio= -input-host-pci.c')) virtio_pci_ss.add(when: 'CONFIG_VIRTIO_INPUT', if_true: files('virtio-inpu= t-pci.c')) virtio_pci_ss.add(when: 'CONFIG_VIRTIO_RNG', if_true: files('virtio-rng-pc= i.c')) --=20 2.35.1 From nobody Thu May 2 03:23:26 2024 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1650471395180164.49063616367232; Wed, 20 Apr 2022 09:16:35 -0700 (PDT) Received: from localhost ([::1]:41232 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nhD0M-0000yi-7B for importer@patchew.org; Wed, 20 Apr 2022 12:16:34 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43016) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nhCM1-00022N-9M for qemu-devel@nongnu.org; Wed, 20 Apr 2022 11:34:53 -0400 Received: from mail-wr1-x433.google.com ([2a00:1450:4864:20::433]:38418) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nhCLz-00010T-CJ for qemu-devel@nongnu.org; Wed, 20 Apr 2022 11:34:52 -0400 Received: by mail-wr1-x433.google.com with SMTP id p18so2794134wru.5 for ; Wed, 20 Apr 2022 08:34:50 -0700 (PDT) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id n68-20020a1c2747000000b0038e6b4d5395sm130401wmn.16.2022.04.20.08.34.48 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Apr 2022 08:34:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=g1KejnVJLrfokiOJb3NlMQTXKsZ5iS+WOPbTY2BhmKU=; b=B/nCqM1PyrL3QG6AJIuMB9CpPwoQOri+MTqOBx+cV/9gsi94rUrdUkT/fFaLzXcpIl 3lkLcHNZuBSaeMx3gDNoliA60BdRQ0qfY3rrhOq9DSa55cwTQ91S7p4E4/uD8KzEg13x zZR7yfaOjtXKM58Tg308W0CW5zijRCgbfS0PblUnR5DLUDBkUx/X3X+Fa7VAr8VmAIYA N4HJRGYW92qwO5mJ2ma2vdSwftMVfMpu6NXIt2DyuwjgiAL+fQxdmg2Jjq7uTp1H7/xs 4rfEqO/ucAyxIN9O0ilNeu+MndrvhFWloxtNqmvPtjq4bqAMfhyaaHeeuET7kfSNwAhv 601w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=g1KejnVJLrfokiOJb3NlMQTXKsZ5iS+WOPbTY2BhmKU=; b=UO+iyUhbpZ083D1euK8K1+XzpBTKNg5/JhoEsB1keUJIeggiq7VA+2DtKEWfiD8DAT l56q4USTQ/tAcIyeNLVLAr7Cy2B5Qaaxp/wJMegQDHVTyRywi22X1l8OB7/YeekfV6bZ JNyAeIDpDophOnYN2/T50M5SXDKvtI0Mmof09zmONUyvKQ8P7dLhPQ0gixta3kZdgffu meOdZBCSQruh3tWogwG1MSwBKLR3JiHH3wnJh+XoqrCGmdvc3kLpj0BEPYQypF/j3XcD j9sA6ApEPAiyRYA+necZaqUd/+jdkvpxH9f8N3urv2xnQgp5U9aKidow1l9zAiDnweMU ebKQ== X-Gm-Message-State: AOAM532iwHeoBwr9HRONDkptaqSy7X1kLkDnAwF7Nlz6pU978bDGg5K6 zxmUVC64Q5FY16KBN6KoBy+nREyQYtPmfw== X-Google-Smtp-Source: ABdhPJwAwkRAoiMLfbD5ZeyfjrtyCHB+abD/pxyF6RgQ5OtmDuqJo3LxQHy3Z4bEDuWQie5+b6mN3A== X-Received: by 2002:a5d:4d91:0:b0:207:ac32:cffb with SMTP id b17-20020a5d4d91000000b00207ac32cffbmr16166481wru.644.1650468890005; Wed, 20 Apr 2022 08:34:50 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 28/34] configure: simplify vhost-net-{user, vdpa} configuration Date: Wed, 20 Apr 2022 17:34:01 +0200 Message-Id: <20220420153407.73926-29-pbonzini@redhat.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220420153407.73926-1-pbonzini@redhat.com> References: <20220420153407.73926-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::433; envelope-from=paolo.bonzini@gmail.com; helo=mail-wr1-x433.google.com 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.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1650471395486100001 Content-Type: text/plain; charset="utf-8" Cleanup to ease review of the conversion to meson. vhost_net_user and vhost_net_vdpa are never assigned anything in the command line parsing loop, so they are always equal to $vhost_user and $vhost_vdpa. Signed-off-by: Paolo Bonzini --- configure | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/configure b/configure index 61b5acae10..2aa4dc3ce1 100755 --- a/configure +++ b/configure @@ -1554,10 +1554,6 @@ if test "$vhost_vsock" =3D "yes" && test "$vhost_ker= nel" !=3D "yes"; then fi =20 # vhost-user backends -test "$vhost_net_user" =3D "" && vhost_net_user=3D$vhost_user -if test "$vhost_net_user" =3D "yes" && test "$vhost_user" =3D "no"; then - error_exit "--enable-vhost-net-user requires --enable-vhost-user" -fi test "$vhost_crypto" =3D "" && vhost_crypto=3D$vhost_user if test "$vhost_crypto" =3D "yes" && test "$vhost_user" =3D "no"; then error_exit "--enable-vhost-crypto requires --enable-vhost-user" @@ -1566,16 +1562,11 @@ test "$vhost_user_fs" =3D "" && vhost_user_fs=3D$vh= ost_user if test "$vhost_user_fs" =3D "yes" && test "$vhost_user" =3D "no"; then error_exit "--enable-vhost-user-fs requires --enable-vhost-user" fi -#vhost-vdpa backends -test "$vhost_net_vdpa" =3D "" && vhost_net_vdpa=3D$vhost_vdpa -if test "$vhost_net_vdpa" =3D "yes" && test "$vhost_vdpa" =3D "no"; then - error_exit "--enable-vhost-net-vdpa requires --enable-vhost-vdpa" -fi =20 # OR the vhost-kernel, vhost-vdpa and vhost-user values for simplicity if test "$vhost_net" =3D ""; then - test "$vhost_net_user" =3D "yes" && vhost_net=3Dyes - test "$vhost_net_vdpa" =3D "yes" && vhost_net=3Dyes + test "$vhost_user" =3D "yes" && vhost_net=3Dyes + test "$vhost_vdpa" =3D "yes" && vhost_net=3Dyes test "$vhost_kernel" =3D "yes" && vhost_net=3Dyes fi =20 @@ -2104,10 +2095,10 @@ fi if test "$vhost_net" =3D "yes" ; then echo "CONFIG_VHOST_NET=3Dy" >> $config_host_mak fi -if test "$vhost_net_user" =3D "yes" ; then +if test "$vhost_user" =3D "yes" ; then echo "CONFIG_VHOST_NET_USER=3Dy" >> $config_host_mak fi -if test "$vhost_net_vdpa" =3D "yes" ; then +if test "$vhost_vdpa" =3D "yes" ; then echo "CONFIG_VHOST_NET_VDPA=3Dy" >> $config_host_mak fi if test "$vhost_crypto" =3D "yes" ; then --=20 2.35.1 From nobody Thu May 2 03:23:26 2024 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1650471573485531.7920892711927; Wed, 20 Apr 2022 09:19:33 -0700 (PDT) Received: from localhost ([::1]:49766 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nhD3E-0006yX-Ez for importer@patchew.org; Wed, 20 Apr 2022 12:19:32 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43074) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nhCM5-00029I-7G for qemu-devel@nongnu.org; Wed, 20 Apr 2022 11:34:58 -0400 Received: from mail-wr1-x42a.google.com ([2a00:1450:4864:20::42a]:43988) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nhCM2-00011D-7N for qemu-devel@nongnu.org; Wed, 20 Apr 2022 11:34:56 -0400 Received: by mail-wr1-x42a.google.com with SMTP id g18so2768215wrb.10 for ; Wed, 20 Apr 2022 08:34:53 -0700 (PDT) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id n68-20020a1c2747000000b0038e6b4d5395sm130401wmn.16.2022.04.20.08.34.50 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Apr 2022 08:34:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=X6YeEYNXxiEZk3H4p+EBnu8YAIb1J5C6cGP3OatBH70=; b=Kyj7QMoK/+la7pQzkxx/b1P8uzJvfPvPBFW7jy+5SlpWYe1vFbEVDVgU/SfHW8Ry+7 Hf/ejQZC3qx9KU1AJlFLOvbr1pu/tUFAC5ZPmyA9c4rRjFeyz1F23a+KZkf3inQv6y2W w7drb94Tt7h0gXlIycChfv4sKGK14iycsWKaRe4IqeF/ld04CP7IuAPL6hb52noyajz/ EKrSThscKA7ZOnidqDFgzLCbD30MkvKIIvg98ctYQ3vGi4xw+5ysXn72Egz2WCnbze8H tvKUe8CF+n3XvbhaCf44NLtVf/UxZ/KTITIDpLGd/bx3EgP6w2d0m8ioDSRb5AJsvD9V tQFQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=X6YeEYNXxiEZk3H4p+EBnu8YAIb1J5C6cGP3OatBH70=; b=jIKVuclt08xBJAXQRqhTg8dLD2rLyrpqUjRqLK/Yaif3HMifgUq57HLd5Bl01IWz9g E6/5L5hEgcW3R6t/RzpFjpFQBT/j5OGA21UWT17dbtm1oyQf0pr0Q+TS/FdgpHAW1XAP F4pVJsAAH3FqNc5w/J6sx9gOPM9bwx4RmNuHo4mcwe7qyMBeG7BIMdEwXRi7dgagMKEv JGJRjjQ454BvW1RMlTj2BxzbUcvK4W9VA7DiNuM/kzYEu/ggoukGyPUuQXn3OG4LgFQp mNYnYeyzxQBaxTxRZIv+wBJkmIjWAsTaC7NmNH3tqZCbZaVNQcBi5dEOBbbvMmtf8WAe njRA== X-Gm-Message-State: AOAM532LQWrOmM0JSnDa/a1RiQb5TxeQYvSEVlMUv5A85O1tHnvzNWfT Xq0j9/6+HuIyYSj/eQuZoToyuI7aw1WNhQ== X-Google-Smtp-Source: ABdhPJw/jjA2FUmub25Fg1cgT8Nbk2RHF8XzEIYuCm104YO0vJyd9IXekQohkm4FxvZHd6A2c1ClBw== X-Received: by 2002:a05:6000:144a:b0:20a:a329:aa46 with SMTP id v10-20020a056000144a00b0020aa329aa46mr8116528wrx.36.1650468892595; Wed, 20 Apr 2022 08:34:52 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 29/34] build: move vhost-vsock configuration to Kconfig Date: Wed, 20 Apr 2022 17:34:02 +0200 Message-Id: <20220420153407.73926-30-pbonzini@redhat.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220420153407.73926-1-pbonzini@redhat.com> References: <20220420153407.73926-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::42a; envelope-from=paolo.bonzini@gmail.com; helo=mail-wr1-x42a.google.com 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.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1650471574617100001 Content-Type: text/plain; charset="utf-8" vhost-vsock and vhost-user-vsock are two devices of their own; it should be possible to enable/disable them with --without-default-devices, not --without-default-features. Compute their default value in Kconfig to obtain the more intuitive behavior. Signed-off-by: Paolo Bonzini Reviewed-by: Marc-Andr=C3=A9 Lureau --- configure | 16 ---------------- hw/virtio/Kconfig | 10 ++++++++++ meson.build | 1 - 3 files changed, 10 insertions(+), 17 deletions(-) diff --git a/configure b/configure index 2aa4dc3ce1..a3b57877e5 100755 --- a/configure +++ b/configure @@ -286,7 +286,6 @@ vhost_kernel=3D"$default_feature" vhost_net=3D"$default_feature" vhost_crypto=3D"$default_feature" vhost_scsi=3D"$default_feature" -vhost_vsock=3D"$default_feature" vhost_user=3D"no" vhost_user_fs=3D"$default_feature" vhost_vdpa=3D"$default_feature" @@ -878,10 +877,6 @@ for opt do ;; --enable-vhost-scsi) vhost_scsi=3D"yes" ;; - --disable-vhost-vsock) vhost_vsock=3D"no" - ;; - --enable-vhost-vsock) vhost_vsock=3D"yes" - ;; --disable-vhost-user-fs) vhost_user_fs=3D"no" ;; --enable-vhost-user-fs) vhost_user_fs=3D"yes" @@ -1108,7 +1103,6 @@ cat << EOF safe-stack SafeStack Stack Smash Protection. Depends on clang/llvm >=3D 3.7 and requires coroutine backend ucont= ext. vhost-net vhost-net kernel acceleration support - vhost-vsock virtio sockets device support vhost-scsi vhost-scsi kernel target support vhost-crypto vhost-user-crypto backend support vhost-kernel vhost kernel backend support @@ -1548,10 +1542,6 @@ test "$vhost_scsi" =3D "" && vhost_scsi=3D$vhost_ker= nel if test "$vhost_scsi" =3D "yes" && test "$vhost_kernel" !=3D "yes"; then error_exit "--enable-vhost-scsi requires --enable-vhost-kernel" fi -test "$vhost_vsock" =3D "" && vhost_vsock=3D$vhost_kernel -if test "$vhost_vsock" =3D "yes" && test "$vhost_kernel" !=3D "yes"; then - error_exit "--enable-vhost-vsock requires --enable-vhost-kernel" -fi =20 # vhost-user backends test "$vhost_crypto" =3D "" && vhost_crypto=3D$vhost_user @@ -2104,12 +2094,6 @@ fi if test "$vhost_crypto" =3D "yes" ; then echo "CONFIG_VHOST_CRYPTO=3Dy" >> $config_host_mak fi -if test "$vhost_vsock" =3D "yes" ; then - echo "CONFIG_VHOST_VSOCK=3Dy" >> $config_host_mak - if test "$vhost_user" =3D "yes" ; then - echo "CONFIG_VHOST_USER_VSOCK=3Dy" >> $config_host_mak - fi -fi if test "$vhost_kernel" =3D "yes" ; then echo "CONFIG_VHOST_KERNEL=3Dy" >> $config_host_mak fi diff --git a/hw/virtio/Kconfig b/hw/virtio/Kconfig index c144d42f9b..b642ae1081 100644 --- a/hw/virtio/Kconfig +++ b/hw/virtio/Kconfig @@ -59,6 +59,16 @@ config VIRTIO_MEM depends on VIRTIO_MEM_SUPPORTED select MEM_DEVICE =20 +config VHOST_VSOCK + bool + default y + depends on VIRTIO && VHOST_KERNEL + +config VHOST_USER_VSOCK + bool + default y + depends on VIRTIO && VHOST_USER + config VHOST_USER_I2C bool default y diff --git a/meson.build b/meson.build index ff5c076805..033d0c9aa1 100644 --- a/meson.build +++ b/meson.build @@ -3678,7 +3678,6 @@ summary_info +=3D {'vhost-kernel support': config_hos= t.has_key('CONFIG_VHOST_KERNE summary_info +=3D {'vhost-net support': config_host.has_key('CONFIG_VHOST_= NET')} summary_info +=3D {'vhost-crypto support': config_host.has_key('CONFIG_VHO= ST_CRYPTO')} summary_info +=3D {'vhost-scsi support': config_host.has_key('CONFIG_VHOST= _SCSI')} -summary_info +=3D {'vhost-vsock support': config_host.has_key('CONFIG_VHOS= T_VSOCK')} summary_info +=3D {'vhost-user support': config_host.has_key('CONFIG_VHOST= _USER')} summary_info +=3D {'vhost-user-blk server support': have_vhost_user_blk_se= rver} summary_info +=3D {'vhost-user-fs support': config_host.has_key('CONFIG_VH= OST_USER_FS')} --=20 2.35.1 From nobody Thu May 2 03:23:26 2024 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1650471815534596.936820847287; Wed, 20 Apr 2022 09:23:35 -0700 (PDT) Received: from localhost ([::1]:58300 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nhD78-0004T9-Dh for importer@patchew.org; Wed, 20 Apr 2022 12:23:34 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43084) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nhCM5-00029M-ON for qemu-devel@nongnu.org; Wed, 20 Apr 2022 11:34:58 -0400 Received: from mail-wr1-x431.google.com ([2a00:1450:4864:20::431]:43995) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nhCM3-00011k-Um for qemu-devel@nongnu.org; Wed, 20 Apr 2022 11:34:57 -0400 Received: by mail-wr1-x431.google.com with SMTP id g18so2768337wrb.10 for ; Wed, 20 Apr 2022 08:34:55 -0700 (PDT) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id n68-20020a1c2747000000b0038e6b4d5395sm130401wmn.16.2022.04.20.08.34.53 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Apr 2022 08:34:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=tklFHVdjTCpGYEV3/SiOWASQte8kP1y3oT2mjbpxLNc=; b=n9Rgwkl6rAhbJgk7g0KN6M/9lycDUF3G26QSeA0dIPCeVCVB7PB48SmO3Biwc051Xv /pAX2WN+j8X+Cos1KgusreVKf9w9NZ1X/7MRSyJBgT+iE0JSVMGamwnh6qLVh1z7qTqU zr1z+y/gTRVwitevfoKeLyOQtnTf5bwsfcuLsxdS0x8fhdiFJpK171Ev8JPE869twM8C ABG2brcY2ggO5wC6SrVpxApDQxDWIHVBp2Z72qabINRs8e3Ek80V8ANF4sNEciiAMKy6 PcwuUcfU6Zn+1xcAVrv/kaRMsD3S32pubhgWM8AN/Lqx680+0ZUIzWkexHaOdNyAIUjS cvWg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=tklFHVdjTCpGYEV3/SiOWASQte8kP1y3oT2mjbpxLNc=; b=XRuZtp9jCqaLj7ycAPxXR+7dM0NHpLHa6CbH80/zi4x8vBh/vWzazBh73nLXbcrSIK OdzrAJDrXQqae4kSJ0uVeUZJ6g1fT+lOJ2iqB3HhG8rIcLxBKkIrPQokx39HDg6iqBtk z4c0QPKXeAgP71djppthQUD7gpsoE1qol2Psh02zY9x8CPCqPjT67E1LY2L4784pkQu+ 14RiOjg6ASf7Y6dEJmTK3yLftYymgJJqczDnrIrN/EZQZGlYsf2WRiqR1+efFdlShiEc Ih0KLl2H3qKTVYXsmAKo7Hs3cewsbCv5QSmIU3lu7QHVyT5VDy56w7OtP2A90DBmaIuU oGMw== X-Gm-Message-State: AOAM5305CcRuiuX7JDYVRDKzpMy3ar1ThUcOCLeZUf5k4G+Ka6b7RXPR +60xqFpVfq7wodxzdN8n35Ve7a/rih39TQ== X-Google-Smtp-Source: ABdhPJxb0RZX/4mA3c5AoxNX7Ig/u7OTWm1wRJ0C1twDCRjb11l0lm+RIiaT9P6QlE5E/DjjVLestA== X-Received: by 2002:adf:eece:0:b0:20a:7bc8:d51 with SMTP id a14-20020adfeece000000b0020a7bc80d51mr16837761wrp.339.1650468894590; Wed, 20 Apr 2022 08:34:54 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 30/34] build: move vhost-scsi configuration to Kconfig Date: Wed, 20 Apr 2022 17:34:03 +0200 Message-Id: <20220420153407.73926-31-pbonzini@redhat.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220420153407.73926-1-pbonzini@redhat.com> References: <20220420153407.73926-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::431; envelope-from=paolo.bonzini@gmail.com; helo=mail-wr1-x431.google.com 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.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1650471815861100001 Content-Type: text/plain; charset="utf-8" vhost-scsi and vhost-user-scsi are two devices of their own; it should be possible to enable/disable them with --without-default-devices, not --without-default-features. Compute their default value in Kconfig to obtain the more intuitive behavior. Signed-off-by: Paolo Bonzini Reviewed-by: Marc-Andr=C3=A9 Lureau --- configure | 15 --------------- hw/scsi/Kconfig | 5 +++++ include/hw/virtio/virtio-scsi.h | 2 -- meson.build | 1 - 4 files changed, 5 insertions(+), 18 deletions(-) diff --git a/configure b/configure index a3b57877e5..65ae2c0c1f 100755 --- a/configure +++ b/configure @@ -285,7 +285,6 @@ EXTRA_LDFLAGS=3D"" vhost_kernel=3D"$default_feature" vhost_net=3D"$default_feature" vhost_crypto=3D"$default_feature" -vhost_scsi=3D"$default_feature" vhost_user=3D"no" vhost_user_fs=3D"$default_feature" vhost_vdpa=3D"$default_feature" @@ -873,10 +872,6 @@ for opt do ;; --enable-vhost-crypto) vhost_crypto=3D"yes" ;; - --disable-vhost-scsi) vhost_scsi=3D"no" - ;; - --enable-vhost-scsi) vhost_scsi=3D"yes" - ;; --disable-vhost-user-fs) vhost_user_fs=3D"no" ;; --enable-vhost-user-fs) vhost_user_fs=3D"yes" @@ -1103,7 +1098,6 @@ cat << EOF safe-stack SafeStack Stack Smash Protection. Depends on clang/llvm >=3D 3.7 and requires coroutine backend ucont= ext. vhost-net vhost-net kernel acceleration support - vhost-scsi vhost-scsi kernel target support vhost-crypto vhost-user-crypto backend support vhost-kernel vhost kernel backend support vhost-user vhost-user backend support @@ -1537,12 +1531,6 @@ if test "$vhost_kernel" =3D "yes" && test "$linux" != =3D "yes"; then error_exit "vhost-kernel is only available on Linux" fi =20 -# vhost-kernel devices -test "$vhost_scsi" =3D "" && vhost_scsi=3D$vhost_kernel -if test "$vhost_scsi" =3D "yes" && test "$vhost_kernel" !=3D "yes"; then - error_exit "--enable-vhost-scsi requires --enable-vhost-kernel" -fi - # vhost-user backends test "$vhost_crypto" =3D "" && vhost_crypto=3D$vhost_user if test "$vhost_crypto" =3D "yes" && test "$vhost_user" =3D "no"; then @@ -2079,9 +2067,6 @@ if test "$modules" =3D "yes"; then echo "CONFIG_MODULES=3Dy" >> $config_host_mak fi =20 -if test "$vhost_scsi" =3D "yes" ; then - echo "CONFIG_VHOST_SCSI=3Dy" >> $config_host_mak -fi if test "$vhost_net" =3D "yes" ; then echo "CONFIG_VHOST_NET=3Dy" >> $config_host_mak fi diff --git a/hw/scsi/Kconfig b/hw/scsi/Kconfig index 77d397c949..e7b34dc8e2 100644 --- a/hw/scsi/Kconfig +++ b/hw/scsi/Kconfig @@ -48,6 +48,11 @@ config VIRTIO_SCSI depends on VIRTIO select SCSI =20 +config VHOST_SCSI + bool + default y + depends on VIRTIO && VHOST_KERNEL + config VHOST_USER_SCSI bool # Only PCI devices are provided for now diff --git a/include/hw/virtio/virtio-scsi.h b/include/hw/virtio/virtio-scs= i.h index 543681bc18..0997313f0a 100644 --- a/include/hw/virtio/virtio-scsi.h +++ b/include/hw/virtio/virtio-scsi.h @@ -55,10 +55,8 @@ struct VirtIOSCSIConf { bool seg_max_adjust; uint32_t max_sectors; uint32_t cmd_per_lun; -#ifdef CONFIG_VHOST_SCSI char *vhostfd; char *wwpn; -#endif CharBackend chardev; uint32_t boot_tpgt; IOThread *iothread; diff --git a/meson.build b/meson.build index 033d0c9aa1..b18731ee84 100644 --- a/meson.build +++ b/meson.build @@ -3677,7 +3677,6 @@ summary_info +=3D {'QOM debugging': get_option('q= om_cast_debug')} summary_info +=3D {'vhost-kernel support': config_host.has_key('CONFIG_VHO= ST_KERNEL')} summary_info +=3D {'vhost-net support': config_host.has_key('CONFIG_VHOST_= NET')} summary_info +=3D {'vhost-crypto support': config_host.has_key('CONFIG_VHO= ST_CRYPTO')} -summary_info +=3D {'vhost-scsi support': config_host.has_key('CONFIG_VHOST= _SCSI')} summary_info +=3D {'vhost-user support': config_host.has_key('CONFIG_VHOST= _USER')} summary_info +=3D {'vhost-user-blk server support': have_vhost_user_blk_se= rver} summary_info +=3D {'vhost-user-fs support': config_host.has_key('CONFIG_VH= OST_USER_FS')} --=20 2.35.1 From nobody Thu May 2 03:23:26 2024 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1650471951600293.79923069033396; Wed, 20 Apr 2022 09:25:51 -0700 (PDT) Received: from localhost ([::1]:38676 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nhD9K-0002Dt-4j for importer@patchew.org; Wed, 20 Apr 2022 12:25:50 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43104) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nhCM6-0002Av-OI for qemu-devel@nongnu.org; Wed, 20 Apr 2022 11:35:00 -0400 Received: from mail-wr1-x42a.google.com ([2a00:1450:4864:20::42a]:42919) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nhCM5-00011u-5R for qemu-devel@nongnu.org; Wed, 20 Apr 2022 11:34:58 -0400 Received: by mail-wr1-x42a.google.com with SMTP id bv16so2769089wrb.9 for ; Wed, 20 Apr 2022 08:34:56 -0700 (PDT) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id n68-20020a1c2747000000b0038e6b4d5395sm130401wmn.16.2022.04.20.08.34.54 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Apr 2022 08:34:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=p9QVfTgIB1vwAMcs7awvqyPjLD3CHyqK31FD2jUQMSE=; b=S7lKrZJWJYw1cuBOueiC2sIvvlg0m6wPUlnq5GtOwNzvf/XWOZiadHTqnRQI4Lvbb2 DhzhUpqe+kMvl8SkZwNrW/jW/NfF2arYXy7zSgLgz1XFwy4k9Z4DATKicTKXHIQtK9QU q+UDBFGSSHZ7gHi0NCC16pgCCImcOWaVvlXCAKpYAhYZPLpLtE0NIUr94UWpcc3VVWQB Mbh8N1Q3x+2qGN9l+YeD83ICdmf/bTDqBdLHz9/pIbmvZ172rFH3R1h/UoSr37NgL5rd WR4j78td1qSigpJ+YKmo4KbinZx29YgUhU2dxNX/DePMM8Ev828QIOKV1pkJ8yWRU1m/ IxtA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=p9QVfTgIB1vwAMcs7awvqyPjLD3CHyqK31FD2jUQMSE=; b=vLqKfJmM9rPFbplnlJ2WS0YTD+ndmoBEQgXKjIH7ddusDoBcxtsaVBCjIm0tJEmtoP HL5dvfKuWz1QP3fOhC0Ws8YGMfs6u48n9gqnZ5D7FbTJpfxfDPhjlpZQBzmTNxr8I4Ud /wzHclW7HiT8j26AueD9e+WA0z/i1v1ZzjlIQOWE6PD/DRYEIILA3FK/nl39IpXkH6co zEI3wGY0yi/a41pXVM1PWhGHpf0NE+YMtwPXxdOnPeWfN4kWZC8fViHQUz4RUb2rSiZy vUYjCfVEzzc7tk7eYr/XPxERKkyl+Ev+kO9po1dks9oWnnWq8W+0vItpo754ZmTJkE/D o4dQ== X-Gm-Message-State: AOAM531XCpJQZE4lSGOzTex58d9B68bGja+Ygw23qI30e08F7Q0FE2qy Za/xhZIh4YGzHb4UaoDsSDdCYygmbH+ZPw== X-Google-Smtp-Source: ABdhPJwIR3jyEs4FOaU9PPZKtqm9MIFOEs8y6xSOmhb1ePrbVUvlvIkUx3bJEjie7eGEjSkP6v967A== X-Received: by 2002:adf:f783:0:b0:207:a8ce:c155 with SMTP id q3-20020adff783000000b00207a8cec155mr16100705wrp.258.1650468895850; Wed, 20 Apr 2022 08:34:55 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 31/34] build: move vhost-user-fs configuration to Kconfig Date: Wed, 20 Apr 2022 17:34:04 +0200 Message-Id: <20220420153407.73926-32-pbonzini@redhat.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220420153407.73926-1-pbonzini@redhat.com> References: <20220420153407.73926-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::42a; envelope-from=paolo.bonzini@gmail.com; helo=mail-wr1-x42a.google.com 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.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1650471952450100001 Content-Type: text/plain; charset="utf-8" vhost-user-fs is a device and it should be possible to enable/disable it with --without-default-devices, not --without-default-features. Compute its default value in Kconfig to obtain the more intuitive behavior. In this case the configure options were undocumented, too. Signed-off-by: Paolo Bonzini Reviewed-by: Marc-Andr=C3=A9 Lureau --- configure | 12 ------------ hw/virtio/Kconfig | 5 +++++ meson.build | 1 - 3 files changed, 5 insertions(+), 13 deletions(-) diff --git a/configure b/configure index 65ae2c0c1f..3b38ff3c63 100755 --- a/configure +++ b/configure @@ -286,7 +286,6 @@ vhost_kernel=3D"$default_feature" vhost_net=3D"$default_feature" vhost_crypto=3D"$default_feature" vhost_user=3D"no" -vhost_user_fs=3D"$default_feature" vhost_vdpa=3D"$default_feature" debug_tcg=3D"no" sanitizers=3D"no" @@ -872,10 +871,6 @@ for opt do ;; --enable-vhost-crypto) vhost_crypto=3D"yes" ;; - --disable-vhost-user-fs) vhost_user_fs=3D"no" - ;; - --enable-vhost-user-fs) vhost_user_fs=3D"yes" - ;; --disable-zlib-test) ;; --disable-virtio-blk-data-plane|--enable-virtio-blk-data-plane) @@ -1536,10 +1531,6 @@ test "$vhost_crypto" =3D "" && vhost_crypto=3D$vhost= _user if test "$vhost_crypto" =3D "yes" && test "$vhost_user" =3D "no"; then error_exit "--enable-vhost-crypto requires --enable-vhost-user" fi -test "$vhost_user_fs" =3D "" && vhost_user_fs=3D$vhost_user -if test "$vhost_user_fs" =3D "yes" && test "$vhost_user" =3D "no"; then - error_exit "--enable-vhost-user-fs requires --enable-vhost-user" -fi =20 # OR the vhost-kernel, vhost-vdpa and vhost-user values for simplicity if test "$vhost_net" =3D ""; then @@ -2088,9 +2079,6 @@ fi if test "$vhost_vdpa" =3D "yes" ; then echo "CONFIG_VHOST_VDPA=3Dy" >> $config_host_mak fi -if test "$vhost_user_fs" =3D "yes" ; then - echo "CONFIG_VHOST_USER_FS=3Dy" >> $config_host_mak -fi =20 # XXX: suppress that if [ "$bsd" =3D "yes" ] ; then diff --git a/hw/virtio/Kconfig b/hw/virtio/Kconfig index b642ae1081..f8e235f814 100644 --- a/hw/virtio/Kconfig +++ b/hw/virtio/Kconfig @@ -78,3 +78,8 @@ config VHOST_USER_RNG bool default y depends on VIRTIO && VHOST_USER + +config VHOST_USER_FS + bool + default y + depends on VIRTIO && VHOST_USER diff --git a/meson.build b/meson.build index b18731ee84..870dd8dee0 100644 --- a/meson.build +++ b/meson.build @@ -3679,7 +3679,6 @@ summary_info +=3D {'vhost-net support': config_host.h= as_key('CONFIG_VHOST_NET')} summary_info +=3D {'vhost-crypto support': config_host.has_key('CONFIG_VHO= ST_CRYPTO')} summary_info +=3D {'vhost-user support': config_host.has_key('CONFIG_VHOST= _USER')} summary_info +=3D {'vhost-user-blk server support': have_vhost_user_blk_se= rver} -summary_info +=3D {'vhost-user-fs support': config_host.has_key('CONFIG_VH= OST_USER_FS')} summary_info +=3D {'vhost-vdpa support': config_host.has_key('CONFIG_VHOST= _VDPA')} summary_info +=3D {'build guest agent': have_ga} summary(summary_info, bool_yn: true, section: 'Configurable features') --=20 2.35.1 From nobody Thu May 2 03:23:26 2024 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1650471492858721.0975915712819; Wed, 20 Apr 2022 09:18:12 -0700 (PDT) Received: from localhost ([::1]:46454 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nhD1v-0004Yw-Rz for importer@patchew.org; Wed, 20 Apr 2022 12:18:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43188) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nhCMC-0002G1-VC for qemu-devel@nongnu.org; Wed, 20 Apr 2022 11:35:05 -0400 Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]:46956) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nhCMB-00013K-6z for qemu-devel@nongnu.org; Wed, 20 Apr 2022 11:35:04 -0400 Received: by mail-wm1-x334.google.com with SMTP id l62-20020a1c2541000000b0038e4570af2fso1481777wml.5 for ; Wed, 20 Apr 2022 08:35:02 -0700 (PDT) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id n68-20020a1c2747000000b0038e6b4d5395sm130401wmn.16.2022.04.20.08.34.56 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Apr 2022 08:35:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=/0zAoQsiX4u9I3ungDt9Q7kGOaiqUTIxH9IA1KKGoWo=; b=pLMQzdvUReYOZkqdYcjo+EhZ3IJ6ybMMxAUraYXTaTVtM+gcorc+zHSa2/kR+RSWpi hnPFg4+ehAihwoUAQWjShVkJOqzJQcOOXoqbgvu22YHRnOQVvr9d7MTOSffkKL1J4Pbp OiiV6Kj6LoCd57+XadFZj5a1YPkWCUn0D/qGN5W3mfESyIh7QL6wti/gbmRpHZ/IRPs+ Qg3UgO/W5arSRAXjycMGIFAZzxcuA2rhq1pMZIheuLUrDA1BV7vEZx2u7E9bc9eqP3iB 8dwKmbFNactXS0qErKG0fdtxInghmXpJ1wF5NcQ1Z+zBUY4DLM0fW0D4tPKcIpy0mF0X GtMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=/0zAoQsiX4u9I3ungDt9Q7kGOaiqUTIxH9IA1KKGoWo=; b=ePhUhtFpDOKjPXD+ehGSmaOOswwoD8Sbh+4bIFa0VFgD2UaA74t5xHHfEOnZ7yZGeq hUg6kcGKUIgIaUSaalmCr8BCnhF4UcW/zWtN7kfNdp6pbK4BR8UTerAWFsZFcQR9/Bqu My6rUX9AffIf03uWvf8ICf/ixkAFab/ogl8Y5iIdGl9XMlbfxN28WdpSnZ3qr9RDT/4/ ESty9YccHTYAucEmxqcSXIFpiIQTcieJkRA70xyvsiCu9qED8cChqBoTuPFm52C4uHtf efu/8PYMZtkAPN7K98mMJuLjwSt+Dxp3MBwIKepbSCxUacOdxK2qMxUA8ZL3hdbMtOVv Xqfg== X-Gm-Message-State: AOAM530f3bbh420n5aZIXLI/yE3PD3dOeHffV9zevsUwYvbYUGW0Vux1 nDMDC7r/AIIGHSpl11NHPAZtzRpSiytvcQ== X-Google-Smtp-Source: ABdhPJwfYQFMZrJxhrfDxAx8GUN1KagNaa13qrtk95doznt4TYrR1DgFb603PUfpKoI3mbsCg8sryw== X-Received: by 2002:a05:600c:4f55:b0:38f:f897:28d1 with SMTP id m21-20020a05600c4f5500b0038ff89728d1mr4363672wmq.97.1650468901516; Wed, 20 Apr 2022 08:35:01 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 32/34] meson: create have_vhost_* variables Date: Wed, 20 Apr 2022 17:34:05 +0200 Message-Id: <20220420153407.73926-33-pbonzini@redhat.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220420153407.73926-1-pbonzini@redhat.com> References: <20220420153407.73926-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::334; envelope-from=paolo.bonzini@gmail.com; helo=mail-wm1-x334.google.com 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.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1650471494328100001 Content-Type: text/plain; charset="utf-8" When using Meson options rather than config-host.h, the "when" clauses have to be changed to if statements (which is not necessarily great, though at least it highlights which parts of the build are per-target and which are not). Do that before moving vhost logic to meson.build, though for now the variables are just based on config-host.mak data. Signed-off-by: Paolo Bonzini Reviewed-by: Marc-Andr=C3=A9 Lureau --- meson.build | 31 ++++++++++++++++++++----------- tests/meson.build | 2 +- tools/meson.build | 2 +- 3 files changed, 22 insertions(+), 13 deletions(-) diff --git a/meson.build b/meson.build index 870dd8dee0..5b5eb442c4 100644 --- a/meson.build +++ b/meson.build @@ -312,6 +312,15 @@ have_tpm =3D get_option('tpm') \ .require(targetos !=3D 'windows', error_message: 'TPM emulation only ava= ilable on POSIX systems') \ .allowed() =20 +# vhost +have_vhost_user =3D 'CONFIG_VHOST_USER' in config_host +have_vhost_vdpa =3D 'CONFIG_VHOST_VDPA' in config_host +have_vhost_kernel =3D 'CONFIG_VHOST_KERNEL' in config_host +have_vhost_net_user =3D 'CONFIG_VHOST_NET_USER' in config_host +have_vhost_net_vdpa =3D 'CONFIG_VHOST_NET_VDPA' in config_host +have_vhost_net =3D 'CONFIG_VHOST_NET' in config_host +have_vhost_user_crypto =3D 'CONFIG_VHOST_CRYPTO' in config_host + # Target-specific libraries and flags libm =3D cc.find_library('m', required: false) threads =3D dependency('threads') @@ -1440,7 +1449,7 @@ has_statx_mnt_id =3D cc.links(statx_mnt_id_test) have_vhost_user_blk_server =3D get_option('vhost_user_blk_server') \ .require(targetos =3D=3D 'linux', error_message: 'vhost_user_blk_server requires linux') \ - .require('CONFIG_VHOST_USER' in config_host, + .require(have_vhost_user, error_message: 'vhost_user_blk_server requires vhost-user suppo= rt') \ .disable_auto_if(not have_system) \ .allowed() @@ -2283,9 +2292,9 @@ host_kconfig =3D \ (have_ivshmem ? ['CONFIG_IVSHMEM=3Dy'] : []) + \ (opengl.found() ? ['CONFIG_OPENGL=3Dy'] : []) + \ (x11.found() ? ['CONFIG_X11=3Dy'] : []) + \ - ('CONFIG_VHOST_USER' in config_host ? ['CONFIG_VHOST_USER=3Dy'] : []) + \ - ('CONFIG_VHOST_VDPA' in config_host ? ['CONFIG_VHOST_VDPA=3Dy'] : []) + \ - ('CONFIG_VHOST_KERNEL' in config_host ? ['CONFIG_VHOST_KERNEL=3Dy'] : []= ) + \ + (have_vhost_user ? ['CONFIG_VHOST_USER=3Dy'] : []) + \ + (have_vhost_vdpa ? ['CONFIG_VHOST_VDPA=3Dy'] : []) + \ + (have_vhost_kernel ? ['CONFIG_VHOST_KERNEL=3Dy'] : []) + \ (have_virtfs ? ['CONFIG_VIRTFS=3Dy'] : []) + \ ('CONFIG_LINUX' in config_host ? ['CONFIG_LINUX=3Dy'] : []) + \ (have_pvrdma ? ['CONFIG_PVRDMA=3Dy'] : []) + \ @@ -2967,7 +2976,7 @@ if have_system or have_user endif =20 vhost_user =3D not_found -if targetos =3D=3D 'linux' and 'CONFIG_VHOST_USER' in config_host +if targetos =3D=3D 'linux' and have_vhost_user libvhost_user =3D subproject('libvhost-user') vhost_user =3D libvhost_user.get_variable('vhost_user_dep') endif @@ -3548,7 +3557,7 @@ if have_tools dependencies: qemuutil, install: true) =20 - if 'CONFIG_VHOST_USER' in config_host + if have_vhost_user subdir('contrib/vhost-user-blk') subdir('contrib/vhost-user-gpu') subdir('contrib/vhost-user-input') @@ -3674,12 +3683,12 @@ if 'simple' in get_option('trace_backends') endif summary_info +=3D {'D-Bus display': dbus_display} summary_info +=3D {'QOM debugging': get_option('qom_cast_debug')} -summary_info +=3D {'vhost-kernel support': config_host.has_key('CONFIG_VHO= ST_KERNEL')} -summary_info +=3D {'vhost-net support': config_host.has_key('CONFIG_VHOST_= NET')} -summary_info +=3D {'vhost-crypto support': config_host.has_key('CONFIG_VHO= ST_CRYPTO')} -summary_info +=3D {'vhost-user support': config_host.has_key('CONFIG_VHOST= _USER')} +summary_info +=3D {'vhost-kernel support': have_vhost_kernel} +summary_info +=3D {'vhost-net support': have_vhost_net} +summary_info +=3D {'vhost-user support': have_vhost_user} +summary_info +=3D {'vhost-user-crypto support': have_vhost_user_crypto} summary_info +=3D {'vhost-user-blk server support': have_vhost_user_blk_se= rver} -summary_info +=3D {'vhost-vdpa support': config_host.has_key('CONFIG_VHOST= _VDPA')} +summary_info +=3D {'vhost-vdpa support': have_vhost_vdpa} summary_info +=3D {'build guest agent': have_ga} summary(summary_info, bool_yn: true, section: 'Configurable features') =20 diff --git a/tests/meson.build b/tests/meson.build index 4f691e8465..8e318ec513 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -68,7 +68,7 @@ test_deps =3D { 'test-qht-par': qht_bench, } =20 -if have_tools and 'CONFIG_VHOST_USER' in config_host and 'CONFIG_LINUX' in= config_host +if have_tools and have_vhost_user and 'CONFIG_LINUX' in config_host executable('vhost-user-bridge', sources: files('vhost-user-bridge.c'), dependencies: [qemuutil, vhost_user]) diff --git a/tools/meson.build b/tools/meson.build index 46977af84f..10eb3a043f 100644 --- a/tools/meson.build +++ b/tools/meson.build @@ -3,7 +3,7 @@ have_virtiofsd =3D get_option('virtiofsd') \ error_message: 'virtiofsd requires Linux') \ .require(seccomp.found() and libcap_ng.found(), error_message: 'virtiofsd requires libcap-ng-devel and seccom= p-devel') \ - .require('CONFIG_VHOST_USER' in config_host, + .require(have_vhost_user, error_message: 'virtiofsd needs vhost-user-support') \ .disable_auto_if(not have_tools and not have_system) \ .allowed() --=20 2.35.1 From nobody Thu May 2 03:23:26 2024 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 165047209162142.319255756598636; Wed, 20 Apr 2022 09:28:11 -0700 (PDT) Received: from localhost ([::1]:47166 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nhDBa-0000hu-F3 for importer@patchew.org; Wed, 20 Apr 2022 12:28:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43218) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nhCME-0002Hk-KR for qemu-devel@nongnu.org; Wed, 20 Apr 2022 11:35:09 -0400 Received: from mail-wr1-x436.google.com ([2a00:1450:4864:20::436]:40724) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nhCMC-00018L-Hp for qemu-devel@nongnu.org; Wed, 20 Apr 2022 11:35:06 -0400 Received: by mail-wr1-x436.google.com with SMTP id q3so2783368wrj.7 for ; Wed, 20 Apr 2022 08:35:04 -0700 (PDT) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id n68-20020a1c2747000000b0038e6b4d5395sm130401wmn.16.2022.04.20.08.35.02 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Apr 2022 08:35:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=+6ZkuzqAW7XzSCHZAbJfxFks6O2HlpyCDll10dAbzlo=; b=WKc/0wGfgCOc9elbOzvyptyjMOBvKw9HhIMLbqKhJmvot/zC2u3twmzku96KSqUSHK BSz7WnTkVeXOcFHk/Nr1+aUtoI6LEhU4C3oyPa2pSZmEzsSsqBlR4jm/FRJwfMBkCEft JRVWAkrm2U87aF3aXKUbaIZ4zzxMwgxji/lkqlN4oSFvJqRq467gi+6wwP4P0xnBRCvO Khorn3+V8GuNKUFip5CcYM4iNylxNerLK2ME736hzwl8/DtBcddkkU3B57n5awlaVwAW I650bySgavmopph6JKd+8gJD6XHx8M2JBQ1UTjPG5QmP++c9pLBgNXHGWbExEs4DyYVs RGjw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=+6ZkuzqAW7XzSCHZAbJfxFks6O2HlpyCDll10dAbzlo=; b=EQ91++9h5ufNqiKF6h4/mVSzP18GdDkaIfiKjaUn7nrD9QMFiD6U2EOIELMGyw+olm kt+9D5OPdIDmxn8yNSXWKQwDLIb7p9OVJFXlvMoTM1cr0jrgc5ohCpirwjSADUre0Map 6PSIOV1BDmI6454n/54uJCykCw9tA1XxB72fH2yYCRYF0kFBcUPXWCyhGZjltT1zihpB dqgv0SlHuHtlrs1K5F0yn740X4TYLX4F6CMUunmvWcw3r1OtlqhwwlKakt4YT/KPQHGH lIZzo9Y7Eg23Lmi0GDeIVZoK/DKjPWN6Lqg6fDqZ6acZNNs9w9VwCnZuzhUuDiPlZMFZ UsCA== X-Gm-Message-State: AOAM5325U50u4dKpjsIhJAbkf3qXJ0ShyGgN9UQ+E0JPrrVIXxteNxmv POjmeXru0pbTBvdnOks7JWuc/gXpelCSRQ== X-Google-Smtp-Source: ABdhPJynYmSm/p3HMJ71m74kT1w46WBjUUKGObyipk5+W0eZQD7dsuXu+7U+7cIgW5F4RSMqzb2e8Q== X-Received: by 2002:a05:6000:1a86:b0:20a:a933:ba16 with SMTP id f6-20020a0560001a8600b0020aa933ba16mr5927534wry.583.1650468903237; Wed, 20 Apr 2022 08:35:03 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 33/34] meson: use have_vhost_* variables to pick sources Date: Wed, 20 Apr 2022 17:34:06 +0200 Message-Id: <20220420153407.73926-34-pbonzini@redhat.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220420153407.73926-1-pbonzini@redhat.com> References: <20220420153407.73926-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::436; envelope-from=paolo.bonzini@gmail.com; helo=mail-wr1-x436.google.com 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.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1650472093036100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Paolo Bonzini Reviewed-by: Marc-Andr=C3=A9 Lureau --- Kconfig.host | 3 --- backends/meson.build | 8 ++++++-- hw/net/meson.build | 8 ++++++-- hw/virtio/Kconfig | 3 --- hw/virtio/meson.build | 25 ++++++++++++++++--------- meson.build | 1 + net/meson.build | 12 +++++++----- tests/qtest/meson.build | 4 +++- 8 files changed, 39 insertions(+), 25 deletions(-) diff --git a/Kconfig.host b/Kconfig.host index 60b9c07b5e..1165c4eacd 100644 --- a/Kconfig.host +++ b/Kconfig.host @@ -22,15 +22,12 @@ config TPM =20 config VHOST_USER bool - select VHOST =20 config VHOST_VDPA bool - select VHOST =20 config VHOST_KERNEL bool - select VHOST =20 config VIRTFS bool diff --git a/backends/meson.build b/backends/meson.build index 535c3ca7dd..b1884a88ec 100644 --- a/backends/meson.build +++ b/backends/meson.build @@ -12,9 +12,13 @@ softmmu_ss.add([files( softmmu_ss.add(when: 'CONFIG_POSIX', if_true: files('rng-random.c')) softmmu_ss.add(when: 'CONFIG_POSIX', if_true: files('hostmem-file.c')) softmmu_ss.add(when: 'CONFIG_LINUX', if_true: files('hostmem-memfd.c')) -softmmu_ss.add(when: ['CONFIG_VHOST_USER', 'CONFIG_VIRTIO'], if_true: file= s('vhost-user.c')) +if have_vhost_user + softmmu_ss.add(when: 'CONFIG_VIRTIO', if_true: files('vhost-user.c')) +endif softmmu_ss.add(when: 'CONFIG_VIRTIO_CRYPTO', if_true: files('cryptodev-vho= st.c')) -softmmu_ss.add(when: ['CONFIG_VIRTIO_CRYPTO', 'CONFIG_VHOST_CRYPTO'], if_t= rue: files('cryptodev-vhost-user.c')) +if have_vhost_user_crypto + softmmu_ss.add(when: 'CONFIG_VIRTIO_CRYPTO', if_true: files('cryptodev-v= host-user.c')) +endif softmmu_ss.add(when: gio, if_true: files('dbus-vmstate.c')) softmmu_ss.add(when: 'CONFIG_SGX', if_true: files('hostmem-epc.c')) =20 diff --git a/hw/net/meson.build b/hw/net/meson.build index 685b75badb..ebac261542 100644 --- a/hw/net/meson.build +++ b/hw/net/meson.build @@ -46,8 +46,12 @@ specific_ss.add(when: 'CONFIG_XILINX_ETHLITE', if_true: = files('xilinx_ethlite.c' softmmu_ss.add(when: 'CONFIG_VIRTIO_NET', if_true: files('net_rx_pkt.c')) specific_ss.add(when: 'CONFIG_VIRTIO_NET', if_true: files('virtio-net.c')) =20 -softmmu_ss.add(when: ['CONFIG_VIRTIO_NET', 'CONFIG_VHOST_NET'], if_true: f= iles('vhost_net.c'), if_false: files('vhost_net-stub.c')) -softmmu_ss.add(when: 'CONFIG_ALL', if_true: files('vhost_net-stub.c')) +if have_vhost_net + softmmu_ss.add(when: 'CONFIG_VIRTIO_NET', if_true: files('vhost_net.c'),= if_false: files('vhost_net-stub.c')) + softmmu_ss.add(when: 'CONFIG_ALL', if_true: files('vhost_net-stub.c')) +else + softmmu_ss.add(files('vhost_net-stub.c')) +endif =20 softmmu_ss.add(when: 'CONFIG_ETSEC', if_true: files( 'fsl_etsec/etsec.c', diff --git a/hw/virtio/Kconfig b/hw/virtio/Kconfig index f8e235f814..e9ecae1f50 100644 --- a/hw/virtio/Kconfig +++ b/hw/virtio/Kconfig @@ -1,6 +1,3 @@ -config VHOST - bool - config VIRTIO bool =20 diff --git a/hw/virtio/meson.build b/hw/virtio/meson.build index f371404b04..7e8877fd64 100644 --- a/hw/virtio/meson.build +++ b/hw/virtio/meson.build @@ -2,18 +2,22 @@ softmmu_virtio_ss =3D ss.source_set() softmmu_virtio_ss.add(files('virtio-bus.c')) softmmu_virtio_ss.add(when: 'CONFIG_VIRTIO_PCI', if_true: files('virtio-pc= i.c')) softmmu_virtio_ss.add(when: 'CONFIG_VIRTIO_MMIO', if_true: files('virtio-m= mio.c')) -softmmu_virtio_ss.add(when: 'CONFIG_VHOST', if_false: files('vhost-stub.c'= )) - -softmmu_ss.add_all(when: 'CONFIG_VIRTIO', if_true: softmmu_virtio_ss) -softmmu_ss.add(when: 'CONFIG_VIRTIO', if_false: files('vhost-stub.c')) - -softmmu_ss.add(when: 'CONFIG_ALL', if_true: files('vhost-stub.c')) =20 virtio_ss =3D ss.source_set() virtio_ss.add(files('virtio.c')) -virtio_ss.add(when: 'CONFIG_VHOST', if_true: files('vhost.c', 'vhost-backe= nd.c', 'vhost-iova-tree.c')) -virtio_ss.add(when: 'CONFIG_VHOST_USER', if_true: files('vhost-user.c')) -virtio_ss.add(when: 'CONFIG_VHOST_VDPA', if_true: files('vhost-shadow-virt= queue.c', 'vhost-vdpa.c')) + +if have_vhost + virtio_ss.add(files('vhost.c', 'vhost-backend.c', 'vhost-iova-tree.c')) + if have_vhost_user + virtio_ss.add(files('vhost-user.c')) + endif + if have_vhost_vdpa + virtio_ss.add(files('vhost-vdpa.c', 'vhost-shadow-virtqueue.c')) + endif +else + softmmu_virtio_ss.add(files('vhost-stub.c')) +endif + virtio_ss.add(when: 'CONFIG_VIRTIO_BALLOON', if_true: files('virtio-balloo= n.c')) virtio_ss.add(when: 'CONFIG_VIRTIO_CRYPTO', if_true: files('virtio-crypto.= c')) virtio_ss.add(when: 'CONFIG_VHOST_USER_FS', if_true: files('vhost-user-fs.= c')) @@ -54,3 +58,6 @@ virtio_pci_ss.add(when: 'CONFIG_VIRTIO_MEM', if_true: fil= es('virtio-mem-pci.c')) virtio_ss.add_all(when: 'CONFIG_VIRTIO_PCI', if_true: virtio_pci_ss) =20 specific_ss.add_all(when: 'CONFIG_VIRTIO', if_true: virtio_ss) +softmmu_ss.add_all(when: 'CONFIG_VIRTIO', if_true: softmmu_virtio_ss) +softmmu_ss.add(when: 'CONFIG_VIRTIO', if_false: files('vhost-stub.c')) +softmmu_ss.add(when: 'CONFIG_ALL', if_true: files('vhost-stub.c')) diff --git a/meson.build b/meson.build index 5b5eb442c4..e8446cf148 100644 --- a/meson.build +++ b/meson.build @@ -319,6 +319,7 @@ have_vhost_kernel =3D 'CONFIG_VHOST_KERNEL' in config_h= ost have_vhost_net_user =3D 'CONFIG_VHOST_NET_USER' in config_host have_vhost_net_vdpa =3D 'CONFIG_VHOST_NET_VDPA' in config_host have_vhost_net =3D 'CONFIG_VHOST_NET' in config_host +have_vhost =3D have_vhost_user or have_vhost_vdpa or have_vhost_kernel have_vhost_user_crypto =3D 'CONFIG_VHOST_CRYPTO' in config_host =20 # Target-specific libraries and flags diff --git a/net/meson.build b/net/meson.build index 847bc2ac85..c965e83b26 100644 --- a/net/meson.build +++ b/net/meson.build @@ -26,10 +26,10 @@ softmmu_ss.add(when: vde, if_true: files('vde.c')) if have_netmap softmmu_ss.add(files('netmap.c')) endif -vhost_user_ss =3D ss.source_set() -vhost_user_ss.add(when: 'CONFIG_VIRTIO_NET', if_true: files('vhost-user.c'= ), if_false: files('vhost-user-stub.c')) -softmmu_ss.add_all(when: 'CONFIG_VHOST_NET_USER', if_true: vhost_user_ss) -softmmu_ss.add(when: 'CONFIG_ALL', if_true: files('vhost-user-stub.c')) +if have_vhost_net_user + softmmu_ss.add(when: 'CONFIG_VIRTIO_NET', if_true: files('vhost-user.c')= , if_false: files('vhost-user-stub.c')) + softmmu_ss.add(when: 'CONFIG_ALL', if_true: files('vhost-user-stub.c')) +endif =20 softmmu_ss.add(when: 'CONFIG_LINUX', if_true: files('tap-linux.c')) softmmu_ss.add(when: 'CONFIG_BSD', if_true: files('tap-bsd.c')) @@ -40,6 +40,8 @@ if not config_host.has_key('CONFIG_LINUX') and not config= _host.has_key('CONFIG_B endif softmmu_ss.add(when: 'CONFIG_POSIX', if_true: files(tap_posix)) softmmu_ss.add(when: 'CONFIG_WIN32', if_true: files('tap-win32.c')) -softmmu_ss.add(when: 'CONFIG_VHOST_NET_VDPA', if_true: files('vhost-vdpa.c= ')) +if have_vhost_net_vdpa + softmmu_ss.add(files('vhost-vdpa.c')) +endif =20 subdir('can') diff --git a/tests/qtest/meson.build b/tests/qtest/meson.build index 69f97b8992..2f2f08b442 100644 --- a/tests/qtest/meson.build +++ b/tests/qtest/meson.build @@ -272,7 +272,9 @@ qos_test_ss.add( if have_virtfs qos_test_ss.add(files('virtio-9p-test.c')) endif -qos_test_ss.add(when: 'CONFIG_VHOST_USER', if_true: files('vhost-user-test= .c')) +if have_vhost_user + qos_test_ss.add(files('vhost-user-test.c')) +endif if have_tools and have_vhost_user_blk_server qos_test_ss.add(files('vhost-user-blk-test.c')) endif --=20 2.35.1 From nobody Thu May 2 03:23:26 2024 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 16504708892057.674598634856238; Wed, 20 Apr 2022 09:08:09 -0700 (PDT) Received: from localhost ([::1]:47158 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nhCsB-0002ba-Jz for importer@patchew.org; Wed, 20 Apr 2022 12:08:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43234) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nhCMF-0002Hv-AP for qemu-devel@nongnu.org; Wed, 20 Apr 2022 11:35:09 -0400 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]:46918) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nhCMD-0001EE-Am for qemu-devel@nongnu.org; Wed, 20 Apr 2022 11:35:07 -0400 Received: by mail-wr1-x434.google.com with SMTP id i20so2762416wrb.13 for ; Wed, 20 Apr 2022 08:35:04 -0700 (PDT) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id n68-20020a1c2747000000b0038e6b4d5395sm130401wmn.16.2022.04.20.08.35.03 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Apr 2022 08:35:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=YSYuTZG+yEFPvaSlzv/t+2s4oVasaVP1l7P3dJgKuZw=; b=qSh0/+0N8+38yyeKF2gcjGJPbE/hLYfU1xnckxzPaYfYx1vmAJ20oAxeGpxhP3KAtf 0BTFdQBZsnlpG6DnBSb6WbbeixTvHqB4AwK6COCwEDnbPVf/7mJWQCm+6lihdBc/+7uU OMe3X04G1whDNHbNRGP2LVort+lAmO4NhuAfktnyb74Uy4fYGl2DGW9mgaRcedbMsr1v klUa0mA+OTWgubj56hPjKXgXTDYsAxYTUGSjadvszEbqUR2kDC5SyUdZg8dKPcdaKuU6 7xzEwwJXZVJV5hXjlO+DfCQLLNtr+NKzzg6clcOsP0aqKEIesGZsLhqIM2wvzrgaAl0f ky2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=YSYuTZG+yEFPvaSlzv/t+2s4oVasaVP1l7P3dJgKuZw=; b=4FHgtis9aZyOMxe1E1E+fHCWoTQou9PVkbnZjsqC0Fzeu7FfLf42CobOl8sndOBSTT nlpQstplf3sqLqwbOoudl6YWyoQ7RlHEu/v/38dSKFAFSJ2AXtMHiDxOJvhqmYFpP4gK 9eJaIpf9l9AFgMlSzSiAlPfntXeMbaSGpjz3azN+je0wWxKl+3zQe81qpQ+1LPdcmpGW BParDp9IstVOGPbC0Y1QZQ14aUGHyXkX9dJ4gP/DBZTM8Odax92qXR/Xvg57gvmzHAD8 MnyY1Cr83tLVh6DPBPnwTU63gNKnSz72skkH6zs7hoNOD2QYxzE9X0ZKVQLTosZ9mkP6 uWjQ== X-Gm-Message-State: AOAM530x/2vLzHWiITQuBiZ6l6wf1FNQ9oKRcxb/B9t9BlUxAkwmO7OE QJgKEB4uPtKHO2SyieGltWgRJ6yUpxKDLA== X-Google-Smtp-Source: ABdhPJwOiZhv2Werrodu0jiDSY4IG3rskKFC5G+e1fJE6MfNqml5NlqFRHW/+YdrssEs2tiOXMoz1Q== X-Received: by 2002:a05:6000:1e0e:b0:207:bb61:78d0 with SMTP id bj14-20020a0560001e0e00b00207bb6178d0mr16503209wrb.512.1650468904022; Wed, 20 Apr 2022 08:35:04 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 34/34] configure, meson: move vhost options to Meson Date: Wed, 20 Apr 2022 17:34:07 +0200 Message-Id: <20220420153407.73926-35-pbonzini@redhat.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220420153407.73926-1-pbonzini@redhat.com> References: <20220420153407.73926-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::434; envelope-from=paolo.bonzini@gmail.com; helo=mail-wr1-x434.google.com 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.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1650470889814100001 Content-Type: text/plain; charset="utf-8" Finish the conversion by moving all the definitions and the constraint checks to meson_options.txt and meson.build respectively. Signed-off-by: Paolo Bonzini Reviewed-by: Marc-Andr=C3=A9 Lureau --- configure | 82 ----------------------------------- meson.build | 33 +++++++++++--- meson_options.txt | 10 +++++ scripts/meson-buildoptions.sh | 15 +++++++ 4 files changed, 51 insertions(+), 89 deletions(-) diff --git a/configure b/configure index 3b38ff3c63..0cedfcf5a9 100755 --- a/configure +++ b/configure @@ -282,11 +282,6 @@ EXTRA_CXXFLAGS=3D"" EXTRA_OBJCFLAGS=3D"" EXTRA_LDFLAGS=3D"" =20 -vhost_kernel=3D"$default_feature" -vhost_net=3D"$default_feature" -vhost_crypto=3D"$default_feature" -vhost_user=3D"no" -vhost_vdpa=3D"$default_feature" debug_tcg=3D"no" sanitizers=3D"no" tsan=3D"no" @@ -526,7 +521,6 @@ haiku) ;; linux) linux=3D"yes" - vhost_user=3D${default_feature:-yes} ;; esac =20 @@ -863,14 +857,6 @@ for opt do ;; --with-coroutine=3D*) coroutine=3D"$optarg" ;; - --disable-vhost-net) vhost_net=3D"no" - ;; - --enable-vhost-net) vhost_net=3D"yes" - ;; - --disable-vhost-crypto) vhost_crypto=3D"no" - ;; - --enable-vhost-crypto) vhost_crypto=3D"yes" - ;; --disable-zlib-test) ;; --disable-virtio-blk-data-plane|--enable-virtio-blk-data-plane) @@ -882,18 +868,6 @@ for opt do --enable-uuid|--disable-uuid) echo "$0: $opt is obsolete, UUID support is always built" >&2 ;; - --disable-vhost-user) vhost_user=3D"no" - ;; - --enable-vhost-user) vhost_user=3D"yes" - ;; - --disable-vhost-vdpa) vhost_vdpa=3D"no" - ;; - --enable-vhost-vdpa) vhost_vdpa=3D"yes" - ;; - --disable-vhost-kernel) vhost_kernel=3D"no" - ;; - --enable-vhost-kernel) vhost_kernel=3D"yes" - ;; --disable-capstone) capstone=3D"disabled" ;; --enable-capstone) capstone=3D"enabled" @@ -1092,11 +1066,6 @@ cat << EOF debug-info debugging information safe-stack SafeStack Stack Smash Protection. Depends on clang/llvm >=3D 3.7 and requires coroutine backend ucont= ext. - vhost-net vhost-net kernel acceleration support - vhost-crypto vhost-user-crypto backend support - vhost-kernel vhost kernel backend support - vhost-user vhost-user backend support - vhost-vdpa vhost-vdpa kernel backend support =20 NOTE: The object files are built at the place where configure is launched EOF @@ -1510,35 +1479,6 @@ else exit 1 fi =20 -######################################### -# vhost interdependencies and host support - -# vhost backends -if test "$vhost_user" =3D "yes" && test "$mingw32" =3D "yes"; then - error_exit "vhost-user is not available on Windows" -fi -test "$vhost_vdpa" =3D "" && vhost_vdpa=3D$linux -if test "$vhost_vdpa" =3D "yes" && test "$linux" !=3D "yes"; then - error_exit "vhost-vdpa is only available on Linux" -fi -test "$vhost_kernel" =3D "" && vhost_kernel=3D$linux -if test "$vhost_kernel" =3D "yes" && test "$linux" !=3D "yes"; then - error_exit "vhost-kernel is only available on Linux" -fi - -# vhost-user backends -test "$vhost_crypto" =3D "" && vhost_crypto=3D$vhost_user -if test "$vhost_crypto" =3D "yes" && test "$vhost_user" =3D "no"; then - error_exit "--enable-vhost-crypto requires --enable-vhost-user" -fi - -# OR the vhost-kernel, vhost-vdpa and vhost-user values for simplicity -if test "$vhost_net" =3D ""; then - test "$vhost_user" =3D "yes" && vhost_net=3Dyes - test "$vhost_vdpa" =3D "yes" && vhost_net=3Dyes - test "$vhost_kernel" =3D "yes" && vhost_net=3Dyes -fi - ########################################## # pkg-config probe =20 @@ -2058,28 +1998,6 @@ if test "$modules" =3D "yes"; then echo "CONFIG_MODULES=3Dy" >> $config_host_mak fi =20 -if test "$vhost_net" =3D "yes" ; then - echo "CONFIG_VHOST_NET=3Dy" >> $config_host_mak -fi -if test "$vhost_user" =3D "yes" ; then - echo "CONFIG_VHOST_NET_USER=3Dy" >> $config_host_mak -fi -if test "$vhost_vdpa" =3D "yes" ; then - echo "CONFIG_VHOST_NET_VDPA=3Dy" >> $config_host_mak -fi -if test "$vhost_crypto" =3D "yes" ; then - echo "CONFIG_VHOST_CRYPTO=3Dy" >> $config_host_mak -fi -if test "$vhost_kernel" =3D "yes" ; then - echo "CONFIG_VHOST_KERNEL=3Dy" >> $config_host_mak -fi -if test "$vhost_user" =3D "yes" ; then - echo "CONFIG_VHOST_USER=3Dy" >> $config_host_mak -fi -if test "$vhost_vdpa" =3D "yes" ; then - echo "CONFIG_VHOST_VDPA=3Dy" >> $config_host_mak -fi - # XXX: suppress that if [ "$bsd" =3D "yes" ] ; then echo "CONFIG_BSD=3Dy" >> $config_host_mak diff --git a/meson.build b/meson.build index e8446cf148..499082bf55 100644 --- a/meson.build +++ b/meson.build @@ -313,14 +313,26 @@ have_tpm =3D get_option('tpm') \ .allowed() =20 # vhost -have_vhost_user =3D 'CONFIG_VHOST_USER' in config_host -have_vhost_vdpa =3D 'CONFIG_VHOST_VDPA' in config_host -have_vhost_kernel =3D 'CONFIG_VHOST_KERNEL' in config_host -have_vhost_net_user =3D 'CONFIG_VHOST_NET_USER' in config_host -have_vhost_net_vdpa =3D 'CONFIG_VHOST_NET_VDPA' in config_host -have_vhost_net =3D 'CONFIG_VHOST_NET' in config_host +have_vhost_user =3D get_option('vhost_user') \ + .disable_auto_if(targetos !=3D 'linux') \ + .require(targetos !=3D 'windows', + error_message: 'vhost-user is not available on Windows').allowe= d() +have_vhost_vdpa =3D get_option('vhost_vdpa') \ + .require(targetos =3D=3D 'linux', + error_message: 'vhost-vdpa is only available on Linux').allowed= () +have_vhost_kernel =3D get_option('vhost_kernel') \ + .require(targetos =3D=3D 'linux', + error_message: 'vhost-kernel is only available on Linux').allow= ed() +have_vhost_user_crypto =3D get_option('vhost_crypto') \ + .require(have_vhost_user, + error_message: 'vhost-crypto requires vhost-user to be enabled'= ).allowed() + have_vhost =3D have_vhost_user or have_vhost_vdpa or have_vhost_kernel -have_vhost_user_crypto =3D 'CONFIG_VHOST_CRYPTO' in config_host + +have_vhost_net_user =3D have_vhost_user and get_option('vhost_net').allowe= d() +have_vhost_net_vdpa =3D have_vhost_vdpa and get_option('vhost_net').allowe= d() +have_vhost_net_kernel =3D have_vhost_kernel and get_option('vhost_net').al= lowed() +have_vhost_net =3D have_vhost_net_kernel or have_vhost_net_user or have_vh= ost_net_vdpa =20 # Target-specific libraries and flags libm =3D cc.find_library('m', required: false) @@ -1709,6 +1721,13 @@ config_host_data.set('CONFIG_SNAPPY', snappy.found()) config_host_data.set('CONFIG_TPM', have_tpm) config_host_data.set('CONFIG_USB_LIBUSB', libusb.found()) config_host_data.set('CONFIG_VDE', vde.found()) +config_host_data.set('CONFIG_VHOST_NET', have_vhost_net) +config_host_data.set('CONFIG_VHOST_NET_USER', have_vhost_net_user) +config_host_data.set('CONFIG_VHOST_NET_VDPA', have_vhost_net_vdpa) +config_host_data.set('CONFIG_VHOST_KERNEL', have_vhost_kernel) +config_host_data.set('CONFIG_VHOST_USER', have_vhost_user) +config_host_data.set('CONFIG_VHOST_CRYPTO', have_vhost_user_crypto) +config_host_data.set('CONFIG_VHOST_VDPA', have_vhost_vdpa) config_host_data.set('CONFIG_VHOST_USER_BLK_SERVER', have_vhost_user_blk_s= erver) config_host_data.set('CONFIG_VNC', vnc.found()) config_host_data.set('CONFIG_VNC_JPEG', jpeg.found()) diff --git a/meson_options.txt b/meson_options.txt index 8efd5f520c..24a2a593f0 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -235,6 +235,16 @@ option('oss', type: 'feature', value: 'auto', option('pa', type: 'feature', value: 'auto', description: 'PulseAudio sound support') =20 +option('vhost_kernel', type: 'feature', value: 'auto', + description: 'vhost kernel backend support') +option('vhost_net', type: 'feature', value: 'auto', + description: 'vhost-net kernel acceleration support') +option('vhost_user', type: 'feature', value: 'auto', + description: 'vhost-user backend support') +option('vhost_crypto', type: 'feature', value: 'auto', + description: 'vhost-user crypto backend support') +option('vhost_vdpa', type: 'feature', value: 'auto', + description: 'vhost-vdpa kernel backend support') option('vhost_user_blk_server', type: 'feature', value: 'auto', description: 'build vhost-user-blk server') option('virtfs', type: 'feature', value: 'auto', diff --git a/scripts/meson-buildoptions.sh b/scripts/meson-buildoptions.sh index 274639777e..28258e1478 100644 --- a/scripts/meson-buildoptions.sh +++ b/scripts/meson-buildoptions.sh @@ -153,8 +153,13 @@ meson_options_help() { printf "%s\n" ' usb-redir libusbredir support' printf "%s\n" ' vde vde network backend support' printf "%s\n" ' vdi vdi image format support' + printf "%s\n" ' vhost-crypto vhost-user crypto backend support' + printf "%s\n" ' vhost-kernel vhost kernel backend support' + printf "%s\n" ' vhost-net vhost-net kernel acceleration support' + printf "%s\n" ' vhost-user vhost-user backend support' printf "%s\n" ' vhost-user-blk-server' printf "%s\n" ' build vhost-user-blk server' + printf "%s\n" ' vhost-vdpa vhost-vdpa kernel backend support' printf "%s\n" ' virglrenderer virgl rendering support' printf "%s\n" ' virtfs virtio-9p support' printf "%s\n" ' virtiofsd build virtiofs daemon (virtiofsd)' @@ -407,8 +412,18 @@ _meson_option_parse() { --disable-vde) printf "%s" -Dvde=3Ddisabled ;; --enable-vdi) printf "%s" -Dvdi=3Denabled ;; --disable-vdi) printf "%s" -Dvdi=3Ddisabled ;; + --enable-vhost-crypto) printf "%s" -Dvhost_crypto=3Denabled ;; + --disable-vhost-crypto) printf "%s" -Dvhost_crypto=3Ddisabled ;; + --enable-vhost-kernel) printf "%s" -Dvhost_kernel=3Denabled ;; + --disable-vhost-kernel) printf "%s" -Dvhost_kernel=3Ddisabled ;; + --enable-vhost-net) printf "%s" -Dvhost_net=3Denabled ;; + --disable-vhost-net) printf "%s" -Dvhost_net=3Ddisabled ;; + --enable-vhost-user) printf "%s" -Dvhost_user=3Denabled ;; + --disable-vhost-user) printf "%s" -Dvhost_user=3Ddisabled ;; --enable-vhost-user-blk-server) printf "%s" -Dvhost_user_blk_server=3D= enabled ;; --disable-vhost-user-blk-server) printf "%s" -Dvhost_user_blk_server= =3Ddisabled ;; + --enable-vhost-vdpa) printf "%s" -Dvhost_vdpa=3Denabled ;; + --disable-vhost-vdpa) printf "%s" -Dvhost_vdpa=3Ddisabled ;; --enable-virglrenderer) printf "%s" -Dvirglrenderer=3Denabled ;; --disable-virglrenderer) printf "%s" -Dvirglrenderer=3Ddisabled ;; --enable-virtfs) printf "%s" -Dvirtfs=3Denabled ;; --=20 2.35.1