From patchwork Wed Aug 14 22:41:29 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Pierrick Bouvier X-Patchwork-Id: 819149 Delivered-To: patch@linaro.org Received: by 2002:adf:cd01:0:b0:367:895a:4699 with SMTP id w1csp906287wrm; Wed, 14 Aug 2024 15:42:39 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWePi9EgBl64LT+Zp2lwkcL7djJN6ZgIWaloC+gNQ2KmeCFsxOtbp+QvENdJJMyr1El9YioG2vDL3VrF/J8OYVZ X-Google-Smtp-Source: AGHT+IFjmUwxgTZlCyXxNOU+QtE9Pu5TaK/BDOTFamq6QwcCeUYDiDJL2kzjUYUf0hIlESVZccNz X-Received: by 2002:a05:620a:2981:b0:7a2:e2e:31c6 with SMTP id af79cd13be357-7a4fd1927a3mr189631985a.21.1723675359174; Wed, 14 Aug 2024 15:42:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1723675359; cv=none; d=google.com; s=arc-20160816; b=zOowyy0QItEFfEtoJZK1CC9qSRh7uQe3EW/KNT4FY1GN/m6jQtfAgKjIIFNBVyotXM gp/YrSBetvFEa7sraEgIKys+zYvbhGZCoex153I47H8wByN7hMoe9FX0pjz+qVVRE2Yi oKLa1MuEAN7IDZhz7+f0ce1rCcijiTmeuHL9djB+5hXtwMp1uLM0OlAXrV+AWusxgmH3 gKWOgvbDXICxT6OYz46fmOAcxj9r4hsxWSdq8AgjoMPoDnoKOzRrRwr42VN9h0OtMyJd e8cs31UoFXIfzriOJHEsUh96ijE24KCo1lnExb9IRcU/whHIfyByZ9S3W7eE4bxbugUK umuA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to: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:cc:to :from:dkim-signature; bh=BA0vIbfMo/Ez2DzL8kYXbRUniB5/Y+edtyx+BnopKwA=; fh=VjGIVy33gfqRtM9nOjXsRmpOiUp81jdvfncfpJZdwe8=; b=GHV2mLK1vhZWletERnI6wA+Q1wl2MDG7Q5CPy3x6UXgcnQQp7px6lCfzeegMRm3w8O Ov3EynLdZ+UOmFAgI7amyX3MPB+ZKhc1JGHmaKBwIwZMQJ1ylELx+HCZ/dwoJ7M6rKp6 SyggRHzGEin7Nd5M4qLgVs9p+OGRhiIYDGGpLAEyb/LtoDhOA03q56ppzqjeTJqpyRD8 PsJYfsFX30lq4EwcF8uhp8/T0B1HPuemgDRwza060CitoMtd4oAcAhHBI7hOLFiV+B3K M5jjagOllTTZuoZQB4bcxDUXatbv/1yRg3DnFIo1PVYQJka1Busus9/DLQF3900H9I11 LmJg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Fd74EX9L; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7a4ff10cd81si36154485a.546.2024.08.14.15.42.39 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 14 Aug 2024 15:42:39 -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=pass header.i=@linaro.org header.s=google header.b=Fd74EX9L; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org 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) 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-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) 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) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Beraldo Leal , David Hildenbrand , Thomas Huth , Marcelo Tosatti , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Paolo Bonzini , kvm@vger.kernel.org, Wainer dos Santos Moschetta , qemu-s390x@nongnu.org, =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , =?utf-8?q?Marc?= =?utf-8?q?-Andr=C3=A9_Lureau?= , Richard Henderson , =?utf-8?q?Alex_Benn=C3=A9?= =?utf-8?q?e?= , 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 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org When building with gcc-12 -fsanitize=thread, gcc reports some constructions not supported with tsan. Found on debian stable. qemu/include/qemu/atomic.h:36:52: error: ‘atomic_thread_fence’ is not supported with ‘-fsanitize=thread’ [-Werror=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 = ['-fsanitize=thread'] + qemu_cflags + tsan_warn_suppress = [] + # gcc (>=11) will report constructions not supported by tsan: + # "error: ‘atomic_thread_fence’ is not supported with ‘-fsanitize=thread’" + # https://gcc.gnu.org/gcc-11/changes.html + # However, clang does not support this warning and this triggers an error. + if cc.has_argument('-Wno-tsan') + tsan_warn_suppress = ['-Wno-tsan'] + endif + qemu_cflags = ['-fsanitize=thread'] + tsan_warn_suppress + qemu_cflags qemu_ldflags = ['-fsanitize=thread'] + qemu_ldflags endif From patchwork Wed Aug 14 22:41:30 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Pierrick Bouvier X-Patchwork-Id: 819151 Delivered-To: patch@linaro.org Received: by 2002:adf:cd01:0:b0:367:895a:4699 with SMTP id w1csp906402wrm; Wed, 14 Aug 2024 15:43:07 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWLJ+QYlsbqMM/jw3tMTJRT7o9Vzvwgkk0Ol4p2warlmlCUiPQRdxmH9AMKveHGRoTV00LszPE6VniIvCaJgp4N X-Google-Smtp-Source: AGHT+IHrkw4NVn+4foR0wV2Zbe+zO+e12hOO6dPSogCZu/vx85Uuvis618KvXQZ9AIV+p2ZnKiEs X-Received: by 2002:ac8:58ca:0:b0:450:3d4:5007 with SMTP id d75a77b69052e-453678eec79mr20399601cf.27.1723675387206; Wed, 14 Aug 2024 15:43:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1723675387; cv=none; d=google.com; s=arc-20160816; b=QaNTtNi8dCkRQcAmeWBb1QJr/6nVJCr4TiQ6vavRJ3DWYWfZh29w81SZF2d39BfsUg nLfuu5nqkrTLJ5akdH8Di1WvNEwBIkEOP4QRr1cp7MWqDR56FuHfHw6Eezr+NrrkipYK Hgiz74U6A7UdIykYwgpAtSxkXgtn06V7xQAa72gKHJQINIOJ029pDNyLyyhNz2qEmuVI Drlc8+K2gBgT1kz70iMDoW5GYuQfYGV0qstuxpazFcvwGkk83/x28Sno9QWfgZZuFdjQ XSpFsMuuC+M480Bj30T+elwSY4SzWwYk8/PrAX4q2kVQPzLBL3q5DmCsAPWOA/XsFvRK lm+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to: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:cc:to :from:dkim-signature; bh=lkpyTpSOlqu0+QkwYEsdEX4Fr7KToSSmbcU9XazMmXA=; fh=VjGIVy33gfqRtM9nOjXsRmpOiUp81jdvfncfpJZdwe8=; b=ZHMGEewPwMF0vda9PEPYDacj1DmNJfcqwYmZPTT5Sgs/Kf9zsZwyHJekfZyXEu7bjx 7wrKo0GVyXsxE/iWSFuGZYed4RblCNrSow67ky1+PyzzDZuLg5svnVW+uiBg7JmBKwIZ j2GV+1gA1QMzWEgHoDjanoHUC3THHq67DhtROkLIdT6XwOhLUgeD8MmZdWNSbMHsQbkT 4/UuDICIqcegTuBQaQ+lSM8qgpsQRbhF2Z3kGfM8i6PSIojDBitN7uPtMBUeWQuTh+O4 W/RbH6/DvZmSlilDNCF5tD1fSl+S1oaMWy5kUDOym6vOJZf0bhFd5wiJMAZ4Bf6iARgR vzDA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=yKEHhFeh; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-4536a00593dsi2896321cf.217.2024.08.14.15.43.07 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 14 Aug 2024 15:43:07 -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=pass header.i=@linaro.org header.s=google header.b=yKEHhFeh; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org 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) 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-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) 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) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Beraldo Leal , David Hildenbrand , Thomas Huth , Marcelo Tosatti , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Paolo Bonzini , kvm@vger.kernel.org, Wainer dos Santos Moschetta , qemu-s390x@nongnu.org, =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , =?utf-8?q?Marc?= =?utf-8?q?-Andr=C3=A9_Lureau?= , Richard Henderson , =?utf-8?q?Alex_Benn=C3=A9?= =?utf-8?q?e?= , 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 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Found on debian stable. ../target/i386/kvm/kvm.c: In function ‘kvm_handle_rdmsr’: ../target/i386/kvm/kvm.c:5345:1: error: control reaches end of non-void function [-Werror=return-type] 5345 | } | ^ ../target/i386/kvm/kvm.c: In function ‘kvm_handle_wrmsr’: ../target/i386/kvm/kvm.c:5364:1: error: control reaches end of non-void function [-Werror=return-type] 5364 | } Signed-off-by: Pierrick Bouvier Reviewed-by: Richard Henderson Reviewed-by: Thomas Huth Reviewed-by: Philippe Mathieu-Daudé --- 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_run *run) } } - assert(false); + g_assert_not_reached(); } static int kvm_handle_wrmsr(X86CPU *cpu, struct kvm_run *run) @@ -5789,7 +5789,7 @@ static int kvm_handle_wrmsr(X86CPU *cpu, struct kvm_run *run) } } - assert(false); + g_assert_not_reached(); } static bool has_sgx_provisioning; From patchwork Wed Aug 14 22:41:31 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Pierrick Bouvier X-Patchwork-Id: 819147 Delivered-To: patch@linaro.org Received: by 2002:adf:cd01:0:b0:367:895a:4699 with SMTP id w1csp906247wrm; Wed, 14 Aug 2024 15:42:33 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXnG49LAJYHtUcBFwv98n0RasvXGzJiENzVsGJE6ymmG6GtpRvWkbBW+lUEReeTN0TlfNTzqkgaqdI1k7Y6anKd X-Google-Smtp-Source: AGHT+IG0cHnEnmXuqQPB5ujT25f/iXME5dJlSi8ba7h8a61UDKvwMiF2G76fw0gXmho4NHEHfmiP X-Received: by 2002:a05:622a:5485:b0:447:e38c:59f with SMTP id d75a77b69052e-4535bb972d7mr53495551cf.47.1723675353139; Wed, 14 Aug 2024 15:42:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1723675353; cv=none; d=google.com; s=arc-20160816; b=PkcaOm8UH8dDSFmwF7cVCOUzDjMCNrKVQanU+7Q3nqZkjT3EwFPiUklgFDyo0Et1H0 r30YYnE/qIHfsYAnVC3CpR9I1x9OgBGxaRxboUx9fdofNh/E/sw/mWBLofWMGrEH2/zv waofqY1lCNoxun+M/pSxZEXDg5fkYq4DlFrSKJpOpn+hvdjyeGn0ddJXWb6EU+2XQm8H /yfCs8VhbxkcptF4Pg7HJ2Kw5ftklnKNVzlgMX9CZmYz4fP10eFvZIGx9rLCxFzovKVQ h0nYfk2lgxeLKJcII4iQ7bOQzWrkJ2MuXUlZry9UX0MDFKOSAewMzSO5eY//nVQlGZSh Z+Hg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to: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:cc:to :from:dkim-signature; bh=ix2f5gCzV/CdkxjLWnI0M17lOMP/hB/dGS/GHu24vmM=; fh=VjGIVy33gfqRtM9nOjXsRmpOiUp81jdvfncfpJZdwe8=; b=w86F50cskFntQrTpciIuCaI3wEaSPNeMOWtkM7OYvmPGJzVRV5HnMIe2XUawOz30hB jF9ptuuMmBhRlvZwib9aB+QPKAYj3Kpz5nPNTizvVSecr7tt39+t+YU3KwMpmrTe0DrJ bxDjLrevzWWH7yfwiBWFFGm4HNGvkf0BIdpGjiIUTtcjjcgH2UZ8w9BEI6sVqjJDcQ10 pmmoI6hmROo454Fl0DBIIOQMIMePk9ELu8y4RDnE4wm9/QxnMoqM8MPA3KlNJxLJXOSQ s9fRFK5EW4WDUEJ0vc7Sl69/2piNRu+tT0BAhp/LTWeyEyzIXVHFYQdT5R+cnwulFJ7u weEQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=GZEApvKJ; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-4536a071af3si2628241cf.384.2024.08.14.15.42.32 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 14 Aug 2024 15:42: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=pass header.i=@linaro.org header.s=google header.b=GZEApvKJ; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org 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) 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-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) 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) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Beraldo Leal , David Hildenbrand , Thomas Huth , Marcelo Tosatti , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Paolo Bonzini , kvm@vger.kernel.org, Wainer dos Santos Moschetta , qemu-s390x@nongnu.org, =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , =?utf-8?q?Marc?= =?utf-8?q?-Andr=C3=A9_Lureau?= , Richard Henderson , =?utf-8?q?Alex_Benn=C3=A9?= =?utf-8?q?e?= , 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 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Found on debian stable. ../target/s390x/tcg/translate.c: In function ‘get_mem_index’: ../target/s390x/tcg/translate.c:398:1: error: control reaches end of non-void function [-Werror=return-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 } From patchwork Wed Aug 14 22:41:32 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierrick Bouvier X-Patchwork-Id: 819150 Delivered-To: patch@linaro.org Received: by 2002:adf:cd01:0:b0:367:895a:4699 with SMTP id w1csp906355wrm; Wed, 14 Aug 2024 15:42:55 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUMKFD52YBYOEwpVsoWYitPaf+bc2AkVtN2jUKMOlSFDib41WV2MhBSZ8YyqlFML+rj7dXr8qDCqSsmJDwsWKVg X-Google-Smtp-Source: AGHT+IHYI51L6Y3Jk64gj/xNIF4S6SBqxKqUH9dCSLk8CmitYhohRGKUGkItRxLfzja51C/Ofvan X-Received: by 2002:a05:620a:2906:b0:79d:7cfb:884e with SMTP id af79cd13be357-7a4ee31ce62mr531738485a.4.1723675375374; Wed, 14 Aug 2024 15:42:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1723675375; cv=none; d=google.com; s=arc-20160816; b=Y0ugp0SUNMu4Bad3NIkF7stZvkt8o2XxsutAU2JdpexyKtA5dQ01KBraSj5op1+7hq /p4ae0NS3JE0qpM6gFeN7iQH/IWaNug2Jfe/I6lCxqbt//NBKbrDQuZdWkaO9wiuLkhR meaZTAb4DlwzsSay8XSt11NFrQtUGd69PcLdHjPWUtA6iiPl4WOq4AkBZDIPQbDDTPdo s9fymqeQ2HaKFfYJaOTr5fGg66Ng2Hs3E7Pm4zAXmi3d0Y+wbPs5gyyH0gix4KPY45Ec TNVGjPSBIrMfMr278oS5yY8oRN2u+86Dvt7ddu24jkMB9SnWEVErRSz+5Hu3xke+h3mU HNtw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to: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:cc:to :from:dkim-signature; bh=zJho7r2KSIGZArJtcY0/tQGk0chbARupwvgFA11PnCQ=; fh=VjGIVy33gfqRtM9nOjXsRmpOiUp81jdvfncfpJZdwe8=; b=TFH+Ab1lJsF6wosbOErqaAzRGhcL7d2Oio+LA0khXTNUE1KDcc3Ih4MhG2gWG5n+Vl IL4Ib0ewkmWE9FCmA81iPa9uS3vfkmitY4EXRX+VreSYoGhJKlTBpMEJzM0939WGbQ6Y MtD+2UlKGzev3ssQ2SYJCBmZhX5VREoshhbweKXkw1c037WZj4xO7EZWlMHks1+d8DS7 jWKOjRDIoT2UmUJLBBRR/5qxrokOnNlQDImZos5rvVQSXkIsTTZTykJAFjMXM5Wgb6FR 1kmUSs4jg6F3TJsN5ROYH5XPNkJqdQrjwgTDQSsi42e82BWCnAvWYuDWtgIZfwd07zdL f4rA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=JVxdkMoY; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7a4feffe387si38560885a.150.2024.08.14.15.42.55 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 14 Aug 2024 15:42:55 -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=pass header.i=@linaro.org header.s=google header.b=JVxdkMoY; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org 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) 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-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) 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) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Beraldo Leal , David Hildenbrand , Thomas Huth , Marcelo Tosatti , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Paolo Bonzini , kvm@vger.kernel.org, Wainer dos Santos Moschetta , qemu-s390x@nongnu.org, =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , =?utf-8?q?Marc?= =?utf-8?q?-Andr=C3=A9_Lureau?= , Richard Henderson , =?utf-8?q?Alex_Benn=C3=A9?= =?utf-8?q?e?= , 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 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org 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. -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 objects +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: .. code:: - sed -i 's/^const/static const/g' \ - /usr/lib/llvm-10/lib/clang/10.0.0/include/sanitizer/tsan_interface.h + $ git clone --depth=1 --branch=2.81.0 https://github.com/GNOME/glib.git + $ cd glib + $ CFLAGS="-O2 -g -fsanitize=thread" meson build + $ ninja -C build To configure the build for TSan: .. code:: - ../configure --enable-tsan --cc=clang-10 --cxx=clang++-10 \ + ../configure --enable-tsan \ --disable-werror --extra-cflags="-O0" +When executing qemu, don't forget to point to tsan glib: + +.. code:: + + $ glib_dir=/path/to/glib + $ export LD_LIBRARY_PATH=$glib_dir/build/gio:$glib_dir/build/glib:$glib_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.