From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36218) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZNl0a-0002ZQ-41 for qemu-devel@nongnu.org; Fri, 07 Aug 2015 13:00:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZNl0Y-0004Ej-GH for qemu-devel@nongnu.org; Fri, 07 Aug 2015 13:00:39 -0400 Received: from mail-wi0-f171.google.com ([209.85.212.171]:36323) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZNl0Y-0004ER-1T for qemu-devel@nongnu.org; Fri, 07 Aug 2015 13:00:38 -0400 Received: by wicgj17 with SMTP id gj17so68837683wic.1 for ; Fri, 07 Aug 2015 10:00:37 -0700 (PDT) From: Alvise Rigo Date: Fri, 7 Aug 2015 19:03:11 +0200 Message-Id: <1438966995-5913-6-git-send-email-a.rigo@virtualopensystems.com> In-Reply-To: <1438966995-5913-1-git-send-email-a.rigo@virtualopensystems.com> References: <1438966995-5913-1-git-send-email-a.rigo@virtualopensystems.com> Subject: [Qemu-devel] [RFC v4 5/9] configure: Enable/disable new qemu_{ld, st} excl insns List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org, mttcg@listserver.greensocs.com Cc: alex.bennee@linaro.org, jani.kokkonen@huawei.com, tech@virtualopensystems.com, claudio.fontana@huawei.com, pbonzini@redhat.com Introduce the new --enable-tcg-ldst-excl configure option to enable the LL/SC operations only for those backends that support them. Suggested-by: Jani Kokkonen Suggested-by: Claudio Fontana Signed-off-by: Alvise Rigo --- configure | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/configure b/configure index 33b9455..c3ea3db 100755 --- a/configure +++ b/configure @@ -264,6 +264,7 @@ debug_tcg="no" debug="no" strip_opt="yes" tcg_interpreter="no" +tcg_use_ldst_excl="no" bigendian="no" mingw32="no" gcov="no" @@ -934,6 +935,10 @@ for opt do ;; --enable-tcg-interpreter) tcg_interpreter="yes" ;; + --disable-tcg-ldst-excl) tcg_use_ldst_excl="no" + ;; + --enable-tcg-ldst-excl) tcg_use_ldst_excl="yes" + ;; --disable-cap-ng) cap_ng="no" ;; --enable-cap-ng) cap_ng="yes" @@ -1392,6 +1397,18 @@ if test "$ARCH" = "unknown"; then fi fi +# Check if the slow-path for atomic instructions is supported by the +# TCG backend. +case $cpu in + i386|x86_64|arm|aarch64) + ;; + *) + if test "$tcg_use_ldst_excl" = "yes"; then + error_exit "Load and store exclusive not supported for $cpu hosts" + fi + ;; +esac + # Consult white-list to determine whether to enable werror # by default. Only enable by default for git builds z_version=`cut -f3 -d. $source_path/VERSION` @@ -4526,6 +4543,7 @@ echo "Install blobs $blobs" echo "KVM support $kvm" echo "RDMA support $rdma" echo "TCG interpreter $tcg_interpreter" +echo "use ld/st excl $tcg_use_ldst_excl" echo "fdt support $fdt" echo "preadv support $preadv" echo "fdatasync $fdatasync" @@ -4903,6 +4921,9 @@ fi if test "$tcg_interpreter" = "yes" ; then echo "CONFIG_TCG_INTERPRETER=y" >> $config_host_mak fi +if test "$tcg_use_ldst_excl" = "yes" ; then + echo "CONFIG_TCG_USE_LDST_EXCL=y" >> $config_host_mak +fi if test "$fdatasync" = "yes" ; then echo "CONFIG_FDATASYNC=y" >> $config_host_mak fi -- 2.5.0