From patchwork Tue Jul 6 14:58:09 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: 470479 Delivered-To: patch@linaro.org Received: by 2002:a17:906:971a:0:0:0:0 with SMTP id k26csp5208160ejx; Tue, 6 Jul 2021 08:27:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxY45hwtZl75d/Y3HvaZ/mTH2brx2VDjaWOkDdTWMr9KXAFu4M7lR/MyZQj/2MNWOLCQpJc X-Received: by 2002:a05:6402:1488:: with SMTP id e8mr424688edv.341.1625585276130; Tue, 06 Jul 2021 08:27:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625585276; cv=none; d=google.com; s=arc-20160816; b=Kx1zp+5gcVQJkoDSfjPtUpkdnRzQv/572PNDGoTRXMGMZ/USoZSRuHldMTF0q1pmtK M111u1kGZzbejyIjZ76/zCilYZTDOrMoHJ16C9erCRIIhvzeTpwYcGbD4JBItQcQNrmK kXvFxG4ijQ2jXIfxmwep7ShxJEoOuSNeTDGvWF5pWc9odpzIcMn9yiMs3f1/jMMDsfWv ttNKrtu8SPeRWUnprDm4y0Zz+As4Er+4QC3WQReBj5q2Y9HGTHQ88BDvxg80rySE1JGw oIilmxxftPdzfNZCeM8WILa9FcRwFnV7xe3EaC7+hp8VY8Lu/kKOI2uuQsfetQZHlYnb sxFQ== 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=sGLYNasVaMqPdnpUXMw96sJwNeDV9lGD9J/c+8i/lvM=; b=0DtU09bblvTpIgKvm1i7NaK/N1+mz7qqQYk6FmivaqsYd1tzGLJcm8AtLnK5yIklQ0 Eo6pcyNrnNUIJnOsvh2PN7K0+gUpy+kOrW/DiIqaWkbfqFJlheGBC5Mzu8zVq2A3p9l1 /jVOvrODvAwmCd11XpdKtCeA6wYU2S3vPLgmSDwzMCKJ9Op+KWe/IUTXI15X7a1Nla1r K9L1Szcvog8gbU0aIeWQYcgS/rGvGmvzgz2cuZ2GNmyFjD1/ly5vt7sZ4GHCQUN7Vs1d AQYXXWR2WGZYTy73lRgFmmk6AMWrrUkWFnpJyx3L832H0R5t2gLzTF9xHqsV+2T6jE/l DT1g== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=aYCs0D+o; 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 dp16si16781333ejc.454.2021.07.06.08.27.55 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 06 Jul 2021 08:27:56 -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=aYCs0D+o; 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]:56374 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m0mzK-0007ai-Ti for patch@linaro.org; Tue, 06 Jul 2021 11:27:54 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38748) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m0moz-0002Q2-NM for qemu-devel@nongnu.org; Tue, 06 Jul 2021 11:17:21 -0400 Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]:54067) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m0mor-0004t6-HG for qemu-devel@nongnu.org; Tue, 06 Jul 2021 11:17:11 -0400 Received: by mail-wm1-x32b.google.com with SMTP id w13so13831220wmc.3 for ; Tue, 06 Jul 2021 08:17: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=sGLYNasVaMqPdnpUXMw96sJwNeDV9lGD9J/c+8i/lvM=; b=aYCs0D+oBBMj0j8/7G0G5qv68fZTdXSU6eS/pNh02BhGHQ/7ggCJzZUa6wX6uvim9S Rs65S2QVVheE34DlzFStrmVMC14D93asM/lurYris1tSjbDsY4BowzJAF++VVrzjd3ix AEU3+s6P3hxvXh2ojEhc6sfTevFHl0aRQvx0u5hdTW4a33RS0no8CCVlGbZylsW4F4ym 1CEaEI3fZ4z6uzuRsJDQd8wsE3JLCkFYSPV6KXhBHhRd+bEpitG2+1SXoJugUM5Q7hKD vZo+MA9z6AJNkX5ybCmqJu7Y5aItOnsDbcSN4bK2aPXknM39dlprhaf/ZJYSSr/H8Uc3 4e+A== 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=sGLYNasVaMqPdnpUXMw96sJwNeDV9lGD9J/c+8i/lvM=; b=BEUxGjM08OqHfLmuDKFqnUZTumpk0vgIb8RnaipYGt91xl/XDNBJJoRJwZiGeKEg3+ //4S2cs6GOwcIm2DoiSh9IaiWDCQ5pYAyw3mHc24r4XVSYJ8LVI83CUFSRQleOPv5Mxe 0wtjuvI0KJJMU6USe7gqSjnH/AGk5cqZ3qIz+k5GXFhu7OJHTxv5EOd+86lfFb+8WOw4 CF8YsAKiM1biQzPCIi0ixIhx42+gH1NgpSX/zOr3jq8K5sqH32wvbagNiwt0g1q2OkC1 ez+7yst4X1LE+bBcy0Ac1EGFcwpr7M3NLN5zXHk/3cW0O6Oi4vpuxryHUNnjPoracuF1 rueg== X-Gm-Message-State: AOAM533HyX2s5+JqHaTce12ynFUAWu9CRkmqE9FfDeCm60UuoqNotY4D yXchhoByx+vC09UamR44eyV3xg== X-Received: by 2002:a7b:c206:: with SMTP id x6mr1456430wmi.114.1625584623319; Tue, 06 Jul 2021 08:17:03 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id z4sm15802616wmf.9.2021.07.06.08.16.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Jul 2021 08:17:01 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 248791FFB7; Tue, 6 Jul 2021 15:58:21 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v1 31/39] tcg/plugins: enable by default for TCG builds Date: Tue, 6 Jul 2021 15:58:09 +0100 Message-Id: <20210706145817.24109-32-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210706145817.24109-1-alex.bennee@linaro.org> References: <20210706145817.24109-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32b; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x32b.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 , berrange@redhat.com, f4bug@amsat.org, Wainer dos Santos Moschetta , Willian Rampazzo , stefanha@redhat.com, crosa@redhat.com, pbonzini@redhat.com, Mahmoud Mandour , 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 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 --- docs/devel/tcg-plugins.rst | 3 +- configure | 125 ++++++++++++++++++++----------------- .gitlab-ci.d/buildtest.yml | 23 ------- 3 files changed, 71 insertions(+), 80 deletions(-) -- 2.20.1 Reviewed-by: Thomas Huth 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 9d72b31a9f..0ce6c1ff65 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" @@ -3085,6 +3085,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 <