From nobody Sun May 19 11:31:09 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1591988686; cv=none; d=zohomail.com; s=zohoarc; b=CEYZPnVlmiiu+94l5EmCcxEYm4ZfOx79csu5mwgkz3iodZ6uAq6bYNoflArX/FYzznJS72cvwm9gn4cL8nFxKKvkfCBPCv2ss80gGMbfwQ80d/EFOEiZH1rwNpmHQuF+OJbNV+UvFjCaASAlJ/693gSHunu/Mpjl1V3cJi1vqJc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1591988686; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=VvsWLFzW89Fr/+a2K5qJoeB4GeJHRtOSlXNKQS2LjDI=; b=HWacCw+sTZfVRKTzOOI1uxqnIfZk0FkYBH0kaRkWu1fEGIeTe6xAfSgGIWWEAUBU/4d09Y/EA5XawouHmJSulWbiiNLl7pZCXVFSx5JT0WyxfjuxovaOpd4JUccWo4Qpgnmlw6XwpZrK3EsVXmkt5EUf3VmJBtvXUepGT5ivSc4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1591988686641724.6533238323055; Fri, 12 Jun 2020 12:04:46 -0700 (PDT) Received: from localhost ([::1]:45476 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jjoyr-0002iN-5q for importer@patchew.org; Fri, 12 Jun 2020 15:04:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54574) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jjox2-0000kX-VU for qemu-devel@nongnu.org; Fri, 12 Jun 2020 15:02:53 -0400 Received: from mail-wr1-x42d.google.com ([2a00:1450:4864:20::42d]:40798) by eggs.gnu.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jjox1-0006sa-CM for qemu-devel@nongnu.org; Fri, 12 Jun 2020 15:02:52 -0400 Received: by mail-wr1-x42d.google.com with SMTP id h5so10828789wrc.7 for ; Fri, 12 Jun 2020 12:02:42 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id a15sm11458716wra.86.2020.06.12.12.02.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Jun 2020 12:02:38 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id EE6D71FF87; Fri, 12 Jun 2020 20:02:37 +0100 (BST) 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=VvsWLFzW89Fr/+a2K5qJoeB4GeJHRtOSlXNKQS2LjDI=; b=p+M/mfiTCmYM8kCkSwmRyFZ3pMO9TwEWnWkAmTqoh7p9npi0fwoCeYdiXur5sluiBr i4AIgPORdYsdN/KKjt/Pv1tPGmfdl2d8bwhLe+fIOhw7ysmzYOcNsRgDDh3u3DhJI/XV WbXaeXpAO9qcNr9MX+O4QNQOt3XO/20DBvYE0FZh3mH9bwHwxTlHjFWnE/2mMDGhzODT l8VhcgklZQuygrjsnFfyn3fnCpuXShbqN6EbDDM10RPMVGd/gYadk0+uNFeLpVJfGkfE c7p0EEj8+BupMxu7IJiosEu387FLOzAvHGCM4PPTFHaxEhG9jGVEQjPwTXhATLS9w/wY Jz2g== 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=VvsWLFzW89Fr/+a2K5qJoeB4GeJHRtOSlXNKQS2LjDI=; b=ulQ/hR6RfbjS2lAbLza6uSD4Octr5FqHBXxdNI+5TthqSrfFBznWPbbyv4eRu+VOx8 OEaI5C0WzVGKpqJXoX+QldNAVc0A9g+UbRM66AXJizJ9Q9qvpmLYd3mdVQyZ//34529f RnfDSSliDeXzQh2S/rne3UR8UNwHTTYcYEmM1BYL6ACjG1DPughMcCzKV0/Y0yVYkXyR ValCRgtxiVyQ6rt0sV7FjTVDNFKAf4ionLdymMKCJ3irG4x2uYr8yEjEAYBC4gDaY8ry QG7ES1prtobSPYqva2LTaveJ/+frETjNcrZc2olSI4AUQkYJQubqpdD/FQGCsJkWFBfJ X/Iw== X-Gm-Message-State: AOAM532QbOn5WNaxxtxeAnWl4xYFnz2pmhijdnoL7ZcVqBH8IHwgVqMU ePkE7b8S4w5PE6GvorjZqPY5eA== X-Google-Smtp-Source: ABdhPJwRPfY9GLXOYm1U92EvIWYb0keXL2s2SS3iXZ4EJ8ov1BPa2ON885QSbnTtxwUHEC4dnwZAuw== X-Received: by 2002:a1c:7215:: with SMTP id n21mr375566wmc.10.1591988561459; Fri, 12 Jun 2020 12:02:41 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v1 01/18] tests/docker: bump fedora to 32 Date: Fri, 12 Jun 2020 20:02:20 +0100 Message-Id: <20200612190237.30436-2-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200612190237.30436-1-alex.bennee@linaro.org> References: <20200612190237.30436-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::42d; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42d.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. 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=_AUTOLEARN 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, berrange@redhat.com, =?UTF-8?q?Alex=20Benn=C3=A9e?= , richard.henderson@linaro.org, f4bug@amsat.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , cota@braap.org, aurelien@aurel32.net Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) We should be keeping this up to date as Fedora goes out of support quite quickly. Signed-off-by: Alex Benn=C3=A9e --- tests/docker/dockerfiles/fedora.docker | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/docker/dockerfiles/fedora.docker b/tests/docker/dockerfi= les/fedora.docker index 92b6e11c8a8..798ddd2c3e0 100644 --- a/tests/docker/dockerfiles/fedora.docker +++ b/tests/docker/dockerfiles/fedora.docker @@ -1,4 +1,4 @@ -FROM fedora:30 +FROM fedora:32 =20 # Please keep this list sorted alphabetically ENV PACKAGES \ --=20 2.20.1 From nobody Sun May 19 11:31:09 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1591988806; cv=none; d=zohomail.com; s=zohoarc; b=BFSWAHIfDUg2BzSwEnkF4Ceh3PlY4LaP2npfomH62kcCQL08l8e8xwSf5tFOrLq1NT67XKqCYav3btfRFrKu38ItDuHCkDE2IgWaMGTDi1QnSzEdmy7GeEYuzoLM2YjtFfdoznaV+xTvzn2uj4W8rYA0FqR3v0pjPySw2t+1g0U= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1591988806; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=ETOQssqeunZMNuQuq6uQLfDZ8XDqPmQMuw/cPtqxYnI=; b=O55BVB+Pc+f2S6AdVFUqstuHx2CmsGS86+E5jBIzg6DG76Bscel9p3CSIbZUu+1JPK+exR8xuyrwxMy8R/i01sORfI41d0YrEgBkmUvmU1PC8I0vvPX3JTeUn8nj0s6jKN9YS6qYrR6f6A83+8xGE8HoS0Bd4Hj1GVwlSEI0OwQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1591988806738433.36390508943293; Fri, 12 Jun 2020 12:06:46 -0700 (PDT) Received: from localhost ([::1]:53912 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jjp0n-0006Co-DQ for importer@patchew.org; Fri, 12 Jun 2020 15:06:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54612) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jjox4-0000lS-5B for qemu-devel@nongnu.org; Fri, 12 Jun 2020 15:02:54 -0400 Received: from mail-wr1-x442.google.com ([2a00:1450:4864:20::442]:33271) by eggs.gnu.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jjox2-0006sg-D9 for qemu-devel@nongnu.org; Fri, 12 Jun 2020 15:02:53 -0400 Received: by mail-wr1-x442.google.com with SMTP id l11so10828599wru.0 for ; Fri, 12 Jun 2020 12:02:44 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id a126sm10321622wme.28.2020.06.12.12.02.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Jun 2020 12:02:39 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 29C241FF8C; Fri, 12 Jun 2020 20:02:38 +0100 (BST) 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=ETOQssqeunZMNuQuq6uQLfDZ8XDqPmQMuw/cPtqxYnI=; b=WTOsK1dJ344coxHh/p9IMYaPLchiSq/69ZtIMYYksULhBnjdgErp5eykewjDAVAcKc stZjNu4/u5QcJBuBEpiubkADWb00ZUC9w9sYbIA7gQr1bQv+XiJT2ep5G1HknqfByZ6L jCe4cRNJSHXnLbYNLfyYte3fYunAl7oRhfDCJUymRGFufqOozBfhRhAw/aJpEAA6xdBz 5T7E0OX/5KoclM4asUDW8X1TP+Jmj8O/34X+FPF7JJIvfr9gkkXe68T64bRRjjmBs6P2 DX4d62Og0qygg8ZC/yX2CtNqRsPVDCBcnvUFZNe9eQTGHK3pmJPSD68QOlznbFZBEStu n7xg== 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=ETOQssqeunZMNuQuq6uQLfDZ8XDqPmQMuw/cPtqxYnI=; b=LcCqQaedbOssR3G///Y6HG9f5fALALE1TwAwwxIUlowidudEyePqKiMEkwe0RxWYhQ uvlUMIHWwucgbrMhRh/fMP+HZiCmxwKYLXVY2S4NMioVxtRTQI3n2xHM3eMJNkCOF87g HUI1PwMpYszvk25AVm5wsuQv0ELhkQhQh4IJm542cKn6QP8CTLLxySnknx0RwbJlEBOD nbsGnh/Jv0bS38PyqBi3Rxm4RxDJd5R0hzpTunI2mLWXJE8SsNRQQw1K4ZfqNkrzYmyJ m6hXVC4IlbJ0+fEnbq9zE1UTW4S2LKicXZ4ZqNwLd286L639jeXGArdK7scEBME+slJ3 4FuA== X-Gm-Message-State: AOAM5310MGKW403tF8v2zSTu428Ei/iec+z6i3ddhF5qYN3IMbJ7/t0L KYp//dMD3hxFdNlheFMW8kUR1Q== X-Google-Smtp-Source: ABdhPJz4Gc7WwQMb80U1PFfcyk4RxpweZCFkWs/+P5EhamaZefxETqbdejWuic1rUVjiZuokYzkFfQ== X-Received: by 2002:a5d:4286:: with SMTP id k6mr15817041wrq.140.1591988563534; Fri, 12 Jun 2020 12:02:43 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v1 02/18] Makefile: dtc: update, build the libfdt target Date: Fri, 12 Jun 2020 20:02:21 +0100 Message-Id: <20200612190237.30436-3-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200612190237.30436-1-alex.bennee@linaro.org> References: <20200612190237.30436-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::442; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x442.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. 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=_AUTOLEARN 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, berrange@redhat.com, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , richard.henderson@linaro.org, f4bug@amsat.org, =?UTF-8?q?Alex=20Benn=C3=A9e?= , cota@braap.org, Claudio Fontana , aurelien@aurel32.net Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: Claudio Fontana dtc submodule update, now call the libfdt target from the new dtc Makefile, which has been changed to not require bison, flex, etc. This removes warnings during the build. scripts/ symlink and tests directory creation are not necessary, and neither is calling the clean rule explicitly. Signed-off-by: Claudio Fontana Reviewed-by: Philippe Mathieu-Daud=C3=A9 Tested-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Alex Benn=C3=A9e Message-Id: <20200518160319.18861-2-cfontana@suse.de> --- configure | 1 - Makefile | 10 +++++----- dtc | 2 +- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/configure b/configure index 597e909b537..af5d7aa57a1 100755 --- a/configure +++ b/configure @@ -4301,7 +4301,6 @@ EOF mkdir -p dtc if [ "$pwd_is_source_path" !=3D "y" ] ; then symlink "$source_path/dtc/Makefile" "dtc/Makefile" - symlink "$source_path/dtc/scripts" "dtc/scripts" fi fdt_cflags=3D"-I\$(SRC_PATH)/dtc/libfdt" fdt_ldflags=3D"-L\$(BUILD_DIR)/dtc/libfdt" diff --git a/Makefile b/Makefile index d1af126ea19..9385c2e653b 100644 --- a/Makefile +++ b/Makefile @@ -526,13 +526,14 @@ $(SOFTMMU_FUZZ_RULES): $(edk2-decompressed) $(TARGET_DIRS_RULES): $(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C $(dir $@) V=3D"$(V)" = TARGET_DIR=3D"$(dir $@)" $(notdir $@),) =20 -DTC_MAKE_ARGS=3D-I$(SRC_PATH)/dtc VPATH=3D$(SRC_PATH)/dtc -C dtc V=3D"$(V)= " LIBFDT_srcdir=3D$(SRC_PATH)/dtc/libfdt +# LIBFDT_lib=3D"": avoid breaking existing trees with objects requiring -f= PIC +DTC_MAKE_ARGS=3D-I$(SRC_PATH)/dtc VPATH=3D$(SRC_PATH)/dtc -C dtc V=3D"$(V)= " LIBFDT_lib=3D"" DTC_CFLAGS=3D$(CFLAGS) $(QEMU_CFLAGS) -DTC_CPPFLAGS=3D-I$(BUILD_DIR)/dtc -I$(SRC_PATH)/dtc -I$(SRC_PATH)/dtc/libf= dt +DTC_CPPFLAGS=3D-I$(SRC_PATH)/dtc/libfdt =20 .PHONY: dtc/all -dtc/all: .git-submodule-status dtc/libfdt dtc/tests - $(call quiet-command,$(MAKE) $(DTC_MAKE_ARGS) CPPFLAGS=3D"$(DTC_CPPFLAGS)= " CFLAGS=3D"$(DTC_CFLAGS)" LDFLAGS=3D"$(QEMU_LDFLAGS)" ARFLAGS=3D"$(ARFLAGS= )" CC=3D"$(CC)" AR=3D"$(AR)" LD=3D"$(LD)" $(SUBDIR_MAKEFLAGS) libfdt/libfdt= .a,) +dtc/all: .git-submodule-status dtc/libfdt + $(call quiet-command,$(MAKE) $(DTC_MAKE_ARGS) CPPFLAGS=3D"$(DTC_CPPFLAGS)= " CFLAGS=3D"$(DTC_CFLAGS)" LDFLAGS=3D"$(QEMU_LDFLAGS)" ARFLAGS=3D"$(ARFLAGS= )" CC=3D"$(CC)" AR=3D"$(AR)" LD=3D"$(LD)" $(SUBDIR_MAKEFLAGS) libfdt,) =20 dtc/%: .git-submodule-status @mkdir -p $@ @@ -820,7 +821,6 @@ distclean: clean rm -rf $$d || exit 1 ; \ done rm -Rf .sdk - if test -f dtc/version_gen.h; then $(MAKE) $(DTC_MAKE_ARGS) clean; fi =20 KEYMAPS=3Dda en-gb et fr fr-ch is lt no pt-br sv \ ar de en-us fi fr-be hr it lv nl pl ru th \ diff --git a/dtc b/dtc index 88f18909db7..85e5d839847 160000 --- a/dtc +++ b/dtc @@ -1 +1 @@ -Subproject commit 88f18909db731a627456f26d779445f84e449536 +Subproject commit 85e5d839847af54efab170f2b1331b2a6421e647 --=20 2.20.1 From nobody Sun May 19 11:31:09 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1591988694; cv=none; d=zohomail.com; s=zohoarc; b=P9flayZhQeH2f5XdcDxyiFe3EQJ2fuEN/9VRg0gQpf0sssU5O4TBpSog2mUmgYqGgdWO5JO2XLsUdKaUvtckqD4eiXAIt07UH6mXJxlmVaiwpn7oUXZWkz2OKfk+ZPv4sMxPGmHASqPBhyZ9m5A9BF85pSBWSa5d7Em5poo968g= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1591988694; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=OWM6z37V43sNWJfaIriZyMnMn9bapISVtQNxM8oRL7o=; b=mZ9SM0FyKLSuN/6q6AWufUOIu+LnlCum7jFpgyYux6mqFGxky5IjzMLyVmPbv62UE9oMO5WxQfTf+JFeHGiJpX5vTUIUUXHkPqw/qJeK5ljP4cmgD8hU3RNWyWX7WKECfMh/BMZ/NQP5bVCOal/OUttXXv7KeuV1RUwVpvmDEiI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1591988694677271.76196867183285; Fri, 12 Jun 2020 12:04:54 -0700 (PDT) Received: from localhost ([::1]:45746 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jjoyz-0002p2-EK for importer@patchew.org; Fri, 12 Jun 2020 15:04:53 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54650) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jjox5-0000oV-UQ for qemu-devel@nongnu.org; Fri, 12 Jun 2020 15:02:55 -0400 Received: from mail-wr1-x443.google.com ([2a00:1450:4864:20::443]:37918) by eggs.gnu.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jjox3-0006sk-Vd for qemu-devel@nongnu.org; Fri, 12 Jun 2020 15:02:55 -0400 Received: by mail-wr1-x443.google.com with SMTP id e1so10830680wrt.5 for ; Fri, 12 Jun 2020 12:02:46 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id f71sm9278533wmf.22.2020.06.12.12.02.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Jun 2020 12:02:41 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 55C321FF8F; Fri, 12 Jun 2020 20:02:38 +0100 (BST) 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=OWM6z37V43sNWJfaIriZyMnMn9bapISVtQNxM8oRL7o=; b=ppZPh3k3Qp8LHCkmeJxvF1AnZPH2I1BJz2okR/I2Q8Cczc7h1zXZrA81syI+BTkjXz 2fDIa70+FGYn8lPnzwVlITnRt1EcdCkeARM1SZknSWU0WQE9pQkwGe9NVyXKQ8wDanyN MJkdI8hgFJZTh1EquNtx6ngW27YDw7AFM5iuwYpTg18CTHVPTmWa05Ja4LDy7L+v6SbL E34RpKWYRxusrwvG7HyuDIQkQveJSDciWF2MrAEoDIfq4SObs80Ipnk0cE7TrvnqGNXh zPu8DAZuojEF9ZbnZyDQyAAQz3Bsv4PWGh3GVAP5CbpUQrBM2Q4mZj7Bdeuz0Swo+1gL yFLw== 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=OWM6z37V43sNWJfaIriZyMnMn9bapISVtQNxM8oRL7o=; b=CyNDy6tI/xvXJfTR3mcI8lUTee3pBWDz1ucNCRxEguWAgZxGq/KheFbQC/A1uFlW8l Z+q6E8bf2yFJmY6OvO10FSS65tl44Zw+60Djm3vA6eWYZjcQsxhfK2rFSMPI8QvgHPrM V1S4N/PnTr/7M6S3XBhOdNP3wvE/pWh/rN5K4gwa/ZWPEmqQ28cyibwLMR14xFCuTIIQ 1wpzmNewseGnDMjyqPuI37x/n+fKJ1BA/i+D2licPFIoI2WFWvgv70GKrgXI0KRR9I12 YoKytb3aiX1reQYa1xRkfQ3SSBmmW22sXTMzj3sh1e7XG/aBF27SqNVBTbFo8fnnAkeU oFMQ== X-Gm-Message-State: AOAM531XIf8pTkEOdgX43Flrjw6Xq2kvjPdh/Y/EjppYDQR0hIjyBgQm GWD3AhHonAy4PDjb/YjoQMkRdQ== X-Google-Smtp-Source: ABdhPJysIpBUY5h3O60gPGuj1iQ1YKVz4fNeyuD85SbAvvHHHidIyKKBP/95BmU1gqNfZcrXpVSFlw== X-Received: by 2002:a5d:628c:: with SMTP id k12mr16303446wru.211.1591988565304; Fri, 12 Jun 2020 12:02:45 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v1 03/18] Makefile: remove old compatibility gunks Date: Fri, 12 Jun 2020 20:02:22 +0100 Message-Id: <20200612190237.30436-4-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200612190237.30436-1-alex.bennee@linaro.org> References: <20200612190237.30436-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::443; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x443.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. 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=_AUTOLEARN 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, berrange@redhat.com, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , richard.henderson@linaro.org, f4bug@amsat.org, Markus Armbruster , =?UTF-8?q?Alex=20Benn=C3=A9e?= , cota@braap.org, Claudio Fontana , aurelien@aurel32.net Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: Claudio Fontana Signed-off-by: Claudio Fontana Reviewed-by: Markus Armbruster Reviewed-by: Philippe Mathieu-Daud=C3=A9 Tested-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Alex Benn=C3=A9e Message-Id: <20200518160319.18861-3-cfontana@suse.de> --- Makefile | 6 ------ 1 file changed, 6 deletions(-) diff --git a/Makefile b/Makefile index 9385c2e653b..57b83521b18 100644 --- a/Makefile +++ b/Makefile @@ -562,12 +562,6 @@ slirp/all: .git-submodule-status CC=3D"$(CC)" AR=3D"$(AR)" LD=3D"$(LD)" RANLIB=3D"$(RANLIB)" \ CFLAGS=3D"$(QEMU_CFLAGS) $(CFLAGS)" LDFLAGS=3D"$(QEMU_LDFLAGS)") =20 -# Compatibility gunk to keep make working across the rename of targets -# for recursion, to be removed some time after 4.1. -subdir-dtc: dtc/all -subdir-capstone: capstone/all -subdir-slirp: slirp/all - $(filter %/all, $(TARGET_DIRS_RULES)): libqemuutil.a $(common-obj-y) \ $(qom-obj-y) =20 --=20 2.20.1 From nobody Sun May 19 11:31:09 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1591988891; cv=none; d=zohomail.com; s=zohoarc; b=fMkkgF347HiTrbpTAn9v+3DP/DyNVmQ5RnUexha3GfCi5yHrd89e7MCSZwMDWGdIYwyCD+H9C9IFff9fwEp/Bi8P6Qp1/jH33+094vOhHuPjkjKm5XdOdtHM7p0+xN9z/TMAZG/D+j/xxUKWuUgRubOCUgdsP8KuQM3zKyzMDf4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1591988891; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=QbPd3c5nq0iqQGGp+VQI0AU24TYH55OhmLcysF1VGuo=; b=PkkX83Rsf8J6cA8AoY1Mfw1WixnQoFxlhFV3gteVKlMc4RNPoS6lw2v7ICpvCggiaecGJewsjdsBAEuCkm7Iy2R7C0iRbOmJR9LegLKXHOVJa7cHesb5JxuCPAQ7OG0BojBthMGDBgJFTT8jcYgMxBZ8hL8CK2nBQua+sJQlpNI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1591988891147234.102761701212; Fri, 12 Jun 2020 12:08:11 -0700 (PDT) Received: from localhost ([::1]:60778 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jjp29-0000x0-SC for importer@patchew.org; Fri, 12 Jun 2020 15:08:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54688) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jjox7-0000q7-QJ for qemu-devel@nongnu.org; Fri, 12 Jun 2020 15:03:00 -0400 Received: from mail-wr1-x441.google.com ([2a00:1450:4864:20::441]:37917) by eggs.gnu.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jjox5-0006sq-JH for qemu-devel@nongnu.org; Fri, 12 Jun 2020 15:02:57 -0400 Received: by mail-wr1-x441.google.com with SMTP id e1so10830804wrt.5 for ; Fri, 12 Jun 2020 12:02:47 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id h27sm13313085wrb.18.2020.06.12.12.02.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Jun 2020 12:02:41 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 86E2A1FF90; Fri, 12 Jun 2020 20:02:38 +0100 (BST) 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=QbPd3c5nq0iqQGGp+VQI0AU24TYH55OhmLcysF1VGuo=; b=g7Dioscget7717CInBFzsAqoBMsuDd445fJOwF9Z+TwxG7GLpopbFDw39YOj4aYRnD eDKd8qMKfpFKZRKetm1LFCmhYiuAhvPeh0o2BsJEsKOZGELnaMxcvexG5BtmAuSTtmNc +mNut2g1w3ecWQJGyPPXwzTLGhrsMKlOG+5Bj8GFf8nSyoLBRstKhPtXp8krh7J0HlMJ yRtCw5aonGQGcD+CJKV5edVgv7ypyEevYbGBhJrc3Cmy7HKVmlRoCMiRFNoL1tmya33C aeu5jzowTOPj6o6DbHyIj+GM0R96w1LQmeLaaje3pZcbdyZwAEfOo6ns466lIMSmLAio u6dA== 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=QbPd3c5nq0iqQGGp+VQI0AU24TYH55OhmLcysF1VGuo=; b=AjpFlc+La0G7cvs5xjRpD1u4ZjzAsin0LP7VFaffwdMVRovEezpWZ3FO5wPqeeJeRl yY5SIE3bSKqutHH0ots6DcUPoImeFkgojqXGbqjZQlvBTNAt3IXNCVQTeNThJlcnH4JL m3Qb1nSVhJ/ZHQsN8O3Wg7d6Abt5sEk/msZz/2TX+Q7E2ySBg236r7rqTUANCipy3TcV HJzx8q5csbm/5CzLfPhNCmXVpNznU9uhIlZIJ9VwjZtB1MtCUaa+kPmRxxfU115g0pfj jy+1fWQ5p6YNnfEiFa1gKSDj7ek44OtUJK0J6gcb0LyNdI8oqqJTpHmDSq4b2o1bP1MZ /aow== X-Gm-Message-State: AOAM533psYlSgTXXPzhuBj4CqSMrICBZjoEzllPug7qDmOfPUr7fZb5U N7cntj4FiidRvzJavoOimSAnDg== X-Google-Smtp-Source: ABdhPJxHQddljtycKOMyhgk2Zp01quys3q6t5Zc9LofsNdR7C5IfSOjZqEY7su5z9AII+41jgzMPyA== X-Received: by 2002:a05:600c:4152:: with SMTP id h18mr332272wmm.189.1591988566352; Fri, 12 Jun 2020 12:02:46 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v1 04/18] configure: add --enable-tsan flag + fiber annotations for coroutine-ucontext Date: Fri, 12 Jun 2020 20:02:23 +0100 Message-Id: <20200612190237.30436-5-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200612190237.30436-1-alex.bennee@linaro.org> References: <20200612190237.30436-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::441; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x441.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. 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=_AUTOLEARN 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, Kevin Wolf , berrange@redhat.com, Robert Foley , =?UTF-8?q?Alex=20Benn=C3=A9e?= , richard.henderson@linaro.org, f4bug@amsat.org, cota@braap.org, Stefan Hajnoczi , Lingfeng Yang , aurelien@aurel32.net Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: Lingfeng Yang We tried running QEMU under tsan in 2016, but tsan's lack of support for longjmp-based fibers was a blocker: https://groups.google.com/forum/#!topic/thread-sanitizer/se0YuzfWazw Fortunately, thread sanitizer gained fiber support in early 2019: https://reviews.llvm.org/D54889 This patch brings tsan support upstream by importing the patch that annotat= ed QEMU's coroutines as tsan fibers in Android's QEMU fork: https://android-review.googlesource.com/c/platform/external/qemu/+/844675 Tested with '--enable-tsan --cc=3Dclang-9 --cxx=3Dclang++-9 --disable-werro= r' configure flags. Signed-off-by: Lingfeng Yang Signed-off-by: Emilio G. Cota [cota: minor modifications + configure changes] Signed-off-by: Robert Foley [RF: configure changes, coroutine fix + minor modifications] Reviewed-by: Alex Benn=C3=A9e Signed-off-by: Alex Benn=C3=A9e Message-Id: <20200609200738.445-2-robert.foley@linaro.org> --- configure | 47 +++++++++++++++++++++++++++- util/coroutine-ucontext.c | 66 +++++++++++++++++++++++++++++++++------ 2 files changed, 103 insertions(+), 10 deletions(-) diff --git a/configure b/configure index af5d7aa57a1..860f4c63647 100755 --- a/configure +++ b/configure @@ -395,6 +395,7 @@ gprof=3D"no" debug_tcg=3D"no" debug=3D"no" sanitizers=3D"no" +tsan=3D"no" fortify_source=3D"" strip_opt=3D"yes" tcg_interpreter=3D"no" @@ -1150,6 +1151,10 @@ for opt do ;; --disable-sanitizers) sanitizers=3D"no" ;; + --enable-tsan) tsan=3D"yes" + ;; + --disable-tsan) tsan=3D"no" + ;; --enable-sparse) sparse=3D"yes" ;; --disable-sparse) sparse=3D"no" @@ -1754,6 +1759,7 @@ Advanced options (experts only): --with-pkgversion=3DVERS use specified string as sub-version of the pa= ckage --enable-debug enable common debug build options --enable-sanitizers enable default sanitizers + --enable-tsan enable thread sanitizer --disable-strip disable stripping binaries --disable-werror disable compilation abort on warning --disable-stack-protector disable compiler-provided stack protection @@ -6195,6 +6201,30 @@ if test "$fuzzing" =3D "yes" ; then fi fi =20 +# Thread sanitizer is, for now, much noisier than the other sanitizers; +# keep it separate until that is not the case. +if test "$tsan" =3D "yes" && test "$sanitizers" =3D "yes"; then + error_exit "TSAN is not supported with other sanitiziers." +fi +have_tsan=3Dno +have_tsan_iface_fiber=3Dno +if test "$tsan" =3D "yes" ; then + write_c_skeleton + if compile_prog "$CPU_CFLAGS -Werror -fsanitize=3Dthread" "" ; then + have_tsan=3Dyes + fi + cat > $TMPC << EOF +#include +int main(void) { + __tsan_create_fiber(0); + return 0; +} +EOF + if compile_prog "$CPU_CFLAGS -Werror -fsanitize=3Dthread" "" ; then + have_tsan_iface_fiber=3Dyes + fi +fi + ########################################## # check for libpmem =20 @@ -6296,6 +6326,16 @@ if test "$have_asan" =3D "yes"; then "Without code annotation, the report may be inferior." fi fi +if test "$have_tsan" =3D "yes" ; then + if test "$have_tsan_iface_fiber" =3D "yes" ; then + QEMU_CFLAGS=3D"-fsanitize=3Dthread $QEMU_CFLAGS" + QEMU_LDFLAGS=3D"-fsanitize=3Dthread $QEMU_LDFLAGS" + else + error_exit "Cannot enable TSAN due to missing fiber annotation interfa= ce." + fi +elif test "$tsan" =3D "yes" ; then + error_exit "Cannot enable TSAN due to missing sanitize thread interface." +fi if test "$have_ubsan" =3D "yes"; then QEMU_CFLAGS=3D"-fsanitize=3Dundefined $QEMU_CFLAGS" QEMU_LDFLAGS=3D"-fsanitize=3Dundefined $QEMU_LDFLAGS" @@ -6331,7 +6371,8 @@ if test "$werror" =3D "yes"; then QEMU_CFLAGS=3D"-Werror $QEMU_CFLAGS" fi =20 -if test "$solaris" =3D "no" ; then +# Exclude --warn-common with TSan to suppress warnings from the TSan libra= ries. +if test "$solaris" =3D "no" && test "$tsan" =3D "no"; then if $ld --version 2>/dev/null | grep "GNU ld" >/dev/null 2>/dev/null ; = then QEMU_LDFLAGS=3D"-Wl,--warn-common $QEMU_LDFLAGS" fi @@ -7385,6 +7426,10 @@ if test "$have_asan_iface_fiber" =3D "yes" ; then echo "CONFIG_ASAN_IFACE_FIBER=3Dy" >> $config_host_mak fi =20 +if test "$have_tsan" =3D "yes" && test "$have_tsan_iface_fiber" =3D "yes" = ; then + echo "CONFIG_TSAN=3Dy" >> $config_host_mak +fi + if test "$has_environ" =3D "yes" ; then echo "CONFIG_HAS_ENVIRON=3Dy" >> $config_host_mak fi diff --git a/util/coroutine-ucontext.c b/util/coroutine-ucontext.c index bd593e61bc0..613f4c118e4 100644 --- a/util/coroutine-ucontext.c +++ b/util/coroutine-ucontext.c @@ -37,12 +37,19 @@ #endif #endif =20 +#ifdef CONFIG_TSAN +#include +#endif + typedef struct { Coroutine base; void *stack; size_t stack_size; sigjmp_buf env; =20 + void *tsan_co_fiber; + void *tsan_caller_fiber; + #ifdef CONFIG_VALGRIND_H unsigned int valgrind_stack_id; #endif @@ -65,7 +72,18 @@ union cc_arg { int i[2]; }; =20 -static void finish_switch_fiber(void *fake_stack_save) +/* QEMU_ALWAYS_INLINE only does so if __OPTIMIZE__, so we cannot use it. */ +static inline __attribute__((always_inline)) +void on_new_fiber(CoroutineUContext *co) +{ +#ifdef CONFIG_TSAN + co->tsan_co_fiber =3D __tsan_create_fiber(0); /* flags: sync on switch= */ + co->tsan_caller_fiber =3D __tsan_get_current_fiber(); +#endif +} + +static inline __attribute__((always_inline)) +void finish_switch_fiber(void *fake_stack_save) { #ifdef CONFIG_ASAN const void *bottom_old; @@ -78,13 +96,30 @@ static void finish_switch_fiber(void *fake_stack_save) leader.stack_size =3D size_old; } #endif +#ifdef CONFIG_TSAN + if (fake_stack_save) { + __tsan_release(fake_stack_save); + __tsan_switch_to_fiber(fake_stack_save, 0); /* 0=3Dsynchronize */ + } +#endif } =20 -static void start_switch_fiber(void **fake_stack_save, - const void *bottom, size_t size) +static inline __attribute__((always_inline)) void start_switch_fiber( + CoroutineAction action, void **fake_stack_save, + const void *bottom, size_t size, void *new_fiber) { #ifdef CONFIG_ASAN - __sanitizer_start_switch_fiber(fake_stack_save, bottom, size); + __sanitizer_start_switch_fiber( + action =3D=3D COROUTINE_TERMINATE ? NULL : fake_stack_save, + bottom, size); +#endif +#ifdef CONFIG_TSAN + void *curr_fiber =3D + __tsan_get_current_fiber(); + __tsan_acquire(curr_fiber); + + *fake_stack_save =3D curr_fiber; + __tsan_switch_to_fiber(new_fiber, 0); /* 0=3Dsynchronize */ #endif } =20 @@ -104,8 +139,12 @@ static void coroutine_trampoline(int i0, int i1) =20 /* Initialize longjmp environment and switch back the caller */ if (!sigsetjmp(self->env, 0)) { - start_switch_fiber(&fake_stack_save, - leader.stack, leader.stack_size); + start_switch_fiber( + COROUTINE_YIELD, + &fake_stack_save, + leader.stack, + leader.stack_size, + self->tsan_caller_fiber); siglongjmp(*(sigjmp_buf *)co->entry_arg, 1); } =20 @@ -154,12 +193,16 @@ Coroutine *qemu_coroutine_new(void) =20 arg.p =3D co; =20 + on_new_fiber(co); makecontext(&uc, (void (*)(void))coroutine_trampoline, 2, arg.i[0], arg.i[1]); =20 /* swapcontext() in, siglongjmp() back out */ if (!sigsetjmp(old_env, 0)) { - start_switch_fiber(&fake_stack_save, co->stack, co->stack_size); + start_switch_fiber( + COROUTINE_YIELD, + &fake_stack_save, + co->stack, co->stack_size, co->tsan_co_fiber); swapcontext(&old_uc, &uc); } =20 @@ -216,8 +259,8 @@ qemu_coroutine_switch(Coroutine *from_, Coroutine *to_, =20 ret =3D sigsetjmp(from->env, 0); if (ret =3D=3D 0) { - start_switch_fiber(action =3D=3D COROUTINE_TERMINATE ? - NULL : &fake_stack_save, to->stack, to->stack_s= ize); + start_switch_fiber(action, &fake_stack_save, + to->stack, to->stack_size, to->tsan_co_fiber); siglongjmp(to->env, action); } =20 @@ -231,6 +274,11 @@ Coroutine *qemu_coroutine_self(void) if (!current) { current =3D &leader.base; } +#ifdef CONFIG_TSAN + if (!leader.tsan_co_fiber) { + leader.tsan_co_fiber =3D __tsan_get_current_fiber(); + } +#endif return current; } =20 --=20 2.20.1 From nobody Sun May 19 11:31:09 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1591988698; cv=none; d=zohomail.com; s=zohoarc; b=eU4aRsrGKz6KmtL7K0ITLAJqTOibLMQR3+fA822Ytmebk+RjvRuf7n4YzgkP/hVUZ+KMygM7w1LH2zePnKmeUBItACel+n39LwJMGinvqPqi0TDruhY9DyWVEzMwX7AnS8HTNy64fJByRPKSx6bsgnxCSJ6IrvTNg1hwAk+c62c= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1591988698; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=wyd2lV6dHVaHmALDhpJ+ImxFwC2VFtV6fvWZJjaxR+k=; b=dNFS/PJ5NYkBYN6Bvp3crWG8Hikf3p9hCtVIyIlR41gCXdcmQGBMVvd/agT5zPsCFXEq8kpXUo5QjUiHd+72AP2Y5GyDpSYhzXpdXaCh57Un5iAhZZFD2D0VqgXaQwjZTBIIhMo0alv19foIDgyBfdHAo2BWAjwNneuSIqn3ulo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 159198869845124.92651460197999; Fri, 12 Jun 2020 12:04:58 -0700 (PDT) Received: from localhost ([::1]:45878 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jjoz3-0002s0-1G for importer@patchew.org; Fri, 12 Jun 2020 15:04:57 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54752) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jjoxA-0000rn-Fi for qemu-devel@nongnu.org; Fri, 12 Jun 2020 15:03:02 -0400 Received: from mail-wr1-x441.google.com ([2a00:1450:4864:20::441]:39284) by eggs.gnu.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jjox7-0006sy-CV for qemu-devel@nongnu.org; Fri, 12 Jun 2020 15:03:00 -0400 Received: by mail-wr1-x441.google.com with SMTP id t18so10820581wru.6 for ; Fri, 12 Jun 2020 12:02:49 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id u4sm10071329wmb.48.2020.06.12.12.02.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Jun 2020 12:02:43 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id C20EA1FF91; Fri, 12 Jun 2020 20:02:38 +0100 (BST) 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=wyd2lV6dHVaHmALDhpJ+ImxFwC2VFtV6fvWZJjaxR+k=; b=Zm9mPVG80LvE0mgp8OuKUggdheh/c0sfRSykA/sMbDmMnsgQ8sX5qMxumxGxH8dLML Pi9tzLINWyM855+zZyWmHnyY13O0cGVHJOwiQG48V4ggziwOlJl+ozRbHnLWy3yiAm7G b/ZJqUcrJRQYNDnGDSX5CoF0QIzMFYZdSyMapRgQC9T0YHNxspY4r34XdGaNHXReQKy8 ZEXN5etUvpyX1ZmyTU3MbgUhfBhluEV6C3cCjHczohZm4OtLR59/asQ0qjK18nzDKLNe y8aXVhTC38hu54rL0uj8/JG9MLUdBEm4Vb5YQRaFn7tqgSfWMSGbhb1v+hjg7rKP9Ono 0PGg== 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=wyd2lV6dHVaHmALDhpJ+ImxFwC2VFtV6fvWZJjaxR+k=; b=kEj0O+RqIyrQ5LIDbYLUDB5buwu8qH8aM3jUwMG/AIr/dRxYhXSWJAtY0eO+pR2LIe 7OLmQPefAL+44wCzmLXhwtCezkyXnKtnn8G7R7IL7vHTYiX0xRC/r2XKieGRzANPdCOd D8S2c6tIBkQbiSOlDFRRbPgXiXhz6GoJq0DLIjCkq/pSBSpUHRiLLeEyvG7al7naqSpp B6cI20/Q5GrL7NXDXUEiWe+WrGqbBIDHNOVx7VfVH3K6wQDqWS+5OVnNezvdZTDTQPrc M0GhX/iu9Mn5SgHLzH4Ldvk3yex7tG3iV8jnBuiawui7K96EW5pUZ/YWVC3keUHorXtb R9Vw== X-Gm-Message-State: AOAM5315VXMJVIz37gJ/075ktzbCX3cj6zOIw41hR+8S0U7q2VPPWYYs C7zSKp816hj9q+L+C1zxc6jPqg== X-Google-Smtp-Source: ABdhPJxS0Oxi3HGnB6gHMIf02Ks34bSEIvMTTOWdVjhoejdNGE5eUabiik0kLcWj07qqJV9JWlD2EA== X-Received: by 2002:adf:a51a:: with SMTP id i26mr16015377wrb.406.1591988568145; Fri, 12 Jun 2020 12:02:48 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v1 05/18] cpu: convert queued work to a QSIMPLEQ Date: Fri, 12 Jun 2020 20:02:24 +0100 Message-Id: <20200612190237.30436-6-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200612190237.30436-1-alex.bennee@linaro.org> References: <20200612190237.30436-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::441; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x441.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. 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=_AUTOLEARN 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, berrange@redhat.com, Robert Foley , =?UTF-8?q?Alex=20Benn=C3=A9e?= , richard.henderson@linaro.org, f4bug@amsat.org, Eduardo Habkost , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , cota@braap.org, Paolo Bonzini , aurelien@aurel32.net, Richard Henderson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: "Emilio G. Cota" We convert queued work to a QSIMPLEQ, instead of open-coding it. While at it, make sure that all accesses to the list are performed while holding the list's lock. Reviewed-by: Richard Henderson Reviewed-by: Alex Benn=C3=A9e Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Emilio G. Cota Signed-off-by: Robert Foley Signed-off-by: Alex Benn=C3=A9e Message-Id: <20200609200738.445-3-robert.foley@linaro.org> --- include/hw/core/cpu.h | 6 +++--- cpus-common.c | 25 ++++++++----------------- cpus.c | 14 ++++++++++++-- hw/core/cpu.c | 1 + 4 files changed, 24 insertions(+), 22 deletions(-) diff --git a/include/hw/core/cpu.h b/include/hw/core/cpu.h index 497600c49ef..b3f4b793182 100644 --- a/include/hw/core/cpu.h +++ b/include/hw/core/cpu.h @@ -331,8 +331,8 @@ struct qemu_work_item; * @opaque: User data. * @mem_io_pc: Host Program Counter at which the memory was accessed. * @kvm_fd: vCPU file descriptor for KVM. - * @work_mutex: Lock to prevent multiple access to queued_work_*. - * @queued_work_first: First asynchronous work pending. + * @work_mutex: Lock to prevent multiple access to @work_list. + * @work_list: List of pending asynchronous work. * @trace_dstate_delayed: Delayed changes to trace_dstate (includes all ch= anges * to @trace_dstate). * @trace_dstate: Dynamic tracing state of events for this vCPU (bitmask). @@ -376,7 +376,7 @@ struct CPUState { sigjmp_buf jmp_env; =20 QemuMutex work_mutex; - struct qemu_work_item *queued_work_first, *queued_work_last; + QSIMPLEQ_HEAD(, qemu_work_item) work_list; =20 CPUAddressSpace *cpu_ases; int num_ases; diff --git a/cpus-common.c b/cpus-common.c index 70a9d12981a..8f5512b3d78 100644 --- a/cpus-common.c +++ b/cpus-common.c @@ -97,7 +97,7 @@ void cpu_list_remove(CPUState *cpu) } =20 struct qemu_work_item { - struct qemu_work_item *next; + QSIMPLEQ_ENTRY(qemu_work_item) node; run_on_cpu_func func; run_on_cpu_data data; bool free, exclusive, done; @@ -106,13 +106,7 @@ struct qemu_work_item { static void queue_work_on_cpu(CPUState *cpu, struct qemu_work_item *wi) { qemu_mutex_lock(&cpu->work_mutex); - if (cpu->queued_work_first =3D=3D NULL) { - cpu->queued_work_first =3D wi; - } else { - cpu->queued_work_last->next =3D wi; - } - cpu->queued_work_last =3D wi; - wi->next =3D NULL; + QSIMPLEQ_INSERT_TAIL(&cpu->work_list, wi, node); wi->done =3D false; qemu_mutex_unlock(&cpu->work_mutex); =20 @@ -306,17 +300,14 @@ void process_queued_cpu_work(CPUState *cpu) { struct qemu_work_item *wi; =20 - if (cpu->queued_work_first =3D=3D NULL) { + qemu_mutex_lock(&cpu->work_mutex); + if (QSIMPLEQ_EMPTY(&cpu->work_list)) { + qemu_mutex_unlock(&cpu->work_mutex); return; } - - qemu_mutex_lock(&cpu->work_mutex); - while (cpu->queued_work_first !=3D NULL) { - wi =3D cpu->queued_work_first; - cpu->queued_work_first =3D wi->next; - if (!cpu->queued_work_first) { - cpu->queued_work_last =3D NULL; - } + while (!QSIMPLEQ_EMPTY(&cpu->work_list)) { + wi =3D QSIMPLEQ_FIRST(&cpu->work_list); + QSIMPLEQ_REMOVE_HEAD(&cpu->work_list, node); qemu_mutex_unlock(&cpu->work_mutex); if (wi->exclusive) { /* Running work items outside the BQL avoids the following dea= dlock: diff --git a/cpus.c b/cpus.c index 5670c96bcfa..af440275495 100644 --- a/cpus.c +++ b/cpus.c @@ -97,9 +97,19 @@ bool cpu_is_stopped(CPUState *cpu) return cpu->stopped || !runstate_is_running(); } =20 +static inline bool cpu_work_list_empty(CPUState *cpu) +{ + bool ret; + + qemu_mutex_lock(&cpu->work_mutex); + ret =3D QSIMPLEQ_EMPTY(&cpu->work_list); + qemu_mutex_unlock(&cpu->work_mutex); + return ret; +} + static bool cpu_thread_is_idle(CPUState *cpu) { - if (cpu->stop || cpu->queued_work_first) { + if (cpu->stop || !cpu_work_list_empty(cpu)) { return false; } if (cpu_is_stopped(cpu)) { @@ -1498,7 +1508,7 @@ static void *qemu_tcg_rr_cpu_thread_fn(void *arg) cpu =3D first_cpu; } =20 - while (cpu && !cpu->queued_work_first && !cpu->exit_request) { + while (cpu && cpu_work_list_empty(cpu) && !cpu->exit_request) { =20 atomic_mb_set(&tcg_current_rr_cpu, cpu); current_cpu =3D cpu; diff --git a/hw/core/cpu.c b/hw/core/cpu.c index f31ec48ee61..80d51c24dd2 100644 --- a/hw/core/cpu.c +++ b/hw/core/cpu.c @@ -370,6 +370,7 @@ static void cpu_common_initfn(Object *obj) cpu->nr_threads =3D 1; =20 qemu_mutex_init(&cpu->work_mutex); + QSIMPLEQ_INIT(&cpu->work_list); QTAILQ_INIT(&cpu->breakpoints); QTAILQ_INIT(&cpu->watchpoints); =20 --=20 2.20.1 From nobody Sun May 19 11:31:09 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1591988978; cv=none; d=zohomail.com; s=zohoarc; b=B/u9iEBXy+4hXtzWP3i2K6pSiaFze7/zYiMUNV8xzTgQgNKZoeC7SMCmNTN5yFhV624w3LRsZudeM2PxyGfTFnRttx6+RSKfqBOz3e3MWT4+gIj5FMoE8SgHbAc8D95cT6CQd2xKjxMOQo98zlggZDS4gHvWYNxvNXHz/uk9b7k= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1591988978; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=PjFzq8wR0LQu6X1N3b1WhVVhSNxDn3nhVeh4fkyxF4o=; b=lq2CmnFV4ORoOGzDtyF/cwwyo3nVBdAxZff440yNFSnwi6JAHgym2MUUeryVdJvCgMnjyZwHbatkNCK2UNAP/F6Q3fPasTAOWFDRkacrIf6lgLf7bpjxxYSrZUvQS93UsZxWAt/ZTF/rHVJsuu/cHGPfhSC27h+BCfbM3lrBD/w= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1591988977996655.850319047507; Fri, 12 Jun 2020 12:09:37 -0700 (PDT) Received: from localhost ([::1]:38158 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jjp3Y-0003Y2-QQ for importer@patchew.org; Fri, 12 Jun 2020 15:09:36 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54872) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jjoxG-0000si-Sw for qemu-devel@nongnu.org; Fri, 12 Jun 2020 15:03:06 -0400 Received: from mail-wr1-x42d.google.com ([2a00:1450:4864:20::42d]:43717) by eggs.gnu.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jjox9-0006t5-B7 for qemu-devel@nongnu.org; Fri, 12 Jun 2020 15:03:04 -0400 Received: by mail-wr1-x42d.google.com with SMTP id l10so10790472wrr.10 for ; Fri, 12 Jun 2020 12:02:50 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id f11sm10755595wrm.13.2020.06.12.12.02.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Jun 2020 12:02:43 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 03D9F1FF92; Fri, 12 Jun 2020 20:02:39 +0100 (BST) 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=PjFzq8wR0LQu6X1N3b1WhVVhSNxDn3nhVeh4fkyxF4o=; b=NIOR2d1722Dj+ElXQGkvy6LpfgtK0baZ1X/2ZD9ALPp/VNEsIYr65VZnZses/Q8NwB jl0DN5ooJKADSgoAPXRDP2ZOPIRE1XWe9JGz06Ty1V5vJvnCIUSy1SFsX63+D/it4mId RvraKaN0SMAfee2zSkbYn0OxEinK2fAi+RZpxe8zETKIyolFVC91cm3EKwg6soKwU9W+ 6TTX/yLkxvKXUbNFSVy7MHOvfGf50rj/nJKLMNx0mBDOvezZLcdm5apoUMi/Rafa4tXg P39w59GLZ+CP3kFNi5pO04V0s+g+/rTkMlmOAtU4CpR2NHf2ofMjKnw4guL8H6pBQlfH PMiQ== 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=PjFzq8wR0LQu6X1N3b1WhVVhSNxDn3nhVeh4fkyxF4o=; b=WJ+AqOSc3zh92aNm3K2Jt75tKplez3jKkZxWOoBYCc8IbPCpFBlWkFGpHRJNqwFJT4 6unN5igARnFyxpzoP+HhyP/XC7z6QeEHHwLANQUudwcwDC/byAw5NqvogDVjNdrce7tt +Bf9TbOAltChcutRMFT00Gi/2Xr3q3rm5H43O1hSvj2XWd2vZFd4QGCmxTiaRs7Zplqu HSpunnhrW77kxbgH8AXeikHMpOoF0FdB5RPiIw+/3NszOXN2wXT+/Vbun6LQWwG9itq5 b43OYtb3b03e664b8kZpIQtnNZM/zW6KezZHsPvQJd0C60dRI2ZfVwVJ3mGIIyaelU57 lmNA== X-Gm-Message-State: AOAM533WPeXTTBEzCWpQoEgWdg5YY3Zj1hnY51srNNBqnbo+dcxtcu6F z7WVjAeHW3kaltvfxvPj5cegzg== X-Google-Smtp-Source: ABdhPJzEYe4MUPFXwnN50QhE8muFYgpVmrKDfnBjD9K9kDL9EN866QIch3grPpI+Vu/73jSiwF9fyw== X-Received: by 2002:a1c:6a01:: with SMTP id f1mr364189wmc.52.1591988569992; Fri, 12 Jun 2020 12:02:49 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v1 06/18] thread: add qemu_spin_destroy Date: Fri, 12 Jun 2020 20:02:25 +0100 Message-Id: <20200612190237.30436-7-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200612190237.30436-1-alex.bennee@linaro.org> References: <20200612190237.30436-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::42d; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42d.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. 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=_AUTOLEARN 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, berrange@redhat.com, Robert Foley , =?UTF-8?q?Alex=20Benn=C3=A9e?= , richard.henderson@linaro.org, f4bug@amsat.org, cota@braap.org, aurelien@aurel32.net Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: "Emilio G. Cota" It will be used for TSAN annotations. Signed-off-by: Emilio G. Cota Signed-off-by: Robert Foley Reviewed-by: Alex Benn=C3=A9e Signed-off-by: Alex Benn=C3=A9e Message-Id: <20200609200738.445-4-robert.foley@linaro.org> --- include/qemu/thread.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/qemu/thread.h b/include/qemu/thread.h index d22848138ea..e50a0738897 100644 --- a/include/qemu/thread.h +++ b/include/qemu/thread.h @@ -215,6 +215,9 @@ static inline void qemu_spin_init(QemuSpin *spin) __sync_lock_release(&spin->value); } =20 +static inline void qemu_spin_destroy(QemuSpin *spin) +{ } + static inline void qemu_spin_lock(QemuSpin *spin) { while (unlikely(__sync_lock_test_and_set(&spin->value, true))) { --=20 2.20.1 From nobody Sun May 19 11:31:09 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1591989184; cv=none; d=zohomail.com; s=zohoarc; b=Uro0Tfqaq8ad+8Ij6/lm0k/LmQiomDNdnDNvVqgVQa4vtlR0bSGTWqb0R9FnRvIR1tKzr7FUK7g2WUnA1I5XGsiuyPOUvMX27FFWsdHNJNNLlE65+5HIirKCQnN7zvw9xNIdqRy2wTAkAAPLy2jgEEL0nnZ+7m3zcJ6QTCnopSI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1591989184; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=P8SWRQjM/hyOQzCww/NtPUfXAjDnTeW6mt1PLc5HvvU=; b=IHXc2n4bce2BZKEGzo9egpqxUOCsHignJfewN+rUjIKOy68gMfJ8yG8uRDFWGXZ5aLxNPLG0zivdzpost4tZ8gkHiH5QuceCr8rfHKrChITOaivi7IhgwpsMhLf7coDrPF6P40mKLnqRPpJqTdclRBXsrkGUTe67MDTCNZ8IP8U= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1591989184125369.7515014678588; Fri, 12 Jun 2020 12:13:04 -0700 (PDT) Received: from localhost ([::1]:49462 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jjp6s-00017i-R3 for importer@patchew.org; Fri, 12 Jun 2020 15:13:02 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54942) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jjoxO-0000u4-KY for qemu-devel@nongnu.org; Fri, 12 Jun 2020 15:03:14 -0400 Received: from mail-wr1-x443.google.com ([2a00:1450:4864:20::443]:41816) by eggs.gnu.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jjoxC-0006tL-Da for qemu-devel@nongnu.org; Fri, 12 Jun 2020 15:03:12 -0400 Received: by mail-wr1-x443.google.com with SMTP id j10so10809066wrw.8 for ; Fri, 12 Jun 2020 12:02:53 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id s8sm11086125wrm.96.2020.06.12.12.02.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Jun 2020 12:02:46 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 3B1041FF93; Fri, 12 Jun 2020 20:02:39 +0100 (BST) 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=P8SWRQjM/hyOQzCww/NtPUfXAjDnTeW6mt1PLc5HvvU=; b=d4eEGV7bcMlhiVx8vuNQOsPDaXZKjqzivKKDK7+hv6LPH8PqIV23FKTzycZ0Ik9hl5 G61VZr5zSql7sBHcFx9neOxHbWVZe2KvQ/8V4qrGYD1OCciY9TlCg7zq7L0zm9R9YyWr h7kPVvZiA7XJem4+QZhkfMHcK8/78oVoB+zEdgteAVje/SbIO4simACoFr4y1IzIOqg3 Ks4RKIk1ARPFwSaAgMDbNvBcbxPY8Ybb7TnpbzlOMYDakqDKOTQidejcYN0He0tN7EIO gD5LQi0d+j3wgsC/de6lH1ZfomON8M+SReSETDcfiNwLU6Qqtb9SQ39Fkq+V0VElX0EF +iLA== 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=P8SWRQjM/hyOQzCww/NtPUfXAjDnTeW6mt1PLc5HvvU=; b=GUMSdLFcYPyjv84BlUUxuhm5WIqPlumngriPljUe2ztjhAd4lu6Su7hY8yKUuM8AfK gOmxkF+jv3iCDLSzN3TEbFhMswUgaGg5CZGDsPqhVMzrKdhjgNx/Fkr7q6rlNaz/fbZi KMr39hnm1GdTkt2Ks8wEOBMnRW4BmUd4UxAtqzoET1wulsmCED/bVhWgTTAytPf8HRuY r/8xaqehus9R0IaqHPaP4fhm4E0+mlGovqn2z+AYFW6cQ8d6NCqAVck3+sYWahH7RRmB F8DNyKlHdX8NwA9ql2xzSu3p3MpJuAxRcGg3x455GIUolozy2zImcoolJ5jv1LT0f19e +o3A== X-Gm-Message-State: AOAM531QmHH9Otwuut5I6YW6suZBnNlQSmkzt2vyD2QUoEcS0lh4j6Dk bpGz5LrEqORY1nJSM55qFLK56w== X-Google-Smtp-Source: ABdhPJx3HUHvkomFSiWJWl50PF2vdUVOgkZHWU3Yw4gJ2Ep4s1gVzxqXTvsS+UqeT4gW4N1MCIgw/w== X-Received: by 2002:a5d:4385:: with SMTP id i5mr16069155wrq.420.1591988572195; Fri, 12 Jun 2020 12:02:52 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v1 07/18] cputlb: destroy CPUTLB with tlb_destroy Date: Fri, 12 Jun 2020 20:02:26 +0100 Message-Id: <20200612190237.30436-8-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200612190237.30436-1-alex.bennee@linaro.org> References: <20200612190237.30436-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::443; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x443.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. 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=_AUTOLEARN 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, berrange@redhat.com, Robert Foley , =?UTF-8?q?Alex=20Benn=C3=A9e?= , richard.henderson@linaro.org, f4bug@amsat.org, cota@braap.org, Paolo Bonzini , aurelien@aurel32.net, Richard Henderson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: "Emilio G. Cota" I was after adding qemu_spin_destroy calls, but while at it I noticed that we are leaking some memory. Signed-off-by: Emilio G. Cota Signed-off-by: Robert Foley Reviewed-by: Alex Benn=C3=A9e Signed-off-by: Alex Benn=C3=A9e Message-Id: <20200609200738.445-5-robert.foley@linaro.org> --- include/exec/exec-all.h | 8 ++++++++ accel/tcg/cputlb.c | 15 +++++++++++++++ exec.c | 1 + 3 files changed, 24 insertions(+) diff --git a/include/exec/exec-all.h b/include/exec/exec-all.h index 8792bea07ab..3cf88272df9 100644 --- a/include/exec/exec-all.h +++ b/include/exec/exec-all.h @@ -124,6 +124,11 @@ void cpu_address_space_init(CPUState *cpu, int asidx, * @cpu: CPU whose TLB should be initialized */ void tlb_init(CPUState *cpu); +/** + * tlb_destroy - destroy a CPU's TLB + * @cpu: CPU whose TLB should be destroyed + */ +void tlb_destroy(CPUState *cpu); /** * tlb_flush_page: * @cpu: CPU whose TLB should be flushed @@ -284,6 +289,9 @@ void tlb_set_page(CPUState *cpu, target_ulong vaddr, static inline void tlb_init(CPUState *cpu) { } +static inline void tlb_destroy(CPUState *cpu) +{ +} static inline void tlb_flush_page(CPUState *cpu, target_ulong addr) { } diff --git a/accel/tcg/cputlb.c b/accel/tcg/cputlb.c index eb2cf9de5e6..1e815357c70 100644 --- a/accel/tcg/cputlb.c +++ b/accel/tcg/cputlb.c @@ -270,6 +270,21 @@ void tlb_init(CPUState *cpu) } } =20 +void tlb_destroy(CPUState *cpu) +{ + CPUArchState *env =3D cpu->env_ptr; + int i; + + qemu_spin_destroy(&env_tlb(env)->c.lock); + for (i =3D 0; i < NB_MMU_MODES; i++) { + CPUTLBDesc *desc =3D &env_tlb(env)->d[i]; + CPUTLBDescFast *fast =3D &env_tlb(env)->f[i]; + + g_free(fast->table); + g_free(desc->iotlb); + } +} + /* flush_all_helper: run fn across all cpus * * If the wait flag is set then the src cpu's helper will be queued as diff --git a/exec.c b/exec.c index a0bf9d61c87..6d7c312c910 100644 --- a/exec.c +++ b/exec.c @@ -892,6 +892,7 @@ void cpu_exec_unrealizefn(CPUState *cpu) { CPUClass *cc =3D CPU_GET_CLASS(cpu); =20 + tlb_destroy(cpu); cpu_list_remove(cpu); =20 if (cc->vmsd !=3D NULL) { --=20 2.20.1 From nobody Sun May 19 11:31:09 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1591989077; cv=none; d=zohomail.com; s=zohoarc; b=egRw/wSSpSAFDnsyjr3Mp4fH9g/3uT76/O+FiZ1KsZxXjBaEPZdTlyCzRqXp7DFMr0RMzt+KIoFKTylsAJOdfZ+6zctlvJ/duiIaSJ0Lr0ypBf5k5UNFdKubnN892XwwzTS9X+QqfNXJv9IKWz4nUzUBGVaI3KfN+hzvwTqRZVI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1591989077; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=t1DzA5iDyLs/5vA/dSSrknurXA9OGsEodwES5eqKbfo=; b=Z714xq5gqPL8qOAOy8GgVj9Dy90735GtXJyMrnDzfMiOlS4EMTE9mWPeQ+QnpXuTfarPEjC1upno1cPdHTdPslW0wOvk7S5B6qK0rnOumvG0hX+Wf6nwXg+Oa2d1Z/t+tCg0QWSEfGxOW47I3sguNb9rmvFb6s004eprMq9Bx4Q= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1591989077818323.72809108896115; Fri, 12 Jun 2020 12:11:17 -0700 (PDT) Received: from localhost ([::1]:44528 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jjp5A-0006YW-7a for importer@patchew.org; Fri, 12 Jun 2020 15:11:16 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54888) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jjoxJ-0000tQ-GK for qemu-devel@nongnu.org; Fri, 12 Jun 2020 15:03:10 -0400 Received: from mail-wr1-x443.google.com ([2a00:1450:4864:20::443]:44163) by eggs.gnu.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jjoxB-0006tX-Up for qemu-devel@nongnu.org; Fri, 12 Jun 2020 15:03:06 -0400 Received: by mail-wr1-x443.google.com with SMTP id y17so10787999wrn.11 for ; Fri, 12 Jun 2020 12:02:54 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id a15sm11458909wra.86.2020.06.12.12.02.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Jun 2020 12:02:46 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 58AF21FF96; Fri, 12 Jun 2020 20:02:39 +0100 (BST) 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=t1DzA5iDyLs/5vA/dSSrknurXA9OGsEodwES5eqKbfo=; b=AvJlJwP0BMGgDZT8NzZAJAkZ+u4AnNlhfuBbkvi5n4UzHfcc7nVScb1wYiz8V/nCE5 hQI421AbkaflY8zXSrPP2CoC5N9KlWjY/Sv9sMC0UL9qeU4ITx3aEc+3flVgZTZB9fwI bWgDcWJvz6u24QNkGV/sXx9FEIMV+0usJl202sT5doGVzpqtN8+Ksw8ZWmN9GqCTCS8O 4tT8RPT73cay7LpJ/bglefM6nGDTTBakPUz7dXGDCc4IXZFcO6jzGvz5AxksoF2O3SZl YBXaaWUP2W2bSEr/fSjpsoPW3uI5McOCy9tqoRxeBzNteuIr+yvY4/bve7ELXRSdoUCf GyvQ== 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=t1DzA5iDyLs/5vA/dSSrknurXA9OGsEodwES5eqKbfo=; b=oMFXRPniU94SK6TfB/dkDfP3+ySelh8aDf4FX6TiyaDETvHEuMND2CfzxPsAiHOgmX 46qR9b9fGwIss6ANgTY6gTm7RE3Cja7LF9kdxZMDpw8n3xNWmd149/yBjwVW73rU7Jf/ M3DXzGSDxWC62wdrKRZ+MR41XKPifybbWJV0wSEK9Nls+ef7nMt/JBlixjnO7OtxHIKC 5hlcOC3RRR3ij+2sFuoWB6xaAUaCXCvqllof6CitP1iGe0+aWj/OlGzQFVa6yVUzV/du nzjNl5EvhIRH+PPcNdkOYrczHhI3e4boyKqNzbfoUB7w15x41WI/zhWUtKx8lbrRBwrb FTWA== X-Gm-Message-State: AOAM530utdCxtsk0RNVF1Zn2c2g4lM2YFvQusv/+hozqvj77O/Lajsd7 U5pnGlzg0tcz6nDUn3/eibfE5Q== X-Google-Smtp-Source: ABdhPJyY+0m2mV472ZKLTV5IR1zJvY9D73iMG4FNbaC7hL33D+ybtXFH7FfmOuo0DXIiwsCvxXBgCQ== X-Received: by 2002:a5d:4c4b:: with SMTP id n11mr15528607wrt.381.1591988573274; Fri, 12 Jun 2020 12:02:53 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v1 08/18] qht: call qemu_spin_destroy for head buckets Date: Fri, 12 Jun 2020 20:02:27 +0100 Message-Id: <20200612190237.30436-9-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200612190237.30436-1-alex.bennee@linaro.org> References: <20200612190237.30436-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::443; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x443.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. 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=_AUTOLEARN 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, berrange@redhat.com, Robert Foley , =?UTF-8?q?Alex=20Benn=C3=A9e?= , richard.henderson@linaro.org, f4bug@amsat.org, cota@braap.org, aurelien@aurel32.net Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: "Emilio G. Cota" Signed-off-by: Robert Foley Reviewed-by: Alex Benn=C3=A9e Signed-off-by: Alex Benn=C3=A9e Message-Id: <20200609200738.445-6-robert.foley@linaro.org> --- util/qht.c | 1 + 1 file changed, 1 insertion(+) diff --git a/util/qht.c b/util/qht.c index aa51be3c52f..67e5d5b9163 100644 --- a/util/qht.c +++ b/util/qht.c @@ -348,6 +348,7 @@ static inline void qht_chain_destroy(const struct qht_b= ucket *head) struct qht_bucket *curr =3D head->next; struct qht_bucket *prev; =20 + qemu_spin_destroy(&head->lock); while (curr) { prev =3D curr; curr =3D curr->next; --=20 2.20.1 From nobody Sun May 19 11:31:09 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1591988918; cv=none; d=zohomail.com; s=zohoarc; b=LVN8nE2aSFYWpIqSj+k0Pj8TcoYVIknzsl8tk2qsUBQc9NpnaPEZ1KhXqEPpirsGuo1kppc6rdWDDel06yIesoYL74GXHH3BtORv3iZYNxqfa7UKaton24YI4uLFgCNPE+JiSwyvJhEWrw45s/iUJcU0C0zZHdbs2wC4UAxrKuc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1591988918; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=57l/aMK2332ZDMnrCc3giHMMSaLKEjqCHI6rtSAmCoo=; b=O4XiFD1+na8RVjx84O1hsoJHzGFp+BTriQQr4GS79JcOXYTdX+Wjwi8S2pFKcNHlKNN2gx5kb4WT1aTTIwMwNI9lPr3S8g5vmdQC52d4ZaaPDMTtjSCsoLxup1a+rL82yKv5MWdC/Z4Rg1ogJrZ7s1BjcfdpG50hYXTDE5Edwik= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1591988918443871.6450931036048; Fri, 12 Jun 2020 12:08:38 -0700 (PDT) Received: from localhost ([::1]:34212 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jjp2a-0001qh-9l for importer@patchew.org; Fri, 12 Jun 2020 15:08:36 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54946) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jjoxP-0000ud-6x for qemu-devel@nongnu.org; Fri, 12 Jun 2020 15:03:15 -0400 Received: from mail-wr1-x443.google.com ([2a00:1450:4864:20::443]:45111) by eggs.gnu.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jjoxI-0006vM-6H for qemu-devel@nongnu.org; Fri, 12 Jun 2020 15:03:14 -0400 Received: by mail-wr1-x443.google.com with SMTP id c3so10772680wru.12 for ; Fri, 12 Jun 2020 12:02:59 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id b8sm11216298wrm.35.2020.06.12.12.02.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Jun 2020 12:02:50 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 92C981FF98; Fri, 12 Jun 2020 20:02:39 +0100 (BST) 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=57l/aMK2332ZDMnrCc3giHMMSaLKEjqCHI6rtSAmCoo=; b=jlCKW9jsfwHQxeVIuK1Q5z+xzq4Hno/PT1Pc/u+MchoSQDMSD6a06hJNwyhcPbfyd1 4Hi+ZAtp6A8r/4WVrZisDcDpvrVl8oLJf3AMgjsYrpO0rcicYqYP8XUpxXu0q+uJdfq4 cgrRrqPf2ehlAh0cZWxPfdMIQzG8hKWyq9YXNl6ZcGtPFr5jhqhPadrfOF5MCj8gjC78 /7h4gUgdTcFOE21oAHtNKxV1Ar1ia7q2qpPsxCsAipidzurLzK8gQSW8NLFx0LTTCsmZ VDUVunOoNxe/GROrgH965Qr5+9rv4WFYVw45qaVDNndy6IcevSDJaQWbVoIl14UAUv1+ pTTQ== 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=57l/aMK2332ZDMnrCc3giHMMSaLKEjqCHI6rtSAmCoo=; b=GpePqHKMu0ruGHPUxGTxrYOsPQYOZU9oVdVad16opEnt7fdAB8RfSCvLIssNd36nQZ N1EAcbpBaIGMr9sv5USBqK/mBp6AhcKGWT1X4QQiHJNkaB9iS8014vztyENXpRABpvLO XntTsMDdv2J006Vgou4oygkOfP0vin4pCjIQ6JFiPeoLzWmu9sFVc7EunEkGCNCauRX3 H8+AuBhU0HAO4VVtttnuETmPuvcyEutAVHbMTclwMIz26PN3AA7FALYYPoyjymPvK5M0 FScptiASSCb6cXpiG3R98Ea3OnbMWktem8hlKTsA/gN0bcwGN+NhYFyuLD/N1yi6cEOH zJaQ== X-Gm-Message-State: AOAM530LfIcM52tgk9nHCTtjwlUEGXZeShcSxOJFfrQshOkSS+LTJAOj OlRpoJe74juBhGsGHOFS9xETxGH46hg= X-Google-Smtp-Source: ABdhPJz/eIoi9K8q2nD7TN18OD8kbF4JriC+3UGu1gOVUe74e1ovukhsCMXGssWCZ45IpluCG/og3g== X-Received: by 2002:a7b:cd06:: with SMTP id f6mr379029wmj.8.1591988579061; Fri, 12 Jun 2020 12:02:59 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v1 09/18] tcg: call qemu_spin_destroy for tb->jmp_lock Date: Fri, 12 Jun 2020 20:02:28 +0100 Message-Id: <20200612190237.30436-10-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200612190237.30436-1-alex.bennee@linaro.org> References: <20200612190237.30436-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::443; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x443.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. 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=_AUTOLEARN 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, berrange@redhat.com, Robert Foley , =?UTF-8?q?Alex=20Benn=C3=A9e?= , richard.henderson@linaro.org, f4bug@amsat.org, cota@braap.org, Paolo Bonzini , aurelien@aurel32.net, Richard Henderson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: "Emilio G. Cota" Signed-off-by: Emilio G. Cota Signed-off-by: Robert Foley Signed-off-by: Alex Benn=C3=A9e [RF: minor changes + remove tb_destroy_func] Message-Id: <20200609200738.445-7-robert.foley@linaro.org> --- include/tcg/tcg.h | 1 + accel/tcg/translate-all.c | 8 ++++++++ tcg/tcg.c | 9 +++++++++ 3 files changed, 18 insertions(+) diff --git a/include/tcg/tcg.h b/include/tcg/tcg.h index 380014ed805..e63450a8936 100644 --- a/include/tcg/tcg.h +++ b/include/tcg/tcg.h @@ -819,6 +819,7 @@ void tcg_pool_reset(TCGContext *s); TranslationBlock *tcg_tb_alloc(TCGContext *s); =20 void tcg_region_init(void); +void tb_destroy(TranslationBlock *tb); void tcg_region_reset_all(void); =20 size_t tcg_code_size(void); diff --git a/accel/tcg/translate-all.c b/accel/tcg/translate-all.c index 42ce1dfcff7..c937210e217 100644 --- a/accel/tcg/translate-all.c +++ b/accel/tcg/translate-all.c @@ -384,6 +384,11 @@ static int cpu_restore_state_from_tb(CPUState *cpu, Tr= anslationBlock *tb, return 0; } =20 +void tb_destroy(TranslationBlock *tb) +{ + qemu_spin_destroy(&tb->jmp_lock); +} + bool cpu_restore_state(CPUState *cpu, uintptr_t host_pc, bool will_exit) { TranslationBlock *tb; @@ -413,6 +418,7 @@ bool cpu_restore_state(CPUState *cpu, uintptr_t host_pc= , bool will_exit) /* one-shot translation, invalidate it immediately */ tb_phys_invalidate(tb, -1); tcg_tb_remove(tb); + tb_destroy(tb); } r =3D true; } @@ -1886,6 +1892,7 @@ TranslationBlock *tb_gen_code(CPUState *cpu, =20 orig_aligned -=3D ROUND_UP(sizeof(*tb), qemu_icache_linesize); atomic_set(&tcg_ctx->code_gen_ptr, (void *)orig_aligned); + tb_destroy(tb); return existing_tb; } tcg_tb_insert(tb); @@ -2235,6 +2242,7 @@ void cpu_io_recompile(CPUState *cpu, uintptr_t retadd= r) tb_phys_invalidate(tb->orig_tb, -1); } tcg_tb_remove(tb); + tb_destroy(tb); } =20 /* TODO: If env->pc !=3D tb->pc (i.e. the faulting instruction was not diff --git a/tcg/tcg.c b/tcg/tcg.c index 1aa6cb47f29..1362bc61017 100644 --- a/tcg/tcg.c +++ b/tcg/tcg.c @@ -502,6 +502,14 @@ size_t tcg_nb_tbs(void) return nb_tbs; } =20 +static gboolean tcg_region_tree_traverse(gpointer k, gpointer v, gpointer = data) +{ + TranslationBlock *tb =3D v; + + tb_destroy(tb); + return FALSE; +} + static void tcg_region_tree_reset_all(void) { size_t i; @@ -510,6 +518,7 @@ static void tcg_region_tree_reset_all(void) for (i =3D 0; i < region.n; i++) { struct tcg_region_tree *rt =3D region_trees + i * tree_size; =20 + g_tree_foreach(rt->tree, tcg_region_tree_traverse, NULL); /* Increment the refcount first so that destroy acts as a reset */ g_tree_ref(rt->tree); g_tree_destroy(rt->tree); --=20 2.20.1 From nobody Sun May 19 11:31:09 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1591988841; cv=none; d=zohomail.com; s=zohoarc; b=bfxWEI76bYM3PandJUDdWgTL15vckYLcwKigw78rd5xReJkT9PIwWP/qLkbwzqTLq1JpevO0elOV6NW7aG87dROqO4wBQHnseNRtW48ry826fJUOz6qzbI80LfFvQzc9YDaXedQh+hpGYtY77J0zyOxGYN9NS5ok1X9UwFrVXWk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1591988841; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=wncxlPgJ5yWTGynznYgamvSG3vnXu4D4fFkpbE/UPyQ=; b=kv+4K0TxmQt3RSp7vwB1caK+MSVju0gz9HuzweQEsZUKHnNA1M6QVtj+uMsBQk5R2jrwEdqjjaPGTeN6q2vfsKqz7tY4e5yD2UqHdG6dhDarErqjfHCKnjTm0fXR9q3CzxhGjvi+rbhadrBT33qD7SE8Ys9vV1ytvSVweV4L4jc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1591988841179298.4050118090979; Fri, 12 Jun 2020 12:07:21 -0700 (PDT) Received: from localhost ([::1]:57320 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jjp1L-0007zv-TQ for importer@patchew.org; Fri, 12 Jun 2020 15:07:19 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54900) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jjoxK-0000tW-Pr for qemu-devel@nongnu.org; Fri, 12 Jun 2020 15:03:14 -0400 Received: from mail-wr1-x441.google.com ([2a00:1450:4864:20::441]:34194) by eggs.gnu.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jjoxE-0006to-QX for qemu-devel@nongnu.org; Fri, 12 Jun 2020 15:03:08 -0400 Received: by mail-wr1-x441.google.com with SMTP id r7so10846718wro.1 for ; Fri, 12 Jun 2020 12:02:56 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id s18sm13233513wra.85.2020.06.12.12.02.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Jun 2020 12:02:50 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id B0AC01FF99; Fri, 12 Jun 2020 20:02:39 +0100 (BST) 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=wncxlPgJ5yWTGynznYgamvSG3vnXu4D4fFkpbE/UPyQ=; b=nZpMozKFkYag2fraf+i1bA0R+qJ2XaaRga7vV2cGh5higPCt6Vk+gm7H1Qzrd/lefR pO86QWNbOKEioYrCv1t0k1Gf+om4t5wQU5+zcxN/4MGVgq30ZZxCFeScjXY1q/L/nkI+ ZaoK1UMymuL+oMUsgsyhyDQI6AhX/ECYavMDQaIYVG7dgDZvd3I/12zVIXoBQwh3WAlK zIDU3Fd5AR8XR+0Vk3qTEodfdgfUXt+gf1onbGm6DJvH1qFnSjdARiQzAQM7jzeW+zSG tyOrN+g+1cZVmg4dX8zvTO9qx/ZnTrI31RMMQcX9MS47hgRwKBLQvFl0y0pdOp2Hw6Ow tqUA== 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=wncxlPgJ5yWTGynznYgamvSG3vnXu4D4fFkpbE/UPyQ=; b=JkTWX6Iqxuxu8WEhtdWDMLD5UAtKMS1h7M2E/86WU6gJ0MzQJwLENoGpjwHu7ogBO8 3obgTAcwCgQA3D8IcgNvqy/gNQr6TJXGtv6gxqWK/u1BgmgXzXfigWHPA60wrAM4u7FE Ea79P+niV8UFakkW7uq/8tPWPuZZYeGZ6YP/ynq3tMuOt2uqf/KdErsOafiLrzmvaTRz qRU7yM5A7gjlQ1QMFKwmcj08qNo2oPaX+xsfDY/jPVyV6yfn7+vuzDjURiJF00OW5nPl ZTb/d8hQFJn3vtIm8zYYr1dXpq92FHNlLmkVbuWMMSZFCKM4RuottiIQwwavK7z5F4Lk GZ1A== X-Gm-Message-State: AOAM530xS0nqZzk9fBbL+AZ8IVo6uC6RrOZu+6d5AO9/OFGhP5Z39JKy hVG7NvRRPG7vjZpKpsi46HUKVQ== X-Google-Smtp-Source: ABdhPJwq29mwAnOZnCNNCXFPw1I3gqVZhCCPF93fHYKGARaAYVnXBYGpdrAOjdubuX2sZM0yUACJVQ== X-Received: by 2002:a05:600c:1403:: with SMTP id g3mr344714wmi.136.1591988575687; Fri, 12 Jun 2020 12:02:55 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v1 10/18] translate-all: call qemu_spin_destroy for PageDesc Date: Fri, 12 Jun 2020 20:02:29 +0100 Message-Id: <20200612190237.30436-11-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200612190237.30436-1-alex.bennee@linaro.org> References: <20200612190237.30436-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::441; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x441.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. 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=_AUTOLEARN 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, berrange@redhat.com, Robert Foley , =?UTF-8?q?Alex=20Benn=C3=A9e?= , richard.henderson@linaro.org, f4bug@amsat.org, cota@braap.org, Paolo Bonzini , aurelien@aurel32.net, Richard Henderson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: "Emilio G. Cota" The radix tree is append-only, but we can fail to insert a PageDesc if the insertion races with another thread. Signed-off-by: Emilio G. Cota Signed-off-by: Robert Foley Reviewed-by: Alex Benn=C3=A9e Signed-off-by: Alex Benn=C3=A9e Message-Id: <20200609200738.445-8-robert.foley@linaro.org> --- accel/tcg/translate-all.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/accel/tcg/translate-all.c b/accel/tcg/translate-all.c index c937210e217..c3d37058a17 100644 --- a/accel/tcg/translate-all.c +++ b/accel/tcg/translate-all.c @@ -547,6 +547,15 @@ static PageDesc *page_find_alloc(tb_page_addr_t index,= int alloc) #endif existing =3D atomic_cmpxchg(lp, NULL, pd); if (unlikely(existing)) { +#ifndef CONFIG_USER_ONLY + { + int i; + + for (i =3D 0; i < V_L2_SIZE; i++) { + qemu_spin_destroy(&pd[i].lock); + } + } +#endif g_free(pd); pd =3D existing; } --=20 2.20.1 From nobody Sun May 19 11:31:09 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1591989263; cv=none; d=zohomail.com; s=zohoarc; b=HU84c9ZyfohdnZvjAvv1YlH0nc8DdDXf7L17XTnTpkMe76JiFLBlkBNK8PUJW2lH9Ab7of0glg5ONIa1i8kfAYP1fe3+Aj/TsebpzgnCSFvNwEqQGjDhpLxyffhdglou4OaR/iaWqHQemVyA+E9YE3E3K/S0eP4UVUTErN+Rh8s= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1591989263; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=xHHjjaudmjL3/NPzgw9p99IfJr3tJhoDfzqQ+U0Pj+w=; b=NaaVfEkyTWun8tHatbFnFnbKDymyMulrp/uT4l5BtOMi7EQSgi2XMifkXxxCM3QZlcT02bgKxLlmqb9sWsVcgXOE6wEQPAD36gEX++YYaEh0PCbGvrzxc7IqSzONV27jZsH+sh0IGryayYqaT8urg9CutdCM3bVXsoXq2vqBGsw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1591989263790608.649370535355; Fri, 12 Jun 2020 12:14:23 -0700 (PDT) Received: from localhost ([::1]:53732 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jjp8A-0002zr-Hy for importer@patchew.org; Fri, 12 Jun 2020 15:14:22 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54954) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jjoxQ-0000vA-C0 for qemu-devel@nongnu.org; Fri, 12 Jun 2020 15:03:16 -0400 Received: from mail-wr1-x442.google.com ([2a00:1450:4864:20::442]:33276) by eggs.gnu.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jjoxI-0006vF-6L for qemu-devel@nongnu.org; Fri, 12 Jun 2020 15:03:15 -0400 Received: by mail-wr1-x442.google.com with SMTP id l11so10830010wru.0 for ; Fri, 12 Jun 2020 12:02:58 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id d5sm11991420wrb.14.2020.06.12.12.02.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Jun 2020 12:02:50 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id D3F9C1FF9A; Fri, 12 Jun 2020 20:02:39 +0100 (BST) 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=xHHjjaudmjL3/NPzgw9p99IfJr3tJhoDfzqQ+U0Pj+w=; b=nJooRcToGPjCrsx3E/yLF2PF+F8TKxwOo17wJVXcKfqdZu9JDxgLr2+BjeVyGBDzS/ gPGYojuGSNw2RmuTTuGWyh+AsN8kLoKg4Qq4rZI7BP9MsPW/rqrfFsnnu6C5lw4tlUlw ZWolRVp15LqvU8lErtoOhio0Xq61hXNYhfddWkuyQXzMD7/3Cv+1PCD+Z88Dl1aWCArC UrokSCFQJ73Qjv7rtCigit5oF0GGwWxlBd+KKi8PgptaA3nWwigo5rNQWRv5iaZoyhad LydnviyZa7pzfCDqBRow9JRhzozwDDRdgVwfSHNaGRL3n32cJLZh65VuhB4loSePfg+L deiQ== 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=xHHjjaudmjL3/NPzgw9p99IfJr3tJhoDfzqQ+U0Pj+w=; b=aRKO0PnHMpstvGtI09yys7uVQiAmZGYUSzPvRzrUOfKZrFVCv8wlKgff/t8axxCJvl o4A3HP+M72Wlez/b9zzHnEYY5gDuZQtQBJU+lMgi/RZ1gADlUhKnWJD15+2PYdSYNGs8 SsjSPaMhHQBZZXJ/PLWdhrLymdwa0Q9Yrg37Qe946Ko9arUcE6uKUI+F++P1qz65DHd2 nOgb/0d7qsQSQDg9trdE6/Kcp4g0PQG4Cx1pEgic5uYk3PO/lDIvcChkNoLHfjU8SW6I rHFU5RKbRlWPsXkjDIX8+FFKKkELf6Ho9S29+XRiyq+5zFUCmtgCCcQxz5wAHMIKLiVH +X9g== X-Gm-Message-State: AOAM533//9930f4/u09djZVP3mlRcB+4AQPEh3z+iaXQXbdRlUneLqAD EFrXWRDr3Ixd1FZtTpMCMZIs9Q== X-Google-Smtp-Source: ABdhPJztNGjh5l4dH8BRMQ2N9NJ0jfOug4KdE3m7duc/NnBwJq6CAGFMUaGR3xfG/SFdegodfUZJRg== X-Received: by 2002:a7b:c5d5:: with SMTP id n21mr364233wmk.106.1591988578082; Fri, 12 Jun 2020 12:02:58 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v1 11/18] thread: add tsan annotations to QemuSpin Date: Fri, 12 Jun 2020 20:02:30 +0100 Message-Id: <20200612190237.30436-12-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200612190237.30436-1-alex.bennee@linaro.org> References: <20200612190237.30436-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::442; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x442.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. 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=_AUTOLEARN 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, berrange@redhat.com, Robert Foley , =?UTF-8?q?Alex=20Benn=C3=A9e?= , richard.henderson@linaro.org, f4bug@amsat.org, cota@braap.org, aurelien@aurel32.net Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: "Emilio G. Cota" Signed-off-by: Emilio G. Cota Signed-off-by: Robert Foley Reviewed-by: Alex Benn=C3=A9e Signed-off-by: Alex Benn=C3=A9e Message-Id: <20200609200738.445-9-robert.foley@linaro.org> --- include/qemu/thread.h | 39 ++++++++++++++++++++++++++++++++++++--- 1 file changed, 36 insertions(+), 3 deletions(-) diff --git a/include/qemu/thread.h b/include/qemu/thread.h index e50a0738897..43fc094b963 100644 --- a/include/qemu/thread.h +++ b/include/qemu/thread.h @@ -206,6 +206,10 @@ void qemu_thread_atexit_add(struct Notifier *notifier); */ void qemu_thread_atexit_remove(struct Notifier *notifier); =20 +#ifdef CONFIG_TSAN +#include +#endif + struct QemuSpin { int value; }; @@ -213,23 +217,46 @@ struct QemuSpin { static inline void qemu_spin_init(QemuSpin *spin) { __sync_lock_release(&spin->value); +#ifdef CONFIG_TSAN + __tsan_mutex_create(spin, __tsan_mutex_not_static); +#endif } =20 -static inline void qemu_spin_destroy(QemuSpin *spin) -{ } +/* const parameter because the only purpose here is the TSAN annotation */ +static inline void qemu_spin_destroy(const QemuSpin *spin) +{ +#ifdef CONFIG_TSAN + __tsan_mutex_destroy((void *)spin, __tsan_mutex_not_static); +#endif +} =20 static inline void qemu_spin_lock(QemuSpin *spin) { +#ifdef CONFIG_TSAN + __tsan_mutex_pre_lock(spin, 0); +#endif while (unlikely(__sync_lock_test_and_set(&spin->value, true))) { while (atomic_read(&spin->value)) { cpu_relax(); } } +#ifdef CONFIG_TSAN + __tsan_mutex_post_lock(spin, 0, 0); +#endif } =20 static inline bool qemu_spin_trylock(QemuSpin *spin) { - return __sync_lock_test_and_set(&spin->value, true); +#ifdef CONFIG_TSAN + __tsan_mutex_pre_lock(spin, __tsan_mutex_try_lock); +#endif + bool busy =3D __sync_lock_test_and_set(&spin->value, true); +#ifdef CONFIG_TSAN + unsigned flags =3D __tsan_mutex_try_lock; + flags |=3D busy ? __tsan_mutex_try_lock_failed : 0; + __tsan_mutex_post_lock(spin, flags, 0); +#endif + return busy; } =20 static inline bool qemu_spin_locked(QemuSpin *spin) @@ -239,7 +266,13 @@ static inline bool qemu_spin_locked(QemuSpin *spin) =20 static inline void qemu_spin_unlock(QemuSpin *spin) { +#ifdef CONFIG_TSAN + __tsan_mutex_pre_unlock(spin, 0); +#endif __sync_lock_release(&spin->value); +#ifdef CONFIG_TSAN + __tsan_mutex_post_unlock(spin, 0); +#endif } =20 struct QemuLockCnt { --=20 2.20.1 From nobody Sun May 19 11:31:09 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1591988809; cv=none; d=zohomail.com; s=zohoarc; b=OJnF2BVHKVh9JjXJn5VgjlW6IAyaFEsA9kQrfGfPNBcvY0woDmQIiLD9raaONPl+mk+KKDgmGImIVT1XK95S2xA1qqPYGQSUgj7NlI5uZcw3gKg01SLpxV2UeF2bw5OKhsthTkKYTMzVHa9GXr5vMnGxlgDs3/i60U4Q1VsfK50= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1591988809; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=+fhzkIekd9HvnT+zTrzjSgSzaU+uY2T8F/QfwK7CaNs=; b=E3fe9rvBabxfXxdQFhRlDYpGxXGwHz0/0BOnVrYJ3q8pZL009r/dE6MYmxbNrSSfqri+h3VxBa9cNXhwxv10EFqeJyBxdg6X7cwyiy20Z5n56YmQkZQd5fUnfBtNXmd6Gmt/7KExCEq0LzhNlpwmVCjYmCylMF5fjAlKQA0g+u0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1591988809654249.73619813693972; Fri, 12 Jun 2020 12:06:49 -0700 (PDT) Received: from localhost ([::1]:54202 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jjp0q-0006MX-B3 for importer@patchew.org; Fri, 12 Jun 2020 15:06:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54924) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jjoxM-0000tZ-KZ for qemu-devel@nongnu.org; Fri, 12 Jun 2020 15:03:14 -0400 Received: from mail-wr1-x442.google.com ([2a00:1450:4864:20::442]:42919) by eggs.gnu.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jjoxF-0006uE-M6 for qemu-devel@nongnu.org; Fri, 12 Jun 2020 15:03:10 -0400 Received: by mail-wr1-x442.google.com with SMTP id p5so10789184wrw.9 for ; Fri, 12 Jun 2020 12:02:57 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id 23sm9723140wmg.10.2020.06.12.12.02.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Jun 2020 12:02:50 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 16A5E1FF7E; Fri, 12 Jun 2020 20:02:40 +0100 (BST) 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=+fhzkIekd9HvnT+zTrzjSgSzaU+uY2T8F/QfwK7CaNs=; b=iYv3bZyw/geh4bQygkWEEWtIFxDK1MAoKBbcs8sOzuLIV/3IjPeNPPWjaYpKEiKN+z QLJt1jGexa7UG/nFpb260hJLzs9zE6NeMFFQB7qOjVnPTziWlMASLEp0OmWkq3kUgwFe CiQYWGFaiYH/TddVQ1KhUNbsCG4FDA2ovA+zDmlQ5JNJaHjH51d/RB7pgAMcWZ/yD0RK rbwLIIuByprx5/sXgwYsPONWatRGoxqjGulS1/P2L/r5ZoD3iUzLXipniWpdU2I0XhzX b9XQwJqe6kMRO8BvqmXYXg/VitfB6Fx/lzLpAFyQ7JiXnSFHwc4rp9kCIgd8BW+5ytvL rlvw== 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=+fhzkIekd9HvnT+zTrzjSgSzaU+uY2T8F/QfwK7CaNs=; b=a28pTYSKzON0PEkHtXC56Ep9P1jfH5PUtLC84F8lguraGdRdwiRZhYPGDfOIU6uFNe Y4gpYxkHSvYGXVnSmplsPRyn4Imbeg7yLLXv2B6ui+rNq6qBIsvr6/wue/9xhkJUXc/q 2IYE6yx70esQ8pPRuysEBZL0MtSLUB9H8fbOxzXQc8djfaVMhAREQpFe9GEzG4HxcOk6 nfij+CzyXJ661MpW4uNrvh98bONp6cLrT99qlEOR44dgxpvDak+M4qOCtV5VhMAVu1Ax Jkx1i6pNYAe2bzfSZOJ/RAwiPyON4w2jcI2Je67wOAIlYXQYBru5+qbRMVZjRWYKd9Nq 1jeQ== X-Gm-Message-State: AOAM530yudXFgp95FUR49HnrKY9zgbLmU6pnv1rVmORTqdWpfJytIvTo ZyYoF4j4cmbGeVUL9Ms0BGZ06A== X-Google-Smtp-Source: ABdhPJw1I9l+miBAX2Ua4EFDzaMZje2W1e0snsvlg/QhmEb0tEdMnaKmOfHTgox15WHz3wo/zMfGbw== X-Received: by 2002:adf:f812:: with SMTP id s18mr15692418wrp.28.1591988576758; Fri, 12 Jun 2020 12:02:56 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v1 12/18] tests/docker: Added docker build support for TSan. Date: Fri, 12 Jun 2020 20:02:31 +0100 Message-Id: <20200612190237.30436-13-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200612190237.30436-1-alex.bennee@linaro.org> References: <20200612190237.30436-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::442; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x442.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. 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=_AUTOLEARN 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, berrange@redhat.com, Robert Foley , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , richard.henderson@linaro.org, f4bug@amsat.org, =?UTF-8?q?Alex=20Benn=C3=A9e?= , cota@braap.org, aurelien@aurel32.net Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: Robert Foley Added a new docker for ubuntu 20.04. This docker has support for Thread Sanitizer including one patch we need in one of the header files. https://github.com/llvm/llvm-project/commit/a72dc86cd This command will build with tsan enabled: make docker-test-tsan-ubuntu2004 V=3D1 Also added the TSAN suppresion file to disable certain cases of TSAN warnings. Cc: Fam Zheng Cc: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Robert Foley Reviewed-by: Alex Benn=C3=A9e Signed-off-by: Alex Benn=C3=A9e Message-Id: <20200609200738.445-10-robert.foley@linaro.org> --- tests/docker/dockerfiles/ubuntu2004.docker | 65 ++++++++++++++++++++++ tests/docker/test-tsan | 44 +++++++++++++++ tests/tsan/blacklist.tsan | 10 ++++ tests/tsan/suppressions.tsan | 14 +++++ 4 files changed, 133 insertions(+) create mode 100644 tests/docker/dockerfiles/ubuntu2004.docker create mode 100755 tests/docker/test-tsan create mode 100644 tests/tsan/blacklist.tsan create mode 100644 tests/tsan/suppressions.tsan diff --git a/tests/docker/dockerfiles/ubuntu2004.docker b/tests/docker/dock= erfiles/ubuntu2004.docker new file mode 100644 index 00000000000..6050ce7e8a8 --- /dev/null +++ b/tests/docker/dockerfiles/ubuntu2004.docker @@ -0,0 +1,65 @@ +FROM ubuntu:20.04 +ENV PACKAGES flex bison \ + ccache \ + clang-10\ + gcc \ + gettext \ + git \ + glusterfs-common \ + libaio-dev \ + libattr1-dev \ + libbrlapi-dev \ + libbz2-dev \ + libcacard-dev \ + libcap-ng-dev \ + libcurl4-gnutls-dev \ + libdrm-dev \ + libepoxy-dev \ + libfdt-dev \ + libgbm-dev \ + libgtk-3-dev \ + libibverbs-dev \ + libiscsi-dev \ + libjemalloc-dev \ + libjpeg-turbo8-dev \ + liblzo2-dev \ + libncurses5-dev \ + libncursesw5-dev \ + libnfs-dev \ + libnss3-dev \ + libnuma-dev \ + libpixman-1-dev \ + librados-dev \ + librbd-dev \ + librdmacm-dev \ + libsasl2-dev \ + libsdl2-dev \ + libseccomp-dev \ + libsnappy-dev \ + libspice-protocol-dev \ + libspice-server-dev \ + libssh-dev \ + libusb-1.0-0-dev \ + libusbredirhost-dev \ + libvdeplug-dev \ + libvte-2.91-dev \ + libxen-dev \ + libzstd-dev \ + make \ + python3-yaml \ + python3-sphinx \ + sparse \ + texinfo \ + xfslibs-dev\ + vim +RUN apt-get update && \ + DEBIAN_FRONTEND=3Dnoninteractive apt-get -y install $PACKAGES +RUN dpkg -l $PACKAGES | sort > /packages.txt +ENV FEATURES clang tsan pyyaml sdl2 + +# https://bugs.launchpad.net/qemu/+bug/1838763 +ENV QEMU_CONFIGURE_OPTS --disable-libssh + +# Apply patch https://reviews.llvm.org/D75820 +# This is required for TSan in clang-10 to compile with QEMU. +RUN sed -i 's/^const/static const/g' /usr/lib/llvm-10/lib/clang/10.0.0/inc= lude/sanitizer/tsan_interface.h diff --git a/tests/docker/test-tsan b/tests/docker/test-tsan new file mode 100755 index 00000000000..eb40ac45b7a --- /dev/null +++ b/tests/docker/test-tsan @@ -0,0 +1,44 @@ +#!/bin/bash -e +# +# This test will use TSan as part of a build and a make check. +# +# Copyright (c) 2020 Linaro +# Copyright (c) 2016 Red Hat Inc. +# +# Authors: +# Robert Foley +# Originally based on test-quick from Fam Zheng +# +# This work is licensed under the terms of the GNU GPL, version 2 +# or (at your option) any later version. See the COPYING file in +# the top-level directory. + +. common.rc + +setup_tsan() +{ + requires clang tsan + tsan_log_dir=3D"/tmp/qemu-test/build/tsan" + mkdir -p $tsan_log_dir > /dev/null || true + EXTRA_CONFIGURE_OPTS=3D"${EXTRA_CONFIGURE_OPTS} --enable-tsan \ + --cc=3Dclang-10 --cxx=3Dclang++-10 \ + --disable-werror --extra-cflags=3D-O0" + # detect deadlocks is false currently simply because + # TSan crashes immediately with deadlock detector enabled. + # We have maxed out the history size to get the best chance of finding + # warnings during testing. + # Note, to get TSan to fail on warning, use exitcode=3D66 below. + tsan_opts=3D"suppressions=3D/tmp/qemu-test/src/tests/tsan/suppressions= .tsan\ + detect_deadlocks=3Dfalse history_size=3D7\ + halt_on_error=3D0 exitcode=3D0 verbose=3D5\ + log_path=3D$tsan_log_dir/tsan_warning" + export TSAN_OPTIONS=3D"$tsan_opts" +} + +cd "$BUILD_DIR" + +TARGET_LIST=3D${TARGET_LIST:-$DEF_TARGET_LIST} \ +setup_tsan +build_qemu +check_qemu +install_qemu diff --git a/tests/tsan/blacklist.tsan b/tests/tsan/blacklist.tsan new file mode 100644 index 00000000000..75e444f5dc6 --- /dev/null +++ b/tests/tsan/blacklist.tsan @@ -0,0 +1,10 @@ +# This is an example blacklist. +# To enable use of the blacklist add this to configure: +# "--extra-cflags=3D-fsanitize-blacklist=3D/tests/tsan/blacklist= .tsan" +# The eventual goal would be to fix these warnings. + +# TSan is not happy about setting/getting of dirty bits, +# for example, cpu_physical_memory_set_dirty_range, +# and cpu_physical_memory_get_dirty. +src:bitops.c +src:bitmap.c diff --git a/tests/tsan/suppressions.tsan b/tests/tsan/suppressions.tsan new file mode 100644 index 00000000000..73414b9ebd9 --- /dev/null +++ b/tests/tsan/suppressions.tsan @@ -0,0 +1,14 @@ +# This is the set of runtime suppressions of TSan warnings. +# The goal would be to have here only items we do not +# plan to fix, and to explain why for each item. + +# TSan reports a double lock on RECURSIVE mutexes. +# Since the recursive lock is intentional, we choose to ignore it. +mutex:aio_context_acquire +mutex:pthread_mutex_lock + +# TSan reports a race betwen pthread_mutex_init() and +# pthread_mutex_lock(). Since this is outside of QEMU, +# we choose to ignore it. +race:pthread_mutex_init +race:pthread_mutex_lock --=20 2.20.1 From nobody Sun May 19 11:31:09 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1591988970; cv=none; d=zohomail.com; s=zohoarc; b=ewFNlzFL2EHwFtjznFIM1MZZwJnslNtaqOtzfvfjcwVMuiwCfbmpOSk1nsDMCSo3Nv+1O5OL08xfG3e7syGQhRnuXsHIBgMqOaKCuzXeSo31EbWXfMC1423bdugd+PvlAO81tBzuqUN6I+MO083htzw9CjMV8KqK8eO/ot+v9XE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1591988970; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=pOTNVC0J3mJ6YGdmpXPCtwPf6rnAZM/12o6pgw/fmt0=; b=Ju+V2/+MTo+OKaZ1QeW+Z8KHHVaU8j8vk/7b+ppfSOSF9e2CU+tL6a9JrDs1TaWfujjURp1tH/dmQOe0cq0EqpYQHjYt/5VotVJow6IkieDysdYDlkIHDdwnai5Z8jh6Qjzpzusc2y4Sunfu9jrgcOtXcgY3S+DGOcWbwxkt/JM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1591988970411302.2631923631351; Fri, 12 Jun 2020 12:09:30 -0700 (PDT) Received: from localhost ([::1]:37418 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jjp3R-0003BM-78 for importer@patchew.org; Fri, 12 Jun 2020 15:09:29 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56450) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jjp2M-0001rk-2C for qemu-devel@nongnu.org; Fri, 12 Jun 2020 15:08:22 -0400 Received: from mail-wr1-x442.google.com ([2a00:1450:4864:20::442]:43566) by eggs.gnu.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jjp2K-0007ar-04 for qemu-devel@nongnu.org; Fri, 12 Jun 2020 15:08:21 -0400 Received: by mail-wr1-x442.google.com with SMTP id l10so10819431wrr.10 for ; Fri, 12 Jun 2020 12:08:13 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id a1sm10293830wmd.28.2020.06.12.12.08.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Jun 2020 12:08:08 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 396C31FF9B; Fri, 12 Jun 2020 20:02:40 +0100 (BST) 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=pOTNVC0J3mJ6YGdmpXPCtwPf6rnAZM/12o6pgw/fmt0=; b=HIeWdS5NVdv+L1Z4u3dquqHJUxFGe0J8Dh2e8RJec6ngzTPqhlFa98nZDgpt4gjIkz Zu6ePg4OdKWN2rFNJcWotJ8y8v13bqilhoz1o1YIQvPfTG02MvvwPLxJetenVKlHMWDe +Ab08U3FEDN8tSFEySsXqZn0ARvQnYsNm1wX8/UrrFccqcGrjVUV6S2vqZ7uDirzYaf6 qHk7TRj78abemoYuVv6c0U19NILudt9REeB3YHGRGjYPNCJsZkBsfRqdcW4TDabX/4fx 6QtPrFyHTtgUWHtUx4QePgKMrVWcqExOWt56oRhtT35G8Nn+M62oehbpn0XTVJJXXY2g 2uwQ== 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=pOTNVC0J3mJ6YGdmpXPCtwPf6rnAZM/12o6pgw/fmt0=; b=UGjwQLDc8eJnRshFFEcBqVXC58LTHfAieX+uRKMhcpdNN05vgtym1+q6zWjLigome7 sye2EIijiLj1Hp81dPsbrelKbgjlDax1tO5qCP1z25xFsOXq7x+7APTXzA5iX7eKxzTQ l8ARuPrNnzmCyuDZCYHnxAyPaVqWwuCgD9s9aBkrpoQgjricM/x7ccUrxbRomIdCCqm4 XlYeA3LLLiduK7c7BxaOUF4KftplqNZv034LX/7YGt87Fclb/mZoO9kDZ14JoU+/R6l/ vKrz3D3NHxgiOvItTnHiLjXkfruTDFgkNhheSkvmEaQ2cGNB8kUodfX4MMHvIIneUJgm VQnQ== X-Gm-Message-State: AOAM5302Yb2bpbe6+ZA8Et3EYibcsV3LvALFcd49/7b2oUYMhZ5DynXp 0aA/EJl7ahSKSfdT1TdG+d0jew== X-Google-Smtp-Source: ABdhPJzrfm1v1HeA7iW5y8bdM/qd9XhJ+XaSPpmfOOm4KwmzETxjNGTyuIelAW/m9/5oDhogHeTXhQ== X-Received: by 2002:adf:eec2:: with SMTP id a2mr15690114wrp.136.1591988892483; Fri, 12 Jun 2020 12:08:12 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v1 13/18] include/qemu: Added tsan.h for annotations. Date: Fri, 12 Jun 2020 20:02:32 +0100 Message-Id: <20200612190237.30436-14-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200612190237.30436-1-alex.bennee@linaro.org> References: <20200612190237.30436-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::442; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x442.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. 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=_AUTOLEARN 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, berrange@redhat.com, Robert Foley , =?UTF-8?q?Alex=20Benn=C3=A9e?= , richard.henderson@linaro.org, f4bug@amsat.org, cota@braap.org, aurelien@aurel32.net Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: Robert Foley These annotations will allow us to give tsan additional hints. For example, we can inform tsan about reads/writes to ignore to silence certain classes of warnings. We can also annotate threads so that the proper thread naming shows up in tsan warning results. Signed-off-by: Robert Foley Reviewed-by: Emilio G. Cota Reviewed-by: Alex Benn=C3=A9e Signed-off-by: Alex Benn=C3=A9e Message-Id: <20200609200738.445-11-robert.foley@linaro.org> --- include/qemu/tsan.h | 71 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 include/qemu/tsan.h diff --git a/include/qemu/tsan.h b/include/qemu/tsan.h new file mode 100644 index 00000000000..09cc665f91d --- /dev/null +++ b/include/qemu/tsan.h @@ -0,0 +1,71 @@ +#ifndef QEMU_TSAN_H +#define QEMU_TSAN_H +/* + * tsan.h + * + * This file defines macros used to give ThreadSanitizer + * additional information to help suppress warnings. + * This is necessary since TSan does not provide a header file + * for these annotations. The standard way to include these + * is via the below macros. + * + * Annotation examples can be found here: + * https://github.com/llvm/llvm-project/tree/master/compiler-rt/test/tsan + * annotate_happens_before.cpp or ignore_race.cpp are good places to start. + * + * The full set of annotations can be found here in tsan_interface_ann.cpp. + * https://github.com/llvm/llvm-project/blob/master/compiler-rt/lib/tsan/= rtl/ + * + * This work is licensed under the terms of the GNU GPL, version 2 or late= r. + * See the COPYING file in the top-level directory. + */ + +#ifdef CONFIG_TSAN +/* + * Informs TSan of a happens before/after relationship. + */ +#define QEMU_TSAN_ANNOTATE_HAPPENS_BEFORE(addr) \ + AnnotateHappensBefore(__FILE__, __LINE__, (void *)(addr)) +#define QEMU_TSAN_ANNOTATE_HAPPENS_AFTER(addr) \ + AnnotateHappensAfter(__FILE__, __LINE__, (void *)(addr)) +/* + * Gives TSan more information about thread names it can report the + * name of the thread in the warning report. + */ +#define QEMU_TSAN_ANNOTATE_THREAD_NAME(name) \ + AnnotateThreadName(__FILE__, __LINE__, (void *)(name)) +/* + * Allows defining a region of code on which TSan will not record memory R= EADS. + * This has the effect of disabling race detection for this section of cod= e. + */ +#define QEMU_TSAN_ANNOTATE_IGNORE_READS_BEGIN() \ + AnnotateIgnoreReadsBegin(__FILE__, __LINE__) +#define QEMU_TSAN_ANNOTATE_IGNORE_READS_END() \ + AnnotateIgnoreReadsEnd(__FILE__, __LINE__) +/* + * Allows defining a region of code on which TSan will not record memory + * WRITES. This has the effect of disabling race detection for this + * section of code. + */ +#define QEMU_TSAN_ANNOTATE_IGNORE_WRITES_BEGIN() \ + AnnotateIgnoreWritesBegin(__FILE__, __LINE__) +#define QEMU_TSAN_ANNOTATE_IGNORE_WRITES_END() \ + AnnotateIgnoreWritesEnd(__FILE__, __LINE__) +#else +#define QEMU_TSAN_ANNOTATE_HAPPENS_BEFORE(addr) +#define QEMU_TSAN_ANNOTATE_HAPPENS_AFTER(addr) +#define QEMU_TSAN_ANNOTATE_THREAD_NAME(name) +#define QEMU_TSAN_ANNOTATE_IGNORE_READS_BEGIN() +#define QEMU_TSAN_ANNOTATE_IGNORE_READS_END() +#define QEMU_TSAN_ANNOTATE_IGNORE_WRITES_BEGIN() +#define QEMU_TSAN_ANNOTATE_IGNORE_WRITES_END() +#endif + +void AnnotateHappensBefore(const char *f, int l, void *addr); +void AnnotateHappensAfter(const char *f, int l, void *addr); +void AnnotateThreadName(const char *f, int l, char *name); +void AnnotateIgnoreReadsBegin(const char *f, int l); +void AnnotateIgnoreReadsEnd(const char *f, int l); +void AnnotateIgnoreWritesBegin(const char *f, int l); +void AnnotateIgnoreWritesEnd(const char *f, int l); +#endif --=20 2.20.1 From nobody Sun May 19 11:31:09 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1591989343; cv=none; d=zohomail.com; s=zohoarc; b=M2JrybFcInFc+M8Zqm4DdUSP1BoyWhzf/+3E66567ess+J980DpFXPTHAlR8YUQjMLdwOAHf++bdyxq1f5ogY7WMqtzISH3X32o1lvhUbtaYWKc+OnXEvDaT+S/gdDdpR5Q5F4gBaIiuwvmc/vZ/Ce1zA0ykzA6Jh6CZOB6qxw0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1591989343; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=TVkmiGx2GSH0speASlWaGVuivqVtJrK614sZoAezQaY=; b=DK1Xk9FJ4KoI/rLxChIw89v3yM82pMhZ0y4JyECy/XZKspuYc9v+IW1fIXYAYlxvceRXEwGbFiBOjkwfczYFKkLMKDRks+nO2idq56Znqb7OYmdieHIfba9wG6YoCfdTgeynBz9G170gDEipPqntJqun3+XldlzEHcJv6X+IDPY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1591989343907458.7759909679402; Fri, 12 Jun 2020 12:15:43 -0700 (PDT) Received: from localhost ([::1]:58004 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jjp9S-0005a0-AI for importer@patchew.org; Fri, 12 Jun 2020 15:15:42 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54998) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jjoxU-00013V-3B for qemu-devel@nongnu.org; Fri, 12 Jun 2020 15:03:20 -0400 Received: from mail-wr1-x444.google.com ([2a00:1450:4864:20::444]:35740) by eggs.gnu.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jjoxS-0006vd-Eo for qemu-devel@nongnu.org; Fri, 12 Jun 2020 15:03:19 -0400 Received: by mail-wr1-x444.google.com with SMTP id x14so10821941wrp.2 for ; Fri, 12 Jun 2020 12:03:02 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id x186sm10255201wmg.8.2020.06.12.12.02.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Jun 2020 12:02:53 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 56EAF1FF9C; Fri, 12 Jun 2020 20:02:40 +0100 (BST) 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=TVkmiGx2GSH0speASlWaGVuivqVtJrK614sZoAezQaY=; b=jbfiRuW76O2HMBDL4roJyZJ+RjZb4r/s6nKMsWDHOlbb5+Skva9mnLXTk7tzNFJITG 5H5PnJnaXpERvv0Z61wiao6iKNoPl+i2um/xKCg3Ca4/haf3+TQmHjO38PLNi+2ybu9H CiKpF8dQqyE3KvgU1Y67FT9CV4AKqsnfiiITGyjOFNmj2iHD4PAhp0HDR/uF9mPHXdnp Fd1KopHuG3CNi1ohkz3gbv7sO1M/wXteGVo+qbcmlPTLe5m08GQapDwVjvTgW8s2coOv l1OeZnO8oSoJzqZ0TKBsvYjNu2bzyT1Ia1qQtZgBHOaPGhMdUj4ErT3nOHsbzQdb5+R5 ASSw== 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=TVkmiGx2GSH0speASlWaGVuivqVtJrK614sZoAezQaY=; b=SgIh63WMdZTwx07Cx56CDobqvqeEbHsm8Gylk8Vgn2hv1dfhMUmdsQn6VxOmvyO2j0 9CDDWarA0SJJHRk4vfleNsjCx367UUbAypYh6YnN3h7nwDUA0e/ob5nnM5co90d2ueXr UHfKaI1KRwtRh9yLLZMEHYK1fG1GXFCM9OheInzbiM5aPv1qgcNJ22mWv65m5nPW1IKA 6P/BEQ3wDqUxCyWuaTN9LwpdNP5aGQC212YTBtnTWBPslzKifhVVDJDeouas0xF/MdJs e4/szRZceGifZ2f38e+Cm3SATOJS3ONvO1XbvUBKm5Wzw8iSqJmS896M39cimk+Qf+UV 8RNg== X-Gm-Message-State: AOAM533dwK748JaEPuf1zKMzFDD7Ce1X2c+m8xlatKjhWkyJ5T+4qxkZ yiBEFQbXJyuNvse8fRfIVFlZSQ== X-Google-Smtp-Source: ABdhPJyHEOOzLRaFm4n/BvBnkv73QDKuKq95vcPWpIU3q6JddILl5xMOaGY+JDg44Qr2I3Lf/OOPkw== X-Received: by 2002:a05:6000:104f:: with SMTP id c15mr16279897wrx.391.1591988581155; Fri, 12 Jun 2020 12:03:01 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v1 14/18] util: Added tsan annotate for thread name. Date: Fri, 12 Jun 2020 20:02:33 +0100 Message-Id: <20200612190237.30436-15-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200612190237.30436-1-alex.bennee@linaro.org> References: <20200612190237.30436-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::444; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x444.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. 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=_AUTOLEARN 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, berrange@redhat.com, Robert Foley , =?UTF-8?q?Alex=20Benn=C3=A9e?= , richard.henderson@linaro.org, f4bug@amsat.org, cota@braap.org, Paolo Bonzini , aurelien@aurel32.net Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: Robert Foley This allows us to see the name of the thread in tsan warning reports such as this: Thread T7 'CPU 1/TCG' (tid=3D24317, running) created by main thread at: Signed-off-by: Robert Foley Reviewed-by: Emilio G. Cota Signed-off-by: Alex Benn=C3=A9e Message-Id: <20200609200738.445-12-robert.foley@linaro.org> --- util/qemu-thread-posix.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/util/qemu-thread-posix.c b/util/qemu-thread-posix.c index 838980aaa55..b4c2359272a 100644 --- a/util/qemu-thread-posix.c +++ b/util/qemu-thread-posix.c @@ -15,6 +15,7 @@ #include "qemu/atomic.h" #include "qemu/notify.h" #include "qemu-thread-common.h" +#include "qemu/tsan.h" =20 static bool name_threads; =20 @@ -513,6 +514,7 @@ static void *qemu_thread_start(void *args) # endif } #endif + QEMU_TSAN_ANNOTATE_THREAD_NAME(qemu_thread_args->name); g_free(qemu_thread_args->name); g_free(qemu_thread_args); pthread_cleanup_push(qemu_thread_atexit_notify, NULL); --=20 2.20.1 From nobody Sun May 19 11:31:09 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1591989214; cv=none; d=zohomail.com; s=zohoarc; b=TJNxaSkmoA6gEoiPNcZNjyFNrqkraa0u/+H8d/nOutHKaM66rLXHpwkPXl0wYBH6QyWURdjzb6PBEBOlQlAkKm2sJ2BFS9Csc4QYWJ9RF4/7cd8fmu6dFK+L9p2iVdXPY02OzmVHEyh0/iJ/Sfl/IXdccxHvFzn+xAIFFqbKANg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1591989214; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=fmvqRWXA4S4s+D50fC0aMio8k7PyGt04LZMtINTzwxg=; b=DKLc9vtwz5+TDyA96x+yfwF97f1FGxG6BkvYskfY1IhO0wWAkv4pr3Z0zB9AHo7EYEc8UQ3IM4Gs0IOGABuC5YpJCNePt6gOJ2MzY1B/ZyUB6Ba9ogQ+Z2xWJIDOT0DymbFZ5OJ/FK14ruqP3I+V84AUN8ZLa811b7jz7hcWNJ8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1591989214802831.0114775430866; Fri, 12 Jun 2020 12:13:34 -0700 (PDT) Received: from localhost ([::1]:51066 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jjp7N-0001mZ-Go for importer@patchew.org; Fri, 12 Jun 2020 15:13:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56478) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jjp2O-0001wx-Hu for qemu-devel@nongnu.org; Fri, 12 Jun 2020 15:08:24 -0400 Received: from mail-wr1-x441.google.com ([2a00:1450:4864:20::441]:37045) by eggs.gnu.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jjp2M-0007av-NM for qemu-devel@nongnu.org; Fri, 12 Jun 2020 15:08:24 -0400 Received: by mail-wr1-x441.google.com with SMTP id x13so10850039wrv.4 for ; Fri, 12 Jun 2020 12:08:14 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id d11sm11503801wrm.64.2020.06.12.12.08.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Jun 2020 12:08:08 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 7DE441FF9D; Fri, 12 Jun 2020 20:02:40 +0100 (BST) 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=fmvqRWXA4S4s+D50fC0aMio8k7PyGt04LZMtINTzwxg=; b=YwX0qdCFw6656yVdn3ZuyHcLqiRMU51QcNhqDIMoiW9IhsTqc3+PsAx6UA/yrCrtlB d1gV+2B8vmfYTGeS9vutWssVF54vXC96F1yh6+P33kap8H3386GDbuol1K61l1/7Qmpx D6JLw7p/CGuDTzsWQ2QNGi/Zurd470JSlGfPGXDhARZOexw30Vwx1yDr8mTUbPbkhH5X PyLzzddcDN0EShGWXKfVoRn6tDttssoSG+DXtbkyYhDpw41WRt9AcREnVrYsc97QyL9l 0/Oo1mofTHCbjWCBBbt1YENlsK2INOnz8RyiywKtJsWQNQrD2gtb0sgg6ECY42A/gvSX OxEg== 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=fmvqRWXA4S4s+D50fC0aMio8k7PyGt04LZMtINTzwxg=; b=T93+gsjKKvpNwTgdnHnJYuRSgnG6zrChH8ep6sYWXGgFlyVINhCkNiItjzjztN2FdF 8QlY2tM7JUD5I0lrSVQ5r/cOsL7zDrX3Gglm3n7/uA1DUPxWsAp9PqzBWDzZ2+O00Rlw +1L27g9jk6jln5dHYmRmxZapQAFP/nEXkPQaVRH4p04ybsOpX4XLOIQHzRVhFONejF/v XqD4ZoAWDUYAjQoFPUyX1Fh/rEmX9Y7LKEMTYgOglvQid0+xirF2Swe+9W2D1wFJff4K XPj0EtqlSqFdoUNYy/78RtXfR4uDvjSWOOgrWWw6mhLr+6YjkH1XuTClVYbvsrw0cHvD QImg== X-Gm-Message-State: AOAM533dc9rtLwUCUmg4C7Wi8BXw81Img7vVUid8dKdmSxP94FhCz+J3 NNEPDb71n03wUAC+fYGZnPbmGQ== X-Google-Smtp-Source: ABdhPJxRgb6U+Z7/oI7B8osdf9PMWNgqUljz6rHEAW5mhKk1MJd82eyRY1NVuMPU5NFpcSmSuvIwGw== X-Received: by 2002:a5d:4c45:: with SMTP id n5mr16558362wrt.341.1591988893816; Fri, 12 Jun 2020 12:08:13 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v1 15/18] docs: Added details on TSan to testing.rst Date: Fri, 12 Jun 2020 20:02:34 +0100 Message-Id: <20200612190237.30436-16-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200612190237.30436-1-alex.bennee@linaro.org> References: <20200612190237.30436-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::441; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x441.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. 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=_AUTOLEARN 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, berrange@redhat.com, Robert Foley , =?UTF-8?q?Alex=20Benn=C3=A9e?= , richard.henderson@linaro.org, f4bug@amsat.org, cota@braap.org, aurelien@aurel32.net Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: Robert Foley Adds TSan details to testing.rst. This includes background and reference details on TSan, and details on how to build and test with TSan both with and without docker. Signed-off-by: Robert Foley Reviewed-by: Emilio G. Cota Reviewed-by: Alex Benn=C3=A9e Signed-off-by: Alex Benn=C3=A9e Message-Id: <20200609200738.445-13-robert.foley@linaro.org> --- docs/devel/testing.rst | 107 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 107 insertions(+) diff --git a/docs/devel/testing.rst b/docs/devel/testing.rst index 770a987ea42..c1ff24370bf 100644 --- a/docs/devel/testing.rst +++ b/docs/devel/testing.rst @@ -397,6 +397,113 @@ list is in the ``make docker`` help text. The frequen= tly used ones are: * ``DEBUG=3D1``: enables debug. See the previous "Debugging a Docker test failure" section. =20 +Thread Sanitizer +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D + +Thread Sanitizer (TSan) is a tool which can detect data races. QEMU suppo= rts +building and testing with this tool. + +For more information on TSan: + +https://github.com/google/sanitizers/wiki/ThreadSanitizerCppManual + +Thread Sanitizer in Docker +--------------------------- +TSan is currently supported in the ubuntu2004 docker. + +The test-tsan test will build using TSan and then run make check. + +.. code:: + + make docker-test-tsan@ubuntu2004 + +TSan warnings under docker are placed in files located at build/tsan/. + +We recommend using DEBUG=3D1 to allow launching the test from inside the d= ocker, +and to allow review of the warnings generated by TSan. + +Building and Testing with TSan +------------------------------ + +It is possible to build and test with TSan, with a few additional steps. +These steps are normally done automatically in the docker. + +There is a one time patch needed in clang-9 or clang-10 at this time: + +.. code:: + + sed -i 's/^const/static const/g' \ + /usr/lib/llvm-10/lib/clang/10.0.0/include/sanitizer/tsan_interface.h + +To configure the build for TSan: + +.. code:: + + ../configure --enable-tsan --cc=3Dclang-10 --cxx=3Dclang++-10 \ + --disable-werror --extra-cflags=3D"-O0" + +The runtime behavior of TSAN is controlled by the TSAN_OPTIONS environment +variable. + +More information on the TSAN_OPTIONS can be found here: + +https://github.com/google/sanitizers/wiki/ThreadSanitizerFlags + +For example: + +.. code:: + + export TSAN_OPTIONS=3Dsuppressions=3D/tests/tsan/suppressi= ons.tsan \ + detect_deadlocks=3Dfalse history_size=3D7 exitcode= =3D0 \ + log_path=3D/tsan/tsan_warning + +The above exitcode=3D0 has TSan continue without error if any warnings are= found. +This allows for running the test and then checking the warnings afterwards. +If you want TSan to stop and exit with error on warnings, use exitcode=3D6= 6. + +TSan Suppressions +----------------- +Keep in mind that for any data race warning, although there might be a dat= a race +detected by TSan, there might be no actual bug here. TSan provides several +different mechanisms for suppressing warnings. In general it is recommend= ed +to fix the code if possible to eliminate the data race rather than suppress +the warning. + +A few important files for suppressing warnings are: + +tests/tsan/suppressions.tsan - Has TSan warnings we wish to suppress at ru= ntime. +The comment on each supression will typically indicate why we are +suppressing it. More information on the file format can be found here: + +https://github.com/google/sanitizers/wiki/ThreadSanitizerSuppressions + +tests/tsan/blacklist.tsan - Has TSan warnings we wish to disable +at compile time for test or debug. +Add flags to configure to enable: + +"--extra-cflags=3D-fsanitize-blacklist=3D/tests/tsan/blacklist.t= san" + +More information on the file format can be found here under "Blacklist For= mat": + +https://github.com/google/sanitizers/wiki/ThreadSanitizerFlags + +TSan Annotations +---------------- +include/qemu/tsan.h defines annotations. See this file for more descripti= ons +of the annotations themselves. Annotations can be used to suppress +TSan warnings or give TSan more information so that it can detect proper +relationships between accesses of data. + +Annotation examples can be found here: + +https://github.com/llvm/llvm-project/tree/master/compiler-rt/test/tsan/ + +Good files to start with are: annotate_happens_before.cpp and ignore_race.= cpp + +The full set of annotations can be found here: + +https://github.com/llvm/llvm-project/blob/master/compiler-rt/lib/tsan/rtl/= tsan_interface_ann.cpp + VM testing =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =20 --=20 2.20.1 From nobody Sun May 19 11:31:09 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1591989296; cv=none; d=zohomail.com; s=zohoarc; b=UZvRKe5dcO6XJQfibzGOifbGJj0lzy++MD5ySKwdYAFe+Y/zr4SA9pUYD8nG3zX7o5umOF3md1MCj8sVQ00OXc4tJe5WI8IbKnNXUZjugyUhlOqtBxsSRPPqAS5SBCkTsSU/RrsLfDhiCowPburecs3Npxgue+nVpnJx4RmN24Q= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1591989296; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=wXhgANSUKYnCKXs8uV1uCQPeeFPmHlGq9ilbgO5w6iI=; b=jD8krIC6YuZysPg9APV3FmIlMLc8OOS+g+47F5hh2S6G/ASk/RAqCxJzsxHNsgaq8G/ZLdfI+bactkgNBUoqIol7d+ucf/hAxeiwAbbY9Gq2LPe49qz4qREYWtb+ljJikAOzff2HTE/X+wi5jtB4POP/tR77g0cwNcPnV/n+wAM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1591989296750345.57562918413964; Fri, 12 Jun 2020 12:14:56 -0700 (PDT) Received: from localhost ([::1]:55362 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jjp8h-00045A-FD for importer@patchew.org; Fri, 12 Jun 2020 15:14:55 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56494) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jjp2P-000206-R7 for qemu-devel@nongnu.org; Fri, 12 Jun 2020 15:08:25 -0400 Received: from mail-wr1-x441.google.com ([2a00:1450:4864:20::441]:43566) by eggs.gnu.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jjp2O-0007b5-0S for qemu-devel@nongnu.org; Fri, 12 Jun 2020 15:08:25 -0400 Received: by mail-wr1-x441.google.com with SMTP id l10so10819609wrr.10 for ; Fri, 12 Jun 2020 12:08:15 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id y66sm10497582wmy.24.2020.06.12.12.08.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Jun 2020 12:08:08 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id AB00D1FF9E; Fri, 12 Jun 2020 20:02:40 +0100 (BST) 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=wXhgANSUKYnCKXs8uV1uCQPeeFPmHlGq9ilbgO5w6iI=; b=JO8Lq9UsZykrE9C0WuOwWC7dTAuP6f71RCn6aB0JBn5ZM0zkG5R76Umi5/NK6RN98t yEgqFveLHYJDzTIHiMp6NpuiGObJQr8ZjfCy5tmUwjR7Cx7UubM1EWjhirPv2s9Gh01P FO5j8akPAT2aSu2inJBdc7gOLQdqeyZRSSpaC1zzlr3DEHTJzRphtoAmnYqx9dyCcc+r gX7Fa8mctv2bJuZujX2aJdfDDiB7zeDmv/rGpiEWoptyuBhbnqNCVTslLr7GVDkCOwoT a5Ee4LLozPKMElnRNEEsi029cGN3eoLQMJvMe7TbDK/5tWHWGcdVktSEQzG4BO7Sk8uz fo2A== 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=wXhgANSUKYnCKXs8uV1uCQPeeFPmHlGq9ilbgO5w6iI=; b=bca1aEgQ/G8HvIDaO3NmnoEyNromEonQ2W8VplYZNiGJyG3og+01l3i5qJPI68cmyc 6uwpHtKkkshLcYL0LzLWZDBiwJrczI5A6GyALygLMTtkeYtSOjL14B5OX8jZB5EMA+IN ZYWUancc3hpnaiRXn9/WanXreLIBUZ4Bb85X6D8JPpDuuTEm+jv7aRIfZomJxyWHRTCQ 17Xguf8SrifdyGWFS3D8DcMq6IuIPeJfAiX4TWAz30V9DTdKthF3bIQOn+5QNj22LFZV VV/MbPGLT0Zk8nr/jbEHclp4MZWApLxhEY/cin4n4jv6+Ycy1UZO5xImVOeogAXbyccS +VKQ== X-Gm-Message-State: AOAM531tP3Soa4vAw0hb8snDrPs1c6hX++PS18wOhq/I1txFSXgDn0yl 43HSxTwzOEa/qVrcMxpMPyUwfg== X-Google-Smtp-Source: ABdhPJybUlFo7xQDhVy73X0+AJpszwm4nXLyGjmqxvjoVQvDAU51wAhC6jc4FKGbOX7/LRzIPs4gvw== X-Received: by 2002:a1c:bd86:: with SMTP id n128mr390249wmf.5.1591988894976; Fri, 12 Jun 2020 12:08:14 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v1 16/18] tests: Disable select tests under TSan, which hit TSan issue. Date: Fri, 12 Jun 2020 20:02:35 +0100 Message-Id: <20200612190237.30436-17-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200612190237.30436-1-alex.bennee@linaro.org> References: <20200612190237.30436-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::441; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x441.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. 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=_AUTOLEARN 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, Laurent Vivier , Thomas Huth , berrange@redhat.com, Robert Foley , =?UTF-8?q?Alex=20Benn=C3=A9e?= , richard.henderson@linaro.org, f4bug@amsat.org, cota@braap.org, Paolo Bonzini , aurelien@aurel32.net Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: Robert Foley Disable a few tests under CONFIG_TSAN, which run into a known TSan issue that results in a hang. https://github.com/google/sanitizers/issues/1116 The disabled tests under TSan include all the qtests as well as the test-char, test-qga, and test-qdev-global-props. Signed-off-by: Robert Foley Reviewed-by: Emilio G. Cota Signed-off-by: Alex Benn=C3=A9e Message-Id: <20200609200738.445-14-robert.foley@linaro.org> --- tests/Makefile.include | 9 +++++++-- tests/qtest/Makefile.include | 7 +++++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/tests/Makefile.include b/tests/Makefile.include index c2397de8ed6..8d82c24d835 100644 --- a/tests/Makefile.include +++ b/tests/Makefile.include @@ -55,7 +55,6 @@ SYSEMU_TARGET_LIST :=3D $(subst -softmmu.mak,,$(notdir \ =20 check-unit-y +=3D tests/check-qdict$(EXESUF) check-unit-y +=3D tests/check-block-qdict$(EXESUF) -check-unit-$(CONFIG_SOFTMMU) +=3D tests/test-char$(EXESUF) check-unit-y +=3D tests/check-qnum$(EXESUF) check-unit-y +=3D tests/check-qstring$(EXESUF) check-unit-y +=3D tests/check-qlist$(EXESUF) @@ -108,7 +107,6 @@ check-unit-y +=3D tests/test-qht$(EXESUF) check-unit-y +=3D tests/test-qht-par$(EXESUF) check-unit-y +=3D tests/test-bitops$(EXESUF) check-unit-y +=3D tests/test-bitcnt$(EXESUF) -check-unit-$(CONFIG_SOFTMMU) +=3D tests/test-qdev-global-props$(EXESUF) check-unit-y +=3D tests/check-qom-interface$(EXESUF) check-unit-y +=3D tests/check-qom-proplist$(EXESUF) check-unit-y +=3D tests/test-qemu-opts$(EXESUF) @@ -123,9 +121,16 @@ check-speed-$(CONFIG_BLOCK) +=3D tests/benchmark-crypt= o-cipher$(EXESUF) check-unit-$(CONFIG_BLOCK) +=3D tests/test-crypto-secret$(EXESUF) check-unit-$(call land,$(CONFIG_BLOCK),$(CONFIG_GNUTLS)) +=3D tests/test-c= rypto-tlscredsx509$(EXESUF) check-unit-$(call land,$(CONFIG_BLOCK),$(CONFIG_GNUTLS)) +=3D tests/test-c= rypto-tlssession$(EXESUF) +ifndef CONFIG_TSAN +# Some tests: test-char, test-qdev-global-props, and test-qga, +# are not runnable under TSan due to a known issue. +# https://github.com/google/sanitizers/issues/1116 +check-unit-$(CONFIG_SOFTMMU) +=3D tests/test-char$(EXESUF) +check-unit-$(CONFIG_SOFTMMU) +=3D tests/test-qdev-global-props$(EXESUF) ifneq (,$(findstring qemu-ga,$(TOOLS))) check-unit-$(call land,$(CONFIG_LINUX),$(CONFIG_VIRTIO_SERIAL)) +=3D tests= /test-qga$(EXESUF) endif +endif check-unit-$(CONFIG_SOFTMMU) +=3D tests/test-timed-average$(EXESUF) check-unit-$(call land,$(CONFIG_SOFTMMU),$(CONFIG_INOTIFY1)) +=3D tests/te= st-util-filemonitor$(EXESUF) check-unit-$(CONFIG_SOFTMMU) +=3D tests/test-util-sockets$(EXESUF) diff --git a/tests/qtest/Makefile.include b/tests/qtest/Makefile.include index 9e5a51d033a..71fd714a2a9 100644 --- a/tests/qtest/Makefile.include +++ b/tests/qtest/Makefile.include @@ -313,12 +313,15 @@ tests/qtest/tpm-tis-device-test$(EXESUF): tests/qtest= /tpm-tis-device-test.o test # QTest rules =20 TARGETS=3D$(patsubst %-softmmu,%, $(filter %-softmmu,$(TARGET_DIRS))) +QTEST_TARGETS =3D +# The qtests are not runnable (yet) under TSan due to a known issue. +# https://github.com/google/sanitizers/issues/1116 +ifndef CONFIG_TSAN ifeq ($(CONFIG_POSIX),y) QTEST_TARGETS =3D $(TARGETS) check-qtest-y=3D$(foreach TARGET,$(TARGETS), $(check-qtest-$(TARGET)-y:%= =3Dtests/qtest/%$(EXESUF))) check-qtest-y +=3D $(check-qtest-generic-y:%=3Dtests/qtest/%$(EXESUF)) -else -QTEST_TARGETS =3D +endif endif =20 qtest-obj-y =3D tests/qtest/libqtest.o $(test-util-obj-y) --=20 2.20.1 From nobody Sun May 19 11:31:09 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1591989005; cv=none; d=zohomail.com; s=zohoarc; b=krJ11Bjdzqnk8iXUahtoE70MkE08l94JA0PUfeHRRcBsdIlz0/Hqs0j4E6hYXYoQ3ideMTq3m4h33Ta9McgYfhzVsOlOXkKemUUB34kCuPcTWeLjbAC6W5euClRCYY9/+lzA/M5R5vKy9nKvQMBVhFSgw3P89t7j8R16ws0o72Q= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1591989005; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=4XFLJYI4xAPs7JF4qUWP5IVqk/6eCNTCwzMmtm4pqYs=; b=TW9ePPEfXtM7ymyZZg2gSq48lLK+IyfeSyD7K+hYsIAYvfNHsSCWTQxuzv7SZCgTNTjv8EW3eAM1SAn9bNzHpwnHe4/awm/i3f/NElza3UheRpPzXi7BQEjwtFvWsrJEyeNTJKdwRFqsgWCdtFljQ+4zl5G5rdF/2Ghebe8Gqvg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1591989005217111.34790851878165; Fri, 12 Jun 2020 12:10:05 -0700 (PDT) Received: from localhost ([::1]:40516 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jjp3z-0004tI-SO for importer@patchew.org; Fri, 12 Jun 2020 15:10:03 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56426) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jjp2K-0001p8-Gp for qemu-devel@nongnu.org; Fri, 12 Jun 2020 15:08:20 -0400 Received: from mail-wr1-x442.google.com ([2a00:1450:4864:20::442]:43565) by eggs.gnu.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jjp2I-0007ag-SU for qemu-devel@nongnu.org; Fri, 12 Jun 2020 15:08:20 -0400 Received: by mail-wr1-x442.google.com with SMTP id l10so10819202wrr.10 for ; Fri, 12 Jun 2020 12:08:10 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id b81sm10672918wmc.5.2020.06.12.12.08.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Jun 2020 12:08:08 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id DA9D11FF9F; Fri, 12 Jun 2020 20:02:40 +0100 (BST) 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=4XFLJYI4xAPs7JF4qUWP5IVqk/6eCNTCwzMmtm4pqYs=; b=Dp3DIHB+qyea8R6laqsJbqTIvwknkgiN/Tt/9JxzM9/p73heAbkGjYV4LuBx9I8vFY tQF/rXFA85LU1682jUG+0tcFzBqIyJD076d95cEfOYzqjyNsUtsqEQoGkI8sRvD1Fvl8 7dFa9fj+2oKI7B/9tSXK4QABwd0Ayln2io7jdJG0/T+v1y9G2qNJlg7sKPILV4Z2adig iH8nU9f5gKL8U30UGay80nWkmAegDbOeJTYarCv+NBxCkK9EmrsQGXZcMmiq+r+y6psJ 3iEpJ0rbZ0Ry8/P3mkn+1S6MfXB/IsUoTZpr17Ztss+GiUGKMnhJuAvFR2UAObuBBFKR 8dMw== 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=4XFLJYI4xAPs7JF4qUWP5IVqk/6eCNTCwzMmtm4pqYs=; b=VQOyg73cpJW/JSqV41oCKE7Lh9jeDrxbBOOTsnCzh54jZrkY3vheQjTjNUEpRsaVly F5u7PkdaqVsoriOaofXmKQyVVZ3BOhnC+yXly2P8sg/M/cWR6TSIFU6iRan0iNLzUd0a YV3tltYtrS8nZjIRtXiNf2vb4GzMPBWzGkCGEP26MQTXFaBj74dnFAmFMNIIDs/H3f2o xWrZadXvhlvVvOhPAsdvzu7airlzGF8XlV4kuKDWPTfxMQMbhiBq9DL53gbS/89AYVV3 Ljd2SCzsynxxsC7xyxyKYtQ4Q1oD8+8Ej9z9cSp6uRulSxhpGvV/mS6vcgjKif7pWLwl Ul5w== X-Gm-Message-State: AOAM533KyQaNy5dIgN3x1UMcJIz9buc5oNjBrzMxMq0AjQModZgO2G2p JttCX0yU9TNYZsL1A1s3aXRZUg== X-Google-Smtp-Source: ABdhPJxB0oSIvYjGw6zeb2yiJQ5rttImeT52cEINZtFjjwf7IclrdMeVvtSM8eEhrcIfuRRKmkN3wg== X-Received: by 2002:adf:bbc5:: with SMTP id z5mr16675085wrg.269.1591988889517; Fri, 12 Jun 2020 12:08:09 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v1 17/18] Revert ".shippable: temporaily disable some cross builds" Date: Fri, 12 Jun 2020 20:02:36 +0100 Message-Id: <20200612190237.30436-18-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200612190237.30436-1-alex.bennee@linaro.org> References: <20200612190237.30436-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::442; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x442.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. 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=_AUTOLEARN 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, berrange@redhat.com, =?UTF-8?q?Alex=20Benn=C3=A9e?= , richard.henderson@linaro.org, f4bug@amsat.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , cota@braap.org, aurelien@aurel32.net Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) This reverts commit 12d43b5ae916809aad9ccf8aa2a0a06260527340. Signed-off-by: Alex Benn=C3=A9e --- .shippable.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.shippable.yml b/.shippable.yml index 10cf219bff4..2cce7b56890 100644 --- a/.shippable.yml +++ b/.shippable.yml @@ -5,8 +5,8 @@ env: global: - LC_ALL=3DC matrix: - # - IMAGE=3Ddebian-amd64 - # TARGET_LIST=3Dx86_64-softmmu,x86_64-linux-user + - IMAGE=3Ddebian-amd64 + TARGET_LIST=3Dx86_64-softmmu,x86_64-linux-user - IMAGE=3Ddebian-win32-cross TARGET_LIST=3Darm-softmmu,i386-softmmu,lm32-softmmu - IMAGE=3Ddebian-win64-cross @@ -19,10 +19,10 @@ env: TARGET_LIST=3Daarch64-softmmu,aarch64-linux-user - IMAGE=3Ddebian-s390x-cross TARGET_LIST=3Ds390x-softmmu,s390x-linux-user - # - IMAGE=3Ddebian-mips-cross - # TARGET_LIST=3Dmips-softmmu,mipsel-linux-user - # - IMAGE=3Ddebian-mips64el-cross - # TARGET_LIST=3Dmips64el-softmmu,mips64el-linux-user + - IMAGE=3Ddebian-mips-cross + TARGET_LIST=3Dmips-softmmu,mipsel-linux-user + - IMAGE=3Ddebian-mips64el-cross + TARGET_LIST=3Dmips64el-softmmu,mips64el-linux-user - IMAGE=3Ddebian-ppc64el-cross TARGET_LIST=3Dppc64-softmmu,ppc64-linux-user,ppc64abi32-linux-user build: --=20 2.20.1 From nobody Sun May 19 11:31:09 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1591989102; cv=none; d=zohomail.com; s=zohoarc; b=Gmegn4zy+wmMmaANDfoRsws1SzlM1dQlz7/Ng8G/DzFIPfvhMgy8Et8oii0phSfRkZbNf7uPIEyJKIaWQYkKStKrz4aNFwNm04oTAF13UFVWAWS6VqgULsz7Vd3dP9udp/cj6eHxrsqNgfhqV4rcSEP41JpSVzsvH1ttaCTeaxU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1591989102; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=BULJelpXGG4oceHKJESiwUE25IojeXa0K35GUnG/ea0=; b=LJetR0lKrAfY3wMIYNQN2XehHHQ3ReOtjs2wrrogPitOzA1hF2d/um8Wvk/m65jMYV+kATGPmYJZO8G0h7+z4O/zi48FVCoJq2OfC0a+/L348rGvRQrttL7iyL/V2UU2idH/Q8HIiiIn7x0xXkXUBeTr+2M+go1dcYDkRblDKCA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1591989102966826.8053994244984; Fri, 12 Jun 2020 12:11:42 -0700 (PDT) Received: from localhost ([::1]:46812 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jjp5Z-00087L-Ov for importer@patchew.org; Fri, 12 Jun 2020 15:11:41 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56444) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jjp2L-0001qf-CQ for qemu-devel@nongnu.org; Fri, 12 Jun 2020 15:08:21 -0400 Received: from mail-wr1-x441.google.com ([2a00:1450:4864:20::441]:41933) by eggs.gnu.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jjp2J-0007an-Rl for qemu-devel@nongnu.org; Fri, 12 Jun 2020 15:08:21 -0400 Received: by mail-wr1-x441.google.com with SMTP id j10so10837897wrw.8 for ; Fri, 12 Jun 2020 12:08:11 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id z8sm11339099wru.33.2020.06.12.12.08.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Jun 2020 12:08:08 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 184761FFA5; Fri, 12 Jun 2020 20:02:41 +0100 (BST) 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=BULJelpXGG4oceHKJESiwUE25IojeXa0K35GUnG/ea0=; b=UZDzRaTHfRMdBdOMrvC/dUnp3bt3JxhmGE+AMmZjOYwCotpleoL6YjttZr9wpknCY0 pKVDcJdFwGaMWXSaaaibrywS2QextLgBnI9MxCFjVerpgL+eATsi/+dQZ/1hOdRLQr8g 3WFkAGaPaN+03O6+5yGKARJ9kgR42drWLKzcflFMt9A+aMPEEyeUshU6o3vqc+IhN9+X 2oqnDyqSQeLPgTBCJt5Tq9J0037enXYhz5rwKqqmsGBqFGQX1L/lBTnMOKrdviu577WN Kx8qbiotoWmmSTOgVFW/S1KaE+1HzkBevzgRHtpkzFew2LIEp2lzXDdrRK4zEoHLlVVw kcqw== 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=BULJelpXGG4oceHKJESiwUE25IojeXa0K35GUnG/ea0=; b=ktSM4dKchE/FrRu96A3iUiM7fV1n5a7SZnh6R2vyWPgOR/eUEYnY+yQ9krKMmFpYGU fR8Zl7w4VA2iH9fLusz6KHdDuhL1a0XWNcY3K/1EcU9b0irKwa6+ow/KGZIMsn0NuRFF tUniJJGx6I1KDOEXbmqfL8rdLh/lW1h89C5dgYyEzeINOoXed2qA/vB3DTg+MRgQqJV7 dhLjXwIrWk9fnZ/f9GckBgxnEl0G1KBA1ePC4Ykh0GLJzUIL0cKQ4qT7p7Y1HOFp/P5q HhFmn3YywTBQR9Oka6JFK5nXz9yvToZiZUn4UD9t1SYqvv4371DHaSK2Rcedzz71/S6b Jm9A== X-Gm-Message-State: AOAM532HVUmPgOGyM3aDiyv+jP2gJ9eZRNBb/LXVmK49CuAfPN66VjzM ArtGu7RVrHnljq2fxqxTj6spWg== X-Google-Smtp-Source: ABdhPJz/AbuxjPc2UFjO1ztytRYs48mNHG7j62ivs/2R+mxDNfWhcPn4Oq4k4RaYE36BZKHHKZy/dA== X-Received: by 2002:a1c:4189:: with SMTP id o131mr321693wma.183.1591988890779; Fri, 12 Jun 2020 12:08:10 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v1 18/18] cirrus.yml: serialise make check Date: Fri, 12 Jun 2020 20:02:37 +0100 Message-Id: <20200612190237.30436-19-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200612190237.30436-1-alex.bennee@linaro.org> References: <20200612190237.30436-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::441; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x441.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. 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=_AUTOLEARN 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, berrange@redhat.com, =?UTF-8?q?Alex=20Benn=C3=A9e?= , richard.henderson@linaro.org, f4bug@amsat.org, cota@braap.org, Ed Maste , Li-Wen Hsu , aurelien@aurel32.net Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) We do this on our other platforms to make it easier to see what has broken. Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Li-Wen Hsu --- .cirrus.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index ce7850a320e..69342ae031b 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -14,7 +14,7 @@ freebsd_12_task: - cd build - ../configure || { cat config.log; exit 1; } - gmake -j8 - - gmake -j8 V=3D1 check + - gmake V=3D1 check =20 macos_task: osx_instance: @@ -26,7 +26,7 @@ macos_task: - cd build - ../configure --python=3D/usr/local/bin/python3 || { cat config.log; = exit 1; } - gmake -j$(sysctl -n hw.ncpu) - - gmake check -j$(sysctl -n hw.ncpu) + - gmake check =20 macos_xcode_task: osx_instance: @@ -39,4 +39,4 @@ macos_xcode_task: - cd build - ../configure --cc=3Dclang || { cat config.log; exit 1; } - gmake -j$(sysctl -n hw.ncpu) - - gmake check -j$(sysctl -n hw.ncpu) + - gmake check --=20 2.20.1