From nobody Sun May 5 15:06:46 2024 Delivered-To: importer2@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+importer2=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 1650718945418190.03799650231247; Sat, 23 Apr 2022 06:02:25 -0700 (PDT) Received: from localhost ([::1]:55684 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1niFP6-000756-AN for importer2@patchew.org; Sat, 23 Apr 2022 09:02:24 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42532) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1niFF4-0006RR-MC for qemu-devel@nongnu.org; Sat, 23 Apr 2022 08:52:02 -0400 Received: from mail-ej1-x632.google.com ([2a00:1450:4864:20::632]:36475) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1niFF3-00053A-2F for qemu-devel@nongnu.org; Sat, 23 Apr 2022 08:52:02 -0400 Received: by mail-ej1-x632.google.com with SMTP id k23so21199824ejd.3 for ; Sat, 23 Apr 2022 05:52:00 -0700 (PDT) Received: from avogadro.lan ([2001:b07:6468:f312:1c09:f536:3de6:228c]) by smtp.gmail.com with ESMTPSA id bo14-20020a170906d04e00b006ce98d9c3e3sm1655573ejb.194.2022.04.23.05.51.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 23 Apr 2022 05:51:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=KhMNiGQqmXEYFPC/2FWQjXDIZvCDcncp47pbV0qHXk4=; b=gwdMpgHvLxzf3olCcRZXpRP8jR0c3AtojmCKVLRctQ7APkCpY671XLLO7mjs7x7TOf gPgcNFASPPxpyDfDOz14F5GxkNhIde2cFqNQOQLNvuOAXsGOL1BHwdeglA60xvQvqPbt NW2M5eFL2it2J7CAg0zpoNi27DTW6UmbLKCewVttmN6ECgS5hJKvUl3ACC4rk0x7XtrJ simy7Yk7Ma+J1h6wbnfHudaV0Md9mmYFOXS0C/kIU+WLyUwQqC6pRiUPwpej367Q9Zq8 A9okExaJgCqKreybcfG53lx6JMJtpqplGg9hAdik/gNcpAbbpb6sssEVyxI+e4tHuiZk FP5A== 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:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=KhMNiGQqmXEYFPC/2FWQjXDIZvCDcncp47pbV0qHXk4=; b=C3ptFLbiuMWHS4YW0GsinAPCCtbWeW5G0wibXtqRCniXe/R2JQZy8ztRioNjeX5v/S n8IbScN+yUcv9ombp2LsrtqnAs7P8G2kwsgkc0+C+HY+wGFBP9gK+w0ymt1JySfEjO+n Mk4Yn0rtky0KaFt3y0rgJ+JL8qnfo8Wndxjl9q7zUe/l3fLQyedpIESeOBBp2vuog5rT B9o+9rZ0mwTyPYcMUZLuUrB4UJoH3ZdC851DuvD5hbAPTG0bBC9VkAL3yNtZMBAV3p1t 0TFstUTU3VdTl5chgiPTHLpNw4fzjLgWyQw+5ulC+8RHiC3Y4vNYFeMpaN/SfmfGXxLx gfCw== X-Gm-Message-State: AOAM533k/+XaAsNXCVxEUYAURvEAoNn4fuGFwE4yiPyIUzrk/T7CDs9g 8Oj6wcDiJOji0IQV5l89hETLLQClzgKu+w== X-Google-Smtp-Source: ABdhPJzGa8GMufnRkWb/26KYeDpOhUikPnpXgcKNl6USkIQ7tXpszsHAbV4V9Aa3Dvbv+DpT2nYmIA== X-Received: by 2002:a17:907:9811:b0:6e8:a1ac:c4be with SMTP id ji17-20020a170907981100b006e8a1acc4bemr8719130ejc.188.1650718318639; Sat, 23 Apr 2022 05:51:58 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH v2 01/34] meson: show final set of compiler flags Date: Sat, 23 Apr 2022 14:51:18 +0200 Message-Id: <20220423125151.27821-2-pbonzini@redhat.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220423125151.27821-1-pbonzini@redhat.com> References: <20220423125151.27821-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Type: text/plain 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+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::632; envelope-from=paolo.bonzini@gmail.com; helo=mail-ej1-x632.google.com X-Spam_score_int: -4 X-Spam_score: -0.5 X-Spam_bar: / X-Spam_report: (-0.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, PP_MIME_FAKE_ASCII_TEXT=0.999, 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: , Cc: marcandre.lureau@redhat.com Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1650718947007100001 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. Reviewed-by: Marc-Andr=C3=A9 Lureau Signed-off-by: Paolo Bonzini --- meson.build | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index d083c6b7bf..a9949ee9e2 100644 --- a/meson.build +++ b/meson.build @@ -3533,10 +3533,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 Sun May 5 15:06:46 2024 Delivered-To: importer2@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+importer2=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 1650718629134159.72178693128205; Sat, 23 Apr 2022 05:57:09 -0700 (PDT) Received: from localhost ([::1]:50260 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1niFK0-0003FP-4a for importer2@patchew.org; Sat, 23 Apr 2022 08:57:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42542) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1niFF5-0006UR-V4 for qemu-devel@nongnu.org; Sat, 23 Apr 2022 08:52:03 -0400 Received: from mail-ej1-x635.google.com ([2a00:1450:4864:20::635]:34606) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1niFF4-00053L-C1 for qemu-devel@nongnu.org; Sat, 23 Apr 2022 08:52:03 -0400 Received: by mail-ej1-x635.google.com with SMTP id ks6so21214824ejb.1 for ; Sat, 23 Apr 2022 05:52:01 -0700 (PDT) Received: from avogadro.lan ([2001:b07:6468:f312:1c09:f536:3de6:228c]) by smtp.gmail.com with ESMTPSA id bo14-20020a170906d04e00b006ce98d9c3e3sm1655573ejb.194.2022.04.23.05.51.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 23 Apr 2022 05:52:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=eWVoNFg17cglqQICzMxJj6RBiNCEoEjYKsESWBBr/7w=; b=JQwHKOyov7MwTbUaPA8mkpsnFxGI/ybnM5rAUh9MA2S+7u0Ed6CLwVMdWi9niFzr/v 5l9w5Q/jxPL/7Qk+baH/V9d/w48N8TepajxioMBrjmmLNEdD32tCQphvqLPatdvBr5JV Mu2ptylD6HI8QPRFPyJlFs1lsd/FnuuT/1efHa5smtGv8kcwhm+UU4J/4CPcvpqQFcg+ O5AHustv3ubM/iQkifrro0dQ9Yu9N0m1ur3b+SDY5CU4H6L9Lj0+D5fzoE6eK4ZaKCv7 iZKnm8I5I6ydQsWznOQ49Zdc5QRfNjoxu1RmO4+qF4hUEPNNMOqsR+oFVkZiXQhjVBSe +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:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=eWVoNFg17cglqQICzMxJj6RBiNCEoEjYKsESWBBr/7w=; b=YDLXXAvQmoK1xgjnguZKhObKUl5H0Iz6SoZAscJfbukAOvPMvZHodBRkaeec5mXqYs 1ZHg2YTqQrIMTGjGAKfDEWxYOXJC/aydZwZBn33kg6DmuI9fZg060LMn29H6lHd1gfB0 GwTEFwzHyzbOiBI9claBmqBLhXQ9UlEFZ6OHBz1NIAbpp/6D7ffvyore7eZNdG34kDlh jPalL3pC/vAkpFhQ9Hy01o9ltbnntKSSnHJISYSTRL0KNn8Y/43rhGsBHu8mcfOI82Nv ZUNyOlf5tPF+NwZ7KXLuaU5VnFIzunlPUzjqAaSSfpi6I8e2XXnpwCL08kEaWykbV7hu xiKg== X-Gm-Message-State: AOAM530xhjL0HOV+/SP0o4L3zwuut/BwTksVC5XIADDASpICU66TsIq0 uFmAHEbQwIcdWX8y7BKhyBx3g7kK7i7w7A== X-Google-Smtp-Source: ABdhPJwQJ57+j6cHmkPoaUqBbouENmP6e+zSwuLUzdrcapD3FwK+hHa/dPArB04pbx8A/KoUCzLJ+Q== X-Received: by 2002:a17:906:1be1:b0:6ce:b0a8:17d with SMTP id t1-20020a1709061be100b006ceb0a8017dmr8205700ejg.413.1650718320631; Sat, 23 Apr 2022 05:52:00 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH v2 02/34] configure: remove dead code Date: Sat, 23 Apr 2022 14:51:19 +0200 Message-Id: <20220423125151.27821-3-pbonzini@redhat.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220423125151.27821-1-pbonzini@redhat.com> References: <20220423125151.27821-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Type: text/plain 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+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::635; envelope-from=paolo.bonzini@gmail.com; helo=mail-ej1-x635.google.com X-Spam_score_int: -4 X-Spam_score: -0.5 X-Spam_bar: / X-Spam_report: (-0.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, PP_MIME_FAKE_ASCII_TEXT=0.999, 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: , Cc: marcandre.lureau@redhat.com Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1650718631334100001 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. Reviewed-by: Marc-Andr=C3=A9 Lureau Signed-off-by: Paolo Bonzini --- configure | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/configure b/configure index a4942c13e4..9e32c96fce 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 @@ -3024,7 +3019,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" @@ -3059,24 +3053,6 @@ done export target_list source_path use_containers cpu host_cc $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 Sun May 5 15:06:46 2024 Delivered-To: importer2@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+importer2=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 1650718583412432.067735315988; Sat, 23 Apr 2022 05:56:23 -0700 (PDT) Received: from localhost ([::1]:47452 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1niFJG-0001J4-Dp for importer2@patchew.org; Sat, 23 Apr 2022 08:56:22 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42564) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1niFF8-0006Zm-Kv for qemu-devel@nongnu.org; Sat, 23 Apr 2022 08:52:06 -0400 Received: from mail-ed1-x536.google.com ([2a00:1450:4864:20::536]:33592) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1niFF6-00053e-3u for qemu-devel@nongnu.org; Sat, 23 Apr 2022 08:52:05 -0400 Received: by mail-ed1-x536.google.com with SMTP id e30so9918734eda.0 for ; Sat, 23 Apr 2022 05:52:03 -0700 (PDT) Received: from avogadro.lan ([2001:b07:6468:f312:1c09:f536:3de6:228c]) by smtp.gmail.com with ESMTPSA id bo14-20020a170906d04e00b006ce98d9c3e3sm1655573ejb.194.2022.04.23.05.52.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 23 Apr 2022 05:52:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=875vs54jSlHP1j/ag97c6ycrMEKN/NuuwrYXpt6BYgw=; b=RF8cIkxNtN3mLWtQHrot5d/DpyYNzE5WesvKrzsNTI3FlWjLHBw4P0dCaYajfe4ZDQ XWGX5dj8ytKztYsw1vawITvHqtx449fJTD+n2lVLDwCXImktDaa1sIfgD9KuAzyiFg27 dkKVrKczJnqtcDtXYjOwg52xau2v9jiK+mqsA2J5I9VT4kmAyoWf/gKtaZyFDE6LOUDO Ml2nAALYzvkEj4nesSLetRL4q8jCsc9QTrr38VlbwIBc4NeNloPMXnfVDRRMnHacx7rG OtB1fu+z9m0cC82WDGlodosII5z/m+MEhMAMUiLIbYXmFHa52pO00MZSBMotThTgIJJ5 E7CQ== 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:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=875vs54jSlHP1j/ag97c6ycrMEKN/NuuwrYXpt6BYgw=; b=5XRUkPR/yIFHpHVMYcdOjaaEp14uNbCIsfup98nOCuYveKpFUvH1KTkPAkBv2uTpmq ka+yh97TH1XB9ssZN3/5aJQ2TzA12Oa54AEQ2wnJC8bbDkCumSxtC54MdkJ8g0bBq9w7 MNnCLGAhhn9SW+8uKFf3eR8Xx0zn1ENk0q4W5m5yFeHUvxDvCesZnbq/uKqBfVCIyBhK nEahdl2JQ2yWQSJfQ5CQBcOe1KlP78o5rD6Fjsz3A5lgIkQ7TdG7jR/z5o0UNMLAjyMU qpyTIJRfOBdVj4CCbrNR+Q98GhLRnqwoLlwATLnAr28A8+Vtnq1+IOR+5YYUEsO4Gsp/ c2mQ== X-Gm-Message-State: AOAM5338T/YUAu7vpiABqTd9hFvPah+9dALAnakm/s0e7j86yVt1Jy63 x4fEHbrkgGNnFtquWwr0dmu19c75VnOGWg== X-Google-Smtp-Source: ABdhPJy+KBfXq2ULAnr5bL49WeoUjzenLer3IRafZ+g6uIIN4JS3NflFw9HfiyEDVc3lLxwD9iS+Gw== X-Received: by 2002:aa7:c793:0:b0:408:4a69:90b4 with SMTP id n19-20020aa7c793000000b004084a6990b4mr10053630eds.58.1650718322624; Sat, 23 Apr 2022 05:52:02 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH v2 03/34] qga: wixl: get path to sysroot from pkg-config as intended Date: Sat, 23 Apr 2022 14:51:20 +0200 Message-Id: <20220423125151.27821-4-pbonzini@redhat.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220423125151.27821-1-pbonzini@redhat.com> References: <20220423125151.27821-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Type: text/plain 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+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::536; envelope-from=paolo.bonzini@gmail.com; helo=mail-ed1-x536.google.com X-Spam_score_int: -4 X-Spam_score: -0.5 X-Spam_bar: / X-Spam_report: (-0.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, PP_MIME_FAKE_ASCII_TEXT=0.999, 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: , Cc: marcandre.lureau@redhat.com Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1650718585128100001 The .wxs file uses $(var.Mingw_bin) while configure/meson have always used Mingw_dlls. Fix them to match what was probably intended. Reviewed-by: Marc-Andr=C3=A9 Lureau Signed-off-by: Paolo Bonzini --- configure | 4 ++-- qga/meson.build | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/configure b/configure index 9e32c96fce..049f669a94 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 Sun May 5 15:06:46 2024 Delivered-To: importer2@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+importer2=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 1650718948344473.447288506468; Sat, 23 Apr 2022 06:02:28 -0700 (PDT) Received: from localhost ([::1]:56070 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1niFP9-0007M0-3k for importer2@patchew.org; Sat, 23 Apr 2022 09:02:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42588) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1niFFA-0006dB-5i for qemu-devel@nongnu.org; Sat, 23 Apr 2022 08:52:08 -0400 Received: from mail-ej1-x632.google.com ([2a00:1450:4864:20::632]:43724) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1niFF8-00054B-PM for qemu-devel@nongnu.org; Sat, 23 Apr 2022 08:52:07 -0400 Received: by mail-ej1-x632.google.com with SMTP id m20so432868ejj.10 for ; Sat, 23 Apr 2022 05:52:06 -0700 (PDT) Received: from avogadro.lan ([2001:b07:6468:f312:1c09:f536:3de6:228c]) by smtp.gmail.com with ESMTPSA id bo14-20020a170906d04e00b006ce98d9c3e3sm1655573ejb.194.2022.04.23.05.52.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 23 Apr 2022 05:52:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=SfhKCmUO//k2KKxCugtKMMJyeYbHUaz7sxHNSvDAQHc=; b=WOelcUrtpQjjTL+OjYHy1a1eTTtvNuw9kedW7CTY/Nx2dHeyvEPdH4Sa3+DczETq96 r50ADoJ+T0fxZ6uqHzoxl2czLGSs2fHy2yH8ocRk1TCEGtgSWQkeiH+DQMVOQKQQj803 /r8WAtmoaYlC7JlMyh7CE+Qf+tzWFFJjysg2DjaKkkmYKCNXtlQj5cLQl5jeIgn4ZCIh 9v2WExzqQvEXTuPnEUVV4NHLWji6MOkpDnDBCFc3EQnUf4rZUImoek1wg9YwJ9wrnBn3 z9soPJAqWhtmBI+M4vUk8VUyOGaMdhJJQdU7vlmoVoxddePhKufMwT+VOGsEvFMQoej4 RdQg== 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:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=SfhKCmUO//k2KKxCugtKMMJyeYbHUaz7sxHNSvDAQHc=; b=fgw9G1ffyGVWW/PPf75KM/PrUFGnBsdMgiv7nz/Ul1llEojn0qDQ6LdlRY/TmImNh2 Qn2Ev/wjoSn+UuMqBsPgcfPn6L/eGkIpk7wSkv8UoZeEsZFAdkK+RydUQIfDE3FyItDk ZqaI2MoqJcA9qiKdpZUW7eszfZtcgqBXR7r4cAj7BaVVslAbJFC2mMLKwomiLr4HnldN CYYE9HgFoWUJvfIOQq02uBvNO1IX3DnG8M4XBHYVv+sNqOGdWPKM1qh6MIQQApYq865S OiN3xpEo8sRmIgAr0KQvqyAvAC5B0kv/U/tbmhmfGu6K+O98W9A83CmOGvDjlC6L9m6l HcFw== X-Gm-Message-State: AOAM5317aG9aBvbkudLcdba08ZWQK1D33RXL/2hj6VMPJM07qNete2Dl 3bqChrjifER1R1lguUNUUBSE+o8k1FVy3g== X-Google-Smtp-Source: ABdhPJz9QTiW2u8iRk+xZ6WNJw6ZUZcyhDKeHKol3Phi/Ns9B5v416t7XBHMfKxApM6N73CUhJXGoA== X-Received: by 2002:a17:906:408c:b0:6e8:d649:5e41 with SMTP id u12-20020a170906408c00b006e8d6495e41mr8426338ejj.519.1650718325572; Sat, 23 Apr 2022 05:52:05 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH v2 04/34] configure: pc-bios/qemu-icon.bmp does not exist Date: Sat, 23 Apr 2022 14:51:21 +0200 Message-Id: <20220423125151.27821-5-pbonzini@redhat.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220423125151.27821-1-pbonzini@redhat.com> References: <20220423125151.27821-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Type: text/plain 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+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::632; envelope-from=paolo.bonzini@gmail.com; helo=mail-ej1-x632.google.com X-Spam_score_int: -4 X-Spam_score: -0.5 X-Spam_bar: / X-Spam_report: (-0.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, PP_MIME_FAKE_ASCII_TEXT=0.999, 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: , Cc: marcandre.lureau@redhat.com, Thomas Huth Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1650718948974100003 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. Reviewed-by: Marc-Andr=C3=A9 Lureau Reviewed-by: Thomas Huth Signed-off-by: Paolo Bonzini --- configure | 1 - 1 file changed, 1 deletion(-) diff --git a/configure b/configure index 049f669a94..a6ed3498f2 100755 --- a/configure +++ b/configure @@ -3019,7 +3019,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 Sun May 5 15:06:46 2024 Delivered-To: importer2@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+importer2=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 1650718588300766.5752321469259; Sat, 23 Apr 2022 05:56:28 -0700 (PDT) Received: from localhost ([::1]:47806 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1niFJL-0001XW-10 for importer2@patchew.org; Sat, 23 Apr 2022 08:56:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42602) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1niFFE-0006kM-0v for qemu-devel@nongnu.org; Sat, 23 Apr 2022 08:52:12 -0400 Received: from mail-ed1-x52e.google.com ([2a00:1450:4864:20::52e]:41840) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1niFFC-00054Y-H0 for qemu-devel@nongnu.org; Sat, 23 Apr 2022 08:52:11 -0400 Received: by mail-ed1-x52e.google.com with SMTP id d6so8355546ede.8 for ; Sat, 23 Apr 2022 05:52:10 -0700 (PDT) Received: from avogadro.lan ([2001:b07:6468:f312:1c09:f536:3de6:228c]) by smtp.gmail.com with ESMTPSA id bo14-20020a170906d04e00b006ce98d9c3e3sm1655573ejb.194.2022.04.23.05.52.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 23 Apr 2022 05:52:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=d57+wLsg6C86Ce9YcdDwqygNOrnIY2eU+VWx4qkmQXk=; b=BksHf9jjqMieHnPl5iGFfIs7t7FjIvNOPx98//EcYVTrsFAB1VJcxs22iCPZMDZj/A NlDn9aYZ5KJOXijWvY2LVbGgnE1WMQsbk7pEDzl/pGgZUmP7nCw45rhVqZLuNQbhmN7y TRkS0drv2LzNL+YZDG+Ok+T0e8h0SAiQiq0PCZKIk4JVt6nXB+GNCyS8Mt4BJmDSD+/J HVbWW4+TLC+eQiuxUZAeIhklkKlf5T+l+Q7vX2xjseki5NKYfWMRMty3/9u6+fw2RBDt vslMftrrPIh18zkTUgUC5wk9xLqHlSc9uyiW5C1IPgNvryNEZHzyIYEUgiqwXvoaBuq5 IqAw== 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:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=d57+wLsg6C86Ce9YcdDwqygNOrnIY2eU+VWx4qkmQXk=; b=SC/1N4KkL2+JRMJxrGXOdfWaBKeMeYs92YbFVRRkwsexbgoc6bHjfdgbVAy8BbmAXe 0w5/vOBDj9qIL/Pj/IrB5ilQ4RzyLRAc2LKn7JpWb+/lGJ8fFwfPj4+N6/CzokO1vWQm 6yryI0oos2AgxhJ/A2nPyAMsJ3+rhoYHutlEgUsjPNBH5FiCIzuRJ81ibksE/eyTioZf QxCRFUl2WJtDEFhm1gsh7NYnxp6GZWxR3j/qpA5T4dzngjnXentwKzYp7keJQ5gKG85e nHDyN3H/lNJM9X2i0TpjjeGFqPOTPgnq+5Ocf3MnoXdtxMN0XXvSAt9sLfsu7TXXWbJZ zFUQ== X-Gm-Message-State: AOAM5301KiqrS0iS32r2hO+LPDR8Zgy7kLT2I8gW4dVlXNcejrba37Jd KbP3tW1mxaQwGYXALN701saDFSlFu1sbRA== X-Google-Smtp-Source: ABdhPJxG78MOp+J9QXstckb9xkwEvnExWo6WtshEgRDJRJT3+B8rSDcIYpOIKL9RJbZvA6Cm8VfNnA== X-Received: by 2002:a05:6402:3485:b0:423:f3fd:75d9 with SMTP id v5-20020a056402348500b00423f3fd75d9mr10198791edc.319.1650718329188; Sat, 23 Apr 2022 05:52:09 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH v2 05/34] configure: gcov should not exclude fortify-source Date: Sat, 23 Apr 2022 14:51:22 +0200 Message-Id: <20220423125151.27821-6-pbonzini@redhat.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220423125151.27821-1-pbonzini@redhat.com> References: <20220423125151.27821-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Type: text/plain 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+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::52e; envelope-from=paolo.bonzini@gmail.com; helo=mail-ed1-x52e.google.com X-Spam_score_int: -4 X-Spam_score: -0.5 X-Spam_bar: / X-Spam_report: (-0.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, PP_MIME_FAKE_ASCII_TEXT=0.999, 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: , Cc: marcandre.lureau@redhat.com Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1650718589121100001 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. Reviewed-by: Marc-Andr=C3=A9 Lureau Signed-off-by: Paolo Bonzini --- configure | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/configure b/configure index a6ed3498f2..e404b55da5 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 Sun May 5 15:06:46 2024 Delivered-To: importer2@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+importer2=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 1650718999321856.9151973269247; Sat, 23 Apr 2022 06:03:19 -0700 (PDT) Received: from localhost ([::1]:58718 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1niFPy-0000lj-8V for importer2@patchew.org; Sat, 23 Apr 2022 09:03:18 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42622) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1niFFG-0006qA-L2 for qemu-devel@nongnu.org; Sat, 23 Apr 2022 08:52:14 -0400 Received: from mail-ej1-x62a.google.com ([2a00:1450:4864:20::62a]:46919) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1niFFE-00054c-1u for qemu-devel@nongnu.org; Sat, 23 Apr 2022 08:52:13 -0400 Received: by mail-ej1-x62a.google.com with SMTP id t11so21109545eju.13 for ; Sat, 23 Apr 2022 05:52:11 -0700 (PDT) Received: from avogadro.lan ([2001:b07:6468:f312:1c09:f536:3de6:228c]) by smtp.gmail.com with ESMTPSA id bo14-20020a170906d04e00b006ce98d9c3e3sm1655573ejb.194.2022.04.23.05.52.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 23 Apr 2022 05:52:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=iTOi8M+CKz+tteXqdlc9EtxfuKMXhzk+dpI+u7NWDEY=; b=P4UE6pmrwdaOS4UXSJd3K8XuXdgxMlY1mnMpmNdiJgxWE5W1/6BInja4LeMy7t/BYT KSC8nh2C4fCtTR7PMWnTNE5sUhkrTTukxO8KhZ0UUShzJzGNRFbD7Na8RiL2Xv+oczrY jBlKDgMTy2TKfSBvv3PexxFSLd5jY7bXkmYNCvjYbMyQLYuop15Cuj84julpVi+PweUu fq+AwirqJ/Pg4Bx/A0uJsOT+8dod5r02OALW++XYTajTcExbe0YmPOP/b/HSUUBvETde d01vnVDf/iUXfvqkjgebT4YfUQhrKKtI2BNEgWJa4YbANJMRNRQaUfa9mNBEQNRXPBMV 3Ggg== 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:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=iTOi8M+CKz+tteXqdlc9EtxfuKMXhzk+dpI+u7NWDEY=; b=UIVsCU3k/FOr518VGiqrrq0sHsSgaOIEJRL53xRx8820HCovhzoVyjTdnBCqmXm1fI MPIr93x2qd9cCOpd5l9nvSBbbE3Xihmx7bsJwKIxy8VWBBtpZDrkjkDhOHPdotofXTBz JyPLZONdvRquGDHKjrRVc/c0+oFPzb2Pll+pz61+kJTASuLq0Ai3CZpUPULu+JcvEgbO Je91m0l0b21SmDLBTxWAPjQRZskt6kIdCDKA6T2qHnvcJfN4PaYD3ASIESIhRUpDUFNV D1BvKxft9YxulchdvE19yPcByGfZBfDuT31Wb9zFRhyBmS0VdSWEfw4wVZpFErWAEJfn Nzew== X-Gm-Message-State: AOAM533qsoVmmJd2FU7UHCaiAcpr/XDKS1HxSFTqiQPf6wp1ZYXFMa/O q14/0CvYit6xgXIoHkj3OC//WZps06eV8w== X-Google-Smtp-Source: ABdhPJzIbaOxpm5AzMTsdSiBhXifrqmze7OUzb4XeOipD3N8khORtQNaHmEZHmnbsyVoQWy0f5DD5g== X-Received: by 2002:a17:906:1841:b0:6e8:872d:8999 with SMTP id w1-20020a170906184100b006e8872d8999mr8135164eje.492.1650718330669; Sat, 23 Apr 2022 05:52:10 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH v2 06/34] configure: move --enable/--disable-debug-info to second option parsing pass Date: Sat, 23 Apr 2022 14:51:23 +0200 Message-Id: <20220423125151.27821-7-pbonzini@redhat.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220423125151.27821-1-pbonzini@redhat.com> References: <20220423125151.27821-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Type: text/plain 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+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::62a; envelope-from=paolo.bonzini@gmail.com; helo=mail-ej1-x62a.google.com X-Spam_score_int: -4 X-Spam_score: -0.5 X-Spam_bar: / X-Spam_report: (-0.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, PP_MIME_FAKE_ASCII_TEXT=0.999, 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: , Cc: marcandre.lureau@redhat.com, Thomas Huth Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1650719001154100001 $debug_info is not needed anywhere except in the final meson invocation, no need to special case it. Reviewed-by: Marc-Andr=C3=A9 Lureau Reviewed-by: Thomas Huth Signed-off-by: Paolo Bonzini --- configure | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/configure b/configure index e404b55da5..d704029284 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 Sun May 5 15:06:46 2024 Delivered-To: importer2@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+importer2=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 1650718959766836.1071750490445; Sat, 23 Apr 2022 06:02:39 -0700 (PDT) Received: from localhost ([::1]:56506 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1niFPK-0007eg-8u for importer2@patchew.org; Sat, 23 Apr 2022 09:02:38 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42634) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1niFFH-0006tQ-RQ for qemu-devel@nongnu.org; Sat, 23 Apr 2022 08:52:15 -0400 Received: from mail-ed1-x52d.google.com ([2a00:1450:4864:20::52d]:46869) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1niFFF-00055H-ME for qemu-devel@nongnu.org; Sat, 23 Apr 2022 08:52:15 -0400 Received: by mail-ed1-x52d.google.com with SMTP id g23so6439723edy.13 for ; Sat, 23 Apr 2022 05:52:13 -0700 (PDT) Received: from avogadro.lan ([2001:b07:6468:f312:1c09:f536:3de6:228c]) by smtp.gmail.com with ESMTPSA id bo14-20020a170906d04e00b006ce98d9c3e3sm1655573ejb.194.2022.04.23.05.52.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 23 Apr 2022 05:52:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=I2/CTTzcxs1CO01n5cgISgwnb1bpltfT4MfHF7j4TFM=; b=mtKFmF82idOHXYZi6iqjrZYNPA+JT98fVGmPQENpdlySn67c/6WervnTzHDbw5zpW0 zVxJASJd0OCPwX5XBTuJ8lVeUjev17kIZm4X3oWAvS/9gn2xzGeDKn/sUx2k7A51Reuw 95+vPtNJ6kLP9+N3kLAPaVRVbvpUfEBgWGZHunYZURW6H0rr97HCOcg3jCkK+2TLxo+1 RqmwfrO3hUwe7JhugRfrPCcALlRoeFk0bIKB3wJr6mUJacjyAuEAELatkbsDq0Z2RuDW wR/6jUkUlSzSI6iwhRZqcVQu9+J99rFQ8TQFpozr3cUBZEf2OIF1xD2MK75r0IuOGUJ1 useQ== 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:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=I2/CTTzcxs1CO01n5cgISgwnb1bpltfT4MfHF7j4TFM=; b=VsUMKp2J78c3sWcbgTYMp/H3xLDd93wu7oZ8oDvrNWzCeMTOiQhEfuc2nKg0tnt1Cz ZhodQh4hoYuFo72gDCRnWG6nsjl0JRmKZ2g1xxcGm+I7qGLUTw+RDDMO4wJMF3k9TaXu ZJdglzSmd3i7i/rXFFsM0z8INwEzUD2fVpk1FCBtP96NUrffEqtut+G9EANPlZ4NSsgf 0OvqhkNflHs7GU5NBsNQaBw5oMdJhfcIqddc5f6DGpOLPVlQPd3JmaQOMkNrE+LV89Ue yUB0mM+NLH2bF36eh48SVEjRGueoxmp7zltkPFhxG0cKj+SaO9nKT2ZYOdkrjrQgk4/k FHjQ== X-Gm-Message-State: AOAM532foFB/sKSN8/Sxca0DeS6EEAZ4CcnmobQmvCA/ByBtPzJvulHN FdhdEnHdJEVQ63xr6vdr1DfEae1nhHNVoA== X-Google-Smtp-Source: ABdhPJyvIvRpUuMvAA/YcrQKbYoDKdPS2i8SO8rApGE0nAjczij5+HlSdNk6isfCPsOuByfMJuI8fg== X-Received: by 2002:a05:6402:1148:b0:413:11e0:1f58 with SMTP id g8-20020a056402114800b0041311e01f58mr9816638edw.113.1650718332170; Sat, 23 Apr 2022 05:52:12 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH v2 07/34] configure, meson: move OpenGL check to meson Date: Sat, 23 Apr 2022 14:51:24 +0200 Message-Id: <20220423125151.27821-8-pbonzini@redhat.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220423125151.27821-1-pbonzini@redhat.com> References: <20220423125151.27821-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Type: text/plain 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+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::52d; envelope-from=paolo.bonzini@gmail.com; helo=mail-ed1-x52d.google.com X-Spam_score_int: -4 X-Spam_score: -0.5 X-Spam_bar: / X-Spam_report: (-0.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, PP_MIME_FAKE_ASCII_TEXT=0.999, 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: , Cc: marcandre.lureau@redhat.com Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1650718961133100001 Reviewed-by: Marc-Andr=C3=A9 Lureau Signed-off-by: Paolo Bonzini --- 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 d704029284..1aefbc2f68 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 a9949ee9e2..d21902e5d0 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()) @@ -2091,7 +2097,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'] : []) + \ @@ -3706,7 +3712,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 Sun May 5 15:06:46 2024 Delivered-To: importer2@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+importer2=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 1650719099885930.9530246878306; Sat, 23 Apr 2022 06:04:59 -0700 (PDT) Received: from localhost ([::1]:35912 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1niFRa-0004OK-E9 for importer2@patchew.org; Sat, 23 Apr 2022 09:04:58 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42654) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1niFFJ-0006zs-KM for qemu-devel@nongnu.org; Sat, 23 Apr 2022 08:52:17 -0400 Received: from mail-ed1-x52b.google.com ([2a00:1450:4864:20::52b]:41838) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1niFFH-00055y-7v for qemu-devel@nongnu.org; Sat, 23 Apr 2022 08:52:17 -0400 Received: by mail-ed1-x52b.google.com with SMTP id d6so8355690ede.8 for ; Sat, 23 Apr 2022 05:52:14 -0700 (PDT) Received: from avogadro.lan ([2001:b07:6468:f312:1c09:f536:3de6:228c]) by smtp.gmail.com with ESMTPSA id bo14-20020a170906d04e00b006ce98d9c3e3sm1655573ejb.194.2022.04.23.05.52.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 23 Apr 2022 05:52:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=+k9jZOFwU7I4PkMF/kaxCvOtEknZXqE5wy9ewcLGyVc=; b=XAo14YHb0HrtzK1Hu8eYPdWORTXvlBU1dYmBpAEU5uYkIb/m2PNwBBYrutGfAsbXkK 1gbtarbqehtOQuky6Gio4dF/Z/R7JwlNjpmcC/zBKQxXD4jy5xMl7mycJlWOgPkXpYxb YrWjqM4j5E/0YmaLBPUKtWoRMCMFWeFgKaF6pTL6ldSKXzHgoBUVRNcs20pZP/XzWNZH hWze+9fd5RVDfDREjIhscC+YVgFcGYM1e5l6rFwvm6uyeCNeDhs5iYw9GWW/7kNHKhFZ pvZY8XcA8yzAzv1KoUARZzzeGODDE1nHVPXf5Cn+yJQG8u6FHvGXb/K0k2z8ZnRkibxS Vfug== 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:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=+k9jZOFwU7I4PkMF/kaxCvOtEknZXqE5wy9ewcLGyVc=; b=rPRiPkt0k1We0FiSyn0goz8Fsoag9CJNtT2aHwYGnpv0CSiInFMzRs9/nIz3ZW7HO1 G7KwoI/pZfZ/FwycA+ZBcPp4MTIsXgSpG/GQwhLH7F/rW65omX+U4XB0WFWpSTX+eqVI qBUHwlVEpFNFHyDifyv3ItSNBtOE0jRKMyYi2NEoLRNUjIhiohTcKCNiHqIzrposwBAO fKepGRBPyjsMG8Bf/7y2DIzh6hUiMJ7EJm8BkS4Wg+ixjoYM9qbyzRnNg1ebSaQUP3ik o/gmvJt3eiTaFt7cLWOwTwlNrGGLlv8culbS8FaIZOvsjUUbToslmZjI0dSp7Rkq5xsh vQXw== X-Gm-Message-State: AOAM532N6Z2CKV4TrKS8HX0HtTnY91/Xw186MsUnXHG9PziPv7xiXe/3 /FzNiIwkITcYndqBtUElSg6Tv6w+WGGrCA== X-Google-Smtp-Source: ABdhPJxQ6DF+rYy3EsL0OxlsnV8aK0iKQI4kiLoIjGg8YvSWpJU7A9pXvFbhvCU5wm5LLXEIkLD7/w== X-Received: by 2002:a05:6402:14c2:b0:41d:816a:4eb0 with SMTP id f2-20020a05640214c200b0041d816a4eb0mr9875134edx.301.1650718333873; Sat, 23 Apr 2022 05:52:13 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH v2 08/34] meson, configure: move RDMA options to meson Date: Sat, 23 Apr 2022 14:51:25 +0200 Message-Id: <20220423125151.27821-9-pbonzini@redhat.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220423125151.27821-1-pbonzini@redhat.com> References: <20220423125151.27821-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Type: text/plain 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+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::52b; envelope-from=paolo.bonzini@gmail.com; helo=mail-ed1-x52b.google.com X-Spam_score_int: -4 X-Spam_score: -0.5 X-Spam_bar: / X-Spam_report: (-0.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, PP_MIME_FAKE_ASCII_TEXT=0.999, 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: , Cc: marcandre.lureau@redhat.com Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1650719100444100001 Reviewed-by: Marc-Andr=C3=A9 Lureau Signed-off-by: Paolo Bonzini --- 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 1aefbc2f68..4deca94235 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 d21902e5d0..55ad65ce95 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' @@ -2104,7 +2148,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' ] @@ -3698,8 +3742,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 Sun May 5 15:06:46 2024 Delivered-To: importer2@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+importer2=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 1650719165416612.887763201218; Sat, 23 Apr 2022 06:06:05 -0700 (PDT) Received: from localhost ([::1]:39680 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1niFSe-0006x6-EC for importer2@patchew.org; Sat, 23 Apr 2022 09:06:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42678) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1niFFL-00075i-CY for qemu-devel@nongnu.org; Sat, 23 Apr 2022 08:52:19 -0400 Received: from mail-ed1-x52e.google.com ([2a00:1450:4864:20::52e]:45914) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1niFFJ-00057r-Kv for qemu-devel@nongnu.org; Sat, 23 Apr 2022 08:52:19 -0400 Received: by mail-ed1-x52e.google.com with SMTP id be20so5112732edb.12 for ; Sat, 23 Apr 2022 05:52:17 -0700 (PDT) Received: from avogadro.lan ([2001:b07:6468:f312:1c09:f536:3de6:228c]) by smtp.gmail.com with ESMTPSA id bo14-20020a170906d04e00b006ce98d9c3e3sm1655573ejb.194.2022.04.23.05.52.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 23 Apr 2022 05:52:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=dNmPnWSLR4JpGKD8F5bvT0F6bgApgbbgz90D+2MI2jc=; b=D00WE/1UcauiiwD0mrRr2Dd9Sl0000dopoyp/cpiQgVRRHBPHuWP8FvXW1GvvTD5DK z6oupthqVf+uNXrBAmEO5fZqA98OD5OiP71auZ+qiwtFwo7x91tKnv/sF7sEWMIdzvs8 CSW0U0+HfF1ftQw6hv86RZHJA6j5mJpaeeCuMEnA4/Wxq4jqhy2kJEpaMaGyxgqn6rPH FHcl6YoqN+uvhimksH9ESj+vGMsD7Yc+QsMJC0GsAD2d7YC++nk50xaFnCNnZJkaNPFJ 03Ld/zF70Dloc8U8NGcHhet0fD61EPXOA2j6ZCRgMkdcWgMW6xQ8hsVU5tAobpUE4y2j ZiZA== 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:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=dNmPnWSLR4JpGKD8F5bvT0F6bgApgbbgz90D+2MI2jc=; b=FxDcgFfwJULsZnOaJLR4pHThSkAD8teCc95Y3dA+9mpDBshDto0VDQ4zlIvaCGYMK7 f678Xy7BYRNCh+xlW52Ya3rAj87wwA3yFdcgOWkgmOUKyMMD/EBNNYtugTWOmMdKHjBh Hmmy53qfCYOQgGm6IgG8spCSk+njVhE0E1VjNTxefz9b5p+YF3y+RKgNrlgdMmLBC84d 8PEUC1AkPrf6w0vga+CCXCYwrGoyzR9+oJ5U9h1HTeC6oqFP6zoWTi/aw+jZEFra2U5K xdIfVi+ezhiYoTgSGZ9BCTpJJz2zTxHyzyB0DcU+cgIwHTjXC+6S0SiFTtg7KiAY4uow hJGg== X-Gm-Message-State: AOAM531xzZRlNhRYhvTObPQK/kRdP82+UMBKFA4wjllJB9C2q7Fd87Z4 Q8vN0GFleYdANOLsr8snwQ1IPiTBKYg7fg== X-Google-Smtp-Source: ABdhPJwBzMNo/s+5x5pI8Kyu799k2m5RsBLM95ahhPNpZlaOBuMec2m11NS1wVUeNYzcQnmZ5Fve4w== X-Received: by 2002:a05:6402:190a:b0:424:890:e4e1 with SMTP id e10-20020a056402190a00b004240890e4e1mr10059987edz.169.1650718336299; Sat, 23 Apr 2022 05:52:16 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH v2 09/34] meson, configure: move keyctl test to meson Date: Sat, 23 Apr 2022 14:51:26 +0200 Message-Id: <20220423125151.27821-10-pbonzini@redhat.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220423125151.27821-1-pbonzini@redhat.com> References: <20220423125151.27821-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Type: text/plain 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+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::52e; envelope-from=paolo.bonzini@gmail.com; helo=mail-ed1-x52e.google.com X-Spam_score_int: -4 X-Spam_score: -0.5 X-Spam_bar: / X-Spam_report: (-0.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, PP_MIME_FAKE_ASCII_TEXT=0.999, 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: , Cc: marcandre.lureau@redhat.com Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1650719166752100001 Reviewed-by: Marc-Andr=C3=A9 Lureau Signed-off-by: Paolo Bonzini --- 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 4deca94235..313579019d 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 55ad65ce95..b39b157222 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) { @@ -3696,7 +3709,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 Sun May 5 15:06:46 2024 Delivered-To: importer2@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+importer2=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 1650719313641210.3052842032796; Sat, 23 Apr 2022 06:08:33 -0700 (PDT) Received: from localhost ([::1]:48044 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1niFV2-0004EW-L4 for importer2@patchew.org; Sat, 23 Apr 2022 09:08:32 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42698) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1niFFM-00079U-Nv for qemu-devel@nongnu.org; Sat, 23 Apr 2022 08:52:20 -0400 Received: from mail-ej1-x633.google.com ([2a00:1450:4864:20::633]:34607) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1niFFL-000587-5Y for qemu-devel@nongnu.org; Sat, 23 Apr 2022 08:52:20 -0400 Received: by mail-ej1-x633.google.com with SMTP id ks6so21215655ejb.1 for ; Sat, 23 Apr 2022 05:52:18 -0700 (PDT) Received: from avogadro.lan ([2001:b07:6468:f312:1c09:f536:3de6:228c]) by smtp.gmail.com with ESMTPSA id bo14-20020a170906d04e00b006ce98d9c3e3sm1655573ejb.194.2022.04.23.05.52.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 23 Apr 2022 05:52:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=GLWsnYF+UqLfKCHc9OyeJDEOn8a2VanbNuZfq+VHH+U=; b=CiCI0egPHy+0WEKiifD8Wua3pufTReNNOFVZx3iMKgT/0Wchhnduk1CjFV+sToyiiP 49XQojUgyXi/GtmB2imshEPpcG52HHJfqG2lUWMKeH5YmBoRsi8AEDoNT2vnlGtXoFtr nZzPvLlV/c1avHMTT6ooCbiYMBfrKb09Y763xSeVgwdY/71Ro4lpDMLx7oFMfvfBEnZr WpWa/Th+V7qHk161rESHnn1fqQ2veVhYC+GmV34Zw7uk2YYt+ztGoHnGXDxyqdeq/GHM ulRRBr27weNl1zlymvWTvjYthTlpLt6mSKahrHMieE9cnbQPKp75Uz7tfr/PiEYyiyMM zlSQ== 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:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=GLWsnYF+UqLfKCHc9OyeJDEOn8a2VanbNuZfq+VHH+U=; b=fd8F3P4hbAAeUCzdGRpsy9VGnS7I6HZ1C90D7fFSjKB96aczr6k9CRZn9XYtxttDt5 lSliTxJCazqalf/tYbXq2fY1roZq9jtd3GGfHeA78eE7oAQkQkE6JPv2xTz156ph7sbF dm8V/YEI/Lg3feFdE5gSSpIphYlAae9ouLhapKz9nnqF8AzbEZfFgjHMqd+cOl4iINBF AJlDrINoCbvQ5ixHYS6YjEh8OCnaMJ+yDZrgGpz86eDdrq35hiz/YJxRxC9q54DQPPRO sZ6EDxS1samD/prw8VGu5c96HXmhh6t1wdgs9rOH4lTnV67mB2YZzsknIjJGLnoluatp kzTA== X-Gm-Message-State: AOAM5305YZ3EPjnC8rG6cx8lWbbrX/80vg9OJBMc/6Lr3s0eJUWLO0VT lfEcj7Z4xmxo98IjvbBet6hK5HrzmROi5Q== X-Google-Smtp-Source: ABdhPJzrklrfntxoRFfs9A7KbpkZvIbJ+syov2Esu40kSXtktsZcBumZQVIc+jYdR8J+2jRAPWU1Jw== X-Received: by 2002:a17:906:5d10:b0:6f3:65e6:5fcb with SMTP id g16-20020a1709065d1000b006f365e65fcbmr5221665ejt.212.1650718337843; Sat, 23 Apr 2022 05:52:17 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH v2 10/34] meson, configure: move usbfs test to meson Date: Sat, 23 Apr 2022 14:51:27 +0200 Message-Id: <20220423125151.27821-11-pbonzini@redhat.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220423125151.27821-1-pbonzini@redhat.com> References: <20220423125151.27821-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Type: text/plain 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+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::633; envelope-from=paolo.bonzini@gmail.com; helo=mail-ej1-x633.google.com X-Spam_score_int: -4 X-Spam_score: -0.5 X-Spam_bar: / X-Spam_report: (-0.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, PP_MIME_FAKE_ASCII_TEXT=0.999, 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: , Cc: marcandre.lureau@redhat.com Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1650719315787100001 Reviewed-by: Marc-Andr=C3=A9 Lureau Signed-off-by: Paolo Bonzini --- configure | 28 ---------------------------- meson.build | 13 +++++++++++++ 2 files changed, 13 insertions(+), 28 deletions(-) diff --git a/configure b/configure index 313579019d..d527a9c22e 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 b39b157222..a26eb878ea 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 Sun May 5 15:06:46 2024 Delivered-To: importer2@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+importer2=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 1650719158314509.5879111639997; Sat, 23 Apr 2022 06:05:58 -0700 (PDT) Received: from localhost ([::1]:39062 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1niFSX-0006VN-8F for importer2@patchew.org; Sat, 23 Apr 2022 09:05:57 -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 1niFFP-0007Hc-QQ for qemu-devel@nongnu.org; Sat, 23 Apr 2022 08:52:23 -0400 Received: from mail-ej1-x631.google.com ([2a00:1450:4864:20::631]:41496) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1niFFN-000591-P0 for qemu-devel@nongnu.org; Sat, 23 Apr 2022 08:52:23 -0400 Received: by mail-ej1-x631.google.com with SMTP id y10so21132070ejw.8 for ; Sat, 23 Apr 2022 05:52:21 -0700 (PDT) Received: from avogadro.lan ([2001:b07:6468:f312:1c09:f536:3de6:228c]) by smtp.gmail.com with ESMTPSA id bo14-20020a170906d04e00b006ce98d9c3e3sm1655573ejb.194.2022.04.23.05.52.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 23 Apr 2022 05:52:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=9/t8b1B+mUb45QLloontMZsmfPWneD1hpUFMiqhFQJY=; b=GZ4jpNjn4jw7VxOppU/hrTBifr09g3+jTCPJVSfj0Qvflf5hbjfRyXEg/coUlqUIZK 40EXEeV18YI27cbM7udokjiDE/qH89UsPqO4D5zLEF1u+uHGxFLNohFgLdTB5xuON5tL 5q86TTE41QZDc6zThCUsSaUQvULNWHPSuR2YeuPdh66716jH6PjcSEiRK1aQx6TLTL58 R1leV0htymQQ3nZtD2ldLAWXHkw9+uzE0CqDqOUTVd+1yB4SrYh6JM2XF3dEJr3cWDMs AcNveQQar200smkM9QvmcGGdY2BKiesRr9BBrZsgPNbvJBdbQU6rhwbb15/ZIU3bgObg VXeg== 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:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=9/t8b1B+mUb45QLloontMZsmfPWneD1hpUFMiqhFQJY=; b=MAicPl/LjwFptYcaX0zLIOexUiaoH0ajTFVRyM7DU4tKI6feaZSuJD3p8az0r8Qlea ptu0nNwLA67VqgzYTwpu5gCzXv1uA7psXnf/V3KnG1ds5SuObDYHhK/Kh/JQvPEX3LVl Jll/ptakWj6dM5JhVXuE21ruIyg15m4o37EMO9zftUdRzziYeNeQvst0LIe/7boJ23ji t/WbcYkfUoJ/TyKeDhzq50UV7038uhDxwK4XmaxdHG/FcDdVdw2UIyshMUcHAhn32Rj6 rAphNsOT2tbor7y/FvTn5sUapnMm1BtwykKxxvn//e1BDxFie1K1vY8wD5hp/wF1qYQy xzcQ== X-Gm-Message-State: AOAM5303mErrij+P6X+G5REk7XJzpDWwvIMiScD5V4Doip+lqs2hQVvR aQ6X8/UnaVFD5RFG1zhWAo9gw+Xdl1UQgw== X-Google-Smtp-Source: ABdhPJx9sJ/nGGuBDzUnIUJCt6qnr+hGWTP1ePY9LkBk2Wb+3QINUFAbKdbpzRQ0K0SpPnsw9InOgg== X-Received: by 2002:a17:907:6e0f:b0:6ef:f51a:fe8c with SMTP id sd15-20020a1709076e0f00b006eff51afe8cmr8315327ejc.661.1650718340335; Sat, 23 Apr 2022 05:52:20 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH v2 11/34] meson, configure: move libgio test to meson Date: Sat, 23 Apr 2022 14:51:28 +0200 Message-Id: <20220423125151.27821-12-pbonzini@redhat.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220423125151.27821-1-pbonzini@redhat.com> References: <20220423125151.27821-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Type: text/plain 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+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::631; envelope-from=paolo.bonzini@gmail.com; helo=mail-ej1-x631.google.com X-Spam_score_int: -4 X-Spam_score: -0.5 X-Spam_bar: / X-Spam_report: (-0.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, PP_MIME_FAKE_ASCII_TEXT=0.999, 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: , Cc: marcandre.lureau@redhat.com Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1650719158755100001 Reviewed-by: Marc-Andr=C3=A9 Lureau Signed-off-by: Paolo Bonzini --- 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 d527a9c22e..1fb70bf614 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 a26eb878ea..e6015fcae4 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 22e1361210..6b9807c183 100644 --- a/tests/qtest/meson.build +++ b/tests/qtest/meson.build @@ -98,14 +98,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 Sun May 5 15:06:46 2024 Delivered-To: importer2@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+importer2=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 165071912557436.44392963097903; Sat, 23 Apr 2022 06:05:25 -0700 (PDT) Received: from localhost ([::1]:36750 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1niFS0-0004wt-11 for importer2@patchew.org; Sat, 23 Apr 2022 09:05:24 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42730) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1niFFR-0007JX-7Z for qemu-devel@nongnu.org; Sat, 23 Apr 2022 08:52:30 -0400 Received: from mail-ej1-x630.google.com ([2a00:1450:4864:20::630]:46927) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1niFFP-00059E-ID for qemu-devel@nongnu.org; Sat, 23 Apr 2022 08:52:24 -0400 Received: by mail-ej1-x630.google.com with SMTP id t11so21110146eju.13 for ; Sat, 23 Apr 2022 05:52:23 -0700 (PDT) Received: from avogadro.lan ([2001:b07:6468:f312:1c09:f536:3de6:228c]) by smtp.gmail.com with ESMTPSA id bo14-20020a170906d04e00b006ce98d9c3e3sm1655573ejb.194.2022.04.23.05.52.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 23 Apr 2022 05:52:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=XytWFLn4SuwfgOxb33+SYDso2NGsYvL0Z7yTVxZuTjE=; b=JqnsTCKl8AR+phI3SAWGo9latRy4OmPwod8S3fobVCrdwJZZ7Zz3KD6NdHmZn1+kde IBscrCpW0ztVhgZCnWV1qPvDZL32BtJYdVWeTzn7iv0HWLj1mvPpeDLjUH4LsChg8LLt cbaQdgwMOUPDUTcnIJ0qlquRebRDjjZYPrt8euqoEUr79ivzvxWrPPLyvUKP1cOWvvjM qqrXY6L3km1m4WSpa/RDv0k2/S/04Qk3ykOA8s7KXlfrvtYC/BC6i5l8HVgFLDqViRrV T2PKv0eTi0cnb6HKSgze5Kuqnw1MoHffPARKMQBrvs6NbEredvv5JhCOXKSJSLbR9zve /dew== 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:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=XytWFLn4SuwfgOxb33+SYDso2NGsYvL0Z7yTVxZuTjE=; b=QrPyC2dGkzZ3RIYZP/4Hm/04J0XF7R6+K5YYasM+uTXNHevZUdodaBmoes+zbRQYaB DTJ+rZvCi+6VzPvIbxQ9zmR9wPaiaTuVgoORhjomJFS4AHlexN+4usL0emJDM9QGewpw gtK22JkbX2CfnP5GLTfKbpN8kcHl6zL7DerJhTgL/a8CQc5CrGJTVSfel5mZ4/vK7+z1 nalK3qgtDNeiORZ7Xy1MJlLDoedoxyPBfQGXOKM8Uimk8RS/LGnwfrFmKJ2EJEqyA2vS vEMU0jEGURS5VmtoFZ1BLPi8oV3LZb+UrzDuroUapGyvwi51rEfN20yXR5ThuQ/SIbkj 0+Kw== X-Gm-Message-State: AOAM530jI7R8Oo+kLQojB4JALi7hK4bkdkgieYtJmcCgZAxkOB8gzoPL yEOnvqxg57zFv78XJTdKgWgSM03epIA7Ig== X-Google-Smtp-Source: ABdhPJx0lAAwbEQ+/L0NNrMM1V3Hfi2o/UJrfMziHGmkshVZ4BSnTrH6jDQneguEBeExtnvjc5gNWA== X-Received: by 2002:a17:907:7d8b:b0:6ef:f0c9:9498 with SMTP id oz11-20020a1709077d8b00b006eff0c99498mr8175703ejc.706.1650718342233; Sat, 23 Apr 2022 05:52:22 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH v2 12/34] meson: remove CONFIG_XEN_PCI_PASSTHROUGH from config-target.h Date: Sat, 23 Apr 2022 14:51:29 +0200 Message-Id: <20220423125151.27821-13-pbonzini@redhat.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220423125151.27821-1-pbonzini@redhat.com> References: <20220423125151.27821-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+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::630; envelope-from=paolo.bonzini@gmail.com; helo=mail-ej1-x630.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: , Cc: marcandre.lureau@redhat.com Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1650719126473100001 Content-Type: text/plain; charset="utf-8" CONFIG_XEN_PCI_PASSTHROUGH is just a global configuration option; it is never used in the source files, so there is no need to put CONFIG_XEN_PCI_PASSTHROUGH in config-target.h or even in config-host.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 --- v1->v2: remove CONFIG_XEN_PCI_PASSTHROUGH symbol hw/xen/meson.build | 20 ++++++++++++-------- meson.build | 2 -- 2 files changed, 12 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 e6015fcae4..19032a829b 100644 --- a/meson.build +++ b/meson.build @@ -2240,8 +2240,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 Sun May 5 15:06:46 2024 Delivered-To: importer2@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+importer2=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 1650719306962228.89328687575608; Sat, 23 Apr 2022 06:08:26 -0700 (PDT) Received: from localhost ([::1]:47516 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1niFUv-0003sQ-V7 for importer2@patchew.org; Sat, 23 Apr 2022 09:08:26 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42740) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1niFFS-0007Jh-JG for qemu-devel@nongnu.org; Sat, 23 Apr 2022 08:52:33 -0400 Received: from mail-ej1-x630.google.com ([2a00:1450:4864:20::630]:44757) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1niFFQ-00059M-Vk for qemu-devel@nongnu.org; Sat, 23 Apr 2022 08:52:26 -0400 Received: by mail-ej1-x630.google.com with SMTP id u15so21097286ejf.11 for ; Sat, 23 Apr 2022 05:52:24 -0700 (PDT) Received: from avogadro.lan ([2001:b07:6468:f312:1c09:f536:3de6:228c]) by smtp.gmail.com with ESMTPSA id bo14-20020a170906d04e00b006ce98d9c3e3sm1655573ejb.194.2022.04.23.05.52.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 23 Apr 2022 05:52:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=DkMapKTANfwabAYkl4R+oiUOYt3T4trbJF1ExycOS+s=; b=BwI18csxO9CkLqAng35yuhx9YMJscUPnYgN492K4Io1pGknFwHUa3SRHoZhYXsSc7M YkNvD5Kc3ZtbhxjQmPwOQzpmUbHRjP0POH390HZhQ8iujDe3nI8EIm/1T/r5ZxwTUm8+ k5IoSmSgSEqv/Nz/VwsHIGy0YQ5rF/l6S/va3KCESSfufrrxSb3zbtSPhy1suc5mhD/3 yTYiskBlbVTrFWWzbOAjjemgwM/tLRLwIqY6KGxyxgkC+6BibwN6XyAAgAIpjeMe117O V8MugSqfASxRq2gqWiPTW5710J6M1BveXO1Wzptid4vweoxgu4jhwnsdHWN/7/yzRAov FPrA== 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:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=DkMapKTANfwabAYkl4R+oiUOYt3T4trbJF1ExycOS+s=; b=ZwPLysgti2eOiXwNzPzuKIZsKqYOHZ51AQjH2LTYBA0+xmyNoDF7VcxiWX54VBTxPg ypRJVrmiq87c5ElFuEclPbcIum12Nl7xAZdaxA5P0mAaUM2IbfTRgy7ngtY+3HKZAXA0 dPmqVo/RMJbev0C6HvVls0rLHv0+R70AT05td6RMS1TK3npKRsAxbbWkiBhwXLxsGKsS xwCf76NtQnVD8+haxPqbZeAA4VWGaHO1x5InayjUbJmE5FihEdS/dm6y2YM6qJyRGkyN eIwbft27J8KiUw8t5XPzOD6CvtpZS+7X50bKh9IlA7DB0G9qWUMQDDursyv8zdyUwtKC Dsfg== X-Gm-Message-State: AOAM5318m5BJjBrV3U+H4e7lS+Xkl9tAZ2mp9I+V0Xlam4CQzgAbXja1 4PMdnxfA1HbnaJOJvQ6WUAVNgLXhXGgD+g== X-Google-Smtp-Source: ABdhPJxslNMU+29esstEPBOOQfkrSif7cOHN7fx6U0rs9Ge1OpsFDG6DkAeSQULr6yLpNUKh2/jHxw== X-Received: by 2002:a17:906:7d83:b0:6ce:fee:9256 with SMTP id v3-20020a1709067d8300b006ce0fee9256mr8469188ejo.647.1650718343238; Sat, 23 Apr 2022 05:52:23 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH v2 13/34] meson, configure: move --enable-module-upgrades to meson Date: Sat, 23 Apr 2022 14:51:30 +0200 Message-Id: <20220423125151.27821-14-pbonzini@redhat.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220423125151.27821-1-pbonzini@redhat.com> References: <20220423125151.27821-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Type: text/plain 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+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::630; envelope-from=paolo.bonzini@gmail.com; helo=mail-ej1-x630.google.com X-Spam_score_int: -4 X-Spam_score: -0.5 X-Spam_bar: / X-Spam_report: (-0.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, PP_MIME_FAKE_ASCII_TEXT=0.999, 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: , Cc: marcandre.lureau@redhat.com Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1650719307551100001 Reviewed-by: Marc-Andr=C3=A9 Lureau Signed-off-by: Paolo Bonzini --- 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 1fb70bf614..59c43bea05 100755 --- a/configure +++ b/configure @@ -310,7 +310,6 @@ fortify_source=3D"yes" 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 19032a829b..77045cf7d4 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()) @@ -3574,7 +3579,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 Sun May 5 15:06:46 2024 Delivered-To: importer2@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+importer2=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 1650719274033810.6720123452162; Sat, 23 Apr 2022 06:07:54 -0700 (PDT) Received: from localhost ([::1]:45256 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1niFUO-0002LA-S3 for importer2@patchew.org; Sat, 23 Apr 2022 09:07:52 -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 1niFFZ-0007Ka-Oa for qemu-devel@nongnu.org; Sat, 23 Apr 2022 08:52:36 -0400 Received: from mail-ed1-x52b.google.com ([2a00:1450:4864:20::52b]:45912) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1niFFS-0005Ai-Nr for qemu-devel@nongnu.org; Sat, 23 Apr 2022 08:52:31 -0400 Received: by mail-ed1-x52b.google.com with SMTP id be20so5112978edb.12 for ; Sat, 23 Apr 2022 05:52:26 -0700 (PDT) Received: from avogadro.lan ([2001:b07:6468:f312:1c09:f536:3de6:228c]) by smtp.gmail.com with ESMTPSA id bo14-20020a170906d04e00b006ce98d9c3e3sm1655573ejb.194.2022.04.23.05.52.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 23 Apr 2022 05:52:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=9CRULFmGb8JuMU5SN8qBhe8UXJr2Mq7ocDKDHiBZkM8=; b=WaCMEYgFkJY/nnN+zVIDCKi18R5pE7rzv7MpAyQkN7GcucX4aJhay/Skz1LhsZAVVr +uUDiP/eJWhFCmWuew0oQa7+Z3aTMDgsNCgB3lqPdTPDKmv5kcoNfNkzJjo5ZO11951L fGStbVJ31bIxhXCGpuqoHl0QZ22yy3PixlF0VwDP87y/Np0x61BTtS4u4as2OXxotf2R 76kV3vNYkQoLRXDZtBlDMzcVE+cUFbjzWmLQfSpxkTy70P46OaBrNRhAOpQNO/DRoGS/ QqUTQ7TTXGWrIDaknEehuXDdF/685S00+rnhAPOnuTr4Q7gnoralExrgRN5H66caWj9M hnqQ== 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:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=9CRULFmGb8JuMU5SN8qBhe8UXJr2Mq7ocDKDHiBZkM8=; b=D6maLOIIv7qBk0biOL912HNwv8eqe57Pdh2bcVm8b19z4Pawdekr96+IlVF9JSIBIU 1wX+yCjnknZeuQldfLC3rAcKvg6zSw3c9sn4RXcd0xrnUHTbclOiAEtTxZ+1PnEMDdZQ OCwZsV9UJ2t81CVj927du00FSXvXvlB4TCd27nHexY5Tu1jVli0Wqu9M8uJqPJteQoG8 qCTgVu+wy3qCmlNJUAG2LFxgEC4LSOLv4Rcdkp/ZRUhvpb8HySR8k+fdT5PdR5EEUeo5 7aSpbsS/ysuMEwCwT3MAGjtY/scpUtlLT5rmCdnS9mPvERaj8j/ROMnQFm5LkNUYalMf w1Dg== X-Gm-Message-State: AOAM532hXKLN1ZY1KR8G3jdFWPQKI3i3FM0mRgYSlADgr62efvzUZc1L zlHIF+iSk0rpPOmd8KTbUobv0+5jkuBT2Q== X-Google-Smtp-Source: ABdhPJxS3Np07KoSu/ZpY5Bb9UykonoOGRZMZmATfT1KSIGORj+CMIUiBpr3iJsk+3pK16zsBIPyQw== X-Received: by 2002:a05:6402:34c9:b0:423:deb7:f69e with SMTP id w9-20020a05640234c900b00423deb7f69emr10075874edc.335.1650718345369; Sat, 23 Apr 2022 05:52:25 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH v2 14/34] meson, configure: move Xen detection to meson Date: Sat, 23 Apr 2022 14:51:31 +0200 Message-Id: <20220423125151.27821-15-pbonzini@redhat.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220423125151.27821-1-pbonzini@redhat.com> References: <20220423125151.27821-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+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::52b; envelope-from=paolo.bonzini@gmail.com; helo=mail-ed1-x52b.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: , Cc: marcandre.lureau@redhat.com Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1650719275395100001 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 | 112 ++++++++++++--- scripts/xen-detect.c | 203 +++++++++++++++++++++++++++ 3 files changed, 296 insertions(+), 341 deletions(-) create mode 100644 scripts/xen-detect.c diff --git a/configure b/configure index 59c43bea05..a3ac5af863 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 @@ -2837,7 +2517,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 77045cf7d4..47e874f0c3 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,6 +1695,15 @@ 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_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) +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]) @@ -2356,7 +2428,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, @@ -3687,9 +3759,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 Sun May 5 15:06:46 2024 Delivered-To: importer2@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+importer2=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 1650719538471946.4348099180437; Sat, 23 Apr 2022 06:12:18 -0700 (PDT) Received: from localhost ([::1]:55892 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1niFYf-0001BG-Dn for importer2@patchew.org; Sat, 23 Apr 2022 09:12:17 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42766) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1niFFX-0007K3-5C for qemu-devel@nongnu.org; Sat, 23 Apr 2022 08:52:36 -0400 Received: from mail-ej1-x62c.google.com ([2a00:1450:4864:20::62c]:37594) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1niFFU-0005Ar-W0 for qemu-devel@nongnu.org; Sat, 23 Apr 2022 08:52:30 -0400 Received: by mail-ej1-x62c.google.com with SMTP id g13so21194701ejb.4 for ; Sat, 23 Apr 2022 05:52:27 -0700 (PDT) Received: from avogadro.lan ([2001:b07:6468:f312:1c09:f536:3de6:228c]) by smtp.gmail.com with ESMTPSA id bo14-20020a170906d04e00b006ce98d9c3e3sm1655573ejb.194.2022.04.23.05.52.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 23 Apr 2022 05:52:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=QM4aSryhMOlrXHpZhEssvOA46rFNviioyue6r+UKFeA=; b=n8SfamY0nBu8Tuinhcy7Ot/KvdKgnBv7ktrrIYXNZKgmlTouHfM1zfmsvmPdEjQj8d Vk8QO68QG3dHQ9b3TYItNwyAl7HZYX5xWYItlOMaJWA0xDOnrLDoiQB1oZFaowvmc1p+ 0j7rcbM3aK72T+wEdMeoAMJrAKlsGTpksialp7NpHi8mriDxvAL29qtH6e4qV4ye3n4O ioZ+tB9NOX7vAVsMUYP45N/c7/yJ76d4FVXxgvA8DrDe6kWqqVag8cnmAIzbn5W1DZHi N3OTB17wn7MDkyH6/HyoALxGep9bMXXsz3DTlr5jo6muCqfwIjl2DO327JAkkPmdbOIe VBcA== 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:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=QM4aSryhMOlrXHpZhEssvOA46rFNviioyue6r+UKFeA=; b=xzVqB/3wZLG6XkB9FVEvtX72/5ZdF8k5bHzHv98mxB+d95tp+vH+m7q27jtwMP1QIK JlKz7l/lS/sFxMM2z3uGa8qLiHBV6a9QAWaYrr2+SQEnWtRM5ozZrjkgOWXhvsG9mFvk wuD0eyK6t6VXEshqykJHbf1PJQtUTkLp2OyUQcBWeI2hut+Yl7YuK2qfItizHSvWdsBs aCSCInGwDbLNvTDheq8byV3UhCg3cP5g0mkieuOeaT8Ei0CZHaiZXSuDETSd59gb7r0S PtURkGkEQg+BXouHKziM1pNosMeyH51yuyq8W6zrdWJhTSLdBFjrTORSX+L29Afb3JCx /PRA== X-Gm-Message-State: AOAM532Z4qvYKfZjiZJJw5LRAgifUzaP7Dcf3KOgquPli5T11Mcb2b9m /N9gZe46scqPAQRiYIxIFPLoMcFyEZ3F3A== X-Google-Smtp-Source: ABdhPJwYXgJsFVT7BaTySW8Zt2+3eZVpILs2h/euIJFy1SnJN3sYgM7Gg6UUEdv7NC1kD9/C43CQuw== X-Received: by 2002:a17:907:72d5:b0:6ec:abf:dc87 with SMTP id du21-20020a17090772d500b006ec0abfdc87mr8368280ejc.120.1650718346511; Sat, 23 Apr 2022 05:52:26 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH v2 15/34] meson-buildoptions: add support for string options Date: Sat, 23 Apr 2022 14:51:32 +0200 Message-Id: <20220423125151.27821-16-pbonzini@redhat.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220423125151.27821-1-pbonzini@redhat.com> References: <20220423125151.27821-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Type: text/plain 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+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::62c; envelope-from=paolo.bonzini@gmail.com; helo=mail-ej1-x62c.google.com X-Spam_score_int: -4 X-Spam_score: -0.5 X-Spam_bar: / X-Spam_report: (-0.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, PP_MIME_FAKE_ASCII_TEXT=0.999, 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: , Cc: marcandre.lureau@redhat.com Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1650719538803100001 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. Tested-by: Marc-Andr=C3=A9 Lureau Signed-off-by: Paolo Bonzini --- 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 Sun May 5 15:06:46 2024 Delivered-To: importer2@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+importer2=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 1650719257152293.9445907463198; Sat, 23 Apr 2022 06:07:37 -0700 (PDT) Received: from localhost ([::1]:45368 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1niFU8-0002Pj-3A for importer2@patchew.org; Sat, 23 Apr 2022 09:07:36 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42786) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1niFFc-0007L2-Sh for qemu-devel@nongnu.org; Sat, 23 Apr 2022 08:52:42 -0400 Received: from mail-ej1-x62a.google.com ([2a00:1450:4864:20::62a]:44753) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1niFFX-0005Ax-5s for qemu-devel@nongnu.org; Sat, 23 Apr 2022 08:52:34 -0400 Received: by mail-ej1-x62a.google.com with SMTP id u15so21097568ejf.11 for ; Sat, 23 Apr 2022 05:52:30 -0700 (PDT) Received: from avogadro.lan ([2001:b07:6468:f312:1c09:f536:3de6:228c]) by smtp.gmail.com with ESMTPSA id bo14-20020a170906d04e00b006ce98d9c3e3sm1655573ejb.194.2022.04.23.05.52.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 23 Apr 2022 05:52:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=7hKDbCtZzuTgitwVi6udR59qz5G6WpBEdGofMT1O4FI=; b=RhtfFpgAORDP2IHS2Qhz9jRSQUn9473u7dNNjsgfyQY8T/ZmOgFBIc6b4bMB11Tw3E CMUzuPJIv60QgA3mjP5qZUQb5EhiKt9NakxB+rXm7VwiM+mUfOxgS6E5uaycZJl7fZgN 1bgXIOwGMql3Vl+4Z8qLDTjWCXBviapO50bR/BiLcbmRUluxjnnmRstwk4TRFZb+5DjJ rgo5BdQHuaErpC+sS4f4Sxs9ut7EgE1yF/2TcrUFMngKvWPdOSS6YfFhYaduQZuTVYsD O4TSewHz1gcLefYKPXjFH7IZHKzuaooPquhXMrEKjQwmZ2rGn5NOcRt4TuZ6V+1Tv4UM 5Wgw== 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:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=7hKDbCtZzuTgitwVi6udR59qz5G6WpBEdGofMT1O4FI=; b=FmGSSY5+sEMerZvbKz4R/YSdCDo1cgWG95NjpPiwXW+cXpdvhvdV5UbxdDFcCVT7f7 u3R8PLE1nkJfXLQm2Y+i4GEZc8RXbGY7F+AwbQ9T+KLdembOBNhOitfItZOt11pjv27n b+uCPNbz4XAz4jF8kpBcG7GksY6TZ9T6jcUId6tfG81/XSlEA0W57IY+CDk1rEukRt/D SxZYVVjYQ/fngWKpa3Hn7irRd15eCanTN85DqQnUWMJGefN3aaHDMRfbFQaQsN3zG2AG O2T+jYWe7sPa6WZuQY5e7GeSU9WIer5Z42r77yy8FIJZQwJudtMAC4kGi6W3H5E+ac+h IUVg== X-Gm-Message-State: AOAM530ALgdy7Uu0aSAJ4aFcxNwD/rI/UNZCIzvR+pZBO2jWLapAa/Ll DW+LzCxv0gCwdLehQZloTr6aYee4UBNwyA== X-Google-Smtp-Source: ABdhPJwdtzr3Yw/pl6+Yg27TZlfqy/J4A/5MCLBQVXgDVTXyv+WStDeXsqImBwtaxLEOHquyzaQaZw== X-Received: by 2002:a17:906:3144:b0:6ce:de5d:5e3b with SMTP id e4-20020a170906314400b006cede5d5e3bmr8238452eje.689.1650718349989; Sat, 23 Apr 2022 05:52:29 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH v2 16/34] configure, meson: move iasl detection to meson Date: Sat, 23 Apr 2022 14:51:33 +0200 Message-Id: <20220423125151.27821-17-pbonzini@redhat.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220423125151.27821-1-pbonzini@redhat.com> References: <20220423125151.27821-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Type: text/plain 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+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::62a; envelope-from=paolo.bonzini@gmail.com; helo=mail-ej1-x62a.google.com X-Spam_score_int: -4 X-Spam_score: -0.5 X-Spam_bar: / X-Spam_report: (-0.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, PP_MIME_FAKE_ASCII_TEXT=0.999, 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: , Cc: marcandre.lureau@redhat.com Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1650719259375100001 Reviewed-by: Marc-Andr=C3=A9 Lureau Signed-off-by: Paolo Bonzini --- configure | 2 +- meson.build | 16 +++++++++------- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/configure b/configure index a3ac5af863..0b236fda59 100755 --- a/configure +++ b/configure @@ -2506,7 +2506,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 47e874f0c3..1a9549d90c 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')) @@ -3628,11 +3634,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 Sun May 5 15:06:46 2024 Delivered-To: importer2@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+importer2=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 1650719469345182.25075597929242; Sat, 23 Apr 2022 06:11:09 -0700 (PDT) Received: from localhost ([::1]:53768 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1niFXY-00088M-9I for importer2@patchew.org; Sat, 23 Apr 2022 09:11:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42806) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1niFFe-0007L5-5Z for qemu-devel@nongnu.org; Sat, 23 Apr 2022 08:52:42 -0400 Received: from mail-ed1-x532.google.com ([2a00:1450:4864:20::532]:39676) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1niFFc-0005BG-Kz for qemu-devel@nongnu.org; Sat, 23 Apr 2022 08:52:37 -0400 Received: by mail-ed1-x532.google.com with SMTP id g20so13460716edw.6 for ; Sat, 23 Apr 2022 05:52:35 -0700 (PDT) Received: from avogadro.lan ([2001:b07:6468:f312:1c09:f536:3de6:228c]) by smtp.gmail.com with ESMTPSA id bo14-20020a170906d04e00b006ce98d9c3e3sm1655573ejb.194.2022.04.23.05.52.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 23 Apr 2022 05:52:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=DVskec/7TgJYKkTM4ZjusbcXkRCS9kju5lUSDbN7nEU=; b=AiJHNkcRroz8NjQIq8Ao+9zADknEhFRVkslttUyRabZhm4S0MUWHOxSf4IoiRgi42r gWH0w2wPMG4FZHykpDHONqTzdnrJD4qJfGSe2QqxEuj9cI3KeXgyQLfnEphql0PJk54r dTH6LtlRTkFmErNFSO1CVjQA9ez8y88205plRvEFPgSrn+zsjx1YBby2kG8qlyT4E+0W e9/7vyFXFxXRb0b1HB7Je+DmCpztU9iOc+d2CgCNH7vxGrbSldn5jRZ94ssdl88XyVH4 P0vNRfFcr/nVf3Y6XVQsMnlktK0RR9ODPQwR1+0TGGqqPftwuapv3WQwv7z/iWCKlsA1 F9VQ== 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:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=DVskec/7TgJYKkTM4ZjusbcXkRCS9kju5lUSDbN7nEU=; b=zHCzn2Z5kesdek9QQ7vkdpuIJ1TFtkkqtDtR2m3ezztW7YORCzgRKsYlQg8PXmg5LQ bVAn42z3aO5B1O1ztWyPr5k92kzpxcCfdizzU5pGlBNBW2O3wMLctcCrOwUIP/3p6csf B1xNLD9SJAIMLM1VyZUddZPJRQ8wXreu68Z9Ej2zqXD892ZUGhtYYRBjQyDamgPjxIUS kvTYOMQU2UzS5l56xdCcdgd6VGFVKeo/FfQkAoxYOy0eWuM4jA0/fHPaCYKj2Uw1a9Pl 1MEuxEEOQg1rPXvqfOSBYSm6yLo+bHH5R7Fd911SvGW8gC5DxZuvl48pqXQqCzI6ueez gy/A== X-Gm-Message-State: AOAM533SrWzhVydyC0tiRh/dOVxrg/ZlVtNnmuTmhdyq0WdBPUSaGWa/ mX2c+bfrFND8lm84e8srILqIzfubjbJx/w== X-Google-Smtp-Source: ABdhPJzxRvHbJo1psjazyUgyWAWNNLIdA2N77tq+KLu0qwA2pCTGwdtnora/Rsdo7rwt+/MTeZoyYQ== X-Received: by 2002:a05:6402:4488:b0:425:9335:bbcb with SMTP id er8-20020a056402448800b004259335bbcbmr10138646edb.197.1650718354171; Sat, 23 Apr 2022 05:52:34 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH v2 17/34] configure: move Windows flags detection to meson Date: Sat, 23 Apr 2022 14:51:34 +0200 Message-Id: <20220423125151.27821-18-pbonzini@redhat.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220423125151.27821-1-pbonzini@redhat.com> References: <20220423125151.27821-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+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::532; envelope-from=paolo.bonzini@gmail.com; helo=mail-ed1-x532.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: , Cc: marcandre.lureau@redhat.com Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1650719470471100003 Content-Type: text/plain; charset="utf-8" Signed-off-by: Paolo Bonzini Reviewed-by: Marc-Andr=C3=A9 Lureau --- v1->v2: fix get_option('optimization') comparison to use a string configure | 20 -------------------- meson.build | 8 ++++++++ 2 files changed, 8 insertions(+), 20 deletions(-) diff --git a/configure b/configure index 0b236fda59..a6ba59cf6f 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 1a9549d90c..d569c6e944 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 Sun May 5 15:06:46 2024 Delivered-To: importer2@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+importer2=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 1650719761005150.63562890979063; Sat, 23 Apr 2022 06:16:01 -0700 (PDT) Received: from localhost ([::1]:36710 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1niFcF-0007jD-Ty for importer2@patchew.org; Sat, 23 Apr 2022 09:15:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42816) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1niFFf-0007L7-6c for qemu-devel@nongnu.org; Sat, 23 Apr 2022 08:52:42 -0400 Received: from mail-ej1-x62b.google.com ([2a00:1450:4864:20::62b]:36474) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1niFFd-0005BL-4y for qemu-devel@nongnu.org; Sat, 23 Apr 2022 08:52:38 -0400 Received: by mail-ej1-x62b.google.com with SMTP id k23so21201538ejd.3 for ; Sat, 23 Apr 2022 05:52:36 -0700 (PDT) Received: from avogadro.lan ([2001:b07:6468:f312:1c09:f536:3de6:228c]) by smtp.gmail.com with ESMTPSA id bo14-20020a170906d04e00b006ce98d9c3e3sm1655573ejb.194.2022.04.23.05.52.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 23 Apr 2022 05:52:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=4yKm4UvJ2WgE67gn1ecRfThuqqNn2HqpkFCAhFSxTkc=; b=WIrnPUo76cHxpkKmXYsWIFFI0LBQ4Z7kC/SLRX1vdKDngcF1BIcNiRYrn4RI3gQRP+ 9ObQSKj5vMjEeiSllRQZZ1PhD8LJVkH0lGLDSXxQmq1wRYlIsESOUq9CTpxmjSUDeMeO 3jWdszTjJiQYAWoczhamhOK9wNBaWnNq4pAtly3LZhA66iiRtH3QriUDWMYpXWckWwxA sYuOuQ8QY/hsCD71jIU91BR+PIle2+xL5q6cen6S60YtMgG+Mc1MqyoXxbglSveLjVmG EEDCpero7dSlHeR0tWSYnf9UI0znhXCn+711iMI0gQw7BWjnm9IGANQHPzS22MT+oXbH NUCg== 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:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=4yKm4UvJ2WgE67gn1ecRfThuqqNn2HqpkFCAhFSxTkc=; b=TiVLXk1cXhC3kkznQddyfA1o1Ht2haUiy7e9e0gOAEzM495f82774KPOx1ftDvYMg0 ErKz2gy5hGNeIikDvkacGXRz1JVekiJpwaalPZLuryF7hz7ZngZzGUh3djnGgLbvXwgj m6vy0MwqImaPwJSWQedo5/B6vqh6+btcTZaZT3c18N6keiEWDx+z6ncIh6IPeV0VA/0a Zwq9bRfqJKlRY1Db5SnA28q9NTuf8jc2C3tzSeKEcfq2V0uDwk+MIfuxhn1gcClGm4P+ OzJu3cKYNNjGBG/ryd34FhL4eFo9t90O36QnfqIc2pXLn2xsvofvib5UxbFWseK/mR8b fKGw== X-Gm-Message-State: AOAM532CvObkTme754QOg+jPoRsQvcwNqvZX/QITjC06gPEB+Wp7H6HH cv/KDlzszNE7uAXn+dkyh2oJ9Po4bUQudQ== X-Google-Smtp-Source: ABdhPJyUEI+lBKDYgDtCGMjoxAX93q9R1BQUy/+CvGa/ukaH1rxymVVdXNsnqiZl5wOAYe4u42BRtw== X-Received: by 2002:a17:907:da7:b0:6df:9ff4:10c7 with SMTP id go39-20020a1709070da700b006df9ff410c7mr8130334ejc.106.1650718355834; Sat, 23 Apr 2022 05:52:35 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH v2 18/34] configure: switch string options to automatic parsing Date: Sat, 23 Apr 2022 14:51:35 +0200 Message-Id: <20220423125151.27821-19-pbonzini@redhat.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220423125151.27821-1-pbonzini@redhat.com> References: <20220423125151.27821-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Type: text/plain 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+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::62b; envelope-from=paolo.bonzini@gmail.com; helo=mail-ej1-x62b.google.com X-Spam_score_int: -4 X-Spam_score: -0.5 X-Spam_bar: / X-Spam_report: (-0.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, PP_MIME_FAKE_ASCII_TEXT=0.999, 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: , Cc: marcandre.lureau@redhat.com Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1650719762062100001 Reviewed-by: Marc-Andr=C3=A9 Lureau Signed-off-by: Paolo Bonzini --- 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 a6ba59cf6f..8de8fea4af 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] @@ -2483,15 +2465,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 Sun May 5 15:06:46 2024 Delivered-To: importer2@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+importer2=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 1650719544598264.51895292520385; Sat, 23 Apr 2022 06:12:24 -0700 (PDT) Received: from localhost ([::1]:56376 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1niFYl-0001Zn-Hk for importer2@patchew.org; Sat, 23 Apr 2022 09:12:23 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42844) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1niFFg-0007LY-K0 for qemu-devel@nongnu.org; Sat, 23 Apr 2022 08:52:42 -0400 Received: from mail-ed1-x534.google.com ([2a00:1450:4864:20::534]:33594) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1niFFe-0005BV-NW for qemu-devel@nongnu.org; Sat, 23 Apr 2022 08:52:40 -0400 Received: by mail-ed1-x534.google.com with SMTP id e30so9919653eda.0 for ; Sat, 23 Apr 2022 05:52:38 -0700 (PDT) Received: from avogadro.lan ([2001:b07:6468:f312:1c09:f536:3de6:228c]) by smtp.gmail.com with ESMTPSA id bo14-20020a170906d04e00b006ce98d9c3e3sm1655573ejb.194.2022.04.23.05.52.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 23 Apr 2022 05:52:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=KE5W/d6LlVFZ2XZ1tI5f3QXLsONnqElJa/y8Ub4p8Ko=; b=I+/5VOfPqWrzEqX+7SwismSe+uqC6xgv51QJd5u0nYas3VlGgh2HhKXB/fq+fijMK5 F6VPKH/5ZqjX7PMGEoE2alCEPCWfgnXcZvidpxmvXod4Ee+Gf4GmkhKxmsi/Wdg+HMQO 0JllNQSq8TAsDpGxecXfOw7TAOnGDZ8MP9j/c6ujqQaSJe1tTys2wXyghiHXSPdBbgwr uuyW+legZLB/sJKviO7lOHtln9zfTEP1c1pQPAhsXOMZXXPTadZJd+lrQTKCn/CV8hly kSRwAgVLDTUwc4ZANfexVcbMQMw80YgC41SfzIp6Th/teJ55JK67MCTl4aoP68kLz5GT Q6EA== 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:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=KE5W/d6LlVFZ2XZ1tI5f3QXLsONnqElJa/y8Ub4p8Ko=; b=jJ3sO2JV5QFVZ+HQGL+nz36BzeRXmc+TacBJpLIWwP8eJhnzAYPyjJyda9eXvLj3Ld 90zx72/o0PLSTcFVUuYApmv0b2CQ3Qd+sHiZ5Wdfk9QM/0r6m8NiP8UGDtPv4Ojt5Qig FoR9u//Rg/nXHzZZzbeNT+OnejA1cEZQQMlgufR4vDS1JXCME4Erk2HsTKhj6gRO9CHy uejSUWZ3pUC5HmIp2h1+hPAg7SbZ5uNzBguU0v5X6QTSYCvrZSLHhuMsNYO8U/DbaOdV zltFzzcgVf5QPHsQ9rR15IaE2mCdOMrR767OLvZ4voPx+u2sgpzsF/x39BePpYSUN0xF jrGg== X-Gm-Message-State: AOAM530stK4fEyBwsRakudvx3CBezdv7xa5tY8m4qtWN5U2LwXPrXUIe ByPb2x8GeOVHEj/AZ55v7lEsD0vnp7xMmQ== X-Google-Smtp-Source: ABdhPJxukG0Ep0dwPmiU79sR8zMPS7MRZEmDwId8R6KAKMuxz8QsbMEQrKLBR88OGGAoxwoaIsmJ0g== X-Received: by 2002:a05:6402:524a:b0:422:2959:1266 with SMTP id t10-20020a056402524a00b0042229591266mr9836618edd.308.1650718357375; Sat, 23 Apr 2022 05:52:37 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH v2 19/34] meson, configure: move --tls-priority to meson Date: Sat, 23 Apr 2022 14:51:36 +0200 Message-Id: <20220423125151.27821-20-pbonzini@redhat.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220423125151.27821-1-pbonzini@redhat.com> References: <20220423125151.27821-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Type: text/plain 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+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::534; envelope-from=paolo.bonzini@gmail.com; helo=mail-ed1-x534.google.com X-Spam_score_int: -4 X-Spam_score: -0.5 X-Spam_bar: / X-Spam_report: (-0.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, PP_MIME_FAKE_ASCII_TEXT=0.999, 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: , Cc: marcandre.lureau@redhat.com Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1650719544850100001 Use the new support for string option parsing. Reviewed-by: Marc-Andr=C3=A9 Lureau Signed-off-by: Paolo Bonzini --- 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 8de8fea4af..c23f12159e 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 d569c6e944..f0b861aacd 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 @@ -3817,7 +3818,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 Sun May 5 15:06:46 2024 Delivered-To: importer2@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+importer2=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 1650719925385322.2165046710827; Sat, 23 Apr 2022 06:18:45 -0700 (PDT) Received: from localhost ([::1]:45060 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1niFeu-0005DT-BN for importer2@patchew.org; Sat, 23 Apr 2022 09:18:44 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42860) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1niFFj-0007Ml-Ab for qemu-devel@nongnu.org; Sat, 23 Apr 2022 08:52:43 -0400 Received: from mail-ej1-x62f.google.com ([2a00:1450:4864:20::62f]:41497) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1niFFg-0005Bm-BG for qemu-devel@nongnu.org; Sat, 23 Apr 2022 08:52:41 -0400 Received: by mail-ej1-x62f.google.com with SMTP id y10so21132933ejw.8 for ; Sat, 23 Apr 2022 05:52:39 -0700 (PDT) Received: from avogadro.lan ([2001:b07:6468:f312:1c09:f536:3de6:228c]) by smtp.gmail.com with ESMTPSA id bo14-20020a170906d04e00b006ce98d9c3e3sm1655573ejb.194.2022.04.23.05.52.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 23 Apr 2022 05:52:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=VBs4vjitGdQirWraLuswcU5ORW9WNwSgTDn5ND5M/lY=; b=V7d7xzGYzUFhPHyIobuNBYNKx8WbrHI30jnYlI8a5HG26YhpHcWIed7XPbWmt//g6j Picd48svXepdKHkPfry6gAvkU1aO0kXS55S/lzIfHEA+dTktc7swYquKAEiNv1HEZ23C NMfFCBLYo904hpD9EDzhqImFkD0rmkVtyK8Bx2nEjpyoQctHs0BrXfTJn+zGaVBIa47F lt+6bQeCuPeIHmAmKh+WV0vn5V6hJ74/2vtEeS9R6TYaL3+HzWu3A7VbfOhjeY4xehsT UWaFHnm2aTwi7J3xPGVWezagPoVA88vhhVj3DPgrBRSF3WgEBr0jK+bAAU/B6Eym4cLA +2xw== 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:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=VBs4vjitGdQirWraLuswcU5ORW9WNwSgTDn5ND5M/lY=; b=Qw0M7IzKm8VT4FR3k0sJdpuku4AptqQbSkAOMLNCxnntExEgOSfVTiKxTkqpu7LojN 8+i2bMt18oD9JObjtlp4zDJ3IDFZHqz3HVAZ7qPWgsbdn16eF8OK5eWGGtWzCGdboxL9 ODBPR9WB1+x281k3SD0PvMdA31PmZ/MJnSVcNJ8YPTox7P14G5x0nxU2hCUTac1i9gdi w+E3sbK3hfGLRLGgM44G4omoNRkXj9hGg7RrEhXx9Mol+9JUAF0b5FLkJapG4zP6CLHs l0Z8DV7O5A/rwQJyU18Ncor08z+7hDBx6mXyJFRxn6yA8lPXxTv1P+/iz1MTKw3qPJzu /CZA== X-Gm-Message-State: AOAM533y56P+zq/BF2KGAPSQpavvBrGQYJEP7yNCbJ5muivDBHyFNNXc AEKvG85KtTcSMx3zLqBl84DbeT47M7KH+g== X-Google-Smtp-Source: ABdhPJznY11BRCD+kab/k8RQWrdzgEup4lJLTfkk6nHkCcchiHn4Asy+uq9BLuxJri+1c/tS4SmarA== X-Received: by 2002:a17:907:6e0d:b0:6e0:59ae:21f1 with SMTP id sd13-20020a1709076e0d00b006e059ae21f1mr8442926ejc.362.1650718358921; Sat, 23 Apr 2022 05:52:38 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH v2 20/34] meson, configure: move bdrv whitelists to meson Date: Sat, 23 Apr 2022 14:51:37 +0200 Message-Id: <20220423125151.27821-21-pbonzini@redhat.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220423125151.27821-1-pbonzini@redhat.com> References: <20220423125151.27821-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Type: text/plain 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+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::62f; envelope-from=paolo.bonzini@gmail.com; helo=mail-ej1-x62f.google.com X-Spam_score_int: -4 X-Spam_score: -0.5 X-Spam_bar: / X-Spam_report: (-0.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, PP_MIME_FAKE_ASCII_TEXT=0.999, 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: , Cc: marcandre.lureau@redhat.com Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1650719927186100001 Use the new support for string option parsing. Reviewed-by: Marc-Andr=C3=A9 Lureau Signed-off-by: Paolo Bonzini --- v1->v2: fix RO/RW typo 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 c23f12159e..56dcc7ba8e 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 f0b861aacd..da8d3076d7 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_RW_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 @@ -2206,16 +2219,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 @@ -3797,8 +3802,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 Sun May 5 15:06:46 2024 Delivered-To: importer2@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+importer2=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 1650719467810498.2496281839352; Sat, 23 Apr 2022 06:11:07 -0700 (PDT) Received: from localhost ([::1]:53650 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1niFXW-00082l-Ov for importer2@patchew.org; Sat, 23 Apr 2022 09:11:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42886) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1niFFk-0007Os-Vl for qemu-devel@nongnu.org; Sat, 23 Apr 2022 08:52:45 -0400 Received: from mail-ej1-x635.google.com ([2a00:1450:4864:20::635]:45638) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1niFFi-0005C0-4C for qemu-devel@nongnu.org; Sat, 23 Apr 2022 08:52:44 -0400 Received: by mail-ej1-x635.google.com with SMTP id y3so791822ejo.12 for ; Sat, 23 Apr 2022 05:52:41 -0700 (PDT) Received: from avogadro.lan ([2001:b07:6468:f312:1c09:f536:3de6:228c]) by smtp.gmail.com with ESMTPSA id bo14-20020a170906d04e00b006ce98d9c3e3sm1655573ejb.194.2022.04.23.05.52.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 23 Apr 2022 05:52:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=8XrJaRvvrhzzc/9h69WhtVUDnFV/wvbnBeaU7prxgqs=; b=ZbA9j0AElIGVlkZLdNrIjvmVA+g683+BmpHZHh+cVyare1W0o+ku4w4iRv3FcfkH9t lCKCZjvBPYmlI/963st8MSoYN3oRx9x8Ethg5+Sop/Zi5Nw6go26WSQMj85XX87Hez/M Ny5AtFL4ESSaImejqMOHTt6zgSG9gOj0dinYYqJfwk4SzGBbXyjKyQbeRCCp9VqhAbiY xTILs6UrDu6hHxjHCi6wwNYQZMjk570QBIqJPe/VpqIYAN/nqzjng7Fcw/ObUo0JK5Hd fwfkiwzxjprL7nWHvPI60kbbkDWj718onPF45P1HO0wvuRUagd4LqMk6GDZSu+tb32WS YE6A== 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:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=8XrJaRvvrhzzc/9h69WhtVUDnFV/wvbnBeaU7prxgqs=; b=EptRLk/tlpMUXSQOtmCEnjtVRuQnfABoxCM/WsdGlUaAYSgbLoXy69uv9n7V2RJQ8/ ovfaZmrUUeRepEmRV1m6PVEs4hLXzl2PimV2Fu+9olfaqAEnL4EPBk70aazGIqixfTip YeM+TSjmjfvO2olAc1Z06D9YPq33Rs4jZaBVj5bRxJkLYhRwuaaGmAHbQ49dVv8spmh8 2DllK76UasgKOB/tU+roQ1cl3NbtQ0zN+G+QMBHV3iQGNEujULeIAULjKx+bHb35JSiZ 8Jg6JHhG4l0E5Bzm4MXXqWV4phlEmOSgn70HJ4Hx2BiObP83yblRe849DqGxkUwDZjZJ P6Ig== X-Gm-Message-State: AOAM532xmsnkW+KYbwUGSvZYrTzw7O5AQl0Tas8/JVyf0Vg90hl1DQYY Mzmv4mr8LV9+b+JHstobfv9MaWt38u6AvA== X-Google-Smtp-Source: ABdhPJwQbUJs254V7VLnM8DTOF2YBYRkou5bLHXdUnudkBNoyh4W+rmdAsc7XGwbNyQ4mJfuaHLaLw== X-Received: by 2002:a17:907:7b96:b0:6f0:2922:7ff8 with SMTP id ne22-20020a1709077b9600b006f029227ff8mr8227582ejc.398.1650718360171; Sat, 23 Apr 2022 05:52:40 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH v2 21/34] meson, configure: move --with-pkgversion, CONFIG_STAMP to meson Date: Sat, 23 Apr 2022 14:51:38 +0200 Message-Id: <20220423125151.27821-22-pbonzini@redhat.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220423125151.27821-1-pbonzini@redhat.com> References: <20220423125151.27821-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Type: text/plain 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+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::635; envelope-from=paolo.bonzini@gmail.com; helo=mail-ej1-x635.google.com X-Spam_score_int: -4 X-Spam_score: -0.5 X-Spam_bar: / X-Spam_report: (-0.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, PP_MIME_FAKE_ASCII_TEXT=0.999, 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: , Cc: marcandre.lureau@redhat.com Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1650719468469100001 The hash is now generated with a Python script. Reviewed-by: Marc-Andr=C3=A9 Lureau Signed-off-by: Paolo Bonzini --- 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 56dcc7ba8e..3f0fe1c4e1 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 da8d3076d7..66b2a3aa31 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() @@ -2796,7 +2804,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 Sun May 5 15:06:46 2024 Delivered-To: importer2@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+importer2=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 1650720128604488.88155352126637; Sat, 23 Apr 2022 06:22:08 -0700 (PDT) Received: from localhost ([::1]:52570 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1niFiB-0002oe-IX for importer2@patchew.org; Sat, 23 Apr 2022 09:22:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42888) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1niFFl-0007P9-Bv for qemu-devel@nongnu.org; Sat, 23 Apr 2022 08:52:45 -0400 Received: from mail-ej1-x633.google.com ([2a00:1450:4864:20::633]:34611) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1niFFj-0005CA-JJ for qemu-devel@nongnu.org; Sat, 23 Apr 2022 08:52:45 -0400 Received: by mail-ej1-x633.google.com with SMTP id ks6so21216739ejb.1 for ; Sat, 23 Apr 2022 05:52:43 -0700 (PDT) Received: from avogadro.lan ([2001:b07:6468:f312:1c09:f536:3de6:228c]) by smtp.gmail.com with ESMTPSA id bo14-20020a170906d04e00b006ce98d9c3e3sm1655573ejb.194.2022.04.23.05.52.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 23 Apr 2022 05:52:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=PLsHIOV/J8FTVgiR3cSfFeze3Hzo4lQbC39Sk+I6bk0=; b=lANLVmdK6zyfPzXeuLnyDd121rxYOBkHlMdw9wEsGp7kInjyIMZ7eUlAzhaTDOBxtP /EkNELo+OmjRBld5TXiljZxBBGyYnR4KZRF+NOLEh8halc1k74dgd4s7WtzWA3NNPs6o LjJBTfZSkpuhkYQWf7DfhywnxERsAq2Czkv3C1vlhg4bM4FUVVTdZfZoJuUfOKLslTvW o+xcSeFp5f2JvO9AQCN/141oqs2H7B9a//NDCoWNJggQhPppqjdqn1lZ5O1o1ID63CJz DbcmSyXZmuEmrfSlaYw8lUvrRnZB/tQ8Za7pXd+K2b9c1fzIQzJ5pbkKw7IsjHlc2jiz XdQg== 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:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=PLsHIOV/J8FTVgiR3cSfFeze3Hzo4lQbC39Sk+I6bk0=; b=ekNVlLL59P3DmdF30jBpkiF+DamQyOAN4ZlgdtV5/RIPbV414mmwijWa2o6H8R3Pjl zjbHIXztIjjCVmlG1w65rw9WAmXP/VJx16KSPz5XRNhH/94vubQz7sZAe+5dTk4om9/p X7UK+38DeV8bYEml6Y471JCEcmOPdu954OnbdputvwTv/ejGsGcJkL07lrcC/kDm/lia AG0rhM7SOIAXZTE+TuHJCje/yDQ3k8CXC5J1ZbdGGr+HiB8BTBOy6UvQUAwgknJCGaDv H/RuQwUTDmW2HnZQuK9DJR8WY/roho5dErn0UbRVdECq3EjSmTcTc6U9a0hc2RVbhEUy bI1w== X-Gm-Message-State: AOAM531NUikpk1Wf49gpTAlx3ubTbXK5FqudUsMESp7yWE0roM/3PBBJ XK7yJgfBPnHRaiYNAnoILTTYvSZDhOTIyQ== X-Google-Smtp-Source: ABdhPJxxbKR7X5VyOamt7JeJCtghkHWMN5vtvrmVDSX5c47gmjXS2COUo9tmeTc2cpx0yWw6q40F/g== X-Received: by 2002:a17:906:a219:b0:6e4:86a3:44ea with SMTP id r25-20020a170906a21900b006e486a344eamr8492807ejy.385.1650718362311; Sat, 23 Apr 2022 05:52:42 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH v2 22/34] meson, configure: move --interp-prefix to meson Date: Sat, 23 Apr 2022 14:51:39 +0200 Message-Id: <20220423125151.27821-23-pbonzini@redhat.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220423125151.27821-1-pbonzini@redhat.com> References: <20220423125151.27821-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Type: text/plain 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+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::633; envelope-from=paolo.bonzini@gmail.com; helo=mail-ej1-x633.google.com X-Spam_score_int: -4 X-Spam_score: -0.5 X-Spam_bar: / X-Spam_report: (-0.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, PP_MIME_FAKE_ASCII_TEXT=0.999, 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: , Cc: marcandre.lureau@redhat.com Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1650720129874100001 This is the last CONFIG_* entry in config-host.mak that had to be special cased. Reviewed-by: Marc-Andr=C3=A9 Lureau Signed-off-by: Paolo Bonzini --- 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 3f0fe1c4e1..2987713a85 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/^/ /') @@ -2288,7 +2283,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 66b2a3aa31..1fdc74c86a 100644 --- a/meson.build +++ b/meson.build @@ -2225,10 +2225,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 @@ -2334,7 +2332,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 Sun May 5 15:06:46 2024 Delivered-To: importer2@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+importer2=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 1650719681782436.66313550928635; Sat, 23 Apr 2022 06:14:41 -0700 (PDT) Received: from localhost ([::1]:33900 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1niFay-0005dA-Pn for importer2@patchew.org; Sat, 23 Apr 2022 09:14:40 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42898) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1niFFm-0007QH-ES for qemu-devel@nongnu.org; Sat, 23 Apr 2022 08:52:46 -0400 Received: from mail-ej1-x62b.google.com ([2a00:1450:4864:20::62b]:40882) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1niFFk-0005CP-PF for qemu-devel@nongnu.org; Sat, 23 Apr 2022 08:52:46 -0400 Received: by mail-ej1-x62b.google.com with SMTP id y20so21163184eju.7 for ; Sat, 23 Apr 2022 05:52:44 -0700 (PDT) Received: from avogadro.lan ([2001:b07:6468:f312:1c09:f536:3de6:228c]) by smtp.gmail.com with ESMTPSA id bo14-20020a170906d04e00b006ce98d9c3e3sm1655573ejb.194.2022.04.23.05.52.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 23 Apr 2022 05:52:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=TQoLEOza6oin0UplM7zhm/vdtebAXQRlMQwMKQhtfh8=; b=dDPLHwZnTpcstT8gPSjzSXkcKTJOaJZR9c3MdPUXDHlGtK/pksNv5tkiNoI4XYXXD+ tWGWvRotswuQP5WPhjzReS32+VQk69f+ReLB9JoaTJoyaywboMAXf6nkpDAd77W/rjCz mBg7ECkBr1RjP0rb4Af+7mFCKKRIT9NDR7RsLVsvRGsnLtd/R4S00uVzBGq9YMtR7q6B o6gb1SSxrULWP63JZ/LxubZp7jaSBGN1Swe6pUQXhfPe+ciTFKih0Vjg1mN6CQMXNXE5 bTIVH2PKy8MNZlkS4CYmDHpi5fx2LdlgasYEXpgoCmvytXVYhdA8YBdMDZWAGD8hyKtR s2RA== 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:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=TQoLEOza6oin0UplM7zhm/vdtebAXQRlMQwMKQhtfh8=; b=mioBf4YSnBKhnT/cNaGoxm0Kl8JP9dXri2zEcof+q/nFnbPaWoBJvj3ZDqDg3GyJaw LMpXARtFsfIdX7Cg27DxbhFzBn1OoxbUrtRrXQcGBSWOJpdC5TJMxvt2M8aIN/njdHrZ HpGkIf8urAkH20AsG5fIEkEZWoBXroMGoD0OhjfHQ15vMjRBMx96DjuwqclD9IjryGP2 xHn6+UuOefpYRigWNDO++KfD2UFwhM6R1tMmbs1J60xTiFQX0F3VYhJE1Z30wGzkNOgb wV+ZtYKT50A/aNm5LDaqH1juk5MvkWUVHE4VBiNyoFlP1Gd1L5dRVg+kPwUsobc0KJwq 8SVA== X-Gm-Message-State: AOAM530P/AoSoEwjriHGQsv04prGlyqF1pYWgA8ys12B2m37o8uq8FOo EoBvmMQt9WeXMr1GR3llbIhHf0TJuXygBw== X-Google-Smtp-Source: ABdhPJyBrX96PW4/63WwQy7XWtj/LfhJkLauMdMn+OJsDIKa9coZmEGI+YcqdgiixQ89yHLQ/pJTKA== X-Received: by 2002:a17:906:2991:b0:6cf:6b24:e92f with SMTP id x17-20020a170906299100b006cf6b24e92fmr8221041eje.748.1650718363581; Sat, 23 Apr 2022 05:52:43 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH v2 23/34] meson: always combine directories with prefix Date: Sat, 23 Apr 2022 14:51:40 +0200 Message-Id: <20220423125151.27821-24-pbonzini@redhat.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220423125151.27821-1-pbonzini@redhat.com> References: <20220423125151.27821-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Type: text/plain 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+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::62b; envelope-from=paolo.bonzini@gmail.com; helo=mail-ej1-x62b.google.com X-Spam_score_int: -4 X-Spam_score: -0.5 X-Spam_bar: / X-Spam_report: (-0.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, PP_MIME_FAKE_ASCII_TEXT=0.999, 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: , Cc: marcandre.lureau@redhat.com Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1650719683647100002 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. Reviewed-by: Marc-Andr=C3=A9 Lureau Signed-off-by: Paolo Bonzini --- meson.build | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/meson.build b/meson.build index 1fdc74c86a..cdbdb1ef8b 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')) @@ -3626,20 +3626,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 Sun May 5 15:06:46 2024 Delivered-To: importer2@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+importer2=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 1650720277703550.5596666573445; Sat, 23 Apr 2022 06:24:37 -0700 (PDT) Received: from localhost ([::1]:57860 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1niFka-0006Wv-MW for importer2@patchew.org; Sat, 23 Apr 2022 09:24:36 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42912) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1niFFp-0007Rx-90 for qemu-devel@nongnu.org; Sat, 23 Apr 2022 08:52:51 -0400 Received: from mail-ej1-x62c.google.com ([2a00:1450:4864:20::62c]:41495) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1niFFn-0005Cg-42 for qemu-devel@nongnu.org; Sat, 23 Apr 2022 08:52:49 -0400 Received: by mail-ej1-x62c.google.com with SMTP id y10so21133258ejw.8 for ; Sat, 23 Apr 2022 05:52:46 -0700 (PDT) Received: from avogadro.lan ([2001:b07:6468:f312:1c09:f536:3de6:228c]) by smtp.gmail.com with ESMTPSA id bo14-20020a170906d04e00b006ce98d9c3e3sm1655573ejb.194.2022.04.23.05.52.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 23 Apr 2022 05:52:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=CYpjLPBeRK6Wjzurn4DEE2FlbVjDvz0lpP672AaOkkQ=; b=k93SqFLWukXsNH3HwvUdTVo2ljSt3KVQAE2L88ta/1/K8p/xQoHWsRP+g4J8P8KWR4 chfN1p1bDRhVBaLhdroFxQeXXN4HIDNbYW9RCQn1mc1R0uwNPFSTQM0vPO3jxrXitWaA czDWe/2BLnH90eDKG8OFGT3t9s4Ws9e0NP4zZhQtOV+SvHEN2VWGfGB6pyRWx3PWotoz 48e092rTg7hlBNwcuZj6HFHzky+ojRpCYi4N3jOLRnwbS+M7k/pdYNMSDxyAdtaoPJHN gklGeGvDRfIE3dKm/hlFtSc760DlaRsdqOi7yXcw9V1WLlHfJhVG3plv+4V35R+3HWY4 QiyQ== 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:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=CYpjLPBeRK6Wjzurn4DEE2FlbVjDvz0lpP672AaOkkQ=; b=vmmyW00/OyNXIvCnLp2ojBdKwMhKLnZK4pId9eYBMmlIcm3CmXxiKrTvBOSrhU0YKP fXqOItNNj2g9p8jiPjQlgUAj6CxUaQvroP86wTcutC8nL2hUpK1B96NnUTHAfVapQSnc YOB0EM73lXkdNTu0/XdkFPOn8CXE/zzhCCuI8veCXaqCzM1vaJWYLo+Zm7m8MuvE0jUZ AuWrwlQRFgiLn9A6yY6y7myCNfmiyhptR2VgiCDaaO0p+lCvErIeIRBaG/xGjWYqevig tn0qt0ugyCFqOw2/aBzD8cHjUvaYEP7DWN3p5A13d2WU6us7WpMTMBXnFJsz8f0idJCR yaDA== X-Gm-Message-State: AOAM530Io8CMvOMs/7S8aXqnGlRm74p/9oC2kNwczjiyAoSh+rXtEMK0 HQgbSfOoUpR/hPX73xYYfNRZypIxSPmeWg== X-Google-Smtp-Source: ABdhPJxd6vF0pC5iBhZGOaFYXFjFsf9Ax9P95byTl9FjKWWtZXUKh03yQWj1pe3EJcO3qH5MJpJPOw== X-Received: by 2002:a17:907:9811:b0:6e8:a1ac:c4be with SMTP id ji17-20020a170907981100b006e8a1acc4bemr8721694ejc.188.1650718365631; Sat, 23 Apr 2022 05:52:45 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH v2 24/34] configure: switch directory options to automatic parsing Date: Sat, 23 Apr 2022 14:51:41 +0200 Message-Id: <20220423125151.27821-25-pbonzini@redhat.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220423125151.27821-1-pbonzini@redhat.com> References: <20220423125151.27821-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Type: text/plain 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+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::62c; envelope-from=paolo.bonzini@gmail.com; helo=mail-ej1-x62c.google.com X-Spam_score_int: -4 X-Spam_score: -0.5 X-Spam_bar: / X-Spam_report: (-0.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, PP_MIME_FAKE_ASCII_TEXT=0.999, 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: , Cc: marcandre.lureau@redhat.com Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1650720278593100001 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. Reviewed-by: Marc-Andr=C3=A9 Lureau 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 2987713a85..1640cae307 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" @@ -2408,18 +2364,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 Sun May 5 15:06:46 2024 Delivered-To: importer2@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+importer2=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 1650719858799483.72375209221104; Sat, 23 Apr 2022 06:17:38 -0700 (PDT) Received: from localhost ([::1]:42360 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1niFdp-0003Lo-Aj for importer2@patchew.org; Sat, 23 Apr 2022 09:17:37 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42938) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1niFFs-0007Tg-5o for qemu-devel@nongnu.org; Sat, 23 Apr 2022 08:52:52 -0400 Received: from mail-ed1-x52f.google.com ([2a00:1450:4864:20::52f]:44913) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1niFFq-0005Cu-7j for qemu-devel@nongnu.org; Sat, 23 Apr 2022 08:52:51 -0400 Received: by mail-ed1-x52f.google.com with SMTP id el3so8641953edb.11 for ; Sat, 23 Apr 2022 05:52:49 -0700 (PDT) Received: from avogadro.lan ([2001:b07:6468:f312:1c09:f536:3de6:228c]) by smtp.gmail.com with ESMTPSA id bo14-20020a170906d04e00b006ce98d9c3e3sm1655573ejb.194.2022.04.23.05.52.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 23 Apr 2022 05:52:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=v/zfZz0eUCW2K/d4YbxLjJ8uZtdUIZW6uvPKbjdpjok=; b=R2+1ot9t+s+PNmuhxBcdSjHXkaKhvbbvwLDqr3OMlRDl5BdA+sGmQFRYP7RHUDLueN W5h56XZFZ6S86FhEzpGWpowdGQPVwotgPHYoc2NHnHnT//rejKREkmflPP2BwaV+jxQH DW9R2r+ZQ/3rh+mv+tdVA8xL9oQ8YaVhtXUJB/w+QPkMFiCnowBGLOXxNlL90mJaY+FW tC45mSeIjwuP/uX1sCP/lswSRj14gUT8BK5S4zvpCj0IOXeMSMawo1fkLjl+df5OZ+5J S5uLo7lir0FNcB9rVUVbThCtPGf1Z50qHvBXeBQpwCai53WEVb7sSe5Pd9KRMwLGH1AJ HYzA== 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:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=v/zfZz0eUCW2K/d4YbxLjJ8uZtdUIZW6uvPKbjdpjok=; b=DDQrco/3qazzaCE+2hK+xkgMZTl4YB3XAuy4YBOWu4Qrr4gwu2QYPVfaH0YbU1ZIl5 EuERo1c3X1foPXQ3RTqOebrFUDY5GFWsWukOPOd2F6Tp3oIIxKGcoa/1fVtyRKuP7Ta4 1jT88+O3qn8g+c279RyIfUyoidgWgM71JwyLeEVYYkfl0jml9XmNwI9DjIvEkopZ2xpp TpimVLVmvVyxzdR5JmWZlDh8Z5bLlWy0fPESssifKd8/NY8XXmW7k9GAkzrpb0h1J22l cFv+CqwvcaAGTVe9MLdCuhucFdpOMi6OTTAbZegICd74Giymxd498T6+Hhi7Jtvx8qwL JeEA== X-Gm-Message-State: AOAM531E/8rgwQVXKwuBmcK/WRdIiuD/uy1TVhIsDQ4h4K4sBGFdeH/w JITAaes3miksnHMhsihbhSSA1jujJfUFZg== X-Google-Smtp-Source: ABdhPJwlwe2aEuG/54YbTRd/bl90pE9kw3xEV3w0mmaIxq/iTlMtEc4nEVENd9Pot2w4WMLt8EuHhA== X-Received: by 2002:a05:6402:26cd:b0:423:b43d:8b09 with SMTP id x13-20020a05640226cd00b00423b43d8b09mr10031868edd.400.1650718368900; Sat, 23 Apr 2022 05:52:48 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH v2 25/34] meson: pass more options directly as -D Date: Sat, 23 Apr 2022 14:51:42 +0200 Message-Id: <20220423125151.27821-26-pbonzini@redhat.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220423125151.27821-1-pbonzini@redhat.com> References: <20220423125151.27821-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Type: text/plain 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+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::52f; envelope-from=paolo.bonzini@gmail.com; helo=mail-ed1-x52f.google.com X-Spam_score_int: -4 X-Spam_score: -0.5 X-Spam_bar: / X-Spam_report: (-0.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, PP_MIME_FAKE_ASCII_TEXT=0.999, 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: , Cc: marcandre.lureau@redhat.com Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1650719860614100001 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. Reviewed-by: Marc-Andr=C3=A9 Lureau 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 1640cae307..c6edbceff0 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"yes" -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 @@ -2365,15 +2352,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 cdbdb1ef8b..1fa4cc255e 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 Sun May 5 15:06:46 2024 Delivered-To: importer2@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+importer2=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 1650719681758700.2661680589802; Sat, 23 Apr 2022 06:14:41 -0700 (PDT) Received: from localhost ([::1]:33868 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1niFay-0005by-MC for importer2@patchew.org; Sat, 23 Apr 2022 09:14:40 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42948) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1niFFs-0007Tq-VQ for qemu-devel@nongnu.org; Sat, 23 Apr 2022 08:52:53 -0400 Received: from mail-ej1-x62c.google.com ([2a00:1450:4864:20::62c]:35456) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1niFFr-0005Cy-4q for qemu-devel@nongnu.org; Sat, 23 Apr 2022 08:52:52 -0400 Received: by mail-ej1-x62c.google.com with SMTP id l7so21214118ejn.2 for ; Sat, 23 Apr 2022 05:52:50 -0700 (PDT) Received: from avogadro.lan ([2001:b07:6468:f312:1c09:f536:3de6:228c]) by smtp.gmail.com with ESMTPSA id bo14-20020a170906d04e00b006ce98d9c3e3sm1655573ejb.194.2022.04.23.05.52.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 23 Apr 2022 05:52:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=BQ2Lcj+YdqXRcpRrMmrKaUG1RtsECttdprGaQ+wveUk=; b=DKdskAqaTM7zBiaLnKG81oWsAOpb06YBU0LHMCn433MyhylKTsytjaPvELW+D1kF/1 mqANjaaMU2EPVtB1D3F60b/3BxAyN0MGQAHqtZiLJE/5eOQ/1IxTJ0cpw9fJVZRFY/id /GZY6Ab/bz5fQt5Lx3A5oi3dTfwTLpmbza/StU+MqCQuD5/mj3nrfQZAyPjeBcbx/iJL f368aX8VedW5MlZr8Dw5Qyt3shQSxdYrC5gpu6hbitKy3NtCilzMbbTK2uu8+sv63hB8 m0itMgOhJuzchrxy5+WO2WbgtXgt85lnDr02hbABDmEfc0ve977gXEeNmQrN32HTkrh5 r7aA== 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:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=BQ2Lcj+YdqXRcpRrMmrKaUG1RtsECttdprGaQ+wveUk=; b=IbTnTap++ELEuLr3/UwP+IR/Bq2Bv2iT2P4qZW8JTNDtgqcL9Fg5T4oF56ElMVC6mL fyR7yfD57YIeoX1xT9wlCFJUA7HXEWWsMHLKf7EjyqVv2XLia4nggJCN1zHowLC8ZC4F NPfbXtKdF6+1XRflUXM6SWtI2VmxzMBGwX6pOcpkK33Vez9TMWprwGwqvbVijY2B4g0H Ek1GLv176sIlbqOavwVTjoFJ63phuzPKwBVpylGNOIlNsag4qhUsywYVq/uDeR5GuFpc 53GWe36yM08K7tN+yso6qFxJC8zdRfm+hrm8IKME5iacUwUgZ7r2WAHMlYMmdmrs6OXe py4A== X-Gm-Message-State: AOAM531LlmVlQrLAApI4Kq0cNv19+oUDBdIudl7EZA8yYg4LuRr6bEi6 q5WpZPxc9lGLgLo34cShZQ2hUmSsXexQGQ== X-Google-Smtp-Source: ABdhPJzm9wVsddM8CBzcy93SqZ+DSUevG7sqtS40Nn34jtd3nveXpDwuYpl7jDggNT9ExvOy9HnZ0g== X-Received: by 2002:a17:906:9c84:b0:6e0:7c75:6f01 with SMTP id fj4-20020a1709069c8400b006e07c756f01mr8194406ejc.103.1650718369931; Sat, 23 Apr 2022 05:52:49 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH v2 26/34] configure: omit options with default values from meson command line Date: Sat, 23 Apr 2022 14:51:43 +0200 Message-Id: <20220423125151.27821-27-pbonzini@redhat.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220423125151.27821-1-pbonzini@redhat.com> References: <20220423125151.27821-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Type: text/plain 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+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::62c; envelope-from=paolo.bonzini@gmail.com; helo=mail-ej1-x62c.google.com X-Spam_score_int: -4 X-Spam_score: -0.5 X-Spam_bar: / X-Spam_report: (-0.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, PP_MIME_FAKE_ASCII_TEXT=0.999, 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: , Cc: marcandre.lureau@redhat.com Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1650719683647100001 This has no functional change, it only makes the command line shorter and nicer. Reviewed-by: Marc-Andr=C3=A9 Lureau 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 c6edbceff0..19947d8d6c 100755 --- a/configure +++ b/configure @@ -2348,19 +2348,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 1fa4cc255e..6913ab0251 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 Sun May 5 15:06:46 2024 Delivered-To: importer2@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+importer2=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 1650719858450635.7379377827564; Sat, 23 Apr 2022 06:17:38 -0700 (PDT) Received: from localhost ([::1]:42312 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1niFdp-0003Jd-E1 for importer2@patchew.org; Sat, 23 Apr 2022 09:17:37 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42966) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1niFFu-0007UL-70 for qemu-devel@nongnu.org; Sat, 23 Apr 2022 08:52:56 -0400 Received: from mail-ed1-x530.google.com ([2a00:1450:4864:20::530]:39676) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1niFFs-0005D4-CM for qemu-devel@nongnu.org; Sat, 23 Apr 2022 08:52:53 -0400 Received: by mail-ed1-x530.google.com with SMTP id g20so13461156edw.6 for ; Sat, 23 Apr 2022 05:52:51 -0700 (PDT) Received: from avogadro.lan ([2001:b07:6468:f312:1c09:f536:3de6:228c]) by smtp.gmail.com with ESMTPSA id bo14-20020a170906d04e00b006ce98d9c3e3sm1655573ejb.194.2022.04.23.05.52.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 23 Apr 2022 05:52:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=pVIHrWb0QymKV8unddHVw3luRnSSMYN+wzhu25/ExSM=; b=oCJT9eoX0avNm173DkCmhtryckKR1ZikGeiKpEaCGtYUOddUgjxZqseacgCCPgZj1K F1OHljJ9/wQX0yeYRkXC+kbEres1tMu08ISPGnlvP9f3DvuUR+Z5M1+z3knZBDWb9Hk+ 0P3nK9+aiDi0O44VFxiIYdBMNBYJl70aM81d9WDcmLZYpdwvWpNi89XMrRhT1p0shv7T i8Vj4PY0MGufJBZQ4o20lXysrk4IwJW4oWnDqYq9CXusXwd/LcY27R5atXbQT/06ghBc i9SFoiG3ZYZvOjNeTVKRvia+o0nWsWQhbAD15BYY0OhoO/b8LkR6jJ8yAvTb1DsYWxEj PQPA== 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:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=pVIHrWb0QymKV8unddHVw3luRnSSMYN+wzhu25/ExSM=; b=qSLpXueziNAUxUThvKTFUVL+yx+c3HwUThAA+zSg8fc7l294qzo7MUYPylo23CZOom TtRmGXj1BJKc0lf+MX5JOMYFp9rxLlggtICZFLM6LjrstbybHIJ5BF99t3IWZBOwDfvU vf0/R5R0OT9AJs4M2E6AX/eUlUjjb0mQzI9S13I/eZbL4S7wqGwchOcE5O18+aFl20kz y82jTOHY7ucdseXPy6WrVSg8chtTtUDtprWTazPmrIZ2a3osRJN4t9FvB1tDQ0mY/n1R Rc6Bl08ePvNMaZyQEiySoCuF9wTTDbkEP4NiX8tjKS71j6L4RDAdyBDgY4lRJ4uchp1U eRNw== X-Gm-Message-State: AOAM530LzeIsyd2zpsHFAG3Z/t+G/tK8h4k4VGSrUqIT12vk8vZr3yYA IvfHMYK0VOlnGWkwkCucpo5Fi5Dv5TFO3A== X-Google-Smtp-Source: ABdhPJzxTxDul8acv1AynzGHQIVwPvi79t8+vuoySx0HAWBIkdf5PYyVbxgfNZ1brhPSIN7sWd45dA== X-Received: by 2002:a05:6402:b45:b0:423:d3d0:5ed6 with SMTP id bx5-20020a0564020b4500b00423d3d05ed6mr9978399edb.139.1650718370997; Sat, 23 Apr 2022 05:52:50 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH v2 27/34] meson, virtio: place all virtio-pci devices under virtio_pci_ss Date: Sat, 23 Apr 2022 14:51:44 +0200 Message-Id: <20220423125151.27821-28-pbonzini@redhat.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220423125151.27821-1-pbonzini@redhat.com> References: <20220423125151.27821-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Type: text/plain 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+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::530; envelope-from=paolo.bonzini@gmail.com; helo=mail-ed1-x530.google.com X-Spam_score_int: -4 X-Spam_score: -0.5 X-Spam_bar: / X-Spam_report: (-0.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, PP_MIME_FAKE_ASCII_TEXT=0.999, 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: , Cc: marcandre.lureau@redhat.com Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1650719860760100003 Since a sourceset already exists for this, avoid unnecessary repeat of CONFIG_VIRTIO_PCI. Reviewed-by: Marc-Andr=C3=A9 Lureau 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 Sun May 5 15:06:46 2024 Delivered-To: importer2@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+importer2=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 1650720046967675.737160200721; Sat, 23 Apr 2022 06:20:46 -0700 (PDT) Received: from localhost ([::1]:50340 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1niFgr-0001BZ-II for importer2@patchew.org; Sat, 23 Apr 2022 09:20:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42988) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1niFFw-0007VG-VF for qemu-devel@nongnu.org; Sat, 23 Apr 2022 08:52:59 -0400 Received: from mail-ej1-x634.google.com ([2a00:1450:4864:20::634]:46935) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1niFFu-0005DL-Bu for qemu-devel@nongnu.org; Sat, 23 Apr 2022 08:52:55 -0400 Received: by mail-ej1-x634.google.com with SMTP id t11so21111536eju.13 for ; Sat, 23 Apr 2022 05:52:53 -0700 (PDT) Received: from avogadro.lan ([2001:b07:6468:f312:1c09:f536:3de6:228c]) by smtp.gmail.com with ESMTPSA id bo14-20020a170906d04e00b006ce98d9c3e3sm1655573ejb.194.2022.04.23.05.52.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 23 Apr 2022 05:52:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=fzpifrkxn/qoSo8/9uyWd3pvXOS+EDX6XI+xXN+aSoU=; b=ldhcto01CGrEIt7vCGt6HfuiU0Nvb1OqWUBKqfutKu8hAEU2Lz0aWvYnVNiv5ifezW MUBNxINZfLjAk3705sSq1qhgcg+nn2TBfXeH1OayrnC9vTj9f7RCP0CaBgl7vExGJ0Et hUiUfx2DVQaccNMgpNOAYCB2IgETU9MgCOghnltTdu3Uy+v6sZ2pLIIgJuPyR3WTl4xx MBITKrFsXmjGuod7GJSaXOl60KTVMYerCWbv+Aa2e9SMNzRio51xnLyFDm52Cmziv6L6 1z2mnMbteuOz0swrbUtxGurARxhkveVUAkGEvkkiI4JLx0HdXwzUKLwyP74rAauYq1qb Kc1g== 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:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=fzpifrkxn/qoSo8/9uyWd3pvXOS+EDX6XI+xXN+aSoU=; b=ynX7Pdu2aEsIYUZCp+VBaQNj9QG9MWRfYxJUw9gxn4siPTUV/1TkVaj4HfcJ3L+RL1 JUjtMPbWe82MAUsrVq4vgawpbqeRYOgA+iNwgt4Yn/ONvCtL72mb6rjbKapGIpOO0kOX XY6Ko9XGwO6AcbIquuo4MTNjzc0I/KqrSvfMHruBCxOFt5R4YCYbvOdDhgig3mXPJ6AG JAq4eo6bN5rajCUoihE4pKTpaSOv6eSISUi6e/A+Z5aXj10OtnbsKllELTKoA4Ul5FK3 aPqNob4suuzdZzihIvyAcgM7vqZDLix8pAA4CciGkrZIbtIToceH4D/Wa4JILWCPQLrx aPTQ== X-Gm-Message-State: AOAM532vIbWVsOxoiFZuKSDJqBBGv+MI2SyMVgdMCwHrqbIFGJRRYf5H GQCR83LddsJLeWyfeyxRz7fqTVQhQekUOg== X-Google-Smtp-Source: ABdhPJzWMNRsIM339spQNYZPhdNJHG4Pw5Ag9qT5eaO56RoP/Gsnok9ofFzQf3N3EHT0ZNs371KrJQ== X-Received: by 2002:a17:906:1be1:b0:6ce:b0a8:17d with SMTP id t1-20020a1709061be100b006ceb0a8017dmr8208376ejg.413.1650718373167; Sat, 23 Apr 2022 05:52:53 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH v2 28/34] configure: simplify vhost-net-{user, vdpa} configuration Date: Sat, 23 Apr 2022 14:51:45 +0200 Message-Id: <20220423125151.27821-29-pbonzini@redhat.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220423125151.27821-1-pbonzini@redhat.com> References: <20220423125151.27821-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Type: text/plain 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+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::634; envelope-from=paolo.bonzini@gmail.com; helo=mail-ej1-x634.google.com X-Spam_score_int: -4 X-Spam_score: -0.5 X-Spam_bar: / X-Spam_report: (-0.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, PP_MIME_FAKE_ASCII_TEXT=0.999, 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: , Cc: marcandre.lureau@redhat.com Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1650720047536100001 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. Reviewed-by: Marc-Andr=C3=A9 Lureau Signed-off-by: Paolo Bonzini --- configure | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/configure b/configure index 19947d8d6c..c5bffcf703 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 Sun May 5 15:06:46 2024 Delivered-To: importer2@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+importer2=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 1650719805771869.0920553668925; Sat, 23 Apr 2022 06:16:45 -0700 (PDT) Received: from localhost ([::1]:39232 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1niFcy-0001CB-Nr for importer2@patchew.org; Sat, 23 Apr 2022 09:16:44 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43014) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1niFFy-0007VJ-HZ for qemu-devel@nongnu.org; Sat, 23 Apr 2022 08:53:03 -0400 Received: from mail-ed1-x529.google.com ([2a00:1450:4864:20::529]:40858) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1niFFw-0005Dh-UB for qemu-devel@nongnu.org; Sat, 23 Apr 2022 08:52:58 -0400 Received: by mail-ed1-x529.google.com with SMTP id p18so8282962edr.7 for ; Sat, 23 Apr 2022 05:52:56 -0700 (PDT) Received: from avogadro.lan ([2001:b07:6468:f312:1c09:f536:3de6:228c]) by smtp.gmail.com with ESMTPSA id bo14-20020a170906d04e00b006ce98d9c3e3sm1655573ejb.194.2022.04.23.05.52.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 23 Apr 2022 05:52:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=MDnImgCAgaRY7z2Eq1k1yAkMOPoehsLN+hIZ3vkai8I=; b=ABgjccIfpeaLdNFz/71aiHHmy2obf9EoTq1buk91t0mwWyRbaiMbTifLVkT67OPxyt +Hdh7YpYYF3eZuT0kMHUZxPekabVOv2C7LW/VqqULj2lE/QkRSjsiL05mxOL51497Cuj dCfpEEXRV8d7cCEC4XPp52Bs3ROWV0KwceTmqkAwW3y/O/v879hQsKes69/TGMmHaH7H MCb/abA641qIolibIN+02hogA9NRNVcXcty1t40WUiTkbe7KZ3dzbqrEGVvl+hL8DYNm i7UC8F7qXvU36fWZFERt7we1VY9EKrvzt0CVrMEUR6JyhSY9g2rCXKqbehlf6WEGQhc8 tNXg== 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:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=MDnImgCAgaRY7z2Eq1k1yAkMOPoehsLN+hIZ3vkai8I=; b=kO0OdF0kEPOFz8zL9wdaxLh31i5h1pxPvrosrZMAELr1gaswjw0a9fMmGuti6crcNj 0ERizU0OGsjTGpG+HT/Pt0Z3qyT2yf8U4+7SmZpcYRBgKMAXHiMKtgQ/8Q/t3EshnuMG lIT/h9JUEUYdO/XJE7mQ4iZAuZ3dDb4OpjEXdr4yWw6xGLpW8gAzig9zNb77+VoLGYBZ v9EaahO0ECmOiY0pxfDiwsBSmaVPAuZrDdHYrSV+PGHu7ZAtUVdNbbEmR9Eu2ZOg8V3P ekDHc9wrHzpAXuY70GjdvCglk1oKH8VcWNI6ISkccz7lG5WbxN0zFl2h/66GerIbhci4 69sg== X-Gm-Message-State: AOAM531veHS8IMzt23+x2eEMsu8KA/Yzh6Ra70l3P14gDZC46seb1n1c SOG5V2GqcNTKSs4k6jXlUssUlrrJecgq3g== X-Google-Smtp-Source: ABdhPJzudpocQPGQN1rYO1juvyD/GIxPTP7e0AuO6t19m4FtdVelWdN6whT6F3H3utr8QH7aW2zh1Q== X-Received: by 2002:a05:6402:3584:b0:423:e4d0:34f with SMTP id y4-20020a056402358400b00423e4d0034fmr10027651edc.72.1650718375621; Sat, 23 Apr 2022 05:52:55 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH v2 29/34] build: move vhost-vsock configuration to Kconfig Date: Sat, 23 Apr 2022 14:51:46 +0200 Message-Id: <20220423125151.27821-30-pbonzini@redhat.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220423125151.27821-1-pbonzini@redhat.com> References: <20220423125151.27821-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Type: text/plain 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+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::529; envelope-from=paolo.bonzini@gmail.com; helo=mail-ed1-x529.google.com X-Spam_score_int: -4 X-Spam_score: -0.5 X-Spam_bar: / X-Spam_report: (-0.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, PP_MIME_FAKE_ASCII_TEXT=0.999, 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: , Cc: marcandre.lureau@redhat.com Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1650719806196100001 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. Reviewed-by: Marc-Andr=C3=A9 Lureau Signed-off-by: Paolo Bonzini --- configure | 16 ---------------- hw/virtio/Kconfig | 10 ++++++++++ meson.build | 1 - 3 files changed, 10 insertions(+), 17 deletions(-) diff --git a/configure b/configure index c5bffcf703..18b18a6551 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 6913ab0251..a2de079801 100644 --- a/meson.build +++ b/meson.build @@ -3689,7 +3689,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 Sun May 5 15:06:46 2024 Delivered-To: importer2@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+importer2=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 1650720401855336.90803045448365; Sat, 23 Apr 2022 06:26:41 -0700 (PDT) Received: from localhost ([::1]:60166 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1niFma-0008GY-TV for importer2@patchew.org; Sat, 23 Apr 2022 09:26:40 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43046) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1niFG3-0007Vy-Tz for qemu-devel@nongnu.org; Sat, 23 Apr 2022 08:53:05 -0400 Received: from mail-ej1-x635.google.com ([2a00:1450:4864:20::635]:41505) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1niFFy-0005Dz-Qj for qemu-devel@nongnu.org; Sat, 23 Apr 2022 08:53:00 -0400 Received: by mail-ej1-x635.google.com with SMTP id y10so21133871ejw.8 for ; Sat, 23 Apr 2022 05:52:58 -0700 (PDT) Received: from avogadro.lan ([2001:b07:6468:f312:1c09:f536:3de6:228c]) by smtp.gmail.com with ESMTPSA id bo14-20020a170906d04e00b006ce98d9c3e3sm1655573ejb.194.2022.04.23.05.52.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 23 Apr 2022 05:52:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ZNRX3H15aUSHjnvlph2zsvIxMGJo5fkoDDNDKWVA9tA=; b=YSUHSSAx468QIylbKAlzibfIp98uravmF26O3zRZNP/NtOvnX3ACNaUGYdzxzfDJC5 ntJey9cegbgNOPt04NAW6dBSbnjX3g985YsM1NR2KO5gpSYjwkFgVm1j2ck+7X5E9lOL yg2hM8V4mSo8jSwn8+OrUu83XhS4LxZZg2MKUrrccr1i49SwbFXaCf5WRxAriw8JN4iQ jiIfUTCNDGsd1rfF9JlbExpXVkVIUzFPzkUCGHoYwbAZkP5fdyFHdB6Krcx2fUv0gT/f nyR5cs6hvkWftnFxUx4QqASpbP0lZLJhJG/xaULMe7szGncbpPo6isyUwYVpDQUmwC/+ MTRQ== 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:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=ZNRX3H15aUSHjnvlph2zsvIxMGJo5fkoDDNDKWVA9tA=; b=I7tL65pXfvJyCMXcdTOifOT1uzMcAIaJyEBNquKIQB2eCErRtJU9OkJD8zYIdileBx tzeuaU+hm5V3apiQjruf1Ft35RKe1aHViJXoK+EPukyJzQu/SFfHmZAyWSfBIUeJ7jm4 JW3lOTq93vZEbsnH+rClFIQVDcIKa/zEmgYzr73Kwm3azhQvZleM4HwUhvTDOFsPphDU oIgQJUsrBRIRTX6Kxz4d8i2TFlSPdTFigM7btzF4u1UL5KhBHbywcM+uvJbyFc4FFMhN 92EMhHEWU6LIMHryp5JLegaLXjnfXGDXaE+zXJtMMiVveeZwI4LG55KfgPVvgRgvv7Jp Bvxg== X-Gm-Message-State: AOAM532B2swaaNQ2HEd7Mm+KTVhFgbHGgQb7/YY3/JAXzDGAlr+pST9Y BPGq2ZR03ZwlJ3HnctaeSDfUpRnKs8xCSw== X-Google-Smtp-Source: ABdhPJyDbWaEoAI69ZXE+emmcU1fmtlHiFB/sMwGK9qb1BvAbLuMtUoHo6k8WoW35myAYFsKiO0g6w== X-Received: by 2002:a17:906:1841:b0:6e8:872d:8999 with SMTP id w1-20020a170906184100b006e8872d8999mr8137524eje.492.1650718377627; Sat, 23 Apr 2022 05:52:57 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH v2 30/34] build: move vhost-scsi configuration to Kconfig Date: Sat, 23 Apr 2022 14:51:47 +0200 Message-Id: <20220423125151.27821-31-pbonzini@redhat.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220423125151.27821-1-pbonzini@redhat.com> References: <20220423125151.27821-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Type: text/plain 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+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::635; envelope-from=paolo.bonzini@gmail.com; helo=mail-ej1-x635.google.com X-Spam_score_int: -4 X-Spam_score: -0.5 X-Spam_bar: / X-Spam_report: (-0.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, PP_MIME_FAKE_ASCII_TEXT=0.999, 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: , Cc: marcandre.lureau@redhat.com Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1650720403335100001 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. Reviewed-by: Marc-Andr=C3=A9 Lureau Signed-off-by: Paolo Bonzini --- 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 18b18a6551..ceef39a615 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 a2de079801..ac1a8fd4e7 100644 --- a/meson.build +++ b/meson.build @@ -3688,7 +3688,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 Sun May 5 15:06:46 2024 Delivered-To: importer2@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+importer2=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 1650720610774527.564166946698; Sat, 23 Apr 2022 06:30:10 -0700 (PDT) Received: from localhost ([::1]:35174 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1niFpx-00026Y-Kt for importer2@patchew.org; Sat, 23 Apr 2022 09:30:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43070) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1niFG5-0007W2-4O for qemu-devel@nongnu.org; Sat, 23 Apr 2022 08:53:05 -0400 Received: from mail-ej1-x62d.google.com ([2a00:1450:4864:20::62d]:42931) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1niFG3-0005ED-9U for qemu-devel@nongnu.org; Sat, 23 Apr 2022 08:53:04 -0400 Received: by mail-ej1-x62d.google.com with SMTP id i27so21134972ejd.9 for ; Sat, 23 Apr 2022 05:53:00 -0700 (PDT) Received: from avogadro.lan ([2001:b07:6468:f312:1c09:f536:3de6:228c]) by smtp.gmail.com with ESMTPSA id bo14-20020a170906d04e00b006ce98d9c3e3sm1655573ejb.194.2022.04.23.05.52.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 23 Apr 2022 05:52:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=if4h28CU6zDu/VVdbHqYlAOIQutrEFzWQ1TQd/xf2e8=; b=qLLxfk0AC7cgO7ZmcKjrJIgWQcBUHHo+6hnJTfCkg/BCTTIPnNeso2buHgCi24Ikm8 JOj6QU6AygqaTVFe6mIbdzLAazZbsXrmkt24LvygmZqD6Jk9Z8GWSdm7ukSQgRIOb3Lk SxUoHy6UH6JjB+M6PvsX2kBH6xikSaX9hr1PGwGnJIeaHmsFLpobzBQCtI0HuA0c0pWV SZ3024PEgqUG70ZtMWT9WRI/mnmcueWGfgFhSmK6ubzKCRXqkguFf419jGz9bOhujml3 QhakyDP3Emav1/e1ymWbLMcw7lZNdpx5AW1XWOcswpqNd0SUcULs6zG6vXaBAzPH1GrA U5/w== 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:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=if4h28CU6zDu/VVdbHqYlAOIQutrEFzWQ1TQd/xf2e8=; b=rDpLslzYD6S8w6BPBQYsNfQs8AvpDOzvtEuAM/Qw0ZNH8V6npHFcMNMGQjHG8Op2xv ALK2KOlf2qodSCce+c2ZntUKPJUF4hJaMOswhbqRBUzXbrA9LNJDvkTwIwImPWWaPN8f b4hixuPWvvDBrewFVPVW7fo4wxce3NcpGjMPVP1i1FFF4BibjmN6wjywufmwU3NZ45Yu qMQ6nbLHiQvMxfOesEV0I7JkFgi9LOOrTm2aOD+LDvKR1RKwwlGzjna7cxPSL7wEm3lf kccMJsMoxa0VQR6ccSxjS3+Pv7Ge60FOLUzmhDIuiFFvn8YV0eGVpdLLjieMNdecRjq8 v+Ig== X-Gm-Message-State: AOAM533Y4SVSTbiVOTMBMXlI72pZR20koJwR+A0LIF8W3XQ/dVJcJOOl Z8Q164k83MgLcN05zVUe7lpue4Rw7q4k9g== X-Google-Smtp-Source: ABdhPJzCYAj/1OFhFR594FTFF8RMgjV53qRRbkL91sV460XZ7p9FqFE1CxJQTM9NQMU5/BRwxikEWQ== X-Received: by 2002:a17:906:52c7:b0:6ce:a880:50a3 with SMTP id w7-20020a17090652c700b006cea88050a3mr8159211ejn.437.1650718379555; Sat, 23 Apr 2022 05:52:59 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH v2 31/34] build: move vhost-user-fs configuration to Kconfig Date: Sat, 23 Apr 2022 14:51:48 +0200 Message-Id: <20220423125151.27821-32-pbonzini@redhat.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220423125151.27821-1-pbonzini@redhat.com> References: <20220423125151.27821-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Type: text/plain 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+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::62d; envelope-from=paolo.bonzini@gmail.com; helo=mail-ej1-x62d.google.com X-Spam_score_int: -4 X-Spam_score: -0.5 X-Spam_bar: / X-Spam_report: (-0.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, PP_MIME_FAKE_ASCII_TEXT=0.999, 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: , Cc: marcandre.lureau@redhat.com Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1650720612684100001 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. Reviewed-by: Marc-Andr=C3=A9 Lureau Signed-off-by: Paolo Bonzini --- configure | 12 ------------ hw/virtio/Kconfig | 5 +++++ meson.build | 1 - 3 files changed, 5 insertions(+), 13 deletions(-) diff --git a/configure b/configure index ceef39a615..3389db6f3a 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 ac1a8fd4e7..85059154e4 100644 --- a/meson.build +++ b/meson.build @@ -3690,7 +3690,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 Sun May 5 15:06:46 2024 Delivered-To: importer2@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+importer2=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 1650720775152762.1486823153189; Sat, 23 Apr 2022 06:32:55 -0700 (PDT) Received: from localhost ([::1]:38472 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1niFsc-0004Pw-6j for importer2@patchew.org; Sat, 23 Apr 2022 09:32:54 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43076) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1niFG5-0007W4-DN for qemu-devel@nongnu.org; Sat, 23 Apr 2022 08:53:05 -0400 Received: from mail-ej1-x636.google.com ([2a00:1450:4864:20::636]:43738) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1niFG3-0005EO-K3 for qemu-devel@nongnu.org; Sat, 23 Apr 2022 08:53:05 -0400 Received: by mail-ej1-x636.google.com with SMTP id m20so435489ejj.10 for ; Sat, 23 Apr 2022 05:53:01 -0700 (PDT) Received: from avogadro.lan ([2001:b07:6468:f312:1c09:f536:3de6:228c]) by smtp.gmail.com with ESMTPSA id bo14-20020a170906d04e00b006ce98d9c3e3sm1655573ejb.194.2022.04.23.05.52.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 23 Apr 2022 05:52:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=SxedSaWSA6csuOSpzb25M9pAAOl/LuDesVmXdvLbQqw=; b=px0cETaiV1aM4o18OAjTbDhnx6JyctbkrpK3zXsIVvwmeSs4RE8SfoFv7ACwFzzkoc ifkVQkLpHNURLeSKWE7b5xcIOZnvkNi4DRDs3pqd3s1eynTonyixn2kDf9CXundT2gVu Vt/5AXTmiTMBBfo34ThFFlJrPFc/EsQhDRKfW3gWTo3+alsrZxcCvFj6Q/ckI+8AbnYQ gOdYbeBJNuppIBuojDMjXbgPNEbJZcCvpV3m7hlSnMqGuHor2dwnF71WolIWfjxhFQWJ M/Hy/5P8welCD5dVEk1UQwmce4oDpM8JoPQ9DkIemeLVJjvIqk+m07Sdytn+R1gyUvkV KauQ== 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:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=SxedSaWSA6csuOSpzb25M9pAAOl/LuDesVmXdvLbQqw=; b=HXfYQmyLLRbJ1a8EONA2mQc9WNfau3Y9KQGmC4LnKOzwZQGUvAV3SMRWidRLOW9MMH FIcsOjYb/2wGkyd7q065rYcnyt/STdySsvcsXYlgYZrhnJldsQ+4/GfX8AdsMMvQ2LgG 4CEX8rZIootrW6mLD3hFfRiX4xZQ74ylKHUkMtCVgVZJo3RiWoBOVgwzx3NSUBY0eh5L kLcK/qoIXBBIHCATc/0oV3bsex0yTFyhYCVWENqGbl2r0GhJttLv0v7ccPLZo1RJ0njZ Lz/oOVx5lKYyz41HDOY9KlHMydDMuOq1DYwQgiZh7mAI/s1xWcXYdNx1K4l4dKEiZa5R sORA== X-Gm-Message-State: AOAM530y7Jxak+aFqQEOyj3p6r7vr28l20lrMwhbziuKWkLwkM73EtcW QBgtVyOqB6Uq2ysN7ENFOPqORIoHL0zwZg== X-Google-Smtp-Source: ABdhPJwi7LfFuEI0pBKh0bDShYi5/mmShuvhAYJGEZiBG2PEWY92/x7H+qTYHWJkHTcJwWSAs2L9Ww== X-Received: by 2002:a17:907:3f82:b0:6df:919c:97a with SMTP id hr2-20020a1709073f8200b006df919c097amr8213160ejc.19.1650718380492; Sat, 23 Apr 2022 05:53:00 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH v2 32/34] meson: create have_vhost_* variables Date: Sat, 23 Apr 2022 14:51:49 +0200 Message-Id: <20220423125151.27821-33-pbonzini@redhat.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220423125151.27821-1-pbonzini@redhat.com> References: <20220423125151.27821-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Type: text/plain 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+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::636; envelope-from=paolo.bonzini@gmail.com; helo=mail-ej1-x636.google.com X-Spam_score_int: -4 X-Spam_score: -0.5 X-Spam_bar: / X-Spam_report: (-0.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, PP_MIME_FAKE_ASCII_TEXT=0.999, 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: , Cc: marcandre.lureau@redhat.com Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1650720775529100001 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. Reviewed-by: Marc-Andr=C3=A9 Lureau Signed-off-by: Paolo Bonzini --- 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 85059154e4..259c8d9174 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() @@ -2294,9 +2303,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'] : []) + \ @@ -2978,7 +2987,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 @@ -3559,7 +3568,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') @@ -3685,12 +3694,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 Sun May 5 15:06:46 2024 Delivered-To: importer2@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+importer2=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 1650720898060612.1196867414243; Sat, 23 Apr 2022 06:34:58 -0700 (PDT) Received: from localhost ([::1]:40624 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1niFua-00060Y-Vg for importer2@patchew.org; Sat, 23 Apr 2022 09:34:56 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43094) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1niFG6-0007YO-Np for qemu-devel@nongnu.org; Sat, 23 Apr 2022 08:53:07 -0400 Received: from mail-ej1-x635.google.com ([2a00:1450:4864:20::635]:40894) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1niFG3-0005ET-KS for qemu-devel@nongnu.org; Sat, 23 Apr 2022 08:53:06 -0400 Received: by mail-ej1-x635.google.com with SMTP id y20so21164108eju.7 for ; Sat, 23 Apr 2022 05:53:02 -0700 (PDT) Received: from avogadro.lan ([2001:b07:6468:f312:1c09:f536:3de6:228c]) by smtp.gmail.com with ESMTPSA id bo14-20020a170906d04e00b006ce98d9c3e3sm1655573ejb.194.2022.04.23.05.53.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 23 Apr 2022 05:53:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=NMMht5ergvHlMH690NYrKkg4t00Bp8kaavqfbrCsGQE=; b=qYtcioSNIzsbSMumUNbUQEbaDRjXpJEk2Ac1PVGRk8daWmGSjkT4WFo3Yw0ZlqHmSE 4doPQ4OTE1Gvx2X7heS/1vYDUZ7LuzgNPoXmsx0UYSspkCFBHCoMeJcx2M1qHzYWqNus M3QTxQcHMQVtEOZ3YVIx1ydYFT2xT8vq7Lg8zCftBicrn2WjhjUTDkJ9h8v3DlG275qI yA8fg/oliRJr6l73Djj5WDnIHCaePk8FVu+C/4vpsl4e3apDROjxXONu+9Dvo0EQRCxb YGwcjrM1S6mGl+XjJCJQE4IMGCIRCLew0eDdSMKkcFoV13H251WVp+EChMyq8czCuj62 wxdw== 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:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=NMMht5ergvHlMH690NYrKkg4t00Bp8kaavqfbrCsGQE=; b=HjNRnXqOj3nDt3CFoKa53WUvGwyFc4nNmhdod6m3FhKFWP9STUZBoGDT6aGn/6m8iW /6PDhf16uJbUgO3GwnacDmIZSVznZuWX6asgZ3yv9dbeUud6sie2V3ZFktlHUldyGfX/ AU/u5EmPdRGf97UeAx8wLpxHEQdOPUWg9WZj59gzoBC/yOruKQGIiu6bICunfXYvVWsh 7snex6IMx2r1HnRN8R1reM4MLD/GANb7BXYKsPnpprwGiWmoq37Vq0maz6WZImAL1Ibb 262KHjN+Nk9CaEhuBKL2yccrKimGHWrLFoGWVlxaXHcDEd476g7SdI4wwD18D3YNEi84 de2w== X-Gm-Message-State: AOAM532mACsC0QwVMzSnUQtt+ROfdOyvVCcxg3PBoAIE7eNdGifTDODr UJCWrfMz8j+rUAklXyeWdlaj6Wa8WVRc1A== X-Google-Smtp-Source: ABdhPJzFGbssJAwgx8eBrkP3ri8FFNau2fmuJT/0b2mSTKbLPspwZ1og3b+SKtlHo7SL8nSpMii6cA== X-Received: by 2002:a17:907:7d8b:b0:6ef:f0c9:9498 with SMTP id oz11-20020a1709077d8b00b006eff0c99498mr8177762ejc.706.1650718382042; Sat, 23 Apr 2022 05:53:02 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH v2 33/34] meson: use have_vhost_* variables to pick sources Date: Sat, 23 Apr 2022 14:51:50 +0200 Message-Id: <20220423125151.27821-34-pbonzini@redhat.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220423125151.27821-1-pbonzini@redhat.com> References: <20220423125151.27821-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Type: text/plain 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+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::635; envelope-from=paolo.bonzini@gmail.com; helo=mail-ej1-x635.google.com X-Spam_score_int: -4 X-Spam_score: -0.5 X-Spam_bar: / X-Spam_report: (-0.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, PP_MIME_FAKE_ASCII_TEXT=0.999, 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: , Cc: marcandre.lureau@redhat.com Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1650720899853100001 Reviewed-by: Marc-Andr=C3=A9 Lureau Signed-off-by: Paolo Bonzini --- 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 259c8d9174..da8ba8f159 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 6b9807c183..ca12b313e1 100644 --- a/tests/qtest/meson.build +++ b/tests/qtest/meson.build @@ -263,7 +263,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 Sun May 5 15:06:46 2024 Delivered-To: importer2@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+importer2=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 1650720064453496.5581664591223; Sat, 23 Apr 2022 06:21:04 -0700 (PDT) Received: from localhost ([::1]:50702 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1niFh8-0001Qz-W5 for importer2@patchew.org; Sat, 23 Apr 2022 09:21:03 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43096) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1niFG7-0007YT-6o for qemu-devel@nongnu.org; Sat, 23 Apr 2022 08:53:07 -0400 Received: from mail-ej1-x62c.google.com ([2a00:1450:4864:20::62c]:45633) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1niFG5-0005Et-0g for qemu-devel@nongnu.org; Sat, 23 Apr 2022 08:53:06 -0400 Received: by mail-ej1-x62c.google.com with SMTP id y3so792975ejo.12 for ; Sat, 23 Apr 2022 05:53:04 -0700 (PDT) Received: from avogadro.lan ([2001:b07:6468:f312:1c09:f536:3de6:228c]) by smtp.gmail.com with ESMTPSA id bo14-20020a170906d04e00b006ce98d9c3e3sm1655573ejb.194.2022.04.23.05.53.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 23 Apr 2022 05:53:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=7VE62N9OthLAoB4SlLqMaWq7S7nIXDCz0FBv9ZPFEHg=; b=d5c3SpmSuImthBzVp6/Myu4t+Fqc2QyGWr/ihcFagSgElKrYEtK+1uwS1nQYtB9Cs+ NJsAgcefmAK1+lHvUl3xj3kHXqUV+aVTshALYZyBLZhizStoTY8+lhmhw3YCOKrwJZaN 3hA2nKKDjoRFeSQHb8XbEpkwKIfwf3tKc5b10FbqX+j0QEMpc6BKmsWVJVP24FXna/Xt EB/Z2Xvkcdim/9M/rRj+fKqE5FJUepwxVlucXtEWTaENZRPsa4WueDZHiqJlwxOQoFwT 6C9yZkGGlNJQmC1tJHxEi+/YTNaYyLOr3igreyLnwJKvodw+Uj5gxAmmL/bLOa90kSfK AX6Q== 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:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=7VE62N9OthLAoB4SlLqMaWq7S7nIXDCz0FBv9ZPFEHg=; b=cnD3BEjyvQJYpsb4dGZOeqgp8ufFz3FFjXRCvAWvA9o7mbIRNGOGIlaRrE+JbL4Yrd UlTuQgSgZRMpVzPvf9RX/S17CUpSIEA8Va5woHqAB+8EpuCrLvfbGDjLtuk492KsJ7t5 HBr6du6UuY/OWvLxD8SXbermP+nF1dHNQNclp8HarP0gsWx7RfTIgvPP1nCpbSqRA8pd 8d0m1T9PXIlHeLxiljFAt/qxO4GlxFpG/Fqzy91CcELuQcTCNnbq6cjlWKZGK+ND3D/z Dxpn0uNtX9o2ArHChBivn/tV6pZse5ngijO0w51HbkCvs7qimh+OUADYOlFpEScEQORw xguQ== X-Gm-Message-State: AOAM5325RM5OAquJ73hFtC6Pss1MMpTNpinLKsx16EnPJIsEgwjigFVQ tzdylmDzZog6iBOU6ZXNerqI9WdtwLvPXw== X-Google-Smtp-Source: ABdhPJx+i/9ngMwx3os4i2yfIMrquKP4XIcDIv+hggu8dwnNVTVeNuA4MBLKPH4q6SNbbbQ1YWnVXw== X-Received: by 2002:a17:906:c1d7:b0:6e8:4f18:fede with SMTP id bw23-20020a170906c1d700b006e84f18fedemr8336375ejb.95.1650718383637; Sat, 23 Apr 2022 05:53:03 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH v2 34/34] configure, meson: move vhost options to Meson Date: Sat, 23 Apr 2022 14:51:51 +0200 Message-Id: <20220423125151.27821-35-pbonzini@redhat.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220423125151.27821-1-pbonzini@redhat.com> References: <20220423125151.27821-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Type: text/plain 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+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::62c; envelope-from=paolo.bonzini@gmail.com; helo=mail-ej1-x62c.google.com X-Spam_score_int: -4 X-Spam_score: -0.5 X-Spam_bar: / X-Spam_report: (-0.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, PP_MIME_FAKE_ASCII_TEXT=0.999, 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: , Cc: marcandre.lureau@redhat.com Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1650720065572100001 Finish the conversion by moving all the definitions and the constraint checks to meson_options.txt and meson.build respectively. Reviewed-by: Marc-Andr=C3=A9 Lureau Signed-off-by: Paolo Bonzini --- 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 3389db6f3a..ee371c2a1f 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 da8ba8f159..326100adf4 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