From patchwork Mon Jul 12 12:26:45 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: 473092 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp2898498jao; Mon, 12 Jul 2021 05:36:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz9NJ2A3QAg9gBaI7ezOy3JAozUCs0AOkJCpRAWkX7nZiIRTEbSZN+WwePYKrShadLFY/TY X-Received: by 2002:aa7:c3d0:: with SMTP id l16mr18625027edr.225.1626093378339; Mon, 12 Jul 2021 05:36:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626093378; cv=none; d=google.com; s=arc-20160816; b=SYw38yOixZFjk9hHxKweI2eziJjp6rUWjkfj6iUMTdjq2uiJk8vvaHCz2iyCEhpRRZ BDAJ+r4sN2v/H8nLWosYzDIAP/RLCYrQKewMtBUQSRc7rYcgqZgMO9lOCEGOOfJlad3S n5fjguAIvAmxM8gWVWVtLJTiO7qgqDV0zSCFDFl+rlPefJLP4xOzVbnIU4GXIS6bscAZ JuUvrzxOWf7A4YmYDegVpX+VVENKAc2L+857fD2ei7SJw8avorExtLxiBilazweHynut WM5M5Xi2w+/vFQPs/IF6ddDkNZquf1q5L3A0SKmZb+q2Dgq1g4cW7KLVf4VMRQJ6VeQi zjLQ== 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=QLGV3nOOa57cJf2gO1fpwVSEwaIR/mViJx+0lBSJNTo=; b=YwXC7x3Ec+FeXeldciMHLBwk35dWfCCqfZRkrF9JFTUzo//XJpBjrfxrGOWmH2FXEp 8Yr9AWmDV4+Ev51JxsRt9fGzUM+aF4T45h/6DL6IEbpDa4Dxsjx0UuRCVcWJXZpeLZZe QyL4gv7xc1XUj9VN9/ex8zDQHeHDQsfGVhcLakKA9A6KopBaHNOpFT55UHfRaeY/k8si CwJj11dZHdXqaVFmxRNNFgTfQuFdJaFH7JfqgiVEgE0tKF70xJAgo8sNBy46JCSlLfbZ 5WqMfTLv7embBNqrywvrHM+LPEF/KuX4yfsVo233+e4tKRMmaWEnmgrNhC316v42momB pJaQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=eTPCjvlV; 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 j23si7785827edr.110.2021.07.12.05.36.18 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 12 Jul 2021 05:36:18 -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=eTPCjvlV; 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]:38472 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m2vAX-00005u-38 for patch@linaro.org; Mon, 12 Jul 2021 08:36:17 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41144) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m2v7M-0004n9-BG for qemu-devel@nongnu.org; Mon, 12 Jul 2021 08:33:00 -0400 Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]:55231) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m2v7J-0002K9-MI for qemu-devel@nongnu.org; Mon, 12 Jul 2021 08:32:59 -0400 Received: by mail-wm1-x330.google.com with SMTP id k32so8086420wms.4 for ; Mon, 12 Jul 2021 05:32:57 -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=QLGV3nOOa57cJf2gO1fpwVSEwaIR/mViJx+0lBSJNTo=; b=eTPCjvlV52H42iacsU5RvA5u2TFdNpdBgRlk7l8zAIA01agwz60m6gAXMtMjOepBvS AX6wcqInb0S+aQzMpM9l4GwxKK6C5zWFOBezc9dL/GxAatOaoqqioUuOU9h0RIwflVIg em7Lf6fviKsQzmxrFmTDFrJfd9uW0LA7EL53cufQZ6tRISTByh8AXUj8mCZrCMvgl3rT cvWmycOsXrSvhriVUxdEjADCwYVnBB8CSWi/wSYUb9UQj7U6pgNf6EOow03WnYQQ6Zd6 CouiV++FRcd/YGsqWiW3aNJ7TcqJvTNdHy8bvNa5BYqSL8/VXhIIxUnB+RTkEJZWx8wy OZFg== 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=QLGV3nOOa57cJf2gO1fpwVSEwaIR/mViJx+0lBSJNTo=; b=RTXRIKegoVjSQlVEaHzADsiTWLq2/0Nv1yfZ7d+Wj8fssuRQOwH0eM96GiVA2cQqfj vx/oYMGAQUif1mHFCDg6VyUg+XvSyynUR05QuQSMtWzIbVlW/ZVzkk5WalMjWx5ul0I1 D9sh9bnCMDmnU9eKV+pjjZNiiLY7ZXULVYCDsi9falqmZ78kNbKUkzHU5CK0lJqjXinG Aa4s9+pBYUn2HSTVW+DivZ1djyJaQeBXwoHRXbTtqjVOKjxh4K0uupNEIAyjkr5WWPLI L0qXFpAz4yubX9j5i0XU3o8PwW/wRZ3Db6QSdrtKVoMdWeAilVNx3FhJmg8MpfqlOBI5 RxWg== X-Gm-Message-State: AOAM533Z0DCHwZNQVo8KH412aoOoE0RNGOqZzi44SNt/4bcHNlU4cUzO HG5M1HUtJGqSPSplzYc+tK7Duw== X-Received: by 2002:a7b:c108:: with SMTP id w8mr25685291wmi.99.1626093176380; Mon, 12 Jul 2021 05:32:56 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id c125sm18783135wme.36.2021.07.12.05.32.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Jul 2021 05:32:56 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 380F81FFBA; Mon, 12 Jul 2021 13:26:57 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 32/40] tcg/plugins: enable by default for most TCG builds Date: Mon, 12 Jul 2021 13:26:45 +0100 Message-Id: <20210712122653.11354-33-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210712122653.11354-1-alex.bennee@linaro.org> References: <20210712122653.11354-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::330; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x330.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 97ea6e6629..60358529fd 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" @@ -2196,6 +2196,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 @@ -3089,6 +3091,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 <