From nobody Sun Nov 24 09:44:06 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1723675359; cv=none; d=zohomail.com; s=zohoarc; b=XxG/s2GleHM0wdzspbMM/P2IW+iqijOycqT9GVjbDx1U/kCes7QeNZPt5ET48T57O1xomDF8Vr5L/5h1GWWAI7aLCJoEZROVeGafdq+1qN7c7LqMm5dP0KImh45BVMx5Byxb+6LkX2EAka2odDIRWNHLNotzmOMsgJprOTa/0ME= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1723675359; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=BA0vIbfMo/Ez2DzL8kYXbRUniB5/Y+edtyx+BnopKwA=; b=k5pw76N6xXuOfRivJM2DzAGLGvZqO3EVaf2xEl7/5KHn+/Kho7+3erFwMp485a7ri1iF0ipBGeR41zBJM0Qy9ZakSVTFfdrGbRgq/eu8URJqPwAu6MTQV3jtDe3jR38z+CXSyZ+KUh/WAx3mCi3rB7jo5SiGEwZiYXaq3rMATlU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1723675359534896.1296455115413; Wed, 14 Aug 2024 15:42:39 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1seMgZ-00022F-Ch; Wed, 14 Aug 2024 18:41:43 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1seMgX-0001xi-VR for qemu-devel@nongnu.org; Wed, 14 Aug 2024 18:41:41 -0400 Received: from mail-pl1-x62a.google.com ([2607:f8b0:4864:20::62a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1seMgU-0007La-FG for qemu-devel@nongnu.org; Wed, 14 Aug 2024 18:41:41 -0400 Received: by mail-pl1-x62a.google.com with SMTP id d9443c01a7336-1fc56fd4de1so2702395ad.0 for ; Wed, 14 Aug 2024 15:41:38 -0700 (PDT) Received: from linaro.vn.shawcable.net ([2604:3d08:9384:1d00:5b09:8db7:b002:cf61]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-201f03b2874sm1225595ad.308.2024.08.14.15.41.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Aug 2024 15:41:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1723675297; x=1724280097; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=BA0vIbfMo/Ez2DzL8kYXbRUniB5/Y+edtyx+BnopKwA=; b=Fd74EX9L6YEtAnGPwwpxA1UGpXv65qOAejrKcULnerI2e8zP2JG0KGor+OlPP3MEZM oZsE0bD4ONYFNdPXC2GSHaZZ266X70Jf195VXOzTio6NkzSxKiCLZFKJlwMKK/oMt5F1 zinQHgGmgJRyHrlx9QK9lOpkQM/n19WAc75LVAEOzLqkyFKnCeDiS/vtlUrixmLId4XK TQZ31oGRL+v4hry0BBLo42dJ48uL+1hs7lIAVU6UnD+kRZW4DSS/IwbzsTAs+iz0X4Qo o5HAcqK+OTg+wDeCFJYNSDqtm5v2lfph4HM1TjiUaF6da23xJsEsOYvJbPwv+b/EXegB exFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723675297; x=1724280097; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=BA0vIbfMo/Ez2DzL8kYXbRUniB5/Y+edtyx+BnopKwA=; b=sJq65+QM6FMGVKfj8tiD9VMyePcuLoVrvuFkY1dFgHorczSClrpa1xo8PXYmP/GfXD 253n8oPr7VmEFY20kjhJybia46FhX2mkt/0LUPIPrnmh0tPPSp5XdR4ZsKfJKHA7xDWn 7JZJKglDbOsZ4bAkK0tg1OeCq4pG2cUGTYS0452R5oSxiKQuBShFkcOSDlVFVlRISws9 6uoPD4ZuIiAvF1EN6cDmvhy7fRHZGNUYTl9mLolxS2SG1o2eLDD9esVqysj7tFognifX rW8q0DZy+0YzHikm1yzpgo+HNnMPVyyju/864hetWRpW0Cfml1Z2r56djV0UB+EpWv1R lEQQ== X-Gm-Message-State: AOJu0Yw0EEwQqy+tJxdQMwld/LUSrxgZYCSJpxMn3BDsYwg76Owq3PD5 L0Ag9AhJ2x1mIkpV29GUgaLXL92J4Cnce9QiehFdXwe51rS2+HaAdrs6Zm2Dh39qKUGo8i++FVE lpzE= X-Google-Smtp-Source: AGHT+IHLOMuA2xNQUnJ7j4Sv3gvsivnE3ZDnjeWx9uHlBTc7JPSjJLnmaTR7KYUm/tE1ewGigV07vg== X-Received: by 2002:a17:902:e807:b0:1f9:e2c0:d962 with SMTP id d9443c01a7336-201ee519f73mr13281165ad.31.1723675297099; Wed, 14 Aug 2024 15:41:37 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Beraldo Leal , David Hildenbrand , Thomas Huth , Marcelo Tosatti , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Paolo Bonzini , kvm@vger.kernel.org, Wainer dos Santos Moschetta , qemu-s390x@nongnu.org, =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Richard Henderson , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Ilya Leoshkevich , Pierrick Bouvier Subject: [PATCH v2 1/4] meson: hide tsan related warnings Date: Wed, 14 Aug 2024 15:41:29 -0700 Message-Id: <20240814224132.897098-2-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240814224132.897098-1-pierrick.bouvier@linaro.org> References: <20240814224132.897098-1-pierrick.bouvier@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::62a; envelope-from=pierrick.bouvier@linaro.org; helo=mail-pl1-x62a.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1723675359822116600 When building with gcc-12 -fsanitize=3Dthread, gcc reports some constructions not supported with tsan. Found on debian stable. qemu/include/qemu/atomic.h:36:52: error: =E2=80=98atomic_thread_fence=E2=80= =99 is not supported with =E2=80=98-fsanitize=3Dthread=E2=80=99 [-Werror=3D= tsan] 36 | #define smp_mb() ({ barrier(); __atomic_thread_= fence(__ATOMIC_SEQ_CST); }) | ^~~~~~~~~~~~~~~~= ~~~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Pierrick Bouvier --- meson.build | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/meson.build b/meson.build index 81ecd4bae7c..52e5aa95cc0 100644 --- a/meson.build +++ b/meson.build @@ -499,7 +499,15 @@ if get_option('tsan') prefix: '#include ') error('Cannot enable TSAN due to missing fiber annotation interface') endif - qemu_cflags =3D ['-fsanitize=3Dthread'] + qemu_cflags + tsan_warn_suppress =3D [] + # gcc (>=3D11) will report constructions not supported by tsan: + # "error: =E2=80=98atomic_thread_fence=E2=80=99 is not supported with = =E2=80=98-fsanitize=3Dthread=E2=80=99" + # https://gcc.gnu.org/gcc-11/changes.html + # However, clang does not support this warning and this triggers an erro= r. + if cc.has_argument('-Wno-tsan') + tsan_warn_suppress =3D ['-Wno-tsan'] + endif + qemu_cflags =3D ['-fsanitize=3Dthread'] + tsan_warn_suppress + qemu_cfla= gs qemu_ldflags =3D ['-fsanitize=3Dthread'] + qemu_ldflags endif =20 --=20 2.39.2 From nobody Sun Nov 24 09:44:06 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1723675387; cv=none; d=zohomail.com; s=zohoarc; b=MXnDHSUOrE2PO/m6+07E+qcSpzGTaGaoIbSfFZgtTkd2WT1+FssO8kiiyneDe0LqchHfvklCq9pJpm4yAUNtKNkY1Tq+P0EfVmzBwX950EsBs+/O+kcagz9RzDhTPMlvG7J0qDNLIPDDBYWnDA72zCGQfgSyHRzYIgI21QY1heI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1723675387; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=lkpyTpSOlqu0+QkwYEsdEX4Fr7KToSSmbcU9XazMmXA=; b=VAjLh9HV7++VAUbAQ0fkx5FQcQe9nK42twTMASUIAK0+Tta6YoB1l4qSCsyNq+rHY6WrpkecyX9EBPK1U3RVCWE6OtMjKkogskiHzK8XiWLOV9AZc5xThAaI46V6d+IbDqQKo82iHnZ4Pk4hZt6u4aEDa/rbzpXVNIC8/sVozdo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1723675387446620.9686704809443; Wed, 14 Aug 2024 15:43:07 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1seMgc-0002Dw-8G; Wed, 14 Aug 2024 18:41:46 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1seMga-000262-9q for qemu-devel@nongnu.org; Wed, 14 Aug 2024 18:41:44 -0400 Received: from mail-pl1-x62f.google.com ([2607:f8b0:4864:20::62f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1seMgY-0007Lm-3w for qemu-devel@nongnu.org; Wed, 14 Aug 2024 18:41:44 -0400 Received: by mail-pl1-x62f.google.com with SMTP id d9443c01a7336-1fc66fc35f2so10990515ad.0 for ; Wed, 14 Aug 2024 15:41:40 -0700 (PDT) Received: from linaro.vn.shawcable.net ([2604:3d08:9384:1d00:5b09:8db7:b002:cf61]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-201f03b2874sm1225595ad.308.2024.08.14.15.41.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Aug 2024 15:41:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1723675298; x=1724280098; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=lkpyTpSOlqu0+QkwYEsdEX4Fr7KToSSmbcU9XazMmXA=; b=yKEHhFeh69YRsOJybIuyUxNOpaf8Ayut5UhrHfLeKsjOs/1dGWpetcAAu9rLXVal87 IgdD1gmipl8M8a5RCl4YivDIGGZIO4Dx4R0FR7NTSsvHZ6G0mwwvnVYdfDqqEnymuvSO qhB24x0/ytx0os8EzAtoTM7CT9EtJ+h4S3c9CU95qRux3Tt7nHuS49DCINrzPrfL8MNa DB2IAofyr91KTRfHSMwkblAtV6JVllw5R3VuJ3i8WeNx0DfVnjEJfwE4w2L1DYgRkoUm OSzY+kNvTM0uB5KWQzX8qjvNqpJgrWTHngEWTtfQBTzNcMB0eQMHShTp9HfhIwQLOa6V UIuQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723675298; x=1724280098; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=lkpyTpSOlqu0+QkwYEsdEX4Fr7KToSSmbcU9XazMmXA=; b=VWK37P7ff1QelitRD2YixDXlncN5siypw0qlHEd3SQ3caOYGThKzi18rgQm24X2cn+ MJxoR4KIHrDsNjydCDiMd0UV6KB+GJ4/L/QeMc75wZ8wVqxE3u9yHRK5An/ebWbmDiZD dZ8uyWQT4tHwi/78ak/2J5cIHgh5D1+wOrkdrdr5XnlVKCjswEbdbUhgvSoVjC/M4+zO IANsxC4eIgbTfbSg4HZz0nOZmk2CAUSr0nAqrCp2vBxClMOmXy1nOB4XWhSgdNcQ7Cap 3oLuYm0M+pv1dYrh3KPYTy7oX4hgM+/uBg7jd3Y7QWyuKGkYdMEHP+6PFiO0h1Xws/LH Jgmw== X-Gm-Message-State: AOJu0YwQVC1zCLEfHCLUZE7mstvGE8DOSeEDfv1PIvXLUBrGKrg34Bx1 dHWwVjpQiT1B2faklNQ/AOaKPBrTaqWRpzeQ0GIPacGaK679jWycbR12SgaQS1oN6r3rCRBympe NrCk= X-Google-Smtp-Source: AGHT+IGkesrW/K1rSLk7UrsKDf2/qUa/M6f0mBcupHt3koifZY7D+XvsN9EVSwi1JJN5HwVBtak53g== X-Received: by 2002:a17:903:41ca:b0:1fd:a412:5df2 with SMTP id d9443c01a7336-201ee515b17mr15782565ad.29.1723675298210; Wed, 14 Aug 2024 15:41:38 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Beraldo Leal , David Hildenbrand , Thomas Huth , Marcelo Tosatti , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Paolo Bonzini , kvm@vger.kernel.org, Wainer dos Santos Moschetta , qemu-s390x@nongnu.org, =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Richard Henderson , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Ilya Leoshkevich , Pierrick Bouvier Subject: [PATCH v2 2/4] target/i386: fix build warning (gcc-12 -fsanitize=thread) Date: Wed, 14 Aug 2024 15:41:30 -0700 Message-Id: <20240814224132.897098-3-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240814224132.897098-1-pierrick.bouvier@linaro.org> References: <20240814224132.897098-1-pierrick.bouvier@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::62f; envelope-from=pierrick.bouvier@linaro.org; helo=mail-pl1-x62f.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1723675387941116600 Found on debian stable. ../target/i386/kvm/kvm.c: In function =E2=80=98kvm_handle_rdmsr=E2=80=99: ../target/i386/kvm/kvm.c:5345:1: error: control reaches end of non-void fun= ction [-Werror=3Dreturn-type] 5345 | } | ^ ../target/i386/kvm/kvm.c: In function =E2=80=98kvm_handle_wrmsr=E2=80=99: ../target/i386/kvm/kvm.c:5364:1: error: control reaches end of non-void fun= ction [-Werror=3Dreturn-type] 5364 | } Signed-off-by: Pierrick Bouvier Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson Reviewed-by: Thomas Huth --- target/i386/kvm/kvm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/i386/kvm/kvm.c b/target/i386/kvm/kvm.c index 31f149c9902..ddec27edd5b 100644 --- a/target/i386/kvm/kvm.c +++ b/target/i386/kvm/kvm.c @@ -5770,7 +5770,7 @@ static int kvm_handle_rdmsr(X86CPU *cpu, struct kvm_r= un *run) } } =20 - assert(false); + g_assert_not_reached(); } =20 static int kvm_handle_wrmsr(X86CPU *cpu, struct kvm_run *run) @@ -5789,7 +5789,7 @@ static int kvm_handle_wrmsr(X86CPU *cpu, struct kvm_r= un *run) } } =20 - assert(false); + g_assert_not_reached(); } =20 static bool has_sgx_provisioning; --=20 2.39.2 From nobody Sun Nov 24 09:44:06 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1723675353; cv=none; d=zohomail.com; s=zohoarc; b=AYKkyglt7WbB6EOZlRkz6aaIeIM3RAUsgjz8c5DVzZ4kvJ6bPJpN981wksKaja+ENNcANQbqLyCYKmAEXiOamjbXXMufjKdTHvHhZmCrK6TmT9lb9YXJ0szoc6fP29Z9Bc5uYJoylw7QuDbujdXRgB/q7jk76xbOvG/T9hps8L0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1723675353; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=ix2f5gCzV/CdkxjLWnI0M17lOMP/hB/dGS/GHu24vmM=; b=kKQjwRYgeA5WnwKUHkzUP+HeYANEpxdlQKwEcIE/Yz05tbJZu9n69Zg33ipjdZZMmkfg7DUJGhFnHWsTNam/R6M/lCbAbTanJymfLO4/uER1t3jm8c+GNub5zItIeC0uFlraDF9d/j6krVrIRsve1l2dllewRDVwI+fpPOgOWPY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1723675353527727.5500338761753; Wed, 14 Aug 2024 15:42:33 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1seMga-00028e-U5; Wed, 14 Aug 2024 18:41:44 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1seMgZ-00021L-4T for qemu-devel@nongnu.org; Wed, 14 Aug 2024 18:41:43 -0400 Received: from mail-pl1-x62c.google.com ([2607:f8b0:4864:20::62c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1seMgW-0007Ls-Qn for qemu-devel@nongnu.org; Wed, 14 Aug 2024 18:41:42 -0400 Received: by mail-pl1-x62c.google.com with SMTP id d9443c01a7336-1fc60c3ead4so3563685ad.0 for ; Wed, 14 Aug 2024 15:41:40 -0700 (PDT) Received: from linaro.vn.shawcable.net ([2604:3d08:9384:1d00:5b09:8db7:b002:cf61]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-201f03b2874sm1225595ad.308.2024.08.14.15.41.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Aug 2024 15:41:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1723675299; x=1724280099; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ix2f5gCzV/CdkxjLWnI0M17lOMP/hB/dGS/GHu24vmM=; b=GZEApvKJLZFVkB7XXbl7q+u5BDzuUJ7iX2wrMc0On44aBEm5brEcwyVOC6YKQKwBEF B6zbBBPQdLCOJ9U0N27BAOrgNiSLOWcS1Or3U8Q5ZebCD7c+7jTEwC6TjK+UkeKWiLF3 hyIl1rzSauk9QyTHhrKvTbxMrNRSb7lQRDl17AfnlLAAjPcw9i+3wSa0uNGyvIcmrQ+f 11PYsRAzk/GEmLXzH/fjxLVEMo1fG4ghr4Q05HmN4w2RNpI0Pu071MUg6E8gVh2jAjL5 7PcoYQo3QSyWZBQW1S0eRaVQwnzLYDKyVByJvtsanTVSFUrMHGITLuYlMf7FQ4XQGOf6 vUSQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723675299; x=1724280099; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ix2f5gCzV/CdkxjLWnI0M17lOMP/hB/dGS/GHu24vmM=; b=LNo9sXjYPWWwsiXMnnUlkccEGeTD4CZ5Qt0oFf7eKMIw7xw2Dm83DQplHWZEQxEgcd uIQBEZF90GVfn62Ckr8c6QmbCn5b2/LOr3GQjHS2+tVnmH7Vm1rW22TxOB4ZuwKdfPP4 f0rYbbtwWKENX3N1iLcESwJQqKGibEjPg0SDCtKqjbU0wh5kZEqQVYsaqE4d+Y7CJzNZ EnCPYaxr2aMw8/lvfvVExU+CdpywuY1+kyW5eVhKKJnxpPQIjeEZvXI0i3di+ySXmFTl S0vcKmb2HPRVLboI//cz0x3EMPN5j6PzzWq7WPPLt11fESwSHP2C+GFjdPBJeSZ3im9J RkkA== X-Gm-Message-State: AOJu0YzR6vp6RxulnuQVmToLXIvNhJRoKRnUBvpSgKSUf8PajJ15f9ED 58tmFnC3FALizbd7blNUasXUDhOpDsYNTBkNJta5CLjKnL3Oj+r54Bp87mb/aBUdUjkBLt8cIsF OVDA= X-Google-Smtp-Source: AGHT+IEcu9RodvL06jYwIW+MbnMmHphUULHzOODkrJsSEEKFjCAGokM2BML2UnWqSdowzt0TfjMKog== X-Received: by 2002:a17:902:d508:b0:201:e792:d6ff with SMTP id d9443c01a7336-201e792d9f9mr31346215ad.10.1723675299512; Wed, 14 Aug 2024 15:41:39 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Beraldo Leal , David Hildenbrand , Thomas Huth , Marcelo Tosatti , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Paolo Bonzini , kvm@vger.kernel.org, Wainer dos Santos Moschetta , qemu-s390x@nongnu.org, =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Richard Henderson , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Ilya Leoshkevich , Pierrick Bouvier Subject: [PATCH v2 3/4] target/s390x: fix build warning (gcc-12 -fsanitize=thread) Date: Wed, 14 Aug 2024 15:41:31 -0700 Message-Id: <20240814224132.897098-4-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240814224132.897098-1-pierrick.bouvier@linaro.org> References: <20240814224132.897098-1-pierrick.bouvier@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::62c; envelope-from=pierrick.bouvier@linaro.org; helo=mail-pl1-x62c.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1723675353967116600 Found on debian stable. ../target/s390x/tcg/translate.c: In function =E2=80=98get_mem_index=E2=80= =99: ../target/s390x/tcg/translate.c:398:1: error: control reaches end of non-vo= id function [-Werror=3Dreturn-type] 398 | } Signed-off-by: Pierrick Bouvier Acked-by: Ilya Leoshkevich --- target/s390x/tcg/translate.c | 1 - 1 file changed, 1 deletion(-) diff --git a/target/s390x/tcg/translate.c b/target/s390x/tcg/translate.c index c81e035dea4..bcfff40b255 100644 --- a/target/s390x/tcg/translate.c +++ b/target/s390x/tcg/translate.c @@ -392,7 +392,6 @@ static int get_mem_index(DisasContext *s) return MMU_HOME_IDX; default: g_assert_not_reached(); - break; } #endif } --=20 2.39.2 From nobody Sun Nov 24 09:44:06 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1723675375; cv=none; d=zohomail.com; s=zohoarc; b=ZFdp0aItl+alv5LcF/1xZ1HBw6I4AT//DhAIg7/by5R59GweekqRPwwYIPFQJHmcnZVpDi63q3syr/VyUchrHSX7MhtT6P/kE7TFbnscW6A9UNCr5gmUdHqEXBhnu9YZsl9deSJ8zWkOAoY8LIY723iVpoW0FTgCEogfRNf2n+I= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1723675375; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=zJho7r2KSIGZArJtcY0/tQGk0chbARupwvgFA11PnCQ=; b=dOLftp7BdRPXNznHRLBBg+OGuF0EalML67laWJhJ3xWJbJ34KiVFw/NDZc3k+8bq/wLwf8/1p/1MisweXPI9wUhx9r8MMymgfoz+eTuR/jVwnZ+hhusz15OBXrlSHl0tX7zZisYOhQ2D85+i6bjUgl8NNw+FHbhXAauSxX8jOB4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1723675375164256.0538085055215; Wed, 14 Aug 2024 15:42:55 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1seMgb-0002Bb-LS; Wed, 14 Aug 2024 18:41:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1seMga-00025j-7L for qemu-devel@nongnu.org; Wed, 14 Aug 2024 18:41:44 -0400 Received: from mail-pl1-x62d.google.com ([2607:f8b0:4864:20::62d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1seMgY-0007MF-3N for qemu-devel@nongnu.org; Wed, 14 Aug 2024 18:41:43 -0400 Received: by mail-pl1-x62d.google.com with SMTP id d9443c01a7336-1fc60c3ead4so3563805ad.0 for ; Wed, 14 Aug 2024 15:41:41 -0700 (PDT) Received: from linaro.vn.shawcable.net ([2604:3d08:9384:1d00:5b09:8db7:b002:cf61]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-201f03b2874sm1225595ad.308.2024.08.14.15.41.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Aug 2024 15:41:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1723675301; x=1724280101; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=zJho7r2KSIGZArJtcY0/tQGk0chbARupwvgFA11PnCQ=; b=JVxdkMoYel9RVeqopVLQ2iRIOhWom3bCyiVWwV2ja6LbKNnn5AD14/H0iYAC03fURo i3Yru+g26uG3gpgWqywVbL5p++TOmftESo1rroAQRoTLqWJP63EjaKDg++CT3B4XXs3b 1xCh3+EiRDo5pKqfe/GGzN4tbbwR5DItHc3EXMtFid8QtxNrRdsGj0y50kfkHxTPvxGg x1CdKp3CODGy2DjuY0nQj+V29z+oKBaOxUKDr3Kv0Je5UwjCzNx8wmxblg2FwDyrmfQx vrKVZlNdDVR7rKxRisSwLR/AzeOBAMXqbFSYoqes13v1dAGNze5HeFHtkGdkszECoOjC Sr8g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723675301; x=1724280101; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=zJho7r2KSIGZArJtcY0/tQGk0chbARupwvgFA11PnCQ=; b=rspFR3ol3AeOTVnHkNTGi22zZnxqOEM2uY8D8u42M4Bh77Y3C4jSCarU6pdfjHugJg ta5RoplW3n5oW9BBhCSqAB/ZKZuRYJ3fr5Gp6af9KxJ/CdQ9p4y9hoZRChcQ3vC8U06t 2/eEUK6cmQLMlXKHy86QlMVbCTRVdCidAyqSJJkEeoSL/CNSdSpMjwR7GVxd9ZeZ7Z5k I/zFwnO7BjTnW2YKG1DU9ztNeed74EKvlCCTeAeNVVCEIl4pS2BMHi4+isKLHlbmDIP1 De5XjeEe8elGJzumR5Ma/2uljdNTwfT2lRHBQiR8Ylhsl6I7BwR3n8weLoeMNNkHKC5z L9FQ== X-Gm-Message-State: AOJu0Yz/OCRqvKw50OY2R4r2HjVchVY++iNFVmROdgSQ9dHafUQptvy0 /DAXUxW6+P/QEJzAGY1TV1EmcTE2AVc+jL1b4VFjRTRtqs89aTYazCQoF1MYPtuOEUUtksL/tZl F/PM= X-Google-Smtp-Source: AGHT+IHfpUHmltRgG/gVjytdo0w2YyJNJqcCukrC0Pgjx2S3EMn+ubfqhC4bAxsC2vTGIUfXWKdtyQ== X-Received: by 2002:a17:903:11c8:b0:1ff:49c:1562 with SMTP id d9443c01a7336-201d64d8afcmr48133095ad.56.1723675300659; Wed, 14 Aug 2024 15:41:40 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Beraldo Leal , David Hildenbrand , Thomas Huth , Marcelo Tosatti , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Paolo Bonzini , kvm@vger.kernel.org, Wainer dos Santos Moschetta , qemu-s390x@nongnu.org, =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Richard Henderson , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Ilya Leoshkevich , Pierrick Bouvier Subject: [PATCH v2 4/4] docs/devel: update tsan build documentation Date: Wed, 14 Aug 2024 15:41:32 -0700 Message-Id: <20240814224132.897098-5-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240814224132.897098-1-pierrick.bouvier@linaro.org> References: <20240814224132.897098-1-pierrick.bouvier@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::62d; envelope-from=pierrick.bouvier@linaro.org; helo=mail-pl1-x62d.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1723675377015116600 Content-Type: text/plain; charset="utf-8" Mention it's now possible to build with gcc, instead of clang, and explain how to build a sanitized glib version. Signed-off-by: Pierrick Bouvier --- docs/devel/testing.rst | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/docs/devel/testing.rst b/docs/devel/testing.rst index af73d3d64fb..f10cfc3f786 100644 --- a/docs/devel/testing.rst +++ b/docs/devel/testing.rst @@ -634,20 +634,38 @@ 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. =20 -There is a one time patch needed in clang-9 or clang-10 at this time: +TSan is supported for clang and gcc. +One particularity of sanitizers is that all the code, including shared obj= ects +dependencies, should be built with it. +In the case of TSan, any synchronization primitive from glib (GMutex for +instance) will not be recognized, and will lead to false positives. + +To build a tsan version of glib: =20 .. code:: =20 - sed -i 's/^const/static const/g' \ - /usr/lib/llvm-10/lib/clang/10.0.0/include/sanitizer/tsan_interface.h + $ git clone --depth=3D1 --branch=3D2.81.0 https://github.com/GNOME/glib= .git + $ cd glib + $ CFLAGS=3D"-O2 -g -fsanitize=3Dthread" meson build + $ ninja -C build =20 To configure the build for TSan: =20 .. code:: =20 - ../configure --enable-tsan --cc=3Dclang-10 --cxx=3Dclang++-10 \ + ../configure --enable-tsan \ --disable-werror --extra-cflags=3D"-O0" =20 +When executing qemu, don't forget to point to tsan glib: + +.. code:: + + $ glib_dir=3D/path/to/glib + $ export LD_LIBRARY_PATH=3D$glib_dir/build/gio:$glib_dir/build/glib:$gl= ib_dir/build/gmodule:$glib_dir/build/gobject:$glib_dir/build/gthread + # check correct version is used + $ ldd build/qemu-x86_64 | grep glib + $ qemu-system-x86_64 ... + The runtime behavior of TSAN is controlled by the TSAN_OPTIONS environment variable. =20 --=20 2.39.2