From nobody Sat Nov 23 17:42:44 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1732153844; cv=none; d=zohomail.com; s=zohoarc; b=G3+zTTx2XILfIYTKd8oRkUDI5T1RFCHOM6RFEeJQMf13Zpa9SpSXZyRZLG2M+kG1DN6LmXuhuA66dHeRbMCyHMzfOtoA4CdlCKecEJqcqoEa24I/5RJzfp5uS3xBi0A28dpnXCLS46TBHi4nNFDLqMPhl9ZqUP6+cgC8GiW6OEQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1732153844; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Sender:Subject:Subject:To:To:Message-Id; bh=92nCTdq11lbmBeZ/kw31uZpfZQz1CwbJLefAdeyXWco=; b=aJ8+LL5M65QsyT7BBw7SyzM+1buO4iny9aDSiHH8VBzqCjvfKcRpRyj3mWl+3/KwY7whUvtAZijwt7Y78fKyUgWbpKOSZyz2heX9m8eGP8AuqkyMF3dg85g6BaAfhByjTnRyzrX/fppvE444uSf40BGTdUMHB7sKxLlX7X/V8lc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1732153844517828.9036532627227; Wed, 20 Nov 2024 17:50:44 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tDwHh-0001Wa-7P; Wed, 20 Nov 2024 20:47:05 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tDwHf-0001Vf-AC for qemu-devel@nongnu.org; Wed, 20 Nov 2024 20:47:03 -0500 Received: from rev.ng ([94.130.142.21]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tDwHd-0004WG-FT for qemu-devel@nongnu.org; Wed, 20 Nov 2024 20:47:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=rev.ng; s=dkim; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive:List-Unsubscribe:List-Unsubscribe-Post: List-Help; bh=92nCTdq11lbmBeZ/kw31uZpfZQz1CwbJLefAdeyXWco=; b=gIde7BioDXeDDff 7ENqxxKNMKavjEuuh1qdClGTzOBL3iDN4USMtm7mwj47KEEDhQ6FpLezAJhjMZr+JoviVSta9e7vv BKszrb81A0vpM2As20cqJsNeLtefTMP3iyDJu9WE/foNCh3Ycx+cRwzUGi4Ibz94HLfhZ++/Ldypw 2E=; To: qemu-devel@nongnu.org Cc: ale@rev.ng, ltaylorsimpson@gmail.com, bcain@quicinc.com, richard.henderson@linaro.org, philmd@linaro.org, alex.bennee@linaro.org Subject: [RFC PATCH v1 01/43] Add option to enable/disable helper-to-tcg Date: Thu, 21 Nov 2024 02:49:05 +0100 Message-ID: <20241121014947.18666-2-anjo@rev.ng> In-Reply-To: <20241121014947.18666-1-anjo@rev.ng> References: <20241121014947.18666-1-anjo@rev.ng> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=94.130.142.21; envelope-from=anjo@rev.ng; helo=rev.ng X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham 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: , Reply-to: Anton Johansson From: Anton Johansson via Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1732153846667116600 Content-Type: text/plain; charset="utf-8" Adds a meson option for enabling/disabling helper-to-tcg along with a CONFIG_* definition. CONFIG_* will in future commits be used to conditionally include the helper-to-tcg subproject, and to remove unneeded code/memory when helper-to-tcg is not in use. Current meson option is limited to Hexagon, as helper-to-tcg will be included as a subproject from target/hexagon. This will change in the future if multiple frontends adopt helper-to-tcg. Signed-off-by: Anton Johansson Acked-by: Richard Henderson --- meson.build | 7 +++++++ meson_options.txt | 2 ++ scripts/meson-buildoptions.sh | 5 +++++ 3 files changed, 14 insertions(+) diff --git a/meson.build b/meson.build index e0b880e4e1..657ebe43f6 100644 --- a/meson.build +++ b/meson.build @@ -230,6 +230,7 @@ have_ga =3D get_option('guest_agent') \ error_message: 'unsupported OS for QEMU guest agent') \ .allowed() have_block =3D have_system or have_tools +helper_to_tcg_enabled =3D get_option('hexagon_helper_to_tcg') =20 enable_modules =3D get_option('modules') \ .require(host_os !=3D 'windows', @@ -3245,6 +3246,11 @@ foreach target : target_dirs 'CONFIG_QEMU_RTSIG_MAP': get_option('rtsig_map'), } endif + if helper_to_tcg_enabled + config_target +=3D { + 'CONFIG_HELPER_TO_TCG': 'y', + } + endif =20 target_kconfig =3D [] foreach sym: accelerators @@ -4122,6 +4128,7 @@ foreach target : target_dirs if host_os =3D=3D 'linux' target_inc +=3D include_directories('linux-headers', is_system: true) endif + if target.endswith('-softmmu') target_type=3D'system' t =3D target_system_arch[target_base_arch].apply(config_target, strict= : false) diff --git a/meson_options.txt b/meson_options.txt index 5eeaf3eee5..0730378305 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -374,6 +374,8 @@ option('qemu_ga_version', type: 'string', value: '', =20 option('hexagon_idef_parser', type : 'boolean', value : true, description: 'use idef-parser to automatically generate TCG code fo= r the Hexagon frontend') +option('hexagon_helper_to_tcg', type : 'boolean', value : true, + description: 'use the helper-to-tcg translator to automatically gen= erate TCG code for the Hexagon frontend') =20 option('x86_version', type : 'combo', choices : ['0', '1', '2', '3', '4'],= value: '1', description: 'tweak required x86_64 architecture version beyond com= piler default') diff --git a/scripts/meson-buildoptions.sh b/scripts/meson-buildoptions.sh index a8066aab03..19c891a39b 100644 --- a/scripts/meson-buildoptions.sh +++ b/scripts/meson-buildoptions.sh @@ -13,6 +13,9 @@ meson_options_help() { printf "%s\n" ' --datadir=3DVALUE Data file directory [share]' printf "%s\n" ' --disable-coroutine-pool coroutine freelist (better per= formance)' printf "%s\n" ' --disable-debug-info Enable debug symbols and other= information' + printf "%s\n" ' --disable-hexagon-helper-to-tcg' + printf "%s\n" ' use the helper-to-tcg translat= or to automatically' + printf "%s\n" ' generate TCG code for the Hexa= gon frontend' printf "%s\n" ' --disable-hexagon-idef-parser' printf "%s\n" ' use idef-parser to automatical= ly generate TCG' printf "%s\n" ' code for the Hexagon frontend' @@ -341,6 +344,8 @@ _meson_option_parse() { --disable-guest-agent) printf "%s" -Dguest_agent=3Ddisabled ;; --enable-guest-agent-msi) printf "%s" -Dguest_agent_msi=3Denabled ;; --disable-guest-agent-msi) printf "%s" -Dguest_agent_msi=3Ddisabled ;; + --enable-hexagon-helper-to-tcg) printf "%s" -Dhexagon_helper_to_tcg=3D= true ;; + --disable-hexagon-helper-to-tcg) printf "%s" -Dhexagon_helper_to_tcg= =3Dfalse ;; --enable-hexagon-idef-parser) printf "%s" -Dhexagon_idef_parser=3Dtrue= ;; --disable-hexagon-idef-parser) printf "%s" -Dhexagon_idef_parser=3Dfal= se ;; --enable-hv-balloon) printf "%s" -Dhv_balloon=3Denabled ;; --=20 2.45.2