From patchwork Thu Jul 8 19:09:33 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: 471303 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp580605jao; Thu, 8 Jul 2021 12:23:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwm5AdWlV0eHv8SLVfB0XECemsweFyvCrYC1QolC7XTQu3ziGDvNMQW6FQd+/7/QG8XILWD X-Received: by 2002:a67:eb86:: with SMTP id e6mr29166529vso.27.1625772197472; Thu, 08 Jul 2021 12:23:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625772197; cv=none; d=google.com; s=arc-20160816; b=PGTyVzFlSVJlxZF93HSQ04kxRS4mvqd0h/vvZVQ4OOPcSWSb4jc+VCN4TXi82N6+Rd 6xs/+mr1f+kUXldXiQ+6fNwUOV3ionrvGfoZx43kTyYOLbcCCDTwTiR04U64CIMYQQvr Ou1mAOyoryFkcC3+OJCa/2qjHf8cDEow1rJ7mEdoitXCYQ/IozqVaZn6f7fHXUD3c2mR sVJVrELgozZmEC0SLPCrCDtx1UD2C7PtQp9ULWVtncj/86RiAn0qUS9Bhkdyzowx8oB/ IdyGAaPuAXUs/ji5OeFd5R8CK7nkkHOt0rnUJrlXflcRBfEOQGfBvw+ULixi4PZ2S2DR q+rw== 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=0gyrc3JGYbG1/lrB5uuyjPa8WOVT1SfE1gj4xzt3DmQ=; b=BnUECFEbxONOJ3SQQHz9uDf4KFRFStfNrqVVwV5IuuQkXjlNbEyWQZ8fHqT9RekQi+ nCMPbCqk5VHXrn48ESbgszq/W5Fd34pmZGT476CtghMymizvgQHmlLz3fXJJ3jnJ+Gv3 qoV4otA18xg2noyipCIbrTgAykNqYc3/AQVUIaNyNllLgwNSLTwyhLyoqsIIN8Jo1z7l W4TwHjQIUnxp07TPVonInCNGWuEdbdBbIH2ejrbjUHGKeGIxUxB0Z8QyFxdql0B7evA+ JyUTaoLlhK8eeO/hjuxpuiKXv9g/sT+oVdkDZ93FmZs3HSeduH4H2VjaktbGg2vQFhai KWwg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=U992Prap; 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 66si4651553vsv.28.2021.07.08.12.23.17 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 08 Jul 2021 12:23:17 -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=U992Prap; 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]:58280 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m1ZcC-0001W8-Pe for patch@linaro.org; Thu, 08 Jul 2021 15:23:16 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50154) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m1ZPY-0003cV-6D for qemu-devel@nongnu.org; Thu, 08 Jul 2021 15:10:12 -0400 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]:46947) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m1ZPR-0004rF-Sf for qemu-devel@nongnu.org; Thu, 08 Jul 2021 15:10:09 -0400 Received: by mail-wm1-x32c.google.com with SMTP id k16-20020a05600c1c90b02901f4ed0fcfe7so4709617wms.5 for ; Thu, 08 Jul 2021 12:10:04 -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=0gyrc3JGYbG1/lrB5uuyjPa8WOVT1SfE1gj4xzt3DmQ=; b=U992Prap+GA2uk6agAVizTq/GFAT4S0m1Hq4i7204QlygS2BFU73bwG+zMdbpNqL8K w//XzkO0lckcMaSyFElb6kOIWZ3vrL+si/SZu4jbS+a8LNB/zbQCvCRJKN2SfKfC169C 9X1FcteP1OIGXRzAHMkhtKGySyGR7C2livmwYh8qYiHjnjvDuOksjx06EgWl/IiRJFP1 FjXAtKgLrRUM75js6/3v88GSlwb+14ONATynFepGunLEi73rlXKth8qkq1SaOwbHraA+ XHX/82dPCVdQtb//UEkwlqVnwlWaBdIwhu/p9R2azZc5uWIc425wsUI+Cv/kyz3KTG0o ZgtQ== 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=0gyrc3JGYbG1/lrB5uuyjPa8WOVT1SfE1gj4xzt3DmQ=; b=hL6gE6SPoLamcZclDNRNFCFk7kMs+LmqRD77crgFeOvuYwdEA4l8GxELh5V0JLVhFN C/MQxcXr7tsKjgFreNBetfmRDllqtc2iolRKdmGmxpik3UKd096blThhJlo1Upobx8Tt NH+REU2Lgrz5U3gb+O4ZSNxGHk3LhXhFVw6v4WXvicxV71/YiLWkRM1A2+c6S/HehORh 6nEz0cA248ugdhc0hcayi9xP5VXfhaLrZy4/4gBe5aeGou8H+48EPXwWoCSM0DqCKcPa wRaMPF7Tp3AR0nWjKnSnOArFPK9B8xMIlpQZoMBlMoPpPVYyvOKtIH6Bi0qo1V1r4LNh 8LlQ== X-Gm-Message-State: AOAM532r81CHSrD5worVPkBfwMCrFr0VGP4ncu1mwLKzYVxFkNlmhKef oyFaKlkykZXLOTHA+w+tXbFTqQ== X-Received: by 2002:a05:600c:3b0b:: with SMTP id m11mr35225266wms.162.1625771403422; Thu, 08 Jul 2021 12:10:03 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id i12sm3263564wrp.57.2021.07.08.12.09.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Jul 2021 12:10:00 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 526901FFB7; Thu, 8 Jul 2021 20:09:45 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v2 31/39] tcg/plugins: enable by default for TCG builds Date: Thu, 8 Jul 2021 20:09:33 +0100 Message-Id: <20210708190941.16980-32-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210708190941.16980-1-alex.bennee@linaro.org> References: <20210708190941.16980-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32c; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x32c.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: fam@euphon.net, Thomas Huth , minyihh@uci.edu, berrange@redhat.com, kuhn.chenqun@huawei.com, f4bug@amsat.org, robhenry@microsoft.com, Willian Rampazzo , mahmoudabdalghany@outlook.com, aaron@os.amperecomputing.com, cota@braap.org, Wainer dos Santos Moschetta , stefanha@redhat.com, crosa@redhat.com, pbonzini@redhat.com, ma.mandourr@gmail.com, Alexandre Iooss , =?utf-8?q?Alex_Benn=C3=A9e?= , aurelien@aurel32.net 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. Cc: Paolo Bonzini Reviewed-by: Thomas Huth Signed-off-by: Alex Bennée --- v2 - properly handle plugins being "" - make the test for linker support handle default case - move linker tests to before the glib-modules test v3 - remove stray debug ($plugins) --- docs/devel/tcg-plugins.rst | 3 +- configure | 125 ++++++++++++++++++++----------------- .gitlab-ci.d/buildtest.yml | 23 ------- 3 files changed, 71 insertions(+), 80 deletions(-) -- 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 43f4d3220a..2097fa69a0 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" @@ -3086,6 +3086,73 @@ 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" + if test "$static" = "no" ; then + 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 + fi + + ######################################### + # See if -exported_symbols_list is supported by the linker + + ld_exported_symbols_list="no" + if test "$static" = "no" ; then + 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 <