From nobody Sun May 19 07:11:51 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1625002186657984.191182914851; Tue, 29 Jun 2021 14:29:46 -0700 (PDT) Received: from localhost ([::1]:42530 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lyLIf-0001t8-G6 for importer@patchew.org; Tue, 29 Jun 2021 17:29:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34532) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lyLHg-0008J3-9n for qemu-devel@nongnu.org; Tue, 29 Jun 2021 17:28:44 -0400 Received: from smtp-out1.suse.de ([195.135.220.28]:49200) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lyLHd-0004im-Ox for qemu-devel@nongnu.org; Tue, 29 Jun 2021 17:28:43 -0400 Received: from imap.suse.de (imap-alt.suse-dmz.suse.de [192.168.254.47]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 9FE0921965; Tue, 29 Jun 2021 21:28:39 +0000 (UTC) Received: from imap3-int (imap-alt.suse-dmz.suse.de [192.168.254.47]) by imap.suse.de (Postfix) with ESMTP id F08E311906; Tue, 29 Jun 2021 21:28:37 +0000 (UTC) Received: from director2.suse.de ([192.168.254.72]) by imap3-int with ESMTPSA id aHshLYWQ22AtQQAALh3uQQ (envelope-from ); Tue, 29 Jun 2021 21:28:37 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1625002119; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=cxjC9vg5O9h/KsgFbnL77+ujadx7CaW97/Uias2sZyU=; b=GY7VpbBbcnzUTedE35u/IFbqWYW9872vqWj9VzATXF6645EyATGnnlNvjObYdSGx4bJ3lH uRZMV/xGlYGB3I3x1tm7axjKCKDR2+NZzoRmayxEc16+QwmsJCHueYmljeGKLt/2DS+ZqR Sg6GFCdoCglf43BCz+jLGPSV86adqd8= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1625002119; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=cxjC9vg5O9h/KsgFbnL77+ujadx7CaW97/Uias2sZyU=; b=5jpAnh/J78rKJJgzcGXMxd9S9Ii/zBC+ggrgE//7WR9lRkVwKJA8Al1VOtui8pqUUJpu7B 6tlVK10xuBXvnrAQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1625002119; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=cxjC9vg5O9h/KsgFbnL77+ujadx7CaW97/Uias2sZyU=; b=GY7VpbBbcnzUTedE35u/IFbqWYW9872vqWj9VzATXF6645EyATGnnlNvjObYdSGx4bJ3lH uRZMV/xGlYGB3I3x1tm7axjKCKDR2+NZzoRmayxEc16+QwmsJCHueYmljeGKLt/2DS+ZqR Sg6GFCdoCglf43BCz+jLGPSV86adqd8= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1625002119; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=cxjC9vg5O9h/KsgFbnL77+ujadx7CaW97/Uias2sZyU=; b=5jpAnh/J78rKJJgzcGXMxd9S9Ii/zBC+ggrgE//7WR9lRkVwKJA8Al1VOtui8pqUUJpu7B 6tlVK10xuBXvnrAQ== From: "Jose R. Ziviani" To: qemu-devel@nongnu.org Subject: [RFC 1/2] modules: Option to build native TCG with --enable-modules Date: Tue, 29 Jun 2021 18:28:18 -0300 Message-Id: <20210629212819.24389-2-jziviani@suse.de> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210629212819.24389-1-jziviani@suse.de> References: <20210629212819.24389-1-jziviani@suse.de> 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=195.135.220.28; envelope-from=jziviani@suse.de; helo=smtp-out1.suse.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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_DNSWL_MED=-2.3, SPF_HELO_NONE=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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: pbonzini@redhat.com, "Jose R. Ziviani" , kraxel@redhat.com, cfontana@suse.de Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (found 2 invalid signatures) Content-Type: text/plain; charset="utf-8" Adds an option (--enable-tcg-builtin) to build TCG natively when --enable-modules argument is passed to the build system. It gives the opportunity to have the accelerator built-in and still take advantage of the new modular system. Signed-off-by: Jose R. Ziviani --- configure | 12 ++++++++++-- meson.build | 7 ++++++- meson_options.txt | 2 ++ 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/configure b/configure index 38704b4e11..add8cf4970 100755 --- a/configure +++ b/configure @@ -344,6 +344,7 @@ tsan=3D"no" fortify_source=3D"$default_feature" strip_opt=3D"yes" tcg_interpreter=3D"false" +tcg_builtin=3D"false" bigendian=3D"no" mingw32=3D"no" gcov=3D"no" @@ -1107,6 +1108,8 @@ for opt do ;; --enable-tcg) tcg=3D"enabled" ;; + --enable-tcg-builtin) tcg_builtin=3D"true" + ;; --disable-malloc-trim) malloc_trim=3D"disabled" ;; --enable-malloc-trim) malloc_trim=3D"enabled" @@ -1792,6 +1795,7 @@ Advanced options (experts only): Default:trace- --disable-slirp disable SLIRP userspace network connectivity --enable-tcg-interpreter enable TCI (TCG with bytecode interpreter, expe= rimental and slow) + --enable-tcg-builtin force TCG builtin even with --enable-modules --enable-malloc-trim enable libc malloc_trim() for memory optimizati= on --oss-lib path to OSS library --cpu=3DCPU Build for host CPU [$cpu] @@ -2288,7 +2292,11 @@ if test "$solaris" =3D "yes" ; then fi fi =20 -if test "$tcg" =3D "enabled"; then +if test "$tcg" =3D "disabled"; then + debug_tcg=3D"no" + tcg_interpreter=3D"false" + tcg_builtin=3D"false" +else git_submodules=3D"$git_submodules tests/fp/berkeley-testfloat-3" git_submodules=3D"$git_submodules tests/fp/berkeley-softfloat-3" fi @@ -6449,7 +6457,7 @@ if test "$skip_meson" =3D no; then -Dvhost_user_blk_server=3D$vhost_user_blk_server -Dmultiprocess=3D= $multiprocess \ -Dfuse=3D$fuse -Dfuse_lseek=3D$fuse_lseek -Dguest_agent_msi=3D$gue= st_agent_msi -Dbpf=3D$bpf\ $(if test "$default_features" =3D no; then echo "-Dauto_features= =3Ddisabled"; fi) \ - -Dtcg_interpreter=3D$tcg_interpreter \ + -Dtcg_interpreter=3D$tcg_interpreter -Dtcg_builtin=3D$tcg_builtin \ $cross_arg \ "$PWD" "$source_path" =20 diff --git a/meson.build b/meson.build index fe58793549..2d72b8cc06 100644 --- a/meson.build +++ b/meson.build @@ -93,6 +93,9 @@ if cpu in ['x86', 'x86_64'] endif =20 modular_tcg =3D ['i386-softmmu', 'x86_64-softmmu'] +is_tcg_modular =3D config_host.has_key('CONFIG_MODULES') \ + and get_option('tcg').enabled() \ + and not get_option('tcg_builtin') =20 edk2_targets =3D [ 'arm-softmmu', 'aarch64-softmmu', 'i386-softmmu', 'x86_= 64-softmmu' ] install_edk2_blobs =3D false @@ -1313,7 +1316,7 @@ foreach target : target_dirs 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 + if target in modular_tcg and is_tcg_modular config_target +=3D { 'CONFIG_TCG_MODULAR': 'y' } else config_target +=3D { 'CONFIG_TCG_BUILTIN': 'y' } @@ -2698,6 +2701,8 @@ summary_info +=3D {'TCG support': config_all.ha= s_key('CONFIG_TCG')} if config_all.has_key('CONFIG_TCG') if get_option('tcg_interpreter') summary_info +=3D {'TCG backend': 'TCI (TCG with bytecode interprete= r, experimental and slow)'} + elif is_tcg_modular + summary_info +=3D {'TCG backend': 'module (@0@)'.format(cpu)} else summary_info +=3D {'TCG backend': 'native (@0@)'.format(cpu)} endif diff --git a/meson_options.txt b/meson_options.txt index 3d304cac96..fd9f92b333 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -43,6 +43,8 @@ option('tcg', type: 'feature', value: 'auto', description: 'TCG support') option('tcg_interpreter', type: 'boolean', value: false, description: 'TCG with bytecode interpreter (experimental and slow)= ') +option('tcg_builtin', type: 'boolean', value: 'false', + description: 'Force TCG builtin') option('cfi', type: 'boolean', value: 'false', description: 'Control-Flow Integrity (CFI)') option('cfi_debug', type: 'boolean', value: 'false', --=20 2.32.0 From nobody Sun May 19 07:11:51 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1625002186406921.9124182343834; Tue, 29 Jun 2021 14:29:46 -0700 (PDT) Received: from localhost ([::1]:42590 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lyLIf-0001vh-6x for importer@patchew.org; Tue, 29 Jun 2021 17:29:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34544) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lyLHj-0008Ml-1S for qemu-devel@nongnu.org; Tue, 29 Jun 2021 17:28:47 -0400 Received: from smtp-out1.suse.de ([195.135.220.28]:49214) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lyLHh-0004kl-99 for qemu-devel@nongnu.org; Tue, 29 Jun 2021 17:28:46 -0400 Received: from imap.suse.de (imap-alt.suse-dmz.suse.de [192.168.254.47]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 8FA91226EA; Tue, 29 Jun 2021 21:28:43 +0000 (UTC) Received: from imap3-int (imap-alt.suse-dmz.suse.de [192.168.254.47]) by imap.suse.de (Postfix) with ESMTP id E1A9D11906; Tue, 29 Jun 2021 21:28:41 +0000 (UTC) Received: from director2.suse.de ([192.168.254.72]) by imap3-int with ESMTPSA id 0KNnKYmQ22AtQQAALh3uQQ (envelope-from ); Tue, 29 Jun 2021 21:28:41 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1625002123; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Qa+labxdjR4IyVCKDF0/nFJ1Fzb864WBc37lKGdMpLs=; b=yrEJe5GEVVOZzu8nDW7Zh79KTBNrxD5St3tBoLiUabVOGUrxuIUx2NU9F0la7kIdz4m8a6 BaPWDAdNcSuzpmPs564/iIjgBhzeOt3aB/TlnNIphR8nmtnxVh1biSRwu+XKTqS8bU83Yd B3ZQ/2StAjT0YR7tomifYHAdeqqJcFg= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1625002123; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Qa+labxdjR4IyVCKDF0/nFJ1Fzb864WBc37lKGdMpLs=; b=TtvyH+2udh/bJ0EoqywGI4uVQW4WHUAHhv0Ly2BxLmYRLPcCRzJGMOV/BgQ+S16uDNdZNt lwk0FN5RjWUZtYBA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1625002123; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Qa+labxdjR4IyVCKDF0/nFJ1Fzb864WBc37lKGdMpLs=; b=yrEJe5GEVVOZzu8nDW7Zh79KTBNrxD5St3tBoLiUabVOGUrxuIUx2NU9F0la7kIdz4m8a6 BaPWDAdNcSuzpmPs564/iIjgBhzeOt3aB/TlnNIphR8nmtnxVh1biSRwu+XKTqS8bU83Yd B3ZQ/2StAjT0YR7tomifYHAdeqqJcFg= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1625002123; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Qa+labxdjR4IyVCKDF0/nFJ1Fzb864WBc37lKGdMpLs=; b=TtvyH+2udh/bJ0EoqywGI4uVQW4WHUAHhv0Ly2BxLmYRLPcCRzJGMOV/BgQ+S16uDNdZNt lwk0FN5RjWUZtYBA== From: "Jose R. Ziviani" To: qemu-devel@nongnu.org Subject: [RFC 2/2] modules: Fix warning in module_arch documentation Date: Tue, 29 Jun 2021 18:28:19 -0300 Message-Id: <20210629212819.24389-3-jziviani@suse.de> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210629212819.24389-1-jziviani@suse.de> References: <20210629212819.24389-1-jziviani@suse.de> 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=195.135.220.28; envelope-from=jziviani@suse.de; helo=smtp-out1.suse.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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_DNSWL_MED=-2.3, SPF_HELO_NONE=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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: pbonzini@redhat.com, "Jose R. Ziviani" , kraxel@redhat.com, cfontana@suse.de Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (found 2 invalid signatures) Content-Type: text/plain; charset="utf-8" Fixes a small issue in the module_arch documentation that caused the build system to complain: module.h:127: warning: Function parameter or member 'name' not described in 'module_arch' module.h:127: warning: Excess function parameter 'arch' description in 'module_arch' Signed-off-by: Jose R. Ziviani --- include/qemu/module.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/qemu/module.h b/include/qemu/module.h index 8bc80535a4..456e190a55 100644 --- a/include/qemu/module.h +++ b/include/qemu/module.h @@ -115,7 +115,7 @@ void module_allow_arch(const char *arch); /** * module_arch * - * @arch: target architecture + * @name: module name * * This module is for target architecture @arch. * --=20 2.32.0