From patchwork Fri Jun 12 19:02:20 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 187857 Delivered-To: patch@linaro.org Received: by 2002:a92:cf06:0:0:0:0:0 with SMTP id c6csp662389ilo; Fri, 12 Jun 2020 12:04:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyx9hlBYbgIHc1DGFczUaIiEoogbLCyaMc1pUGTJYU83CFXDi2rVKgcAmp1bDUfdtWYpH2G X-Received: by 2002:a25:a0c7:: with SMTP id i7mr22546168ybm.169.1591988645573; Fri, 12 Jun 2020 12:04:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591988645; cv=none; d=google.com; s=arc-20160816; b=lCmFSA7IfM8RNHH5cS0wnY88A8tQvyoR5katOW0cjunTbci4N7GmrPWpthuZSiTgC6 uGSEWE2Sd4Ki3sN4SXbjc3D4gntWzqMLXNbVGj0JupSeW+lUK+uBqOTGHGLiv+lMesTN xkYrduWppXWztvGdbQmgOXOH18miy16+YiyQI9BnVpXerD0E4Znib8G3aiyIyiyDHfyI bi7Bt4bknkPS3tDqgoOl0IWoa1qU0ihKjGmEsC4UnBPaxhL2jz0k5Y+/+hwHuJ9QqHX6 2tqfQ7a9ZtGswvq22y20D/EXUZ+HbLy2q5IrBhOGVNHb5w7D4j7KY8IxAmrMy0sOPakw ykIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=VvsWLFzW89Fr/+a2K5qJoeB4GeJHRtOSlXNKQS2LjDI=; b=uk8zqgCwBfnBs0SGlOTifAao2szqNgfWMZwoo2A+zHS1xBw1davFlCq0qi744dDY8k LbBcEcH/rUhJXZh2Rm7TqpB7U0F4yH2k/TAJTh1irbkXfKGmEBrTkJCOGnVpm9aYUTBC 8tGmQm/3z43i7GMseu1xxafmD992x9tapuEbeNVo5sZJ+SQ2qtnfBO3AloTXCrtd0jid 3xJERiPaFdA34k/9u4hpv1N04BFtP5eEvrmHONjtkOmFf0NXSCY/g0pTjnN5n/fGEnHO tCTCdeaYHyuGJMZC+usZiUjkJg/BhHNsul+SZyCM2s/ph1ldAps0TchDqv+9wc0aGOZZ YkXg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b="p+M/mfiT"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id v68si6086198ybb.215.2020.06.12.12.04.05 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 12 Jun 2020 12:04:05 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b="p+M/mfiT"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:41610 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jjoyC-0000lZ-Vc for patch@linaro.org; Fri, 12 Jun 2020 15:04:05 -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) 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-Received: by 2002:a1c:7215:: with SMTP id n21mr375566wmc.10.1591988561459; Fri, 12 Jun 2020 12:02:41 -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) From: =?utf-8?q?Alex_Benn=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 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_Benn=C3=A9e?= , richard.henderson@linaro.org, f4bug@amsat.org, =?utf-8?q?Philippe_Mat?= =?utf-8?q?hieu-Daud=C3=A9?= , cota@braap.org, aurelien@aurel32.net Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" We should be keeping this up to date as Fedora goes out of support quite quickly. Signed-off-by: Alex Bennée --- tests/docker/dockerfiles/fedora.docker | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.20.1 diff --git a/tests/docker/dockerfiles/fedora.docker b/tests/docker/dockerfiles/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 # Please keep this list sorted alphabetically ENV PACKAGES \ From patchwork Fri Jun 12 19:02:21 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 187859 Delivered-To: patch@linaro.org Received: by 2002:a92:cf06:0:0:0:0:0 with SMTP id c6csp663840ilo; Fri, 12 Jun 2020 12:05:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy/NsuIiVFeumppY/1niasnGXsoaznqnSX5S+FNVmUd/6Xv/5p591XO9zAr9QQ+y5p/Dkte X-Received: by 2002:a25:abc3:: with SMTP id v61mr24937057ybi.250.1591988753427; Fri, 12 Jun 2020 12:05:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591988753; cv=none; d=google.com; s=arc-20160816; b=aXH6AJ8LkdPu0YQ9Q0R2XB9pjK+uumFnaCziR91EawsKq48bmRksHJ+TFVyTSWUeJz LFHnQDHGKy95A/NdJxDsdlCbq09+dmEolq8A/YMIY6tgEdlL0myH/jTOPnQ5yjYUbncX wQ7ZIxPCOevbtCdOBkGZ8MLpxB5x1VMmPQCkB/eKUF3SQ8q/ypo8EGACSTTRv89qmYmZ +3TLoqAyGpMGlC0Hxpra6k5pvG5BrapRGKntT+/42BL6Mvyu7Xlvy3lUMYcaq7/pt5Jp M2bFwPYnX/FfLpGKJTpYu+zrB4eGTRoqxOG2EjcF0Zf6X2X7MqlEUgESRkqo4/sDdVzk kNNA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=ETOQssqeunZMNuQuq6uQLfDZ8XDqPmQMuw/cPtqxYnI=; b=eSwXSgmVuiHSq8m7ufxNlbLsW9GIO6RBhh2IZHf2rXo97zOciwBRc2DjDVS9kRP0eV O4Q9MRiuHUntTGaGzXB+9rNDkxeWsZnZ1uf/djyspN4XjKohsV42cceY8zlztPRACKVh vpG5V7vz0qQgDISktOGtzgJVzt3ZPVwvSLynR/AiCmv5zt40QYTYDq8P4DyC8LNe84f4 eywLpsVEB5WzySgtsR/LzjQpeWrX2rdYdMjbxCb0Wx8ExkYAKmc7LmiwjJfq5pQyNnp9 e77yDQVrGnEPXfovIBUO4QAIWNZOgft9dpplfx4k0brTVYfJzDC2JFKZVuJsX3gBDHdq a2Nw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=WTOsK1dJ; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id o137si5519409ybg.278.2020.06.12.12.05.53 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 12 Jun 2020 12:05:53 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=WTOsK1dJ; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:49922 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jjozw-0004Zo-TL for patch@linaro.org; Fri, 12 Jun 2020 15:05:52 -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) 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-Received: by 2002:a5d:4286:: with SMTP id k6mr15817041wrq.140.1591988563534; Fri, 12 Jun 2020 12:02:43 -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) From: =?utf-8?q?Alex_Benn=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 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_Mathieu-Daud?= =?utf-8?b?w6k=?= , richard.henderson@linaro.org, f4bug@amsat.org, =?utf-8?q?Alex_Benn?= =?utf-8?b?w6ll?= , cota@braap.org, Claudio Fontana , aurelien@aurel32.net Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" 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é Tested-by: Philippe Mathieu-Daudé Signed-off-by: Alex Bennée Message-Id: <20200518160319.18861-2-cfontana@suse.de> --- configure | 1 - Makefile | 10 +++++----- dtc | 2 +- 3 files changed, 6 insertions(+), 7 deletions(-) -- 2.20.1 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" != "y" ] ; then symlink "$source_path/dtc/Makefile" "dtc/Makefile" - symlink "$source_path/dtc/scripts" "dtc/scripts" fi fdt_cflags="-I\$(SRC_PATH)/dtc/libfdt" fdt_ldflags="-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="$(V)" TARGET_DIR="$(dir $@)" $(notdir $@),) -DTC_MAKE_ARGS=-I$(SRC_PATH)/dtc VPATH=$(SRC_PATH)/dtc -C dtc V="$(V)" LIBFDT_srcdir=$(SRC_PATH)/dtc/libfdt +# LIBFDT_lib="": avoid breaking existing trees with objects requiring -fPIC +DTC_MAKE_ARGS=-I$(SRC_PATH)/dtc VPATH=$(SRC_PATH)/dtc -C dtc V="$(V)" LIBFDT_lib="" DTC_CFLAGS=$(CFLAGS) $(QEMU_CFLAGS) -DTC_CPPFLAGS=-I$(BUILD_DIR)/dtc -I$(SRC_PATH)/dtc -I$(SRC_PATH)/dtc/libfdt +DTC_CPPFLAGS=-I$(SRC_PATH)/dtc/libfdt .PHONY: dtc/all -dtc/all: .git-submodule-status dtc/libfdt dtc/tests - $(call quiet-command,$(MAKE) $(DTC_MAKE_ARGS) CPPFLAGS="$(DTC_CPPFLAGS)" CFLAGS="$(DTC_CFLAGS)" LDFLAGS="$(QEMU_LDFLAGS)" ARFLAGS="$(ARFLAGS)" CC="$(CC)" AR="$(AR)" LD="$(LD)" $(SUBDIR_MAKEFLAGS) libfdt/libfdt.a,) +dtc/all: .git-submodule-status dtc/libfdt + $(call quiet-command,$(MAKE) $(DTC_MAKE_ARGS) CPPFLAGS="$(DTC_CPPFLAGS)" CFLAGS="$(DTC_CFLAGS)" LDFLAGS="$(QEMU_LDFLAGS)" ARFLAGS="$(ARFLAGS)" CC="$(CC)" AR="$(AR)" LD="$(LD)" $(SUBDIR_MAKEFLAGS) libfdt,) 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 KEYMAPS=da 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 From patchwork Fri Jun 12 19:02:22 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 187856 Delivered-To: patch@linaro.org Received: by 2002:a92:cf06:0:0:0:0:0 with SMTP id c6csp661854ilo; Fri, 12 Jun 2020 12:03:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwpu8ATyPILzMSrwy9Ju4WDCHjK3GLwPWTl5KAr9h5BHLrQbNDcMZyYN8kCQqUDFKbZV+uP X-Received: by 2002:a25:c6c2:: with SMTP id k185mr25520379ybf.94.1591988607869; Fri, 12 Jun 2020 12:03:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591988607; cv=none; d=google.com; s=arc-20160816; b=xfEaDwr+Rp+h1rsw7v02RIa5PgoriULX82vjQGAHSvxWuuHWSTvjQyp45fH/MrITWL TPHPvXUeDVpl/DAOwLC33x0pfJXKSAJZtOv1AsEEzNrKhTsQ7GSsmz1+UXPZ7GPWCZET oZHjbXdvAs7Cdj3nkqETiWzZhbU3kQF5Bzo0p0XUY4ooyhd6OEFfuvkAszp4YFxH2j3c 2tXgWJEiJX48X5wrtbHvPdEH7RQ/ZqWBd52yuHoiwVHPxAzLfcCMbstfNqgFJ3d4z/lq PEd2VhJ2M2W45MOcVkqFCIsMWkvNPLz4GhMDBdwLZNXAHqwUGVfSJhJy3KFZvrfhYPdX q8CA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=OWM6z37V43sNWJfaIriZyMnMn9bapISVtQNxM8oRL7o=; b=tN1Gobc96kv19OkBWC5M0Z49smOIYshxZTAbiwUCcwQ63Mpyb1fV737WmI37P9lF3g wVtsWCwgkClVfFwxRivtL6AeuIgZZw1lpGhc1hcFOzd5sr9ByRrbNLSuVNvhyV3j2Xpw XOzyhE5FU0CLD7cGssz8FkIyZ705yLuYBfFXiL+v+LGBHOWhCR9Zyb+Mxfn1zCgx2ZM3 tKep/W0l/hl/Q6VooV3mOs5/AQcWpd3lBBCf89tlofyejFWwfoCi1cXmR/VStdpBW9+/ 1kmqnUbX1/uS0y8L8ZrhjXzp7AjOHwwR/hd4MQ8yWcMigQB1hYxhxkExaC2e0c0X7DLH 0Kdg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=ppZPh3k3; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id y189si5502656ybc.257.2020.06.12.12.03.27 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 12 Jun 2020 12:03:27 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=ppZPh3k3; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:41786 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jjoxb-0000qH-B1 for patch@linaro.org; Fri, 12 Jun 2020 15:03:27 -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) 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-Received: by 2002:a5d:628c:: with SMTP id k12mr16303446wru.211.1591988565304; Fri, 12 Jun 2020 12:02:45 -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) From: =?utf-8?q?Alex_Benn=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 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_Mathieu-Daud?= =?utf-8?b?w6k=?= , richard.henderson@linaro.org, f4bug@amsat.org, Markus Armbruster , =?utf-8?q?Alex_Benn=C3=A9e?= , cota@braap.org, Claudio Fontana , aurelien@aurel32.net Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Claudio Fontana Signed-off-by: Claudio Fontana Reviewed-by: Markus Armbruster Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé Signed-off-by: Alex Bennée Message-Id: <20200518160319.18861-3-cfontana@suse.de> --- Makefile | 6 ------ 1 file changed, 6 deletions(-) -- 2.20.1 diff --git a/Makefile b/Makefile index 9385c2e653b..57b83521b18 100644 --- a/Makefile +++ b/Makefile @@ -562,12 +562,6 @@ slirp/all: .git-submodule-status CC="$(CC)" AR="$(AR)" LD="$(LD)" RANLIB="$(RANLIB)" \ CFLAGS="$(QEMU_CFLAGS) $(CFLAGS)" LDFLAGS="$(QEMU_LDFLAGS)") -# 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) From patchwork Fri Jun 12 19:02:23 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 187862 Delivered-To: patch@linaro.org Received: by 2002:a92:cf06:0:0:0:0:0 with SMTP id c6csp665054ilo; Fri, 12 Jun 2020 12:07:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwlEp3ZsrTxfGr3z16n+p23g/h3Zo2JILPbWnWij5HA5o3+Ue5lukpcIWF41PAXDAdP9Zmk X-Received: by 2002:ac8:4104:: with SMTP id q4mr4724340qtl.67.1591988844075; Fri, 12 Jun 2020 12:07:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591988844; cv=none; d=google.com; s=arc-20160816; b=WKw16zGnqsejIuAGQgaCs3atKXatHem57VsoOaRY1O9gyvvwPXizj91owvV2LoNE6Z ZZk2gK90NegmoN6QRTc6fFb7irnkLxiPu0C6DI5UY4ymhvaTBCvh9wcdOMsJcPhDh8fB 0oixbWaqmqIw/VQRQmNPTIZJnj4UfvkymGl0SKTit4AGdfEV/sxs1G9Xbqww0ZtYlfGs 07ffondDDr8XYx/qs35OXnWg8H7QVx+iLcFPBC39fw6ZlWFp/JtopXNJBxKDCiUPCCd0 NO2fGFArF0Hny5S7CHcY7PPzTVPKauFALTLzhckrBUjEKvG1DXMZHUdBpZOnU0rIdXcU beVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=QbPd3c5nq0iqQGGp+VQI0AU24TYH55OhmLcysF1VGuo=; b=dcDC9TaaI//7vl1IxCFHVDW7PGjccnwOKi6+4w+j4bVo17YdExznUAGwwfqbhxqpfV jPL7s1pR1NYKQgZasIucioHa9elQZg/9TsifawZyjt17ZDLdHuj0U/HSQWQ009MD48j5 PYM/jSC/3DnIz6QAwh8XMhHUgfMF8ADlDTZ8xX5VZ5bX9ELSbGoD8EJJQCG6wj/eBidB 63Dio8wuFlehEIDTTqy9UIMUtCh4Noj0NXSlSmG+X3XkkW4Hr7YP7CjMf/Pkjx+Q54Rh 7AXaO74T15qfNW43TulnyYnU4oRMu04BW98ibWdmlpBlh2YNDv+tlvow/QlTIqKte0Vh IQuA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=g7Dioscg; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id y3si4955362qvl.196.2020.06.12.12.07.23 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 12 Jun 2020 12:07:24 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=g7Dioscg; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:58262 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jjp1P-0008Mv-GS for patch@linaro.org; Fri, 12 Jun 2020 15:07:23 -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) 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-Received: by 2002:a05:600c:4152:: with SMTP id h18mr332272wmm.189.1591988566352; Fri, 12 Jun 2020 12:02:46 -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) From: =?utf-8?q?Alex_Benn=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 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_Benn=C3=A9e?= , richard.henderson@linaro.org, f4bug@amsat.org, cota@braap.org, Stefan Hajnoczi , Lingfeng Yang , aurelien@aurel32.net Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" 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 annotated 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=clang-9 --cxx=clang++-9 --disable-werror' 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ée Signed-off-by: Alex Bennée Message-Id: <20200609200738.445-2-robert.foley@linaro.org> --- configure | 47 +++++++++++++++++++++++++++- util/coroutine-ucontext.c | 66 +++++++++++++++++++++++++++++++++------ 2 files changed, 103 insertions(+), 10 deletions(-) -- 2.20.1 diff --git a/configure b/configure index af5d7aa57a1..860f4c63647 100755 --- a/configure +++ b/configure @@ -395,6 +395,7 @@ gprof="no" debug_tcg="no" debug="no" sanitizers="no" +tsan="no" fortify_source="" strip_opt="yes" tcg_interpreter="no" @@ -1150,6 +1151,10 @@ for opt do ;; --disable-sanitizers) sanitizers="no" ;; + --enable-tsan) tsan="yes" + ;; + --disable-tsan) tsan="no" + ;; --enable-sparse) sparse="yes" ;; --disable-sparse) sparse="no" @@ -1754,6 +1759,7 @@ Advanced options (experts only): --with-pkgversion=VERS use specified string as sub-version of the package --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" = "yes" ; then fi fi +# Thread sanitizer is, for now, much noisier than the other sanitizers; +# keep it separate until that is not the case. +if test "$tsan" = "yes" && test "$sanitizers" = "yes"; then + error_exit "TSAN is not supported with other sanitiziers." +fi +have_tsan=no +have_tsan_iface_fiber=no +if test "$tsan" = "yes" ; then + write_c_skeleton + if compile_prog "$CPU_CFLAGS -Werror -fsanitize=thread" "" ; then + have_tsan=yes + fi + cat > $TMPC << EOF +#include +int main(void) { + __tsan_create_fiber(0); + return 0; +} +EOF + if compile_prog "$CPU_CFLAGS -Werror -fsanitize=thread" "" ; then + have_tsan_iface_fiber=yes + fi +fi + ########################################## # check for libpmem @@ -6296,6 +6326,16 @@ if test "$have_asan" = "yes"; then "Without code annotation, the report may be inferior." fi fi +if test "$have_tsan" = "yes" ; then + if test "$have_tsan_iface_fiber" = "yes" ; then + QEMU_CFLAGS="-fsanitize=thread $QEMU_CFLAGS" + QEMU_LDFLAGS="-fsanitize=thread $QEMU_LDFLAGS" + else + error_exit "Cannot enable TSAN due to missing fiber annotation interface." + fi +elif test "$tsan" = "yes" ; then + error_exit "Cannot enable TSAN due to missing sanitize thread interface." +fi if test "$have_ubsan" = "yes"; then QEMU_CFLAGS="-fsanitize=undefined $QEMU_CFLAGS" QEMU_LDFLAGS="-fsanitize=undefined $QEMU_LDFLAGS" @@ -6331,7 +6371,8 @@ if test "$werror" = "yes"; then QEMU_CFLAGS="-Werror $QEMU_CFLAGS" fi -if test "$solaris" = "no" ; then +# Exclude --warn-common with TSan to suppress warnings from the TSan libraries. +if test "$solaris" = "no" && test "$tsan" = "no"; then if $ld --version 2>/dev/null | grep "GNU ld" >/dev/null 2>/dev/null ; then QEMU_LDFLAGS="-Wl,--warn-common $QEMU_LDFLAGS" fi @@ -7385,6 +7426,10 @@ if test "$have_asan_iface_fiber" = "yes" ; then echo "CONFIG_ASAN_IFACE_FIBER=y" >> $config_host_mak fi +if test "$have_tsan" = "yes" && test "$have_tsan_iface_fiber" = "yes" ; then + echo "CONFIG_TSAN=y" >> $config_host_mak +fi + if test "$has_environ" = "yes" ; then echo "CONFIG_HAS_ENVIRON=y" >> $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 +#ifdef CONFIG_TSAN +#include +#endif + typedef struct { Coroutine base; void *stack; size_t stack_size; sigjmp_buf env; + 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]; }; -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 = __tsan_create_fiber(0); /* flags: sync on switch */ + co->tsan_caller_fiber = __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 = size_old; } #endif +#ifdef CONFIG_TSAN + if (fake_stack_save) { + __tsan_release(fake_stack_save); + __tsan_switch_to_fiber(fake_stack_save, 0); /* 0=synchronize */ + } +#endif } -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 == COROUTINE_TERMINATE ? NULL : fake_stack_save, + bottom, size); +#endif +#ifdef CONFIG_TSAN + void *curr_fiber = + __tsan_get_current_fiber(); + __tsan_acquire(curr_fiber); + + *fake_stack_save = curr_fiber; + __tsan_switch_to_fiber(new_fiber, 0); /* 0=synchronize */ #endif } @@ -104,8 +139,12 @@ static void coroutine_trampoline(int i0, int i1) /* 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); } @@ -154,12 +193,16 @@ Coroutine *qemu_coroutine_new(void) arg.p = co; + on_new_fiber(co); makecontext(&uc, (void (*)(void))coroutine_trampoline, 2, arg.i[0], arg.i[1]); /* 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); } @@ -216,8 +259,8 @@ qemu_coroutine_switch(Coroutine *from_, Coroutine *to_, ret = sigsetjmp(from->env, 0); if (ret == 0) { - start_switch_fiber(action == COROUTINE_TERMINATE ? - NULL : &fake_stack_save, to->stack, to->stack_size); + start_switch_fiber(action, &fake_stack_save, + to->stack, to->stack_size, to->tsan_co_fiber); siglongjmp(to->env, action); } @@ -231,6 +274,11 @@ Coroutine *qemu_coroutine_self(void) if (!current) { current = &leader.base; } +#ifdef CONFIG_TSAN + if (!leader.tsan_co_fiber) { + leader.tsan_co_fiber = __tsan_get_current_fiber(); + } +#endif return current; } From patchwork Fri Jun 12 19:02:24 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 187858 Delivered-To: patch@linaro.org Received: by 2002:a92:cf06:0:0:0:0:0 with SMTP id c6csp662495ilo; Fri, 12 Jun 2020 12:04:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzcSkMI6diSYioJpCP1JbVgMr3dmOTaqLtXP0SwPWFy0buo3MqP0SM1Nk5rS7KALMZP95Ig X-Received: by 2002:a25:8b12:: with SMTP id i18mr18999537ybl.377.1591988653520; Fri, 12 Jun 2020 12:04:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591988653; cv=none; d=google.com; s=arc-20160816; b=lFZzFnkMDGID9O5xAYZ1XRljZm6ujZVdQB1+N/8BwTxhOLPh7ReM73kyXFFCkJQKUj cCjyt/XEtt5U1lryik2nkeErVxApwprUwX0vYzSL//ViItiPhbzCqJ5XVCy4+xk6BDb7 98RmrCc6uol6j3YPa0wuiwRAUwOTX5FqUD4M5YPFlnOWi2uxa3gXIOFh0Vsmui/pyr0s xU7sRwurpgtefuCR3yV5iRjQXm5NwiNRn8IlTC5srG7pBOh2Ag7Du4TqPnZcKbdH+8PA R4wb5YdCIm9vSJcJ53T4zqGkGnMptN/DvrrtBzvb5dke5oezBq9QV899bLdJOQNNCa1b Ac4w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=wyd2lV6dHVaHmALDhpJ+ImxFwC2VFtV6fvWZJjaxR+k=; b=J59L9flv59h2CVHjiq6XWNanBNp2ImpH6NFyB4d1+4tzunGXI2pXUXuW8UWSPjhrVK 7dNgSrThVhJQDLO7I0SkAk3Z9ymW6TNHyt805Jd/f8Z3FCN+RV7XgLlF8bKPFi+zBSyE nKXtaHQsG4M4ePXyN2lYbh8e7mI67gVJJIfYUH6ZKTfkhVs9DpJNu0OKIgufbR6Uy1Bm 6K87/1rn0oTpnQcawLlhRTgWCEaiMhsFHveMiXFVdZXoRe8QUT2IDGEJg2bLTM2oPUZq vIcOHO9h+Y2SYh8bsk1yBZmG5PGE2VWs4OG83G+pRgQlPt5htzSWphBm+RpkPa2m3s/d Pl6A== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=Zm9mPVG8; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id n4si6101285ybn.165.2020.06.12.12.04.13 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 12 Jun 2020 12:04:13 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=Zm9mPVG8; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:41858 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jjoyK-0000tT-QA for patch@linaro.org; Fri, 12 Jun 2020 15:04:12 -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) 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-Received: by 2002:adf:a51a:: with SMTP id i26mr16015377wrb.406.1591988568145; Fri, 12 Jun 2020 12:02:48 -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) From: =?utf-8?q?Alex_Benn=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 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_Benn=C3=A9e?= , richard.henderson@linaro.org, f4bug@amsat.org, Eduardo Habkost , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , cota@braap.org, Paolo Bonzini , aurelien@aurel32.net, Richard Henderson Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" 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ée Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Emilio G. Cota Signed-off-by: Robert Foley Signed-off-by: Alex Bennée 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(-) -- 2.20.1 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 changes * to @trace_dstate). * @trace_dstate: Dynamic tracing state of events for this vCPU (bitmask). @@ -376,7 +376,7 @@ struct CPUState { sigjmp_buf jmp_env; QemuMutex work_mutex; - struct qemu_work_item *queued_work_first, *queued_work_last; + QSIMPLEQ_HEAD(, qemu_work_item) work_list; 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) } 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 == NULL) { - cpu->queued_work_first = wi; - } else { - cpu->queued_work_last->next = wi; - } - cpu->queued_work_last = wi; - wi->next = NULL; + QSIMPLEQ_INSERT_TAIL(&cpu->work_list, wi, node); wi->done = false; qemu_mutex_unlock(&cpu->work_mutex); @@ -306,17 +300,14 @@ void process_queued_cpu_work(CPUState *cpu) { struct qemu_work_item *wi; - if (cpu->queued_work_first == 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 != NULL) { - wi = cpu->queued_work_first; - cpu->queued_work_first = wi->next; - if (!cpu->queued_work_first) { - cpu->queued_work_last = NULL; - } + while (!QSIMPLEQ_EMPTY(&cpu->work_list)) { + wi = 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 deadlock: 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(); } +static inline bool cpu_work_list_empty(CPUState *cpu) +{ + bool ret; + + qemu_mutex_lock(&cpu->work_mutex); + ret = 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 = first_cpu; } - while (cpu && !cpu->queued_work_first && !cpu->exit_request) { + while (cpu && cpu_work_list_empty(cpu) && !cpu->exit_request) { atomic_mb_set(&tcg_current_rr_cpu, cpu); current_cpu = 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 = 1; qemu_mutex_init(&cpu->work_mutex); + QSIMPLEQ_INIT(&cpu->work_list); QTAILQ_INIT(&cpu->breakpoints); QTAILQ_INIT(&cpu->watchpoints); From patchwork Fri Jun 12 19:02:25 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 187865 Delivered-To: patch@linaro.org Received: by 2002:a92:cf06:0:0:0:0:0 with SMTP id c6csp666026ilo; Fri, 12 Jun 2020 12:08:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwVXT6eIXjjYAy1EF8osor4d911DJ2yhisNjnLDpV/sPbM+a3F5aMWtlZPPPmoaKBxcQjtg X-Received: by 2002:a25:af93:: with SMTP id g19mr27316800ybh.109.1591988922051; Fri, 12 Jun 2020 12:08:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591988922; cv=none; d=google.com; s=arc-20160816; b=V5OIFVB8oomH9VLYyTx4/MXwmgZjLoLe4oCcaHkgiraTvh/AfycfFMsTqKw411hBLa ESEBbJYxTVrz4v9T5IRmtIVbwTKne2qWE8YyWLY9/xL1ylcGZAD4vWG13BbI1ek0wiun LxgXlfU9TwD3fvUV0W29FcbECW/E5XqySSWraJBsKf32E1AH6s8lAFCuPmZ3NLmzb5UM AQxeEn0qjh8rTVLpmGWabguVUKPt94+jOuWu3GzYljJap1V//RCWfGWo70C3DuJd5Git nqk3y8mT+6u2gojyYkRc3Rt8xN/eGEUfc1Mm1XtnzlYqw2q6PFhDWB7Z6cu9n5gzheUb f/lw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=PjFzq8wR0LQu6X1N3b1WhVVhSNxDn3nhVeh4fkyxF4o=; b=kM69AbxBOIgjHE0F4vG/ni/ve2e6LWW2a8x687MwOiZAQ64uk0J53YZ/p8MIAOhtv/ oun66oaUJZCl1Yl0Z09FCl/NRBaEH1kZ3wsdkvOmOiHmI7g+3CWATkpx5ppAlrEQQOQk kZiZX/XXC+VEqe1JSQR9J33k27RM6BAZ9t1luO3Yixpu5DJOlgQbHGgItyRWDnvTloNy 6pS3QKCdZD1pVf5x6vM23lQwyWGT16kuMAZ1vu4iiz0J0Etwk1igZMSxXT1lqHtQRN4R sJ/BkEPbT0K8OJdzeC0anhUdeqxbNSOitaq8Y9jPdB7dGvxJGRKv4OYLbGFoRw7fyzxx n9jA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=NIOR2d17; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id e129si6033938ybf.359.2020.06.12.12.08.41 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 12 Jun 2020 12:08:42 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=NIOR2d17; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:35154 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jjp2f-0002EV-IQ for patch@linaro.org; Fri, 12 Jun 2020 15:08:41 -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) 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-Received: by 2002:a1c:6a01:: with SMTP id f1mr364189wmc.52.1591988569992; Fri, 12 Jun 2020 12:02:49 -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) From: =?utf-8?q?Alex_Benn=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 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_Benn=C3=A9e?= , richard.henderson@linaro.org, f4bug@amsat.org, cota@braap.org, aurelien@aurel32.net Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" 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ée Signed-off-by: Alex Bennée Message-Id: <20200609200738.445-4-robert.foley@linaro.org> --- include/qemu/thread.h | 3 +++ 1 file changed, 3 insertions(+) -- 2.20.1 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); } +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))) { From patchwork Fri Jun 12 19:02:26 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 187869 Delivered-To: patch@linaro.org Received: by 2002:a92:cf06:0:0:0:0:0 with SMTP id c6csp668354ilo; Fri, 12 Jun 2020 12:11:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxQDgS91N0+xcwpyBPvNX4FJU7brOTJX6MM73WuP5/RfmD0CAXSXSGhoCH0YgS7xUubVi7B X-Received: by 2002:a37:494c:: with SMTP id w73mr4312067qka.27.1591989106621; Fri, 12 Jun 2020 12:11:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591989106; cv=none; d=google.com; s=arc-20160816; b=0oYCwsjL+bKMKYTHPAagUP6HfyDLRbPtcXrUxk3ehgTUPTM9chLJ5qk3r87/GIWKWV CfpY9BHwdM6JSxIePE4PZm2s1NFvByd86g2BOrkK7gFPfGzJfANvaDNyHEto99KBev2X SI45wF6lp8s6JRlC/UISVCo4iTrweg7FlFMqAqjLZLdt4rG0O4M7ExXo0SLZRV9HHROn gZ+VtciSa8mPH5bGI+JYHwUQeu8Uln/Apsa+8Wi3CuOn7AId3fa+13+5vrbECTgeJ9Fw EgRdrotxdYop9mdiyJf0gxMmwFCq9RtUewp2L5+IB17J4JsY89xa2fZvbkR6sQZWSGRC K8rg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=P8SWRQjM/hyOQzCww/NtPUfXAjDnTeW6mt1PLc5HvvU=; b=Q449Bf6R78Ktjn1m8/r+6WlfYVZD0lUSZpsW+/KvHzRgsXlmeZXm/KvKI/wu4tALbq ONbkl10wRq4SjMeC7AbpCIeTDPEfyeMptHfDJFCWuSUvfHO/e0JQvpYUueFfb+KRlEwq OiHnFBlvYTgkleqFZ7E8H6SPcG3PJjM0XnubDbQHWV7YHiu1NnHVgY77kLGcmq4Xa5sl bER8DfM8wLniGs9mHCFq7nZ1AhqtrtbS3C1ubf5DOdRTGkJHXIcWJ9lj3C3NtERyicVF hdnz6mO9bn/N2w+QdcpODQyyt5niL1V8wL0Auho2rhLTaFLFcTntAEvpW7YZjQIXW5p5 FPgw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=d4eEGV7b; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id m52si4351221qtm.10.2020.06.12.12.11.46 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 12 Jun 2020 12:11:46 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=d4eEGV7b; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:47448 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jjp5e-0008Mf-1P for patch@linaro.org; Fri, 12 Jun 2020 15:11:46 -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) 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-Received: by 2002:a5d:4385:: with SMTP id i5mr16069155wrq.420.1591988572195; Fri, 12 Jun 2020 12:02:52 -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) From: =?utf-8?q?Alex_Benn=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 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_Benn=C3=A9e?= , richard.henderson@linaro.org, f4bug@amsat.org, cota@braap.org, Paolo Bonzini , aurelien@aurel32.net, Richard Henderson Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" 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ée Signed-off-by: Alex Bennée 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(+) -- 2.20.1 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) } } +void tlb_destroy(CPUState *cpu) +{ + CPUArchState *env = cpu->env_ptr; + int i; + + qemu_spin_destroy(&env_tlb(env)->c.lock); + for (i = 0; i < NB_MMU_MODES; i++) { + CPUTLBDesc *desc = &env_tlb(env)->d[i]; + CPUTLBDescFast *fast = &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 = CPU_GET_CLASS(cpu); + tlb_destroy(cpu); cpu_list_remove(cpu); if (cc->vmsd != NULL) { From patchwork Fri Jun 12 19:02:27 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 187867 Delivered-To: patch@linaro.org Received: by 2002:a92:cf06:0:0:0:0:0 with SMTP id c6csp667160ilo; Fri, 12 Jun 2020 12:10:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyAjNtvgJ6wUAiYa35LFvkj7hja2ikL1Sdk0K70R8ZRPuXz9NpIQhpL/mhdDDx/leJ2EF0w X-Received: by 2002:a25:56:: with SMTP id 83mr25975027yba.149.1591989009871; Fri, 12 Jun 2020 12:10:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591989009; cv=none; d=google.com; s=arc-20160816; b=E++8wOCbj6JKUKeBefpVl5HvuKeRpW8sF1PHKKolqYV0uKeekj3N5RVcn8Ym8yantP GBWYitbsPfRbyPkOj6Fz20hTwYasYsT5bRk05DaI/FpR8MmYSRcBOI7ZBt7/evtv+36V IidnCPu+u+J4Ku6gubn2vSQlQn6HDKhBJicx062jCSQzruHidrKvEI+R3Kzz5xvjL39S c3GxngHzfuJIio5z4jJMz9U68n0m1zAN8wfQs0pB0H6AQNNiU8Mzt3jdg2nUJJqEewOL Js4DyiO/i4zs/sHTmRX1oqOFEePbDPNu1JIhoix773odq8Njg5LlM4zdW2rTSEOpzgRi VeMw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=t1DzA5iDyLs/5vA/dSSrknurXA9OGsEodwES5eqKbfo=; b=rnH5EnbRkw1GNJ+Qa4QmaYzySXk5hZz9x2L1Uncgjdca7iypS+0kYfT03GoiEVXzhJ vRJKk/ozrMFtAYVszjnbnyFRGAGYoGK7vx4seqbGRObKeghDN9l7wcG2htcKOgJ5upTW qJctprvG/vDbFwBh46Zkz0Bxt8tEP5gEgQ7OzayzPPo/57xx/p06Jso5z1pAYAYwpLOB znczI044U4GwxpdefvwQGk1MWBTQ+DvluCzTvBQAqKZ+EvND+zz2SBLBz+f2cz02WDLA 4h7UYVybqfeouGmlQMmpwCvAEYvf1hz8TnQMAVMbiyDBDZmD1PgA2/aSNzLmOzJC3/AV C4ig== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=AvJlJwP0; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id u18si5762116ybu.365.2020.06.12.12.10.09 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 12 Jun 2020 12:10:09 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=AvJlJwP0; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:41500 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jjp45-0005H4-Ct for patch@linaro.org; Fri, 12 Jun 2020 15:10:09 -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) 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-Received: by 2002:a5d:4c4b:: with SMTP id n11mr15528607wrt.381.1591988573274; Fri, 12 Jun 2020 12:02:53 -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) From: =?utf-8?q?Alex_Benn=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 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_Benn=C3=A9e?= , richard.henderson@linaro.org, f4bug@amsat.org, cota@braap.org, aurelien@aurel32.net Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: "Emilio G. Cota" Signed-off-by: Robert Foley Reviewed-by: Alex Bennée Signed-off-by: Alex Bennée Message-Id: <20200609200738.445-6-robert.foley@linaro.org> --- util/qht.c | 1 + 1 file changed, 1 insertion(+) -- 2.20.1 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_bucket *head) struct qht_bucket *curr = head->next; struct qht_bucket *prev; + qemu_spin_destroy(&head->lock); while (curr) { prev = curr; curr = curr->next; From patchwork Fri Jun 12 19:02:28 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 187863 Delivered-To: patch@linaro.org Received: by 2002:a92:cf06:0:0:0:0:0 with SMTP id c6csp665748ilo; Fri, 12 Jun 2020 12:08:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw0C1Rzp48AFtPoe0tyxwnWXBXmpcoIDVn7pUOtp+YNB54IzlVq2dC/Hn0Dg60HX0RXCbZr X-Received: by 2002:a25:a12a:: with SMTP id z39mr21811805ybh.481.1591988899275; Fri, 12 Jun 2020 12:08:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591988899; cv=none; d=google.com; s=arc-20160816; b=o7l1pyl+RsWXVpUdeEa+cvKZHl2Idtp9mZ+yfwUrrqD+pbhcFNwZ8Tk310gB0ehAz6 iK43HpOlTeWUGpt2+Z8/tuOX5Qep2ZI40u8+UZ60Ixxbi4Gf12FP3SpmX97eLxVi8XTA R0ErLixUAnZirrQfReY4ujFXuSynIFqoeaDQEP4oDTHrGym4CCfoASFxDxOtqVO8JyxP aoqEWTYeZuLsyRy9+YL/93gnuOUeY3ot5Ya3F/c61toQmi2RduhXna1oqziUrOxyNOL5 cygmOf2m4/aqHQdrUwJbSRjB7YY4pttFllswr6dPh/2T3p5DfpvYdVh5N0cglAB/Eglu RCgw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=57l/aMK2332ZDMnrCc3giHMMSaLKEjqCHI6rtSAmCoo=; b=MJMbgiL2BdiFhkdHcewXOqkBPwyR4gG8NyRNj9xc7obqOnaQV9wla4WT24JShvopWz RIdr2pUIu1CFPTdBN9KcutueHUcebghjGLI2qoOYwzXGBzQY6CmE6ZBm7DfjZ0cOjFOo E+zbkPVqhJAMZ+xsh2jQZFiN1T/jcbafnOG/KeZcfHh93OHjkc2eYrAJmwkF/tTkxngv ExMKkTIWdvVuHaM2O7P7rmJ6t0sHMHL+yMPtJBuQgAWcowDmRmDtzNDUspyHO8xyCyuU rnVijfv5qBi3CHV8HvtW8NCKh2HjGfCpQcT8EjWtQbqVTudkZplE8KxzJ/sjArFvnPie Xklg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=jlCKW9js; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id a9si5903653ybo.146.2020.06.12.12.08.19 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 12 Jun 2020 12:08:19 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=jlCKW9js; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:60454 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jjp2I-0000p6-Os for patch@linaro.org; Fri, 12 Jun 2020 15:08:18 -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) 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-Received: by 2002:a7b:cd06:: with SMTP id f6mr379029wmj.8.1591988579061; 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) From: =?utf-8?q?Alex_Benn=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 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_Benn=C3=A9e?= , richard.henderson@linaro.org, f4bug@amsat.org, cota@braap.org, Paolo Bonzini , aurelien@aurel32.net, Richard Henderson Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: "Emilio G. Cota" Signed-off-by: Emilio G. Cota Signed-off-by: Robert Foley Signed-off-by: Alex Bennée [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(+) -- 2.20.1 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); void tcg_region_init(void); +void tb_destroy(TranslationBlock *tb); void tcg_region_reset_all(void); 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, TranslationBlock *tb, return 0; } +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 = true; } @@ -1886,6 +1892,7 @@ TranslationBlock *tb_gen_code(CPUState *cpu, orig_aligned -= 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 retaddr) tb_phys_invalidate(tb->orig_tb, -1); } tcg_tb_remove(tb); + tb_destroy(tb); } /* TODO: If env->pc != 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; } +static gboolean tcg_region_tree_traverse(gpointer k, gpointer v, gpointer data) +{ + TranslationBlock *tb = 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 = 0; i < region.n; i++) { struct tcg_region_tree *rt = region_trees + i * tree_size; + 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); From patchwork Fri Jun 12 19:02:29 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 187861 Delivered-To: patch@linaro.org Received: by 2002:a92:cf06:0:0:0:0:0 with SMTP id c6csp664733ilo; Fri, 12 Jun 2020 12:06:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy5VO0SotdQyow90y36Txy80rzwecgLQPoIhV959OqtQpQJQGX9UoVrz5rD4lf4l+rL7+td X-Received: by 2002:a37:a8c1:: with SMTP id r184mr4420913qke.402.1591988818474; Fri, 12 Jun 2020 12:06:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591988818; cv=none; d=google.com; s=arc-20160816; b=JmvwbkRnmIPlaupHc7/dDIuhpvIxhlifrVtKlTFajZ2zi+mn7qKjGG/Rb2vLlgou2z Um50SCCPXWjLgkR2PlpBaJw6i8jmRRq3+scchZwlxAs7q6OuMJKxm4vUoTTveS+qq8Ea uP8kZp5bW4V4NUGL5QEDDhwvtmIFC4nYXJDsFKe8O23w9l9Q4fPPJNu+gReFRtJi60sD adX2NMUiYhldLLHj63gmipR6zMSS9rLILro2EX6bBgJN0heSu65UCDptQIFcpE3kbRYx HUhUnnEIHcRcbDUouD+5R7QGjeXn/ZFm4x0F51YwxVtvyd4cjazL2w5ugEbbYBVUJ/sS C6UQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=wncxlPgJ5yWTGynznYgamvSG3vnXu4D4fFkpbE/UPyQ=; b=PEfRFzNvOZAGVFApRA5+3D6ye/KxuUOPznMGB7Uvrl3aXqU361sv41AclkEljw4s2N yWmMwS16lVLvcmM6Az8w2MYG0J7z9CFgYqjO5YbzVxy4iqSfXqJ1bwKQGxkyYkEyLeNv zcMDyqYMgy2dHE9+qM1zs7dAVp8NyURytaM4sfFlU+HBdYJPGH3o2L2qaLjGo2QaPezg p3nwektFfI11nKslbxZP8i7DrRsBcRjuhUv/yo5RtNnVLhyQCBrEUOmFLd77hy6OiehM iEAkieZFtn0g2vgquxmAfE8BNf7fqI7m4hdomgR1RS0dQbMfWgQIHA9YecUdFz9w4y78 TZNw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=nZpMozKF; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id bn1si3995978qvb.14.2020.06.12.12.06.58 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 12 Jun 2020 12:06:58 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=nZpMozKF; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:53400 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jjp0z-0005z9-Nu for patch@linaro.org; Fri, 12 Jun 2020 15:06:57 -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) 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-Received: by 2002:a05:600c:1403:: with SMTP id g3mr344714wmi.136.1591988575687; Fri, 12 Jun 2020 12:02:55 -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) From: =?utf-8?q?Alex_Benn=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 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_Benn=C3=A9e?= , richard.henderson@linaro.org, f4bug@amsat.org, cota@braap.org, Paolo Bonzini , aurelien@aurel32.net, Richard Henderson Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" 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ée Signed-off-by: Alex Bennée Message-Id: <20200609200738.445-8-robert.foley@linaro.org> --- accel/tcg/translate-all.c | 9 +++++++++ 1 file changed, 9 insertions(+) -- 2.20.1 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 = atomic_cmpxchg(lp, NULL, pd); if (unlikely(existing)) { +#ifndef CONFIG_USER_ONLY + { + int i; + + for (i = 0; i < V_L2_SIZE; i++) { + qemu_spin_destroy(&pd[i].lock); + } + } +#endif g_free(pd); pd = existing; } From patchwork Fri Jun 12 19:02:30 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 187871 Delivered-To: patch@linaro.org Received: by 2002:a92:cf06:0:0:0:0:0 with SMTP id c6csp669614ilo; Fri, 12 Jun 2020 12:13:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzqcH/z3RaYjNVSbh360a4zjy7AS+v3lzTYUAL1hBzwhNapQAfNMYosj/Y5SnQzCTuphTMQ X-Received: by 2002:a25:2a0b:: with SMTP id q11mr24190409ybq.495.1591989218781; Fri, 12 Jun 2020 12:13:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591989218; cv=none; d=google.com; s=arc-20160816; b=ARjIjTaZuc7f9nYn3eoEBG5TRWKR2i8aB69D0MvZMwTv8labbfv7qh6sIAt/RxNUuU tCN6expBcpZL+GMSYPO38Hwe/1lZDnWAkf0/m5AnY1ADWeNm7NbYyOvisRoI8jbnDrmg RYc7m34D8fMwWKiEN6wUpv7EsbVDa79ud50CH04Pc6hOucVtXENPPp67FscS+aziGncd gtSbsLYyfRRIQ1FnOcp1IUwGUJ2T2cR068ZgAEJvPQ9D+wSaY5Pnlbj4GX7QidkJfNaQ sWvJDBdr0fB1s3G6y99yzJPzBhRFk5cZ3GONCLw3Oyh80+CCqd38wBPnqemdPi7x+GNU h0pQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=xHHjjaudmjL3/NPzgw9p99IfJr3tJhoDfzqQ+U0Pj+w=; b=DMuBbHwVmnQS1mhRk7DfFMCNrHcNv9o8r1hTCd1apbeiSpozIVZf0qhq8VcbZN8PzL pKPO2Hfhj4vEdeOevWq2TNcLem6AFxpkcg29P2LN4xVzYw5s2KsF1AQ/EgKUiBCNSfh3 qM+aKrneUqM11aK2zqPpX6LIuVRpJFHEInYU/RJmkcVLzjhiJial8mtJ5j6kElt9RC4l DtWFlzlt9m4zGU/D13abbsrFLlNF+cNe9gXd2XLxu7oh/Sq0GGf/10mJLLehy2Bqv7+k jDJVZNK8mQaMHAwVbP/aoydWMkXckrbSS8HayKNaqgghf+cYfG1wCAmdkk8aprmnTp9g hbnQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=nJooRcTo; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id f1si5884316ybn.485.2020.06.12.12.13.38 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 12 Jun 2020 12:13:38 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=nJooRcTo; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:51736 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jjp7S-0002BQ-Ao for patch@linaro.org; Fri, 12 Jun 2020 15:13:38 -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) 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-Received: by 2002:a7b:c5d5:: with SMTP id n21mr364233wmk.106.1591988578082; 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) From: =?utf-8?q?Alex_Benn=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 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_Benn=C3=A9e?= , richard.henderson@linaro.org, f4bug@amsat.org, cota@braap.org, aurelien@aurel32.net Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: "Emilio G. Cota" Signed-off-by: Emilio G. Cota Signed-off-by: Robert Foley Reviewed-by: Alex Bennée Signed-off-by: Alex Bennée Message-Id: <20200609200738.445-9-robert.foley@linaro.org> --- include/qemu/thread.h | 39 ++++++++++++++++++++++++++++++++++++--- 1 file changed, 36 insertions(+), 3 deletions(-) -- 2.20.1 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); +#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 } -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 +} 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 } 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 = __sync_lock_test_and_set(&spin->value, true); +#ifdef CONFIG_TSAN + unsigned flags = __tsan_mutex_try_lock; + flags |= busy ? __tsan_mutex_try_lock_failed : 0; + __tsan_mutex_post_lock(spin, flags, 0); +#endif + return busy; } static inline bool qemu_spin_locked(QemuSpin *spin) @@ -239,7 +266,13 @@ static inline bool qemu_spin_locked(QemuSpin *spin) 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 } struct QemuLockCnt { From patchwork Fri Jun 12 19:02:31 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 187860 Delivered-To: patch@linaro.org Received: by 2002:a92:cf06:0:0:0:0:0 with SMTP id c6csp663883ilo; Fri, 12 Jun 2020 12:05:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwpwWJbk+Hws3LFMEBR9IvvgEWiXRyf0oQDp/aZvPhwuwhA7dBXUYOjYMwVz0jPSXfxFwQx X-Received: by 2002:a25:bf8f:: with SMTP id l15mr21941455ybk.453.1591988756783; Fri, 12 Jun 2020 12:05:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591988756; cv=none; d=google.com; s=arc-20160816; b=bfbYnN6ug8AIqZZMSp0JQ3+navI5fFjRPIJyIOivRBv/YylMkddwWde5wfuPYuOyyU 5woHRgViLYEmjtuJMoXsWJs7a5Aw+XTkOFj7dGsuVv4meyVIe6phs255YkzZcMN2q52P Az4RaMFlmg7PnFGKivKtALhbXsSoFWpx22M6+r0N6v6RO9OXw/XcZf1yBL6FwWv2giJ+ YR9SlNqwjvnKKsLgCxnNJlYuN/fpanqviZHsyeaKj3sc+Mcem9Unco03b6kVewsO6XVw M3gsNXWMwf8rWSeYHrzdsf4gUVKr2gn42Kgmd552lwK2wuGg544SAu0dq41f1LBZBJfq 5kQg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=+fhzkIekd9HvnT+zTrzjSgSzaU+uY2T8F/QfwK7CaNs=; b=PIBH52qnbWXSBv78KXYZRkrnoMAlR1fg9nHAtzzaJjHmo9uLL7ffmNGI09JpNCSnLj JhFPcDd6N62u3QO9sd8xBxkbi6IeRhFSe7Thcaf+0vRg8ZlQEY6/8C1B0RKXwy7o3txK HUVQHAb7aoDm5fglTHXQPk5tis3c57Mfm4hY4yaO6Afl06ooQMAS5ZNMs0mjBRkcRNxe pvcYA/38XjTjYG6ii3Lqfd9g08oi+vztBharIn20CWNobmbSOhKIaHWCjE8J+6iWmTGb uKB792+mPCdYq0Btr3qAATGjfC4iOQ/0Df0N53hPlkGYpVa7yNMwfeZcprsM3EKY1L5R ia/A== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=iYv3bZyw; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id v88si5831403ybi.197.2020.06.12.12.05.56 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 12 Jun 2020 12:05:56 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=iYv3bZyw; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:50260 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jjp00-0004hj-6J for patch@linaro.org; Fri, 12 Jun 2020 15:05:56 -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) 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-Received: by 2002:adf:f812:: with SMTP id s18mr15692418wrp.28.1591988576758; Fri, 12 Jun 2020 12:02:56 -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) From: =?utf-8?q?Alex_Benn=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 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_Mathieu-Da?= =?utf-8?q?ud=C3=A9?= , richard.henderson@linaro.org, f4bug@amsat.org, =?utf-8?q?Alex_Benn?= =?utf-8?b?w6ll?= , cota@braap.org, aurelien@aurel32.net Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" 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=1 Also added the TSAN suppresion file to disable certain cases of TSAN warnings. Cc: Fam Zheng Cc: Philippe Mathieu-Daudé Signed-off-by: Robert Foley Reviewed-by: Alex Bennée Signed-off-by: Alex Bennée 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 -- 2.20.1 diff --git a/tests/docker/dockerfiles/ubuntu2004.docker b/tests/docker/dockerfiles/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=noninteractive 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/include/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="/tmp/qemu-test/build/tsan" + mkdir -p $tsan_log_dir > /dev/null || true + EXTRA_CONFIGURE_OPTS="${EXTRA_CONFIGURE_OPTS} --enable-tsan \ + --cc=clang-10 --cxx=clang++-10 \ + --disable-werror --extra-cflags=-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=66 below. + tsan_opts="suppressions=/tmp/qemu-test/src/tests/tsan/suppressions.tsan\ + detect_deadlocks=false history_size=7\ + halt_on_error=0 exitcode=0 verbose=5\ + log_path=$tsan_log_dir/tsan_warning" + export TSAN_OPTIONS="$tsan_opts" +} + +cd "$BUILD_DIR" + +TARGET_LIST=${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=-fsanitize-blacklist=/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 From patchwork Fri Jun 12 19:02:32 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 187864 Delivered-To: patch@linaro.org Received: by 2002:a92:cf06:0:0:0:0:0 with SMTP id c6csp665945ilo; Fri, 12 Jun 2020 12:08:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxH7XhCfRfW9pQumPN9wxL/Vthne9+8W6jH1wCN5Ikby7DC0Zc/GU9m7GrXkyvwHyX4pC3Y X-Received: by 2002:a25:61d3:: with SMTP id v202mr26522909ybb.457.1591988913775; Fri, 12 Jun 2020 12:08:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591988913; cv=none; d=google.com; s=arc-20160816; b=rWjn+yYgQYqmbf85MAV057+p1sSuOChBTV0cZDQhVBf3OeU3OOMPNtW+ZZcmOFpV6V etnnhBom1LgrJ/O75rytNPWI/WlVvZ7MhSSqpYd3RRIxwaoT4A6ihAJp7bC2zQEXS5Po tYgOE5EC4r8Tgu+/lske64dibEP6cFjjYQzV6l8zZuU9gOCUA+Nc6qxQost4YlS153iT 3tUWgcJX9z54v3G7IbiDeqzSI2/61UjbjPIEoq9eipsYAEl0zWt7DX/Mn1INgKiMX7wB LZonbLGuLuZet2edlFFtuMwZ6zBOjFW16SGQ7jp6XUUy8Pp3BmVK34Fg+WBBrm5RM5Ka crRg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=pOTNVC0J3mJ6YGdmpXPCtwPf6rnAZM/12o6pgw/fmt0=; b=anyhhSr26sbPyu7CyjkcD3gBgVPk28pdL4RNqaUz05OE3PYqmAgs0/JAR6GSbPP9AY SBkjbi16xes+Hxga5j5945KphM3W5jbAO7aMGqTyTjvXmWg663AVJxCHvsQGM1PEOVCH Kt7B2h5fTw/0MHI7ntGHLTjemAdVJ/1kIkeTpzt/rsGDfVI4B2IgTutpkGYvdGQlk788 ik7Ioi6w5qkM49B+Pjt8S82MzBodL3NSTmIFVsIDDbXMcw01su4VWaTqvnpHhUjdjJef RilA30Nyn00iEMzaqXIRsMSssFgd13lKxL/9zOkhRxLJRInbZl+m/gAjH2RJlakuoqlP Putw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=HIeWdS5N; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id k12si8906929ybt.3.2020.06.12.12.08.33 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 12 Jun 2020 12:08:33 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=HIeWdS5N; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:34396 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jjp2X-0001vX-7n for patch@linaro.org; Fri, 12 Jun 2020 15:08:33 -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) 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-Received: by 2002:adf:eec2:: with SMTP id a2mr15690114wrp.136.1591988892483; Fri, 12 Jun 2020 12:08:12 -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) From: =?utf-8?q?Alex_Benn=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 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_Benn=C3=A9e?= , richard.henderson@linaro.org, f4bug@amsat.org, cota@braap.org, aurelien@aurel32.net Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" 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ée Signed-off-by: Alex Bennée 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 -- 2.20.1 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 later. + * 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 READS. + * This has the effect of disabling race detection for this section of code. + */ +#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 From patchwork Fri Jun 12 19:02:33 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 187873 Delivered-To: patch@linaro.org Received: by 2002:a92:cf06:0:0:0:0:0 with SMTP id c6csp670538ilo; Fri, 12 Jun 2020 12:14:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw0kHcQbkovuVEebu6+h3IVjOF+uA+KyT7hDLH/MZF9Wv/h55VOV9kZwX4HERPbfs6IfIrl X-Received: by 2002:a25:6606:: with SMTP id a6mr23470226ybc.448.1591989299711; Fri, 12 Jun 2020 12:14:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591989299; cv=none; d=google.com; s=arc-20160816; b=w28QtjNVPT3wM3NS5m/xKpEKXl+7MvII3JILaup0FTR9vg0jD2WsGjuVDGqgLi6flq qgcMAbmmOVOnl0lSS6vC56CKGwKGTIF5Ft81JVYLVDCmBjRVzU2kL5Emhnz4A393YMyn q4AuhtRNsLIeiN3g0RRK04ylz8n/5AkbLBLalOYois1ZRsrjIv96Ckkmt7rMea9TD3Qw dDp8WhmLW/izvzBobCLLiqYBfr3D5wKPneddQNG8tt+i14iHgQasNY5L4L2lIkzCtfPB IiXN/gUyiBgCOVB5mPhVCVjg6hds+1PmDjO/UkB3Cc7uOEPhasMvInKBfz9mRIzw/Y0x 5Lxw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=TVkmiGx2GSH0speASlWaGVuivqVtJrK614sZoAezQaY=; b=nLX5u/GA6/85007x7l19sHiiJBuPW4G+rrnqOrlgw9jM1NTkKhgd/1+GejvBtlWOxE uVKkZ+xlNr2ycUxSnh5L5K7zkcqmJotkfZQtLpIfj6zxkQKk8Tay9mt5CdsPUO+uusle 4YjnztOJ51bwgYiCpCOJT2ihTy8kSPKd4ckTMfbj4LgE7ynqoQvAqrUx/2RVdV/mrtXO yO4urfDOLv1OijNytyZg7zrV3qzEt8q6M48oFGmJyZENRM9TzRdGH15Tq7UydCyH/X/i SD4W7KM3ob0bIQRVCE6n2PovoMgvfa9TTWE7XrqFbvhBULYehYz+cZtfS+xvYLNvTvyd yQnA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=jbfiRuW7; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id t128si5713140ybf.135.2020.06.12.12.14.59 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 12 Jun 2020 12:14:59 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=jbfiRuW7; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:55972 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jjp8l-0004Ys-6d for patch@linaro.org; Fri, 12 Jun 2020 15:14:59 -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) 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-Received: by 2002:a05:6000:104f:: with SMTP id c15mr16279897wrx.391.1591988581155; Fri, 12 Jun 2020 12:03:01 -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) From: =?utf-8?q?Alex_Benn=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 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_Benn=C3=A9e?= , richard.henderson@linaro.org, f4bug@amsat.org, cota@braap.org, Paolo Bonzini , aurelien@aurel32.net Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" 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=24317, running) created by main thread at: Signed-off-by: Robert Foley Reviewed-by: Emilio G. Cota Signed-off-by: Alex Bennée Message-Id: <20200609200738.445-12-robert.foley@linaro.org> --- util/qemu-thread-posix.c | 2 ++ 1 file changed, 2 insertions(+) -- 2.20.1 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" static bool name_threads; @@ -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); From patchwork Fri Jun 12 19:02:34 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 187870 Delivered-To: patch@linaro.org Received: by 2002:a92:cf06:0:0:0:0:0 with SMTP id c6csp668896ilo; Fri, 12 Jun 2020 12:12:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw0tm7pRSS6iGNtTLwohMzc8Uku5wl5krlIozuj0xJZVq6aY/sf4LLlJdqA+2vCt+P+y7Yb X-Received: by 2002:a0c:d40b:: with SMTP id t11mr14286296qvh.0.1591989157205; Fri, 12 Jun 2020 12:12:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591989157; cv=none; d=google.com; s=arc-20160816; b=wnU4xEhu2qM6tewcU1CpFWRhfi1TEKQd64x+6K/tVXBhw2xvnh5osOeWzCtfgMQ8pm mcqWYx3byLF1hK6qotPw8mm9Py0J++aMmxyrGUv2h4r8VlN7i11wTKTEmN7sX6bSS22k BoH0e3QUBnB5AbHzw2/+iX0rF5A6E2WEsxeKglxphqlw2KfBCwwTWNYwKTS0jibSWxNi kRXbNkLYuhjX/lEUmurxamtkvHcCRqkAZVmB10AveIjCP2RKMlbofYPamnsXQ9oFga/N E3QnRM3I5VRG+t8K2yKRK1l2oYRUNHJ9oGf4dE9/Pn1f1Ew3mSDS6L9qBCVPjbM0gWDX k21g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=fmvqRWXA4S4s+D50fC0aMio8k7PyGt04LZMtINTzwxg=; b=0usOFlf8IQw55kHAEc/u8jLe0/E9JQyI18vqXcnk0pwLI71gUWlvYjZ/s9XCq2k8pO TREwReggjH9iaSaOqyHboyGwMHgX8CxNZhzRLXkp/+EFuVAY0uUu4kImxfBXpkLg3sXd M31OnFDq99swiqHK8mpqsP2ElfCa09KLaWZl+D9RVGkAkstIKjOf9q5B1I+WGDcaX+oZ a8dHSNj+/aiX0xXj0ESgjVQNM9NO2zO9dehH/CTVYtYtiCycYg3Bwj22jQwbmcm70I8j e9IfF9Z3WDOI6TRh1VjBVu3wZfzydXDJvsGaYwVy868tr20RMs3rrRR9JadLgb+kh296 rOqA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=YwX0qdCF; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id b1si4507721qtq.366.2020.06.12.12.12.37 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 12 Jun 2020 12:12:37 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=YwX0qdCF; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:49092 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jjp6S-0000yM-BM for patch@linaro.org; Fri, 12 Jun 2020 15:12:36 -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) 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-Received: by 2002:a5d:4c45:: with SMTP id n5mr16558362wrt.341.1591988893816; Fri, 12 Jun 2020 12:08:13 -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) From: =?utf-8?q?Alex_Benn=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 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_Benn=C3=A9e?= , richard.henderson@linaro.org, f4bug@amsat.org, cota@braap.org, aurelien@aurel32.net Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" 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ée Signed-off-by: Alex Bennée Message-Id: <20200609200738.445-13-robert.foley@linaro.org> --- docs/devel/testing.rst | 107 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 107 insertions(+) -- 2.20.1 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 frequently used ones are: * ``DEBUG=1``: enables debug. See the previous "Debugging a Docker test failure" section. +Thread Sanitizer +================ + +Thread Sanitizer (TSan) is a tool which can detect data races. QEMU supports +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=1 to allow launching the test from inside the docker, +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=clang-10 --cxx=clang++-10 \ + --disable-werror --extra-cflags="-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=suppressions=/tests/tsan/suppressions.tsan \ + detect_deadlocks=false history_size=7 exitcode=0 \ + log_path=/tsan/tsan_warning + +The above exitcode=0 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=66. + +TSan Suppressions +----------------- +Keep in mind that for any data race warning, although there might be a data race +detected by TSan, there might be no actual bug here. TSan provides several +different mechanisms for suppressing warnings. In general it is recommended +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 runtime. +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=-fsanitize-blacklist=/tests/tsan/blacklist.tsan" + +More information on the file format can be found here under "Blacklist Format": + +https://github.com/google/sanitizers/wiki/ThreadSanitizerFlags + +TSan Annotations +---------------- +include/qemu/tsan.h defines annotations. See this file for more descriptions +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 ========== From patchwork Fri Jun 12 19:02:35 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 187872 Delivered-To: patch@linaro.org Received: by 2002:a92:cf06:0:0:0:0:0 with SMTP id c6csp669981ilo; Fri, 12 Jun 2020 12:14:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxmUTm6eMjs/YgBRsX5tyUHf0bZr/hOh/mtO8WQ1VAeSl/zJfuk4Vk1leAmZPISiwpOWZlD X-Received: by 2002:a25:ec3:: with SMTP id 186mr26531775ybo.475.1591989251872; Fri, 12 Jun 2020 12:14:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591989251; cv=none; d=google.com; s=arc-20160816; b=O2Dxb0ip7QQQxvyoNqNDStPLgZ6CD9mDdR/+L5gWQrF67G8t8rDxRkMs5pP/KVbk9x W/MEX9cEQqfNDdKY0OdLczyuwttw5qw+4lQr2FAcqdHOq0q/irCQpkM1tQ2suRTY2z3h ok9REYzeLLZFvM1pNXIm2IIPBmh75muxesCED1hl82oQ279IcO7vGCIcjIkRRVbHUeX7 RmeWuHCNY2PYuMYaw6uxbjBrQ9O/90QDGWM4q7v5lDwuaSkGgt4grD1R0bA/Whr6Elru MORph0z1WzwkLZiIrfFpk3LSUoM7qx/wCiObmlS2ctf0AV1ZSm4J3sSxZyTCtH7IoHJC dM4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=wXhgANSUKYnCKXs8uV1uCQPeeFPmHlGq9ilbgO5w6iI=; b=xP0/MQDYYfBHHHgN5JG9DOVMdz+epbtzUQ4YiDxFoadAfFg9EMcvGFybGLnCSzmygf BE5H8QB9V9grudfvjXy2Zkezxy6HRARDQQPE7/fzE6g5k1cg8sbK7lhtkF2W+QXT1HL4 oUQS1gCI5+2+c+jTXYR21WqN9A3geABfaesCyFNgxSq280ckUysFuKmJBllnJ2eRnCx1 vviL4vnXfItdNyJclNMGopX3RMCY/dmxUUATnLCCP/gSwUaHh0wAwEPIvNCHbQZS0tSi ANOXYL5HijXwIjF0M+oczxKTfgmUqby8tRQir89tqSvditUpMl6BxooTmeosemu+VYXS 5WFg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=JO8Lq9Us; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id n184si5984539ybc.403.2020.06.12.12.14.11 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 12 Jun 2020 12:14:11 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=JO8Lq9Us; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:53326 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jjp7z-0002pr-C1 for patch@linaro.org; Fri, 12 Jun 2020 15:14:11 -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) 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-Received: by 2002:a1c:bd86:: with SMTP id n128mr390249wmf.5.1591988894976; Fri, 12 Jun 2020 12:08:14 -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) From: =?utf-8?q?Alex_Benn=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 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_Benn=C3=A9e?= , richard.henderson@linaro.org, f4bug@amsat.org, cota@braap.org, Paolo Bonzini , aurelien@aurel32.net Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" 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ée 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(-) -- 2.20.1 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 := $(subst -softmmu.mak,,$(notdir \ check-unit-y += tests/check-qdict$(EXESUF) check-unit-y += tests/check-block-qdict$(EXESUF) -check-unit-$(CONFIG_SOFTMMU) += tests/test-char$(EXESUF) check-unit-y += tests/check-qnum$(EXESUF) check-unit-y += tests/check-qstring$(EXESUF) check-unit-y += tests/check-qlist$(EXESUF) @@ -108,7 +107,6 @@ check-unit-y += tests/test-qht$(EXESUF) check-unit-y += tests/test-qht-par$(EXESUF) check-unit-y += tests/test-bitops$(EXESUF) check-unit-y += tests/test-bitcnt$(EXESUF) -check-unit-$(CONFIG_SOFTMMU) += tests/test-qdev-global-props$(EXESUF) check-unit-y += tests/check-qom-interface$(EXESUF) check-unit-y += tests/check-qom-proplist$(EXESUF) check-unit-y += tests/test-qemu-opts$(EXESUF) @@ -123,9 +121,16 @@ check-speed-$(CONFIG_BLOCK) += tests/benchmark-crypto-cipher$(EXESUF) check-unit-$(CONFIG_BLOCK) += tests/test-crypto-secret$(EXESUF) check-unit-$(call land,$(CONFIG_BLOCK),$(CONFIG_GNUTLS)) += tests/test-crypto-tlscredsx509$(EXESUF) check-unit-$(call land,$(CONFIG_BLOCK),$(CONFIG_GNUTLS)) += tests/test-crypto-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) += tests/test-char$(EXESUF) +check-unit-$(CONFIG_SOFTMMU) += tests/test-qdev-global-props$(EXESUF) ifneq (,$(findstring qemu-ga,$(TOOLS))) check-unit-$(call land,$(CONFIG_LINUX),$(CONFIG_VIRTIO_SERIAL)) += tests/test-qga$(EXESUF) endif +endif check-unit-$(CONFIG_SOFTMMU) += tests/test-timed-average$(EXESUF) check-unit-$(call land,$(CONFIG_SOFTMMU),$(CONFIG_INOTIFY1)) += tests/test-util-filemonitor$(EXESUF) check-unit-$(CONFIG_SOFTMMU) += 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 TARGETS=$(patsubst %-softmmu,%, $(filter %-softmmu,$(TARGET_DIRS))) +QTEST_TARGETS = +# 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 = $(TARGETS) check-qtest-y=$(foreach TARGET,$(TARGETS), $(check-qtest-$(TARGET)-y:%=tests/qtest/%$(EXESUF))) check-qtest-y += $(check-qtest-generic-y:%=tests/qtest/%$(EXESUF)) -else -QTEST_TARGETS = +endif endif qtest-obj-y = tests/qtest/libqtest.o $(test-util-obj-y) From patchwork Fri Jun 12 19:02:36 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 187866 Delivered-To: patch@linaro.org Received: by 2002:a92:cf06:0:0:0:0:0 with SMTP id c6csp666530ilo; Fri, 12 Jun 2020 12:09:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwBlBJ4had7fKwuZj51pgejry6ce5OFYk7JdOBZEDhJ3V8HNUhrDo1YEk/qqqxuCqboMtjT X-Received: by 2002:a25:8284:: with SMTP id r4mr22777030ybk.351.1591988964070; Fri, 12 Jun 2020 12:09:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591988964; cv=none; d=google.com; s=arc-20160816; b=Ul65eTnGyrgEDuDwkuI9NghQU0iKgIwl5M4BryFm7XdGI/+edYPQ1DhfstiVmalxnI GUjf3Y6qKVEmZot1YHKy3HqGBw9GCYrIl0GsD6g2UkH+o9wYTatc+VJXYEh2lGulgY0L JbcbhL8OYJ7sNlQYUgHqMXptFTKZee2xAgaVCojwYXJvhS1XF0Elj57yb2HCaro6cNei /1wvw4dYL9imGkTFyOUGp/GtuOYBSEK0kz5C1dbUJGl61IGyji0A6O69hK6oKWgwNQvc wpKujYjEG0EFfMj/OiDWEfvgpHpVd0kDSwGHUj0cK+gYH8oZl1siNidjOkmU3Ka6nZe7 zRwQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=4XFLJYI4xAPs7JF4qUWP5IVqk/6eCNTCwzMmtm4pqYs=; b=p4GNUAtMmxUQTtA9MBr6vi3gsHYqMsBSwX+SNZnY+ch5nFhPrbF272VllWh0G4Z52j uJvmot4TmUdBEdnXvAMsXJII+nVI7Z86Lp2Pm6i5qdO0iYsh59YY1fI+LPlc0jo0AhJF 3XKCGI3A7XjQ3YBCpfOH0Y82EbuiYPoY+q6UlUl5bEWfJCy62MDIY1auzZHrF+caN6yL lM2iUHrXJVHzxz42sLLkrQAR5gy2uBzMOH/w/zydL1q35zqhnVEHUbBbaQcQSQuhJP/5 SyhiLgaxBwL6/gxm7yHGtEAc+wtkcyM9nV2lBslZkOIXbzDBR7Tf1GArhwzWRtMB4g3n XQvw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=Dp3DIHB+; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id l7si6133929ybb.38.2020.06.12.12.09.24 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 12 Jun 2020 12:09:24 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=Dp3DIHB+; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:37502 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jjp3L-0003EG-HH for patch@linaro.org; Fri, 12 Jun 2020 15:09:23 -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) 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-Received: by 2002:adf:bbc5:: with SMTP id z5mr16675085wrg.269.1591988889517; Fri, 12 Jun 2020 12:08:09 -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) From: =?utf-8?q?Alex_Benn=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 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_Benn=C3=A9e?= , richard.henderson@linaro.org, f4bug@amsat.org, =?utf-8?q?Philippe_Mat?= =?utf-8?q?hieu-Daud=C3=A9?= , cota@braap.org, aurelien@aurel32.net Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" This reverts commit 12d43b5ae916809aad9ccf8aa2a0a06260527340. Signed-off-by: Alex Bennée --- .shippable.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) -- 2.20.1 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=C matrix: - # - IMAGE=debian-amd64 - # TARGET_LIST=x86_64-softmmu,x86_64-linux-user + - IMAGE=debian-amd64 + TARGET_LIST=x86_64-softmmu,x86_64-linux-user - IMAGE=debian-win32-cross TARGET_LIST=arm-softmmu,i386-softmmu,lm32-softmmu - IMAGE=debian-win64-cross @@ -19,10 +19,10 @@ env: TARGET_LIST=aarch64-softmmu,aarch64-linux-user - IMAGE=debian-s390x-cross TARGET_LIST=s390x-softmmu,s390x-linux-user - # - IMAGE=debian-mips-cross - # TARGET_LIST=mips-softmmu,mipsel-linux-user - # - IMAGE=debian-mips64el-cross - # TARGET_LIST=mips64el-softmmu,mips64el-linux-user + - IMAGE=debian-mips-cross + TARGET_LIST=mips-softmmu,mipsel-linux-user + - IMAGE=debian-mips64el-cross + TARGET_LIST=mips64el-softmmu,mips64el-linux-user - IMAGE=debian-ppc64el-cross TARGET_LIST=ppc64-softmmu,ppc64-linux-user,ppc64abi32-linux-user build: From patchwork Fri Jun 12 19:02:37 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 187868 Delivered-To: patch@linaro.org Received: by 2002:a92:cf06:0:0:0:0:0 with SMTP id c6csp668102ilo; Fri, 12 Jun 2020 12:11:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzsJO4xG0WVAMxrrpkPwy2QFVQ5uXvmm7q7kkskZ2fkecWJcR3PnlHIyqa5bojqG4U6b0zS X-Received: by 2002:a1f:3ac6:: with SMTP id h189mr11187499vka.16.1591989086037; Fri, 12 Jun 2020 12:11:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591989086; cv=none; d=google.com; s=arc-20160816; b=ufth+ERtVMwsL9zBnoxYdvBd0ikXDnH0FwzjeE+fqVu24262wmfW3boP3TXmHmq6XA F1esxDVSRRn8ESLWJr+t7K9/lwWrq7rEM4RWRPFZZzb7xWkEhuCwW0YadTDJsncP8Lde SPWOuRJy42KK8NUlB4nL4tOPON1rcrog6VEzc8LkUYZFwgOaPL77AO5gsNm2wkpAY3L2 znLNbnXHC6KTrzdIrTNdveQkVc2xWJxYpXrPPPzgifpxpwmT3hwEkKuWsMEfC7Wfeokn cC+94I5h/P2JBy0kvmiP/6M+ji8cFClR93zuYLRGDe8gnmHQlEwOr9B3XiI7Hr88NuoQ 7pgA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=BULJelpXGG4oceHKJESiwUE25IojeXa0K35GUnG/ea0=; b=aX0C6CA3/q96M6G47zcGMrHoh3jLKElEkd8cOWgoso1x+vUTUrk78+H4XNriHuIOlZ 3t/hzZLu37i9ShXkl6E8o3IPzYG+fJpMCwBJDcll/HCzZ7UVSJUXwB+diiLiYWuL+WWC J/2nlXq2LW4S4JXKvhsWPN2oEDqUf/go/WmHEYP3yNfiDq0GJyKqOz+AN4OARZ06BENz VJTs22guyDSY/qmin3NRNUxB8FvExiVmCnN3mGEG1ewOWehhwTefuTQoeNxtl2N1Av5G xfWYJQeEj78LutnA1anI3Y8O6Lxm8BFdH+1BlMivWmJGlVswxG2/JXENeMniHItjFOA5 qIlw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=UZDzRaTH; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id v4si773569vsl.233.2020.06.12.12.11.25 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 12 Jun 2020 12:11:26 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=UZDzRaTH; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:43890 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jjp5J-0006JF-ED for patch@linaro.org; Fri, 12 Jun 2020 15:11:25 -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) 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-Received: by 2002:a1c:4189:: with SMTP id o131mr321693wma.183.1591988890779; Fri, 12 Jun 2020 12:08:10 -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) From: =?utf-8?q?Alex_Benn=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 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_Benn=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+patch=linaro.org@nongnu.org Sender: "Qemu-devel" We do this on our other platforms to make it easier to see what has broken. Signed-off-by: Alex Bennée --- .cirrus.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -- 2.20.1 Reviewed-by: Li-Wen Hsu 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=1 check + - gmake V=1 check macos_task: osx_instance: @@ -26,7 +26,7 @@ macos_task: - cd build - ../configure --python=/usr/local/bin/python3 || { cat config.log; exit 1; } - gmake -j$(sysctl -n hw.ncpu) - - gmake check -j$(sysctl -n hw.ncpu) + - gmake check macos_xcode_task: osx_instance: @@ -39,4 +39,4 @@ macos_xcode_task: - cd build - ../configure --cc=clang || { cat config.log; exit 1; } - gmake -j$(sysctl -n hw.ncpu) - - gmake check -j$(sysctl -n hw.ncpu) + - gmake check