From patchwork Wed Jul 14 15:00:28 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 476762 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp658787jao; Wed, 14 Jul 2021 08:10:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwyy2pqX5LBWTG27cIz2PN8zaeJk33WfdDnzcNlEOmxolcN4aI7+lCbA+fdTmOAWdZi1DPF X-Received: by 2002:a67:bc12:: with SMTP id t18mr14612131vsn.13.1626275437763; Wed, 14 Jul 2021 08:10:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626275437; cv=none; d=google.com; s=arc-20160816; b=kOn3bK9BaCw/FnBLVi+wPcqtQATtcKaRaP2mewpC4I4eVMlhM7T4LWDx3uQEwJ6qcg vz7y8RhQ8AzKA1Z6FOOEOrAJLk1KY0w7HqThVcP6Q9sAIZ6pIsosvVp4GGvePsZRfYYK VbQ0B9rHQW1mWfxEI0IQZZ8L7wztLvAWj5Kd3ntttMRpJ2z8JMb6fwu1onSae63AaLPj sqMSwXhhrRPwSLNqJvNDNa8yXYbAoJR2pGfx4tbhvfz5u7h58IF0Rv0jgMJvPSsU9AFE J8FE4C1uMOAH+uwQUQx3bcp6I2GSFXgiKEMl0NIcJXwpAHpWMRlAll7BW5GM6Y2Ytcar pjug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=NdFhM3mErXM9CZH7/QXNM2pE9ztXd5aa82fNrrn30UU=; b=yqnqsox69EITZJoKrODF0yWZEHdMI453+A45JOOtCWUYbxOPyo/Ph8qg29GpJmsQcg LHx+z+cIYtXoZIyNd30/I+31ZC6zK97oLDeGxWRMHfrL18mgetEZczy89vrZGcnrnDhR ypP9MvhTD3AR5ekrG2LWxqa3eufXnsZWVAQIh3WYqrpZDQMaBvhRUMxvtnShc1MLUO7q GebM9tF2m2mzj8qw6hpuN0U4htm0rb8OiRXUxBL0+y44x7qIU/F5lHq6/DJbCRBC3RpK VIa1keEK2JWvJW7+U4uWz9k7CSc0vJPkWPYcmCWk2azEyLQweZmE0W6S94jhRuFmo/OR Cg0Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=nxXZlDjO; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id z19si3633901vsk.73.2021.07.14.08.10.37 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 14 Jul 2021 08:10:37 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=nxXZlDjO; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:49756 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m3gWz-000437-1S for patch@linaro.org; Wed, 14 Jul 2021 11:10:37 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49558) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m3gNp-0007Tn-8N for qemu-devel@nongnu.org; Wed, 14 Jul 2021 11:01:09 -0400 Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]:39804) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m3gNi-0007d1-Dr for qemu-devel@nongnu.org; Wed, 14 Jul 2021 11:01:09 -0400 Received: by mail-wr1-x42b.google.com with SMTP id f17so3616457wrt.6 for ; Wed, 14 Jul 2021 08:01:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=NdFhM3mErXM9CZH7/QXNM2pE9ztXd5aa82fNrrn30UU=; b=nxXZlDjOf12sKfB6+Q/pQXJbj89MHIoClUAk6s1jdINLIz5PPcaUYBUT8C0FtzN/DQ mjLSddlwsCQz6iODBVWlMGrlEwTeene4lKYXjzaW1pTNtMP4acujOMdG2qN240jzVUhp 0DvWomIFQc75LlYKhJdFrgfNdLnNT2ZQ/IO701j6e1SXbX5DBGqR2XIWwLjNTIPfrhQj FSt63mRO1dBW84oi0/AbcTgEGqjjAzSi/yP2fJ9ViccAeyuid0AY5G6JgSgKU2Ul0LTd A7byGk83mGQQ9qzMkVXCEOTl8UfppvFmi9MA4d80VQXbEjXTzFHWGIWo6eGqLcS6nsJB T8qg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=NdFhM3mErXM9CZH7/QXNM2pE9ztXd5aa82fNrrn30UU=; b=XhQi2CV8xoFKjXb44wZM5KMPEX/4Edd2WcdcHSgTqbe96wwgkFSbb6dTsnVlbDvCEM niYR70k+wId+85bdTFvEWqD56N3f8egmXAwW8sQ5+m/ztyfQ/EeeXw8O1g2891/VNs8F 0k3DfjM8bCfYRIRvEaLq4FrMHJ9NM3d7EgR5lh83u6hQ61ReuP69zxUH2rDES33or8ey Tful/joIBH31RizrYv5cV9B2GCARXsYho7lXSRIr2l2YPqAy+sM7poPPK/F9YZjjhzEJ I1NFktPmgDTb0RgyNLHepP5zh9P3GgbwjFAheFnkkxzMgkso4GS4j+TtWFN1acsC2laC qiLg== X-Gm-Message-State: AOAM533AtLFpr8lQgokxFSqys32Jud20PFhMH+8PyQUSa4BfsHRb1bJ2 tkLVAU47zOJ9w9s602NmKcBEsw== X-Received: by 2002:adf:f50e:: with SMTP id q14mr13495773wro.183.1626274860943; Wed, 14 Jul 2021 08:01:00 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id o14sm3066671wrj.66.2021.07.14.08.00.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Jul 2021 08:00:58 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 92AD91FFBE; Wed, 14 Jul 2021 16:00:40 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL v5 36/44] tcg/plugins: enable by default for most TCG builds Date: Wed, 14 Jul 2021 16:00:28 +0100 Message-Id: <20210714150036.21060-37-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210714150036.21060-1-alex.bennee@linaro.org> References: <20210714150036.21060-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42b; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42b.google.com 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_DNSWL_NONE=-0.0001, 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: Thomas Huth , Richard Henderson , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Wainer dos Santos Moschetta , qemu-devel@nongnu.org, Willian Rampazzo , Alexandre Iooss , Paolo Bonzini , Mahmoud Mandour , =?utf-8?q?Alex_Benn=C3=A9e?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Aside from a minor bloat to file size the ability to have TCG plugins has no real impact on performance unless a plugin is actively loaded. Even then the libempty.so plugin shows only a minor degradation in performance caused by the extra book keeping the TCG has to do to keep track of instructions. As it's a useful feature lets just enable it by default and reduce our testing matrix a little. We need to move our linker testing earlier so we can be sure we can enable the loader module required. As we have ruled out static & plugins in an earlier patch we can also reduce the indent a little. Signed-off-by: Alex Bennée Reviewed-by: Thomas Huth Reviewed-by: Richard Henderson Cc: Paolo Bonzini Message-Id: <20210709143005.1554-33-alex.bennee@linaro.org> -- 2.20.1 diff --git a/docs/devel/tcg-plugins.rst b/docs/devel/tcg-plugins.rst index 18c6581d85..0cd77c77d2 100644 --- a/docs/devel/tcg-plugins.rst +++ b/docs/devel/tcg-plugins.rst @@ -71,7 +71,8 @@ API Usage ===== -The QEMU binary needs to be compiled for plugin support:: +Any QEMU binary with TCG support has plugins enabled by default. +Earlier releases needed to be explicitly enabled with:: configure --enable-plugins diff --git a/configure b/configure index e7f2fcd02c..49b5481139 100755 --- a/configure +++ b/configure @@ -429,7 +429,7 @@ libxml2="auto" debug_mutex="no" libpmem="auto" default_devices="true" -plugins="no" +plugins="$default_feature" fuzzing="no" rng_none="no" secret_keyring="$default_feature" @@ -2209,6 +2209,8 @@ if test "$static" = "yes" ; then fi if test "$plugins" = "yes"; then error_exit "static and plugins are mutually incompatible" + else + plugins="no" fi fi @@ -3102,6 +3104,69 @@ for drv in $audio_drv_list; do esac done +########################################## +# plugin linker support probe + +if test "$plugins" != "no"; then + + ######################################### + # See if --dynamic-list is supported by the linker + + ld_dynamic_list="no" + cat > $TMPTXT < $TMPC < +void foo(void); + +void foo(void) +{ + printf("foo\n"); +} + +int main(void) +{ + foo(); + return 0; +} +EOF + + if compile_prog "" "-Wl,--dynamic-list=$TMPTXT" ; then + ld_dynamic_list="yes" + fi + + ######################################### + # See if -exported_symbols_list is supported by the linker + + ld_exported_symbols_list="no" + cat > $TMPTXT < $TMPTXT < $TMPC < -void foo(void); - -void foo(void) -{ - printf("foo\n"); -} - -int main(void) -{ - foo(); - return 0; -} -EOF - - if compile_prog "" "-Wl,--dynamic-list=$TMPTXT" ; then - ld_dynamic_list="yes" - fi -fi - -######################################### -# See if -exported_symbols_list is supported by the linker - -ld_exported_symbols_list="no" -if test "$static" = "no" ; then - cat > $TMPTXT <