From nobody Tue Oct 22 22:17:15 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=1729594749; cv=none; d=zohomail.com; s=zohoarc; b=Ltjm7kpeJQIl6ILJ4AyirYlocivO3e/IGbt9JCOFNPB0562DuQ1MMrhiequO0JymFaXs9ZPY83AuLvHgbgfbEM0CdUeNg9FZ7AUUQcaLjyv8FfpAgtflwVrsLaEABDodyuIIOkuA6FIdo3RVX5QxEZhYQ87e9Od4tXSyJ1CnyNE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1729594749; 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=FXjwiUjPDmRUKmjejukivCx1FVXlutJ/frWtXF30WgI=; b=jY2gReIIIplPzgLMIbS9TS2onfSkXGDN8SqS2xKbXgkq6GUmXqwQLfB76/yk/39NFZ1oXkUEfjICRR8XRwR/0yqrU4TBtqTyCst+4EIimIpmYdoWXUVIXDJ3QZe/Aqq1dk7HNPhIbrWgbkWLh0axL8il5DbZJyi0oMYJMFNgEJ8= 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 1729594749343375.5023223875869; Tue, 22 Oct 2024 03:59:09 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t3CYx-0001np-TI; Tue, 22 Oct 2024 06:56:31 -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 1t3CYr-0001iv-A2 for qemu-devel@nongnu.org; Tue, 22 Oct 2024 06:56:26 -0400 Received: from mail-lf1-x132.google.com ([2a00:1450:4864:20::132]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t3CYn-0001yq-BY for qemu-devel@nongnu.org; Tue, 22 Oct 2024 06:56:23 -0400 Received: by mail-lf1-x132.google.com with SMTP id 2adb3069b0e04-539f4d8ef66so7276125e87.1 for ; Tue, 22 Oct 2024 03:56:20 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5cb675eb1bdsm2947453a12.10.2024.10.22.03.56.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 22 Oct 2024 03:56:15 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id BF0265F8A6; Tue, 22 Oct 2024 11:56:14 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1729594579; x=1730199379; 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=FXjwiUjPDmRUKmjejukivCx1FVXlutJ/frWtXF30WgI=; b=Ukl5X34AE0gzAUhgp1B//k5X41uY02S27X8r0PsRHvIe5OSia7lBWBl6jSEPojhe/a qwAxlFPgSdDzrGXtAejuyLnnI4XdnDSpfPbFb5oEGiRj0haH2pSJZSj8lBoKRxDKt+Q4 UzGAALsYdiL9KHRHLeQ/nsZPLMywDL1hF1/OwB5fJjDfjdShvdWo+ftMJNW3MrORqnze WB/m5QJt6YgC6bzva6XPxTQrwvuN7LTpZ1zxiHysF5df9WjXVOsXISBZqmc/I5vkRBTZ LQxkMR+7esXPkoqt1va+pNcYlDxIPHdcVbVJ43UgPfRhNVu9ZYwZMxG5h66tlRekVEGd jvEA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729594579; x=1730199379; 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=FXjwiUjPDmRUKmjejukivCx1FVXlutJ/frWtXF30WgI=; b=s+ZP//WpNYXyRJZOo0BOXSwHfXes1wR2qh8xMyZOV01pFTeKNHAjcG+Rbd97tI0WGO 0cqQeh/yjW4ylPEMR9aXc+qRqczXJoicTFbUIN0rKqHD1PNhaOHI5Jwv+HFJNyI2Oxct Sr8K/0m8OvaDzEb0MORl7gN1RqSDPaUjv6BdzKRK6MdK4LYr8Eeshj4VN4hGYUn95vob ludFQpXbmKBWna2fiwAD/m4U4YLF+52efROzeOWkMxgeHM3yRajIcBf2QXtuDCKBfj/F tHzj1Doguw6V5mjU0vwk4KSQ8siYE6iRX9sVoOF42evQ2swU8SHWQNXTEQiGA/y0Wpve 0X5g== X-Gm-Message-State: AOJu0YyYGWVnFZQ7vT7ciTMJxLS8acAX2fObKQZGIoouEjHR53qI2Cc8 deVtx3ODlSqfQY0Glaa6kI80R6GBHcgNSuUux+QhJysqMSsXhPLyxCLAYwOFoZU= X-Google-Smtp-Source: AGHT+IFnyQzZQ7bHbDbOpYPXpjtSnilsQDL7HRDM+s0y4d6oS+Xo96+ra1aRtC+YDcuLeBLbm75Uyw== X-Received: by 2002:a05:6512:108f:b0:536:9ef0:d829 with SMTP id 2adb3069b0e04-53a1544afc8mr7923850e87.44.1729594579206; Tue, 22 Oct 2024 03:56:19 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Beraldo Leal , Laurent Vivier , Wainer dos Santos Moschetta , Mahmoud Mandour , Jiaxun Yang , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Yanan Wang , Thomas Huth , John Snow , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , qemu-arm@nongnu.org, =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Eduardo Habkost , devel@lists.libvirt.org, Cleber Rosa , kvm@vger.kernel.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Alexandre Iooss , Peter Maydell , Richard Henderson , Riku Voipio , Zhao Liu , Marcelo Tosatti , "Edgar E. Iglesias" , Marcel Apfelbaum , Pierrick Bouvier , Paolo Bonzini , Ilya Leoshkevich Subject: [PATCH v2 01/20] tests/docker: Fix microblaze atomics Date: Tue, 22 Oct 2024 11:55:55 +0100 Message-Id: <20241022105614.839199-2-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241022105614.839199-1-alex.bennee@linaro.org> References: <20241022105614.839199-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::132; envelope-from=alex.bennee@linaro.org; helo=mail-lf1-x132.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 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: 1729594751432116600 From: Ilya Leoshkevich GCC produces invalid code for microblaze atomics. The fix is unfortunately not upstream, so fetch it from an external location and apply it locally. Suggested-by: Peter Maydell Signed-off-by: Ilya Leoshkevich Message-Id: <20240919152308.10440-1-iii@linux.ibm.com> Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Pierrick Bouvier --- .../debian-microblaze-cross.d/build-toolchain.sh | 8 ++++++++ tests/docker/dockerfiles/debian-toolchain.docker | 7 +++++++ 2 files changed, 15 insertions(+) diff --git a/tests/docker/dockerfiles/debian-microblaze-cross.d/build-toolc= hain.sh b/tests/docker/dockerfiles/debian-microblaze-cross.d/build-toolchai= n.sh index 23ec0aa9a7..c5cd0aa931 100755 --- a/tests/docker/dockerfiles/debian-microblaze-cross.d/build-toolchain.sh +++ b/tests/docker/dockerfiles/debian-microblaze-cross.d/build-toolchain.sh @@ -10,6 +10,8 @@ TOOLCHAIN_INSTALL=3D/usr/local TOOLCHAIN_BIN=3D${TOOLCHAIN_INSTALL}/bin CROSS_SYSROOT=3D${TOOLCHAIN_INSTALL}/$TARGET/sys-root =20 +GCC_PATCH0_URL=3Dhttps://raw.githubusercontent.com/Xilinx/meta-xilinx/refs= /tags/xlnx-rel-v2024.1/meta-microblaze/recipes-devtools/gcc/gcc-12/0009-Pat= ch-microblaze-Fix-atomic-boolean-return-value.patch + export PATH=3D${TOOLCHAIN_BIN}:$PATH =20 # @@ -31,6 +33,12 @@ mv gcc-11.2.0 src-gcc mv musl-1.2.2 src-musl mv linux-5.10.70 src-linux =20 +# +# Patch gcc +# + +wget -O - ${GCC_PATCH0_URL} | patch -d src-gcc -p1 + mkdir -p bld-hdr bld-binu bld-gcc bld-musl mkdir -p ${CROSS_SYSROOT}/usr/include =20 diff --git a/tests/docker/dockerfiles/debian-toolchain.docker b/tests/docke= r/dockerfiles/debian-toolchain.docker index 687a97fec4..ab4ce29533 100644 --- a/tests/docker/dockerfiles/debian-toolchain.docker +++ b/tests/docker/dockerfiles/debian-toolchain.docker @@ -10,6 +10,8 @@ FROM docker.io/library/debian:11-slim # ??? The build-dep isn't working, missing a number of # minimal build dependiencies, e.g. libmpc. =20 +RUN sed 's/^deb /deb-src /' /etc/apt/sources.list.= d/deb-src.list + RUN apt update && \ DEBIAN_FRONTEND=3Dnoninteractive apt install -yy eatmydata && \ DEBIAN_FRONTEND=3Dnoninteractive eatmydata \ @@ -33,6 +35,11 @@ RUN cd /root && ./build-toolchain.sh # and the build trees by restoring the original image, # then copying the built toolchain from stage 0. FROM docker.io/library/debian:11-slim +RUN apt update && \ + DEBIAN_FRONTEND=3Dnoninteractive apt install -yy eatmydata && \ + DEBIAN_FRONTEND=3Dnoninteractive eatmydata \ + apt install -y --no-install-recommends \ + libmpc3 COPY --from=3D0 /usr/local /usr/local # As a final step configure the user (if env is defined) ARG USER --=20 2.39.5 From nobody Tue Oct 22 22:17:16 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=1729594776; cv=none; d=zohomail.com; s=zohoarc; b=M2GImXwXOSGB4jUHJg37ZYC6dWGVwTp51DtjsPClmDGMkrYpLtUUyldZKL2fo4mLduqei3DrqcXR4nknsdhFgtJPqYilh1+EB14S4Q/T+/QBzV0/LRzgn0f+gSJSOl8zzWA0ItKmLr1/jYC8Ey1uUOJtSESzzEUdiudHKG+j2gA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1729594776; 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=LfxPswSzpy5PJY7wIfJ4Znven71oBCSA3p2JUb9OqOg=; b=KjjLcWbPtWvFiv+9UfaMGa1gxn/a4Z/UMCSRQbDrjAUAnkU9oFSdvGc/kT6bETPXAbI5aYWhrB414RtzXxErU66PVrH7Ebu9NfEBuIsTi2Lz42SAkXd6QaZFSuCke3V9sSrbqDB0EAFkq12iUWbA2gXZj0ATcnH1+mIYwdypjrY= 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 1729594776120975.2212018582228; Tue, 22 Oct 2024 03:59:36 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t3CYv-0001lO-TD; Tue, 22 Oct 2024 06:56:30 -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 1t3CYo-0001ia-N5 for qemu-devel@nongnu.org; Tue, 22 Oct 2024 06:56:24 -0400 Received: from mail-ed1-x52f.google.com ([2a00:1450:4864:20::52f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t3CYn-0001yt-47 for qemu-devel@nongnu.org; Tue, 22 Oct 2024 06:56:22 -0400 Received: by mail-ed1-x52f.google.com with SMTP id 4fb4d7f45d1cf-5c9709c9b0cso7211143a12.1 for ; Tue, 22 Oct 2024 03:56:20 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5cb66c7262bsm2981150a12.82.2024.10.22.03.56.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 22 Oct 2024 03:56:15 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id D35445F8CC; Tue, 22 Oct 2024 11:56:14 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1729594580; x=1730199380; 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=LfxPswSzpy5PJY7wIfJ4Znven71oBCSA3p2JUb9OqOg=; b=hXzWgu13QIr+QYXUj0yTO/727/OWh1+qF08195R8LmqpA0NEmVZmpMPGHcFWEnY3oq hDRjYn51SivmTdwDsF9fvc0xhO9a9DqSl++q0aMnZbejrmNEuJcbPIMK99ovAsZvedM+ YjpRGUvwuqxxOyZ4JLGykLTo+p3aOp1qwj1yOESz1Qj/5sm7dRonCj8KU3Xd8cB+AbzK 2irrfiFTh9EcyzbuICBcRuSAJXdARqXl6Aq445UnkNcxyfPHS6HokXGj8TiJ9xDyDdnh gKe0HX6NOJAL2x40Uphr6KIN92iQs/Eycy8IxQ/W5n9462h9tHZNMMn2mg9u7DrbMZlv 0vXg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729594580; x=1730199380; 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=LfxPswSzpy5PJY7wIfJ4Znven71oBCSA3p2JUb9OqOg=; b=rohM4eX/iRx+43i0oGMoK9wfxS3wt+diSOh7+TWQVRAq91hT9yUAY9hGAYZpU0KbCn m0QmMNekQlVyzJAfdvGjrKFQLxCznaGyd3pk+GeMRJPZApXJ586rOvcuqOVVwd+6KYPe fnjHXsmNB3LTyfmZcWtQw3xEkMCH9h38RW90mTYVZDLZrGQPDEHtq3WNtHwBl44cK4Qm eAS+MNp9gymtg25Xe81Sg8ElN+Hky19AiTe9SRWat5awWsmV9b80cNZO0LQUpHKsYSql Sb4jHMEKW9jZjxvVAO147kBf7AzwQNNIBUf/ybX8QQjcGFtRjtCSYePYa6Yw+hFR2SFj 79bA== X-Gm-Message-State: AOJu0YwvOXnrmmfCiHRW1o0p9fphg9DAmMKgMmMvUY8MdIVbADUKOkpO 7QR+OyTzbawZ4vxFlXa5Eq/8N2/QEF4R9uK/sLuKUDcqzWKE940Rs1bav9lxe94= X-Google-Smtp-Source: AGHT+IEWTHq0nZKsD5+vd+nTSltz6qRpJ8m1ZUA3e2J9fRXNb4Q6Dz/tYps28BHQ7v9MYQ4wj/pQ1w== X-Received: by 2002:a05:6402:1d49:b0:5c9:57bd:e9d with SMTP id 4fb4d7f45d1cf-5cb782f9e3fmr2351410a12.19.1729594579617; Tue, 22 Oct 2024 03:56:19 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Beraldo Leal , Laurent Vivier , Wainer dos Santos Moschetta , Mahmoud Mandour , Jiaxun Yang , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Yanan Wang , Thomas Huth , John Snow , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , qemu-arm@nongnu.org, =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Eduardo Habkost , devel@lists.libvirt.org, Cleber Rosa , kvm@vger.kernel.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Alexandre Iooss , Peter Maydell , Richard Henderson , Riku Voipio , Zhao Liu , Marcelo Tosatti , "Edgar E. Iglesias" , Marcel Apfelbaum , Pierrick Bouvier , Paolo Bonzini Subject: [PATCH v2 02/20] tests/docker: add NOFETCH env variable for testing Date: Tue, 22 Oct 2024 11:55:56 +0100 Message-Id: <20241022105614.839199-3-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241022105614.839199-1-alex.bennee@linaro.org> References: <20241022105614.839199-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::52f; envelope-from=alex.bennee@linaro.org; helo=mail-ed1-x52f.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 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: 1729594777470116600 Testing non-auto built docker containers (i.e. custom built compilers) is a bit fiddly as you couldn't continue a build with a previously locally built container. While you can play games with REGISTRY its simpler to allow a NOFETCH that will go through the cached build process when you run the tests. Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Pierrick Bouvier --- tests/docker/Makefile.include | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include index 681feae744..fead7d3abe 100644 --- a/tests/docker/Makefile.include +++ b/tests/docker/Makefile.include @@ -92,10 +92,10 @@ endif docker-image-alpine: NOUSER=3D1 =20 debian-toolchain-run =3D \ - $(if $(NOCACHE), \ + $(if $(NOCACHE)$(NOFETCH), \ $(call quiet-command, \ $(DOCKER_SCRIPT) build -t qemu/$1 -f $< \ - $(if $V,,--quiet) --no-cache \ + $(if $V,,--quiet) $(if $(NOCACHE),--no-cache) \ --registry $(DOCKER_REGISTRY) --extra-files \ $(DOCKER_FILES_DIR)/$1.d/build-toolchain.sh, \ "BUILD", $1), \ @@ -177,6 +177,7 @@ docker: @echo ' NETWORK=3D$$BACKEND Enable virtual network interface with = $$BACKEND.' @echo ' NOUSER=3D1 Define to disable adding current user t= o containers passwd.' @echo ' NOCACHE=3D1 Ignore cache when build images.' + @echo ' NOFETCH=3D1 Do not fetch from the registry.' @echo ' EXECUTABLE=3D Include executable in image.' @echo ' EXTRA_FILES=3D" [... ]"' @echo ' Include extra files in image.' --=20 2.39.5 From nobody Tue Oct 22 22:17:16 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=fail(p=none dis=none) header.from=linaro.org Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1729594607121618.6044685184215; Tue, 22 Oct 2024 03:56:47 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 996) id DA8C41904; Tue, 22 Oct 2024 06:56:45 -0400 (EDT) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id C38DD15BD; Tue, 22 Oct 2024 06:56:22 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 996) id D6EA51590; Tue, 22 Oct 2024 06:56:18 -0400 (EDT) Received: from mail-wr1-f51.google.com (mail-wr1-f51.google.com [209.85.221.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id 305E7158A for ; Tue, 22 Oct 2024 06:56:18 -0400 (EDT) Received: by mail-wr1-f51.google.com with SMTP id ffacd0b85a97d-37d495d217bso5306505f8f.0 for ; Tue, 22 Oct 2024 03:56:18 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a9a91572abdsm326459266b.171.2024.10.22.03.56.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 22 Oct 2024 03:56:15 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id E69C95F8D7; Tue, 22 Oct 2024 11:56:14 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-2.3 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_HELO_NONE autolearn=unavailable autolearn_force=no version=3.4.4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1729594577; x=1730199377; darn=lists.libvirt.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=VedVTeltUD2hOjhTzgZcTRLZkzOYBwLXkPWLhE+aU3A=; b=GlsgzgAh52boQi0x5AGfExZ9mh6iJvrCPgL3RopLZc6YA/k5k0E+H3kudY88nMgzBI bjgsCCo05ptI5k2Pugc8hxFIxIxlKB1o1mqLfpeWyfB0Gu58iEKkCsPKab2Dti7dQHCo SSS0WOsmxNOQiMJQXGAsQ6xTkhPllyunWFLoDsn/21eKQooRIrXDG4DGh1hFhveEpBfs BSp78/sl9PjY9x0KCXO77KeRvXqUURPMKH1hcLirm7/9JZc4VdyoxkAng+teC99yA9VR 4AdsnGuhsq5rJznJnM3L89nbWE/ycwRK9QKFHBVQlXYKI+3caN8gBBAZKEX69D1v8NL6 NmuA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729594577; x=1730199377; 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=VedVTeltUD2hOjhTzgZcTRLZkzOYBwLXkPWLhE+aU3A=; b=F1bPy+rp/Hqsj1Iy8qQ02CLgy3ndodg+Z5/Z/O8Toa5chaKQJkwlPlN16YFuCy6JAL fPUB/3y8rkdbmFAoK3oHOKfVMJ8TLJ8SRwGcScJqz6aPXQoh60dkWuAp5CMERPjgonNe SMbyRpfg0C6udnbFnZUAlpzQYqfe1+8qOf/x51ugzUQ9WOtvP3yssRiUveK9CKMUDXZt Hd7kUZncKufSxAaBCIw2rykhJx4TFQNThjpTF4+ua6q135vrCSXFzhXpv5/+/RQW+G7W CZYf8IYb8OFmH6Far6OsYPgEsGMGdm4RqWGNTb4mNbMW76waRR7TUfKdqx84w16z4Qv7 T9Cw== X-Forwarded-Encrypted: i=1; AJvYcCX8fpTNhG9DVrsYe9Ytzz9OesoxcmVQwd3TH+YE+VcEk3NH3LZzDVjuJUWiCMgHHAEz3yqsWg==@lists.libvirt.org X-Gm-Message-State: AOJu0Yx/iAvYdLZhyqttwlqQRPoa/1fSuJlCB4C0xDvI1w8KjLNcSTjc g26+NlfuHcBYmKDRyMFsHmDsJZ5eZ4HpMzUysUh2lk9zki8H5vLo2yQ5zJBU4mA= X-Google-Smtp-Source: AGHT+IEkxGTtQDWx75WFvqG2eOnkN/ttLbD0g2OlndDgZrl3BuDo9P5GA68WBIt5JhY19RGUOaJdnw== X-Received: by 2002:a5d:424c:0:b0:37d:51b7:5e08 with SMTP id ffacd0b85a97d-37ea21d8fbdmr11273254f8f.18.1729594576819; Tue, 22 Oct 2024 03:56:16 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v2 03/20] MAINTAINERS: mention my testing/next tree Date: Tue, 22 Oct 2024 11:55:57 +0100 Message-Id: <20241022105614.839199-4-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241022105614.839199-1-alex.bennee@linaro.org> References: <20241022105614.839199-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-ID-Hash: MEZ3XJ2UQZVV42GPYFHJ5EDZK6546YRA X-Message-ID-Hash: MEZ3XJ2UQZVV42GPYFHJ5EDZK6546YRA X-MailFrom: alex.bennee@linaro.org X-Mailman-Rule-Hits: nonmember-moderation X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-config-1; header-match-config-2; header-match-config-3; header-match-devel.lists.libvirt.org-0 CC: Beraldo Leal , Laurent Vivier , Wainer dos Santos Moschetta , Mahmoud Mandour , Jiaxun Yang , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Yanan Wang , Thomas Huth , John Snow , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , qemu-arm@nongnu.org, Eduardo Habkost , devel@lists.libvirt.org, Cleber Rosa , kvm@vger.kernel.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Alexandre Iooss , Peter Maydell , Richard Henderson , Riku Voipio , Zhao Liu , Marcelo Tosatti , "Edgar E. Iglesias" , Marcel Apfelbaum , Pierrick Bouvier , Paolo Bonzini X-Mailman-Version: 3.2.2 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1729594608856116600 Content-Type: text/plain; charset="utf-8" I put it under my name as there may be other maintainer testing trees as well. Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Thomas Huth --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index c21d6a2f9e..b84787ae1b 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -4074,6 +4074,7 @@ Build and test automation ------------------------- Build and test automation, general continuous integration M: Alex Benn=C3=A9e +T: git https://gitlab.com/stsquad/qemu testing/next M: Philippe Mathieu-Daud=C3=A9 M: Thomas Huth R: Wainer dos Santos Moschetta --=20 2.39.5 From nobody Tue Oct 22 22:17:16 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=1729594682; cv=none; d=zohomail.com; s=zohoarc; b=hyJ2koE6pC9oOQPpjKBeMgE+EB4mGKtJNe3zxzcmxvl1c9KY74JhYVsVvRFhGBjlchPv0G3YtL+jnTvCjWIqPZc/2oDlF/nUfDCEJsihajNOskl56wQE8bWBhIL2qFPTv2wMxAUGJWaKVZP1x7NydMbbeVV93VxE71bRWJlkIdw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1729594682; 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=/9/+YXB0yFn3lOXE+wDfnOMUk7oakkE6QbrJ6dxZQ+4=; b=VJHkt4ZHKprE7ZQXHZYR5HmgUpHmg7MuuU7RcLfi09yJzSbZa73AXPFnHp/Y2ohAP7ocrQq4R4qiMF08Tsb6vkGcjiAdHLas94+lHc+NKfzGMI2JTS3b3KrRaFg1Jov5LeMWpshrVAv2xDJdV7qh3V4pBnp+sn6dl/uDApHUPpw= 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 172959468203242.65518906465775; Tue, 22 Oct 2024 03:58:02 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t3CYu-0001kn-9P; Tue, 22 Oct 2024 06:56:28 -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 1t3CYo-0001i9-5H for qemu-devel@nongnu.org; Tue, 22 Oct 2024 06:56:22 -0400 Received: from mail-lf1-x12e.google.com ([2a00:1450:4864:20::12e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t3CYl-0001yI-C6 for qemu-devel@nongnu.org; Tue, 22 Oct 2024 06:56:21 -0400 Received: by mail-lf1-x12e.google.com with SMTP id 2adb3069b0e04-539fb49c64aso7695062e87.0 for ; Tue, 22 Oct 2024 03:56:18 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a9a912d62e4sm321153666b.7.2024.10.22.03.56.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 22 Oct 2024 03:56:15 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 0741C5F913; Tue, 22 Oct 2024 11:56:15 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1729594577; x=1730199377; 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=/9/+YXB0yFn3lOXE+wDfnOMUk7oakkE6QbrJ6dxZQ+4=; b=s7vdUzlfuVxb0zWoPc6QWYx/UlE+nzMgZ2nY79QhTSmHo1OwU0+c21kAQVuV7uSDOg +mJlyO9wUuZpn0LnXTW4qV7/+wI343kIlNDkWE2D0GNvTJ6aK7e0sD6Nkd3NPhEG8VUi sgHECExozmSPj3q4HW+hzXmz2qwSpQhsLeKTCSX0hDOWE7iFE3wVsA6wJfU3wgiKdVJC TKLriK0afYizXDUQG0XJ/Hv9V3qIPS67RsGnt/OOUpPR23lFZNTXK8uwE4oNGIfMuB7/ kloE+hKfouXW2H8n0DT7ab4Ipg9yMx4bvsnG0rOc5pIDRs4/NWyluQeTdGB7z6GvtiMW MovQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729594577; x=1730199377; 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=/9/+YXB0yFn3lOXE+wDfnOMUk7oakkE6QbrJ6dxZQ+4=; b=JOIYeSKOWYZHzUMxttdFxY4OPL4bmrbdJ4aPCYQDeQ3qLGeuVW9voLAVCIh3RhqqUQ 5xmD9q2xs10F94Rg9zJbmk1yfSsmOUdRxscSFvjK1KXdKJc1+raqOgum6E/vYQcQPgPc SmKNazjVwABYdPD9+gbxEEEyJJ8GeJVA4QR4HGZv/2Z0zc1An6zpgbUmzgrDBZ5bEqqR gnqmmDW+wJcN8Go2HSWftqeZnUk6D9YfRhBfZTORxzIQSUWPhZXAB4UPg3eRYxDUvk3I 3Ew5m74QEncU3iATZ8aaCgVESBZRf7ko6I745UAtMDW/T9dEKnxZuXc+78xXY9TDhuMT XMIw== X-Gm-Message-State: AOJu0Yy88xERedqYcJsAcwRWemua0a4qBGtOPPjtqMZarXwRGQvKc89G 6s7+3MJRTIvHq2YdxuuVCnkCvmA+DGZZ/Wji+ln3bpOb8rwg5T6VXW/33gCddeg= X-Google-Smtp-Source: AGHT+IGyaTZRzVDmFkdPhfv0rvAvIdjH0I+E59F1p2dZtHMO7E+32HML2OhzkPGNPbWtrxG3At+wRA== X-Received: by 2002:a05:6512:2388:b0:539:9767:903d with SMTP id 2adb3069b0e04-53a154eb91emr9004463e87.60.1729594577248; Tue, 22 Oct 2024 03:56:17 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Beraldo Leal , Laurent Vivier , Wainer dos Santos Moschetta , Mahmoud Mandour , Jiaxun Yang , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Yanan Wang , Thomas Huth , John Snow , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , qemu-arm@nongnu.org, =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Eduardo Habkost , devel@lists.libvirt.org, Cleber Rosa , kvm@vger.kernel.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Alexandre Iooss , Peter Maydell , Richard Henderson , Riku Voipio , Zhao Liu , Marcelo Tosatti , "Edgar E. Iglesias" , Marcel Apfelbaum , Pierrick Bouvier , Paolo Bonzini Subject: [PATCH v2 04/20] meson: hide tsan related warnings Date: Tue, 22 Oct 2024 11:55:58 +0100 Message-Id: <20241022105614.839199-5-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241022105614.839199-1-alex.bennee@linaro.org> References: <20241022105614.839199-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::12e; envelope-from=alex.bennee@linaro.org; helo=mail-lf1-x12e.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 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: 1729594683302116600 From: Pierrick Bouvier 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 Reviewed-by: Thomas Huth Message-Id: <20240910174013.1433331-2-pierrick.bouvier@linaro.org> Signed-off-by: Alex Benn=C3=A9e --- meson.build | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/meson.build b/meson.build index d26690ce20..bdd67a2d6d 100644 --- a/meson.build +++ b/meson.build @@ -538,7 +538,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.5 From nobody Tue Oct 22 22:17:16 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=1729594637; cv=none; d=zohomail.com; s=zohoarc; b=JvgLfIS60mUBZdLSO9Z0f3GLz6ViCDkP+p1PRbskZ/FaWe6DyV1aZktuisyj81Es0AELoGAh4eDBPIIuONmMsdeWxxWFb718zcAgkJzE1GVMz5osftXdaJ56l7ZM6dC3/SI3HcdVM8DDyljjoH9vOgHf/sDPsKJOowVZdtSXs2I= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1729594637; 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=iZZo1oPZPqzjBeoixQ7wpptFRyTvJhgIff9wczeHXgQ=; b=gwfx9e+jNP4MTVAw8y8g7fA2O2KKuyqSYR2DVuc+Y9hrDzLiqAPwBr2R/fXiqGTcfMa4EvVVNGq20FkKiZEZBu2TC4RRmR6WofnCTHPmF7+W5LDfaHL/oBsDUy9OW3oS0L3dcqUN7b6huT5SNWe4pPBaHMDnSKY08f9E7R46gBQ= 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 1729594637051247.35867411204345; Tue, 22 Oct 2024 03:57:17 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t3CZX-0001x8-H2; Tue, 22 Oct 2024 06:57:10 -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 1t3CYy-0001oN-6I for qemu-devel@nongnu.org; Tue, 22 Oct 2024 06:56:32 -0400 Received: from mail-ed1-x533.google.com ([2a00:1450:4864:20::533]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t3CYw-00023U-2N for qemu-devel@nongnu.org; Tue, 22 Oct 2024 06:56:31 -0400 Received: by mail-ed1-x533.google.com with SMTP id 4fb4d7f45d1cf-5c96936065dso5865766a12.3 for ; Tue, 22 Oct 2024 03:56:29 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5cb66a657bcsm3124198a12.23.2024.10.22.03.56.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 22 Oct 2024 03:56:19 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 1AA775F925; Tue, 22 Oct 2024 11:56:15 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1729594588; x=1730199388; 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=iZZo1oPZPqzjBeoixQ7wpptFRyTvJhgIff9wczeHXgQ=; b=Z2AcBfUK05G7uwVw0Ce5CGgywzYhxEZWHLZ8EXh3cTbgSQE8DgBj1lr6JiPSh6iAuL W2hYP/JCZtbrnZUy3zijpWDrpdP+Ni91hwBFFnSNUQZnEX26EUbkFSy2Av1LEKsxh6q2 cSwlzvoZi73sKy5OYva+l+xvcMsZTut9oHzDZNz3Rq4RTCN2+j2/GxRz2/VJ66/m3hPp JsSH8XY9PBfXhdLwFQpGrxAGERlEd8BSTXvSOmhqFm8kay/jaQGmvIafww+k9Dwq7HnX ePg4Jcp+U6kpPJqwFsBZZXIM0D2rHuQyZ9f7zjBWz9vs17KRtXsZJE4ZnD4ELT63itJ4 ZXzg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729594588; x=1730199388; 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=iZZo1oPZPqzjBeoixQ7wpptFRyTvJhgIff9wczeHXgQ=; b=dsDYJGK7uzHgRBnnVXRmy45AOV2MY5WJZqK1a4M2C7HT9E6OBn7o3zdsJJ2caKGndE erleX20AJEuwJisVpwOqWrPzsFtsIc3GYG3QLa5Xhwb5UGuJyG4ITSogO2DmE0IIazGz i2l6TjFocTuuIMvuSxangrHoEfvUmJaChrWmPu7zNwa9DFVMDHgK3kQEOA71cUYslf4O wNKzZZH9duId/M4uvlpyatzD+ANhgJ7px3bbL3WFD+1a6uK0vZ4w6/JaZ5ry6ehX4LXz RjaWPptiHD/YMcN0WfiuwyQNRI++tg5/hu4wSbblb7GZ3akuwrPqyImKY0GZBDbP/MJ9 pgAA== X-Gm-Message-State: AOJu0YwYxXXVBMKbIQTbsma63vn/8QDho86b3ZDt05PKWFB9idPRi3KR lbJFBD8fl6v2PYngYZVII4e9hIQlXXUEOT8UKRIEVyxR1eHOoTaSzX0DFAXqTh4= X-Google-Smtp-Source: AGHT+IFRsXwXWWZ+1iUXj/NDdR1zmIgl8xhujNIEkYhFmxY8XSoNScTyD+Rf8wUGR1kAm8G1SujWGA== X-Received: by 2002:a05:6402:3514:b0:5cb:7594:9ece with SMTP id 4fb4d7f45d1cf-5cb782e16e2mr2678552a12.17.1729594588142; Tue, 22 Oct 2024 03:56:28 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Beraldo Leal , Laurent Vivier , Wainer dos Santos Moschetta , Mahmoud Mandour , Jiaxun Yang , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Yanan Wang , Thomas Huth , John Snow , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , qemu-arm@nongnu.org, =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Eduardo Habkost , devel@lists.libvirt.org, Cleber Rosa , kvm@vger.kernel.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Alexandre Iooss , Peter Maydell , Richard Henderson , Riku Voipio , Zhao Liu , Marcelo Tosatti , "Edgar E. Iglesias" , Marcel Apfelbaum , Pierrick Bouvier , Paolo Bonzini Subject: [PATCH v2 05/20] docs/devel: update tsan build documentation Date: Tue, 22 Oct 2024 11:55:59 +0100 Message-Id: <20241022105614.839199-6-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241022105614.839199-1-alex.bennee@linaro.org> References: <20241022105614.839199-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::533; envelope-from=alex.bennee@linaro.org; helo=mail-ed1-x533.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 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: 1729594638901116600 From: Pierrick Bouvier 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 Reviewed-by: Thomas Huth Message-Id: <20240910174013.1433331-4-pierrick.bouvier@linaro.org> Signed-off-by: Alex Benn=C3=A9e --- docs/devel/testing/main.rst | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/docs/devel/testing/main.rst b/docs/devel/testing/main.rst index 09725e8ea9..91f4dc61fb 100644 --- a/docs/devel/testing/main.rst +++ b/docs/devel/testing/main.rst @@ -628,20 +628,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.5 From nobody Tue Oct 22 22:17:16 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=1729594671; cv=none; d=zohomail.com; s=zohoarc; b=kEGTmiGHdW3qbRTWnUFoV7mO00BvSSV1Y41g+TCMzCbpCiySZkAVKbh3Gq7vqqPh02PqawiXp7j0wJsg/x3nqwQ5+WkVQuN1g4MMkBtFdBRpDKlMnye1VNFFL1gsIaiey+5cLMC1gSLWexOL4c+uq2F8vmj2UE6AYrjEYlNCPNw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1729594671; 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=COTB8IX9EL+KvqwMSRlZ5WoxH3jy7uQtMVM8wKCP4/g=; b=S6wRj7epy8DiI+jCy+kpPWm5ukIZBhmWN66OwhhzA5WuovnZprGnETUVgnl18bq3GrVMw9Ny2tXZqIn6xwDgPMdg7YF7pIEPyLX/3YnUhPmR3JHFbs7oQXH1XdRsYu6B77AWBAkar1HPgw4mcg1v4kxRoSbu3iWzoPHugqX4R3M= 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 1729594671955719.9401752881222; Tue, 22 Oct 2024 03:57:51 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t3CYu-0001ko-AZ; Tue, 22 Oct 2024 06:56:28 -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 1t3CYr-0001iu-9x for qemu-devel@nongnu.org; Tue, 22 Oct 2024 06:56:26 -0400 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t3CYn-0001zD-Mp for qemu-devel@nongnu.org; Tue, 22 Oct 2024 06:56:23 -0400 Received: by mail-wr1-x430.google.com with SMTP id ffacd0b85a97d-37d4ac91d97so5282435f8f.2 for ; Tue, 22 Oct 2024 03:56:21 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a9a91307874sm323980966b.94.2024.10.22.03.56.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 22 Oct 2024 03:56:19 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 2F1E35F92E; Tue, 22 Oct 2024 11:56:15 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1729594580; x=1730199380; 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=COTB8IX9EL+KvqwMSRlZ5WoxH3jy7uQtMVM8wKCP4/g=; b=p5QDVz2phnPTmjsR8vP3N8UTNsE13QMvswISY9BpX1bQaDAblHt4BCdZtT6Cv2WQ7A oTPI8I01negcTy0m+2Tc1qsp4LRw5vRYMutdmZWaTtoA8KpSJV1ccdG/xx2nXvjY8MQ8 mn23sgJtJO+VNEhTp3927ksS0ecs2Fw7ZXCKJh88KYFWfm3iaGHAJVC6n3GAFAWCufVc LDqOMeo5Rd64qynMPDK1xVf8sHQpA9xy5VOUVhoXvLZeBcckOPfiPLqX5qXKcudkGpkS Ib1IFjJngGgK7uixVsVeFfVz28t+xNmealp9UyzdiqyooljmXx+ZKjaeUuhKPPIDbpFK zP+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729594580; x=1730199380; 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=COTB8IX9EL+KvqwMSRlZ5WoxH3jy7uQtMVM8wKCP4/g=; b=QetDPlQXhfNs7S6O4CaR8azXG0eT0WjbfbUrF45j0avnJH8RaoTV8uT7g50b94gRpj rMvWorJm+nO9IPVlvGE+sOKfC7jtYGlMPIBkjHDfwStxtMdvoWf3ZQvChfGK5IygoD57 3R3xG03nmxVjTC+HI76H5j5WAe2Leh804l1Q5g954MuyQ2/cJ9yH38XbGDlfElKNMO7G PUgZPQ9dpJJVCX4Jfv9y8VYBHKT6GekfU4HqSg/mr3fBmjethU3eDFB1PB3hZOWIozwa aOzABYwAqbO+nisCJgB8r7MqqBrv1lYp5qYclQaNyFdpMjJ+q9zvGw6k14AFlLR03YSh DsUQ== X-Gm-Message-State: AOJu0YwPR/2txG3QkdQWRnSvN63LGOchU/tdNAPurh+BOCelPD6R9rus yS5KNfLBWOSEFBRP80DUf6mgrUysKxMQTja6BEHzSr7ibw74Hxo0MV4AZH2PgX8= X-Google-Smtp-Source: AGHT+IF8gTYNUNEInBLeGzU/PWN6iK1a20tMenTDraAJtih3b9OaMANLgGCpLzqKTnRdNaK+s8hEig== X-Received: by 2002:a5d:424c:0:b0:37d:51b7:5e08 with SMTP id ffacd0b85a97d-37ea21d8fbdmr11273338f8f.18.1729594580178; Tue, 22 Oct 2024 03:56:20 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Beraldo Leal , Laurent Vivier , Wainer dos Santos Moschetta , Mahmoud Mandour , Jiaxun Yang , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Yanan Wang , Thomas Huth , John Snow , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , qemu-arm@nongnu.org, =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Eduardo Habkost , devel@lists.libvirt.org, Cleber Rosa , kvm@vger.kernel.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Alexandre Iooss , Peter Maydell , Richard Henderson , Riku Voipio , Zhao Liu , Marcelo Tosatti , "Edgar E. Iglesias" , Marcel Apfelbaum , Pierrick Bouvier , Paolo Bonzini Subject: [PATCH v2 06/20] scripts/ci: remove architecture checks for build-environment updates Date: Tue, 22 Oct 2024 11:56:00 +0100 Message-Id: <20241022105614.839199-7-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241022105614.839199-1-alex.bennee@linaro.org> References: <20241022105614.839199-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::430; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x430.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 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: 1729594673079116600 We were missing s390x here. There isn't much point testing for the architecture here as we will fail anyway if the appropriate package list is missing. Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Pierrick Bouvier --- scripts/ci/setup/ubuntu/build-environment.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/scripts/ci/setup/ubuntu/build-environment.yml b/scripts/ci/set= up/ubuntu/build-environment.yml index edf1900b3e..56b51609e3 100644 --- a/scripts/ci/setup/ubuntu/build-environment.yml +++ b/scripts/ci/setup/ubuntu/build-environment.yml @@ -39,7 +39,6 @@ when: - ansible_facts['distribution'] =3D=3D 'Ubuntu' - ansible_facts['distribution_version'] =3D=3D '22.04' - - ansible_facts['architecture'] =3D=3D 'aarch64' or ansible_facts[= 'architecture'] =3D=3D 'x86_64' =20 - name: Install packages for QEMU on Ubuntu 22.04 package: @@ -47,7 +46,6 @@ when: - ansible_facts['distribution'] =3D=3D 'Ubuntu' - ansible_facts['distribution_version'] =3D=3D '22.04' - - ansible_facts['architecture'] =3D=3D 'aarch64' or ansible_facts[= 'architecture'] =3D=3D 'x86_64' =20 - name: Install armhf cross-compile packages to build QEMU on AArch64 = Ubuntu 22.04 package: --=20 2.39.5 From nobody Tue Oct 22 22:17:16 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=1729594773; cv=none; d=zohomail.com; s=zohoarc; b=QqsYWrNxPoMhWIPTLl7bJHrW3HKspBCGP2uyHsBJP6JSV/pbhnROnlcf18Pu0zzDricetWp/lTk6a5ynkxID0Q3+TWE1P6h4f0BPXWpnvQ2eqUvzFJ3t7QjfK3JKFRl4svBGXsdG+Xwhxx5b1KDSyuWFXa/36vvZCBn4QLcnoSI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1729594773; 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=HOyxXWkbmxyeJp1271bZ6nHrEgwT9agO1ZydqcSHiVY=; b=AJ8PMQRXzsZ8sJ0Fakdbu5HRfNo8rU5xJFF8BsLA38XcEsYmdZViHYcWvctMcAqkn9e+o9dh1O5+I8PGfk+IobBq5rHz6JF7m6c2azW9tolHp+1pIIMesbDgsm8GZXvKvfAyw5M6U/0Ko5Coj8+Zb00e8EuEyg7t/HeHbtpMpuA= 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 1729594773686172.63451456396854; Tue, 22 Oct 2024 03:59:33 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t3CZ6-0001rL-Gc; Tue, 22 Oct 2024 06:56:40 -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 1t3CYv-0001lF-62 for qemu-devel@nongnu.org; Tue, 22 Oct 2024 06:56:29 -0400 Received: from mail-ej1-x636.google.com ([2a00:1450:4864:20::636]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t3CYt-00022o-Ae for qemu-devel@nongnu.org; Tue, 22 Oct 2024 06:56:28 -0400 Received: by mail-ej1-x636.google.com with SMTP id a640c23a62f3a-a99e3b3a411so1054242866b.0 for ; Tue, 22 Oct 2024 03:56:26 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a9a91370e91sm320592666b.123.2024.10.22.03.56.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 22 Oct 2024 03:56:19 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 465EC5F942; Tue, 22 Oct 2024 11:56:15 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1729594586; x=1730199386; 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=HOyxXWkbmxyeJp1271bZ6nHrEgwT9agO1ZydqcSHiVY=; b=VZn8DrFiuIHwxVXCHZtWUH2Er6GDLnoz/aq5guxUrNWHZpyge4xbzfGhA+RW7k16Dl AZ9vVTAffjDrDarV55DmbCSQ5ZJrzNPPCnTxlVU0FgMV0yERUj6A1c//JRmmW5WceStm YaabpzzOUBQJR47ftiRg/SfHgkm8dAaqzOrBKZV0IPkooxGwxyGUmNc5qrd8iL8gA3sW hhAaSE9Pijs08oOTRIwcn5IOo2jJr2lGtwKBgxhpTWv5SOv+vb/4J0d2Eyd4MwUOXYLf AhZul2SAQ6zJMY0G4wSwORx9nJRe60GmZU2imHMklAZT2nvUEkEwYXYPSzBfD63meBJq jrtA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729594586; x=1730199386; 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=HOyxXWkbmxyeJp1271bZ6nHrEgwT9agO1ZydqcSHiVY=; b=oYsCIQ7yV8bYIYnAGqvoV8pf3mBnUZU8PmuezCp2x5qwm06MME8HHMSuFtJNqvu6gw 75gB0m8XcI1rMLwYjExEQzvdDcgfSkQUYJHq5hIWv1UCswAFqrtF2BFWZJL2bRSAhU43 iARVjkbrZi6AaTzHvmLK1R04eZL4twB1stxwN2FpMhMnw4gd6c//5tuwC6o6zCFpnKOD TCX88Eazn7bswS4sg0iC1ikYk8pE2UPtZe/mai8yTMWHXL/3tbZXaNaNzEEcLM25G3fM dBfbrYr1O2XZ/wFzOGzkus5E6dYEl5pDW5K8JZPFXBkgmJeNkOWqqwjk+CifnN9TfDha UJyQ== X-Gm-Message-State: AOJu0YyCU3EZmJUuf8nb/0/F8wjUcdqAiljnUfE/fJRKRRcsbqjtcZQO Y9y+y8i8jiEZiaAg7IaEzH4RbdC5erEbrPAFTJCWNQG2Vq3NDNE9dWtWf3KGG+c= X-Google-Smtp-Source: AGHT+IEZjLLtqU09Sx+uo+mrjZmbCZKUxmm4Ab8Z+Gbl4XRa6e9yqIzpm990wPYB5uU0/r5L4B8Jhw== X-Received: by 2002:a17:907:1c85:b0:a9a:597:8cc9 with SMTP id a640c23a62f3a-a9aaa523356mr288374566b.12.1729594585591; Tue, 22 Oct 2024 03:56:25 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Beraldo Leal , Laurent Vivier , Wainer dos Santos Moschetta , Mahmoud Mandour , Jiaxun Yang , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Yanan Wang , Thomas Huth , John Snow , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , qemu-arm@nongnu.org, =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Eduardo Habkost , devel@lists.libvirt.org, Cleber Rosa , kvm@vger.kernel.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Alexandre Iooss , Peter Maydell , Richard Henderson , Riku Voipio , Zhao Liu , Marcelo Tosatti , "Edgar E. Iglesias" , Marcel Apfelbaum , Pierrick Bouvier , Paolo Bonzini , Ilya Leoshkevich Subject: [PATCH v2 07/20] tests/tcg/x86_64: Add cross-modifying code test Date: Tue, 22 Oct 2024 11:56:01 +0100 Message-Id: <20241022105614.839199-8-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241022105614.839199-1-alex.bennee@linaro.org> References: <20241022105614.839199-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::636; envelope-from=alex.bennee@linaro.org; helo=mail-ej1-x636.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 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: 1729594775517116600 From: Ilya Leoshkevich commit f025692c992c ("accel/tcg: Clear PAGE_WRITE before translation") fixed cross-modifying code handling, but did not add a test. The changed code was further improved recently [1], and I was not sure whether these modifications were safe (spoiler: they were fine). Add a test to make sure there are no regressions. [1] https://lists.gnu.org/archive/html/qemu-devel/2022-09/msg00034.html Signed-off-by: Ilya Leoshkevich Message-Id: <20241001150617.9977-1-iii@linux.ibm.com> Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Pierrick Bouvier --- tests/tcg/x86_64/cross-modifying-code.c | 80 +++++++++++++++++++++++++ tests/tcg/x86_64/Makefile.target | 4 ++ 2 files changed, 84 insertions(+) create mode 100644 tests/tcg/x86_64/cross-modifying-code.c diff --git a/tests/tcg/x86_64/cross-modifying-code.c b/tests/tcg/x86_64/cro= ss-modifying-code.c new file mode 100644 index 0000000000..2704df6061 --- /dev/null +++ b/tests/tcg/x86_64/cross-modifying-code.c @@ -0,0 +1,80 @@ +/* + * Test patching code, running in one thread, from another thread. + * + * Intel SDM calls this "cross-modifying code" and recommends a special + * sequence, which requires both threads to cooperate. + * + * Linux kernel uses a different sequence that does not require cooperatio= n and + * involves patching the first byte with int3. + * + * Finally, there is user-mode software out there that simply uses atomics= , and + * that seems to be good enough in practice. Test that QEMU has no problems + * with this as well. + */ + +#include +#include +#include +#include + +void add1_or_nop(long *x); +asm(".pushsection .rwx,\"awx\",@progbits\n" + ".globl add1_or_nop\n" + /* addq $0x1,(%rdi) */ + "add1_or_nop: .byte 0x48, 0x83, 0x07, 0x01\n" + "ret\n" + ".popsection\n"); + +#define THREAD_WAIT 0 +#define THREAD_PATCH 1 +#define THREAD_STOP 2 + +static void *thread_func(void *arg) +{ + int val =3D 0x0026748d; /* nop */ + + while (true) { + switch (__atomic_load_n((int *)arg, __ATOMIC_SEQ_CST)) { + case THREAD_WAIT: + break; + case THREAD_PATCH: + val =3D __atomic_exchange_n((int *)&add1_or_nop, val, + __ATOMIC_SEQ_CST); + break; + case THREAD_STOP: + return NULL; + default: + assert(false); + __builtin_unreachable(); + } + } +} + +#define INITIAL 42 +#define COUNT 1000000 + +int main(void) +{ + int command =3D THREAD_WAIT; + pthread_t thread; + long x =3D 0; + int err; + int i; + + err =3D pthread_create(&thread, NULL, &thread_func, &command); + assert(err =3D=3D 0); + + __atomic_store_n(&command, THREAD_PATCH, __ATOMIC_SEQ_CST); + for (i =3D 0; i < COUNT; i++) { + add1_or_nop(&x); + } + __atomic_store_n(&command, THREAD_STOP, __ATOMIC_SEQ_CST); + + err =3D pthread_join(thread, NULL); + assert(err =3D=3D 0); + + assert(x >=3D INITIAL); + assert(x <=3D INITIAL + COUNT); + + return EXIT_SUCCESS; +} diff --git a/tests/tcg/x86_64/Makefile.target b/tests/tcg/x86_64/Makefile.t= arget index 783ab5b21a..d6dff559c7 100644 --- a/tests/tcg/x86_64/Makefile.target +++ b/tests/tcg/x86_64/Makefile.target @@ -17,6 +17,7 @@ X86_64_TESTS +=3D cmpxchg X86_64_TESTS +=3D adox X86_64_TESTS +=3D test-1648 X86_64_TESTS +=3D test-2175 +X86_64_TESTS +=3D cross-modifying-code TESTS=3D$(MULTIARCH_TESTS) $(X86_64_TESTS) test-x86_64 else TESTS=3D$(MULTIARCH_TESTS) @@ -27,6 +28,9 @@ adox: CFLAGS=3D-O2 run-test-i386-ssse3: QEMU_OPTS +=3D -cpu max run-plugin-test-i386-ssse3-%: QEMU_OPTS +=3D -cpu max =20 +cross-modifying-code: CFLAGS+=3D-pthread +cross-modifying-code: LDFLAGS+=3D-pthread + test-x86_64: LDFLAGS+=3D-lm -lc test-x86_64: test-i386.c test-i386.h test-i386-shift.h test-i386-muldiv.h $(CC) $(CFLAGS) $< -o $@ $(LDFLAGS) --=20 2.39.5 From nobody Tue Oct 22 22:17:16 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=1729594632; cv=none; d=zohomail.com; s=zohoarc; b=jcXySp3x4mjyvEkC1tN8hlnxQYXcwKkqbUMVMxiLSjeIX4ccr7Uoyx7+gfP66KnpihqfoGDixRTDezSz4TzygmyJfRYWqL1T1gybBPr1dAtKJHiK+ggfIw10VjpZ8NPr2G/XnL9ZSTsEXhECljFn2sUULa+YsdQWIhsMLqGbpTA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1729594632; 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=CnSO5MY5LW+ONfwtsvf8QoavFQHBZ1D8g95DfEWZbMI=; b=kSEqoHbjT/9Qxg8dqe4uBfhHiftB1QZSdagzTdn5/Fq+xL/015L8ZDT5qOILZqZQl+ipRhuk4x6M4utBUbjvspJlyoA64ueb9eS6aBZtp8oHcXQRpFPWwrq7y7dfY7UsDPh7UYqpLGO6nb/N5PzTS88KJTvAXN3bI8btWdVM3oY= 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 1729594632654866.9958064000897; Tue, 22 Oct 2024 03:57:12 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t3CZH-0001sb-P6; Tue, 22 Oct 2024 06:56:52 -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 1t3CYw-0001mJ-QL for qemu-devel@nongnu.org; Tue, 22 Oct 2024 06:56:30 -0400 Received: from mail-ed1-x532.google.com ([2a00:1450:4864:20::532]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t3CYt-00022y-Lm for qemu-devel@nongnu.org; Tue, 22 Oct 2024 06:56:30 -0400 Received: by mail-ed1-x532.google.com with SMTP id 4fb4d7f45d1cf-5c941623a5aso10852690a12.0 for ; Tue, 22 Oct 2024 03:56:27 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a9a91559c06sm324381166b.138.2024.10.22.03.56.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 22 Oct 2024 03:56:19 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 5CB715F9D0; Tue, 22 Oct 2024 11:56:15 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1729594586; x=1730199386; 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=CnSO5MY5LW+ONfwtsvf8QoavFQHBZ1D8g95DfEWZbMI=; b=krAPCbK6vVfqJ+3Gw5QmJdK5a3cuR7ymepFMHdmSvDd87gWOG11GGntTF0LdknzLKa sJnDV/7xiwJq794JCHFE9xLNeXCetelYhyC92rfmI4MpZ/bbLhx9tmITFxI4sj4ELCxQ QvDajzUwZUsTR/vKHukSyyRz17v2j+igPzjf5b+dnZZiHC4oq7NT4fVSPX9A9B8TODzZ 4OGbBzQqRLPFjQ2jLvrukIEaaZ2qQxJdSj06xGSC/EvWkYOi1lqzfbjnofC1mD8zKrp+ eVH3sDcdDHvXZrBSu1hBqVAdrUjv0o6nZ3XP457CzK9EwzjVZ5b1RzAMRiR0CBzMHYQW In+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729594586; x=1730199386; 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=CnSO5MY5LW+ONfwtsvf8QoavFQHBZ1D8g95DfEWZbMI=; b=T8OvHCpmPQOnhnOaWiVu3IthQHfykI/9CnLawlLrZthRM2AM2TIO7rwZWtByjRz7Xu 7xI3Hdb/vM2KaXvx1FioXNhyNOYcIPMoA8YthWXcLIGqgHre2dZ6IC7lW9HvW4mMSemU paFFU+YNBAIzDGpTkHc+MTlOhv7cNHG8NOMsVYJPe9KmEN3t0kqBwdQwWyvD5vJIKUn6 kGkGY7rLe9aj52NDK2Ri1Xtau/8LAuEZEjUfhNF3cRsV4CC88OGwcqoanmv1/D7YOqQX vagqB1nCvQaHsyNjHtz/SSLOwEtbKkwfAB0lgppicF0zaJDrUhtWYGy5loCCIQzNbho5 ducA== X-Gm-Message-State: AOJu0YzjugMZ1/36gwso922yw93J88lvbPvaJ2bvnofjqtrzpIwdx87r +xxnUtNPhEQWeeJ4yjcs+orY8R/AvhrvvtWBlS1syP3wsfRZnAYzR0VqKWkI6Oo= X-Google-Smtp-Source: AGHT+IE/K5pr2g0U8BMqLhyIWw7NwWY4cgjvbPeZV6ZYZQj/JnrnlV+snPJRyVIL9w1vqQwf5cuM+A== X-Received: by 2002:a17:907:944e:b0:a9a:3f9c:f89d with SMTP id a640c23a62f3a-a9aaa5ee850mr282522466b.34.1729594586066; Tue, 22 Oct 2024 03:56:26 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Beraldo Leal , Laurent Vivier , Wainer dos Santos Moschetta , Mahmoud Mandour , Jiaxun Yang , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Yanan Wang , Thomas Huth , John Snow , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , qemu-arm@nongnu.org, =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Eduardo Habkost , devel@lists.libvirt.org, Cleber Rosa , kvm@vger.kernel.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Alexandre Iooss , Peter Maydell , Richard Henderson , Riku Voipio , Zhao Liu , Marcelo Tosatti , "Edgar E. Iglesias" , Marcel Apfelbaum , Pierrick Bouvier , Paolo Bonzini Subject: [PATCH v2 08/20] accel/tcg: add tracepoints for cpu_loop_exit_atomic Date: Tue, 22 Oct 2024 11:56:02 +0100 Message-Id: <20241022105614.839199-9-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241022105614.839199-1-alex.bennee@linaro.org> References: <20241022105614.839199-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::532; envelope-from=alex.bennee@linaro.org; helo=mail-ed1-x532.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 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: 1729594633181116600 We try to avoid using cpu_loop_exit_atomic as it brings in an all-core sync point. However on some cpu/kernel/benchmark combinations it is starting to show up in the performance profile. To make it easier to see whats going on add tracepoints for the slow path so we can see what is triggering the wait. It seems for a modern CPU it can be quite a bit, for example: ./qemu-system-aarch64 \ -machine type=3Dvirt,virtualization=3Don,pflash0=3Drom,pflash1= =3Defivars,gic-version=3Dmax \ -smp 4 \ -accel tcg \ -device virtio-net-pci,netdev=3Dunet \ -device virtio-scsi-pci \ -device scsi-hd,drive=3Dhd \ -netdev user,id=3Dunet,hostfwd=3Dtcp::2222-:22 \ -blockdev driver=3Draw,node-name=3Dhd,file.driver=3Dhost_device,= file.filename=3D/dev/zen-ssd2/trixie-arm64,discard=3Dunmap \ -serial mon:stdio \ -blockdev node-name=3Drom,driver=3Dfile,filename=3D(pwd)/pc-bios= /edk2-aarch64-code.fd,read-only=3Dtrue \ -blockdev node-name=3Defivars,driver=3Dfile,filename=3D$HOME/ima= ges/qemu-arm64-efivars \ -m 8192 \ -object memory-backend-memfd,id=3Dmem,size=3D8G,share=3Don \ -kernel /home/alex/lsrc/linux.git/builds/arm64/arch/arm64/boot/I= mage -append "root=3D/dev/sda2 console=3DttyAMA0 systemd.unit=3Dbenchmark-s= tress-ng.service" \ -display none -d trace:load_atom\*_fallback,trace:store_atom\*_f= allback With: -cpu neoverse-v1,pauth-impdef=3Don =3D> 2203343 With: -cpu cortex-a76 =3D> 0 Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Richard Henderson Reviewed-by: Pierrick Bouvier --- v2 - 0x prefixes for ra as per checkpatch --- accel/tcg/user-exec.c | 2 +- accel/tcg/ldst_atomicity.c.inc | 9 +++++++++ accel/tcg/trace-events | 12 ++++++++++++ 3 files changed, 22 insertions(+), 1 deletion(-) diff --git a/accel/tcg/user-exec.c b/accel/tcg/user-exec.c index 51b2c16dbe..aa8af52cc3 100644 --- a/accel/tcg/user-exec.c +++ b/accel/tcg/user-exec.c @@ -29,7 +29,7 @@ #include "exec/page-protection.h" #include "exec/helper-proto.h" #include "qemu/atomic128.h" -#include "trace/trace-root.h" +#include "trace.h" #include "tcg/tcg-ldst.h" #include "internal-common.h" #include "internal-target.h" diff --git a/accel/tcg/ldst_atomicity.c.inc b/accel/tcg/ldst_atomicity.c.inc index 134da3c1da..c735add261 100644 --- a/accel/tcg/ldst_atomicity.c.inc +++ b/accel/tcg/ldst_atomicity.c.inc @@ -168,6 +168,7 @@ static uint64_t load_atomic8_or_exit(CPUState *cpu, uin= tptr_t ra, void *pv) #endif =20 /* Ultimate fallback: re-execute in serial context. */ + trace_load_atom8_or_exit_fallback(ra); cpu_loop_exit_atomic(cpu, ra); } =20 @@ -212,6 +213,7 @@ static Int128 load_atomic16_or_exit(CPUState *cpu, uint= ptr_t ra, void *pv) } =20 /* Ultimate fallback: re-execute in serial context. */ + trace_load_atom16_or_exit_fallback(ra); cpu_loop_exit_atomic(cpu, ra); } =20 @@ -519,6 +521,7 @@ static uint64_t load_atom_8(CPUState *cpu, uintptr_t ra, if (HAVE_al8) { return load_atom_extract_al8x2(pv); } + trace_load_atom8_fallback(memop, ra); cpu_loop_exit_atomic(cpu, ra); default: g_assert_not_reached(); @@ -563,6 +566,7 @@ static Int128 load_atom_16(CPUState *cpu, uintptr_t ra, break; case MO_64: if (!HAVE_al8) { + trace_load_atom16_fallback(memop, ra); cpu_loop_exit_atomic(cpu, ra); } a =3D load_atomic8(pv); @@ -570,6 +574,7 @@ static Int128 load_atom_16(CPUState *cpu, uintptr_t ra, break; case -MO_64: if (!HAVE_al8) { + trace_load_atom16_fallback(memop, ra); cpu_loop_exit_atomic(cpu, ra); } a =3D load_atom_extract_al8x2(pv); @@ -897,6 +902,7 @@ static void store_atom_2(CPUState *cpu, uintptr_t ra, g_assert_not_reached(); } =20 + trace_store_atom2_fallback(memop, ra); cpu_loop_exit_atomic(cpu, ra); } =20 @@ -961,6 +967,7 @@ static void store_atom_4(CPUState *cpu, uintptr_t ra, return; } } + trace_store_atom4_fallback(memop, ra); cpu_loop_exit_atomic(cpu, ra); default: g_assert_not_reached(); @@ -1029,6 +1036,7 @@ static void store_atom_8(CPUState *cpu, uintptr_t ra, default: g_assert_not_reached(); } + trace_store_atom8_fallback(memop, ra); cpu_loop_exit_atomic(cpu, ra); } =20 @@ -1107,5 +1115,6 @@ static void store_atom_16(CPUState *cpu, uintptr_t ra, default: g_assert_not_reached(); } + trace_store_atom16_fallback(memop, ra); cpu_loop_exit_atomic(cpu, ra); } diff --git a/accel/tcg/trace-events b/accel/tcg/trace-events index 4e9b450520..14f638810c 100644 --- a/accel/tcg/trace-events +++ b/accel/tcg/trace-events @@ -12,3 +12,15 @@ memory_notdirty_set_dirty(uint64_t vaddr) "0x%" PRIx64 =20 # translate-all.c translate_block(void *tb, uintptr_t pc, const void *tb_code) "tb:%p, pc:0x= %"PRIxPTR", tb_code:%p" + +# ldst_atomicity +load_atom2_fallback(uint32_t memop, uintptr_t ra) "mop:0x%"PRIx32", ra:0x%= "PRIxPTR"" +load_atom4_fallback(uint32_t memop, uintptr_t ra) "mop:0x%"PRIx32", ra:0x%= "PRIxPTR"" +load_atom8_or_exit_fallback(uintptr_t ra) "ra:0x%"PRIxPTR"" +load_atom8_fallback(uint32_t memop, uintptr_t ra) "mop:0x%"PRIx32", ra:0x%= "PRIxPTR"" +load_atom16_fallback(uint32_t memop, uintptr_t ra) "mop:0x%"PRIx32", ra:0x= %"PRIxPTR"" +load_atom16_or_exit_fallback(uintptr_t ra) "ra:0x%"PRIxPTR"" +store_atom2_fallback(uint32_t memop, uintptr_t ra) "mop:0x%"PRIx32", ra:0x= %"PRIxPTR"" +store_atom4_fallback(uint32_t memop, uintptr_t ra) "mop:0x%"PRIx32", ra:0x= %"PRIxPTR"" +store_atom8_fallback(uint32_t memop, uintptr_t ra) "mop:0x%"PRIx32", ra:0x= %"PRIxPTR"" +store_atom16_fallback(uint32_t memop, uintptr_t ra) "mop:0x%"PRIx32", ra:0= x%"PRIxPTR"" --=20 2.39.5 From nobody Tue Oct 22 22:17:16 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=1729594732; cv=none; d=zohomail.com; s=zohoarc; b=jLy2B6KqxCevAaI3jTgyKOwcLpPJq6Hpk1vFBLj8wCaZOtcLZXbjWS6tNIm0AuPDOARqtfE+rSgNicAmBN6j5mV7cGL3roH8PmQweAorLInxoQHZkqjYq4n5qbtNYvavlzFaqlmKQ0h8I7ktBYg3KqoKMexUZdJlqRbGiCAsI+c= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1729594732; 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=dc/d/VIiG49L+/d6qxDj8y/ZsZGo0rIznhJwT5hb3KQ=; b=W7yALzNFdEg/a7CNIs7GaRG5WMf+JkqDqcfVWj2bEQ/IL8TfB4HW2GYCnnBkUdsWrcZYksgPTz1TY3kY/FxgHQc2AD7SJrau94QLZM3GNbRha8W5gYP+iKOtktSE//eOhC27cKs4YA0TyOC9bdeVPKz9Z/xNYliMzWNBYMXtaOM= 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 172959473266098.45561621992852; Tue, 22 Oct 2024 03:58:52 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t3CZ2-0001on-Io; Tue, 22 Oct 2024 06:56:36 -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 1t3CYw-0001mE-Oh for qemu-devel@nongnu.org; Tue, 22 Oct 2024 06:56:30 -0400 Received: from mail-ed1-x52a.google.com ([2a00:1450:4864:20::52a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t3CYu-000237-2k for qemu-devel@nongnu.org; Tue, 22 Oct 2024 06:56:30 -0400 Received: by mail-ed1-x52a.google.com with SMTP id 4fb4d7f45d1cf-5c96df52c52so7122067a12.1 for ; Tue, 22 Oct 2024 03:56:27 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5cb66c737c4sm2963632a12.96.2024.10.22.03.56.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 22 Oct 2024 03:56:19 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 711A35F9DD; Tue, 22 Oct 2024 11:56:15 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1729594586; x=1730199386; 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=dc/d/VIiG49L+/d6qxDj8y/ZsZGo0rIznhJwT5hb3KQ=; b=IsYcSQnH04/k5U5ppbVY/Skpb3KOJDJjqmYBnE0oGENHXNon0fldCHHGfqQ7F/sPs6 eWyQfY+etfDJmXBcCdmPPKKsnlEs9oDS1z2ctQjWu6IfLab7Q3ijslS17Ru3kWCPfeJ3 JtANSAJUpmtAsSp9cx1Cqq6k9fhJVP+LD0yywzgmrqmFmnF5iUv1IxXkCYG3BP2N2CGM K5mDLcWDYkSOUcRxMGHVS8gtfoxZjAZIS06WAKYdTBaZS5r4riOBov3eqzWCyeUtEpF8 nSUPmGJ051Pa+r16K2bREGuAf05ZbXKtNquh4pkHEIMKGBWzyM4JewzdQ2SDTuQ3MMIr ZmQw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729594586; x=1730199386; 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=dc/d/VIiG49L+/d6qxDj8y/ZsZGo0rIznhJwT5hb3KQ=; b=qXP2l6rFbv5M5CJqRYSpK+VUONH0FfdRP+Vo31sJtvRHhj4eIJNqSqTGdlr8g5mmDx bpSZvzfQzCPdRfhdy+u89qedKgaKq/I3QldS1ODpL7eD8mE2q4sT0zwGyb5xCP4xFXaB z1MM5ZpR8PajuWYWeH7ViwX33rE8Ijd5CRszqIiQSoLDoqnOUwZQgUE4y+YgOCUMNlo0 SMou4PUEFftjBQ8A0Ti0OfpGpS90dXo2yCbaTczCo5Bq5pWm+1yn/iSYxMpdjbTqm3Bh lHfm9jVmY/1hiH3tjgWWM40EwjY+0PKQDqWKPLN5Xym3P2H4TMJOutiqL6awyY7dBOOJ A7lg== X-Gm-Message-State: AOJu0YzrJbeQPxWMQK7CTk7A49Nn2pxXPCAOQd4tne8hCeMmv7yTO2VZ UqyRVB04age5uWLW7cxLJ7fmyQcIe4GpUpZxXwv4znPsqiqqAn5znW8AHSFCbIE= X-Google-Smtp-Source: AGHT+IGl+hAC7xKg+0Mp16pdpeeXIDIYDU6WjhEFWtxxGSyLoudl/zJKvx6zmb4I/Li5Y9q95p5HIQ== X-Received: by 2002:a05:6402:358a:b0:5c9:85dc:5b9f with SMTP id 4fb4d7f45d1cf-5ca0ac43593mr11802716a12.2.1729594586471; Tue, 22 Oct 2024 03:56:26 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Beraldo Leal , Laurent Vivier , Wainer dos Santos Moschetta , Mahmoud Mandour , Jiaxun Yang , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Yanan Wang , Thomas Huth , John Snow , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , qemu-arm@nongnu.org, =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Eduardo Habkost , devel@lists.libvirt.org, Cleber Rosa , kvm@vger.kernel.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Alexandre Iooss , Peter Maydell , Richard Henderson , Riku Voipio , Zhao Liu , Marcelo Tosatti , "Edgar E. Iglesias" , Marcel Apfelbaum , Pierrick Bouvier , Paolo Bonzini Subject: [PATCH v2 09/20] dockerfiles: fix default targets for debian-loongarch-cross Date: Tue, 22 Oct 2024 11:56:03 +0100 Message-Id: <20241022105614.839199-10-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241022105614.839199-1-alex.bennee@linaro.org> References: <20241022105614.839199-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::52a; envelope-from=alex.bennee@linaro.org; helo=mail-ed1-x52a.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 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: 1729594733331116600 From: Pierrick Bouvier fix system target name, and remove --disable-system (which deactivates system target). Found using: make docker-test-build@debian-loongarch-cross V=3D1 Signed-off-by: Pierrick Bouvier Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Thomas Huth Message-Id: <20241020213759.2168248-1-pierrick.bouvier@linaro.org> Signed-off-by: Alex Benn=C3=A9e --- tests/docker/dockerfiles/debian-loongarch-cross.docker | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/docker/dockerfiles/debian-loongarch-cross.docker b/tests= /docker/dockerfiles/debian-loongarch-cross.docker index 79eab5621e..538ab53490 100644 --- a/tests/docker/dockerfiles/debian-loongarch-cross.docker +++ b/tests/docker/dockerfiles/debian-loongarch-cross.docker @@ -43,8 +43,8 @@ RUN curl -#SL https://github.com/loongson/build-tools/rel= eases/download/2023.08. ENV PATH $PATH:/opt/cross-tools/bin ENV LD_LIBRARY_PATH /opt/cross-tools/lib:/opt/cross-tools/loongarch64-unkn= own-linux-gnu/lib:$LD_LIBRARY_PATH =20 -ENV QEMU_CONFIGURE_OPTS --disable-system --disable-docs --disable-tools -ENV DEF_TARGET_LIST loongarch64-linux-user,loongarch-softmmu +ENV QEMU_CONFIGURE_OPTS --disable-docs --disable-tools +ENV DEF_TARGET_LIST loongarch64-linux-user,loongarch64-softmmu ENV MAKE /usr/bin/make =20 # As a final step configure the user (if env is defined) --=20 2.39.5 From nobody Tue Oct 22 22:17:16 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=1729594788; cv=none; d=zohomail.com; s=zohoarc; b=SyyrBB3e+37GJGe/qiuPP1ek6oPTuyLJkxqCewQFKyhhGCwGPeoGFOLUGmD4wYm1nlJjT9Syao/JRssgLY267UqJ1YPRk+9zQUbtEc2qP2cwptdKw1lqcF9TmHqAagNjFL1PLMeyCMkJmmfkJyxgr8HZOFueYvQgBPz6wcHxovI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1729594788; 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=/thHQrDD74xWhDO5ZvpNfmAfgwRl7ohsH8B1mB/WTo0=; b=O+ISaRNd8L/h1S+94v+y0tXFpLudRt0hp2q4+TtHwmPtCtmb9tQRz8v1dUeTa7z5nBczq98MOLLwIh0OrWj0kTssWHBGZY7kksZH1KJPu0cox7wxG4Rrxt1z7KTaDlJdSuLkuenuP8hqLorWYR5+Lw6xGKbW4T0wuQsY6utyogg= 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 1729594788961496.5412629520288; Tue, 22 Oct 2024 03:59:48 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t3CYx-0001nH-9V; Tue, 22 Oct 2024 06:56:31 -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 1t3CYs-0001k7-MC for qemu-devel@nongnu.org; Tue, 22 Oct 2024 06:56:26 -0400 Received: from mail-ed1-x52c.google.com ([2a00:1450:4864:20::52c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t3CYq-00020f-SE for qemu-devel@nongnu.org; Tue, 22 Oct 2024 06:56:26 -0400 Received: by mail-ed1-x52c.google.com with SMTP id 4fb4d7f45d1cf-5c94861ee25so2818022a12.0 for ; Tue, 22 Oct 2024 03:56:23 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5cb66c72581sm3010588a12.86.2024.10.22.03.56.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 22 Oct 2024 03:56:19 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 86BD95F9EC; Tue, 22 Oct 2024 11:56:15 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1729594582; x=1730199382; 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=/thHQrDD74xWhDO5ZvpNfmAfgwRl7ohsH8B1mB/WTo0=; b=z3VxdBuIQO1qI0fcyld3DpbT56IOFAqliutNPX6YkU1mNlB1opS5kinbDeEx+7TVXH g+145zLUcrbwIsVuw15PiZSj1w/L8f4/Oxd8cPsQ9Cr0zNXE0X/rUgse8i5KCazG85lF IBIqiG+EKF4YxD16S1SJHvrbP3gmqMnM7+iEN/S4uin9RzuN0kUHo3NMxkxdeNQpYjb7 GOgJneIVeY+Q0RzZ2buAgnJS7lIXQQyYngZkCPLjzbq/mqxVe1NLwlPxv98pzTI3jm/M NtEfltg1oX6vV45ZqYP+RyUZCy5AHyZfWL4z0WxKYpI7esjPyxo0XBI3MzlYJDJvAOh+ vhPQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729594582; x=1730199382; 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=/thHQrDD74xWhDO5ZvpNfmAfgwRl7ohsH8B1mB/WTo0=; b=ndF10IIrQ7wwYzihGVE6/Du6wlW6cvvDHZQ7zRaCdLPSzAs59QD3cJgCNVvMwCJ7m0 COqRtu/bFyvZg6cl+Mu9mYsIuCZEjD4UbElRVGdvHkB41zQtEnQlNyczTpGuOAopnWSO YkmhhawMINAvqko2nFYO+OFkvh1H6W0yNpPibd2C6hiBpK758fgd1HUdCPQHYUZqC9FZ VlqaQgHDTIGG9/T+xegb1inCeS6tnWPhH+zcsFI5q4AVY1pW0q6lba6aHCj8X/xf2Z14 M9RNhDCIzBcdYcl5DDP3M8bCfkUjvbESM+IvXHFs16WgYkL6I7My+czQT/a56is3Mz6w PqSA== X-Gm-Message-State: AOJu0Yy0c+mHdh7UazbOMxQcSSC/VEPchlorN0/exc5K6d4hg+wNcaDH uFdXFjACbyCdbBILxHkDP1jbIHU74nxGDnpVVoSmr0OIcHRuRpQAlgnAnuMpc1s= X-Google-Smtp-Source: AGHT+IFBxLhqkcFc083FyPJREjZC/bdX6TenkPZv3cJUb/crfFR4k5TS849WsfGhqyrMbpgpzkF9Rg== X-Received: by 2002:a05:6402:909:b0:5c9:21aa:b145 with SMTP id 4fb4d7f45d1cf-5ca0af87099mr17318763a12.36.1729594582079; Tue, 22 Oct 2024 03:56:22 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Beraldo Leal , Laurent Vivier , Wainer dos Santos Moschetta , Mahmoud Mandour , Jiaxun Yang , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Yanan Wang , Thomas Huth , John Snow , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , qemu-arm@nongnu.org, =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Eduardo Habkost , devel@lists.libvirt.org, Cleber Rosa , kvm@vger.kernel.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Alexandre Iooss , Peter Maydell , Richard Henderson , Riku Voipio , Zhao Liu , Marcelo Tosatti , "Edgar E. Iglesias" , Marcel Apfelbaum , Pierrick Bouvier , Paolo Bonzini Subject: [PATCH v2 10/20] gitlab: make check-[dco|patch] a little more verbose Date: Tue, 22 Oct 2024 11:56:04 +0100 Message-Id: <20241022105614.839199-11-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241022105614.839199-1-alex.bennee@linaro.org> References: <20241022105614.839199-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::52c; envelope-from=alex.bennee@linaro.org; helo=mail-ed1-x52c.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 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: 1729594789539116600 When git fails the rather terse backtrace only indicates it failed without some useful context. Add some to make the log a little more useful. Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Thomas Huth --- .gitlab-ci.d/check-dco.py | 9 +++++---- .gitlab-ci.d/check-patch.py | 9 +++++---- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/.gitlab-ci.d/check-dco.py b/.gitlab-ci.d/check-dco.py index 632c8bcce8..d29c580d63 100755 --- a/.gitlab-ci.d/check-dco.py +++ b/.gitlab-ci.d/check-dco.py @@ -19,10 +19,11 @@ reponame =3D os.path.basename(cwd) repourl =3D "https://gitlab.com/%s/%s.git" % (namespace, reponame) =20 -subprocess.check_call(["git", "remote", "add", "check-dco", repourl]) -subprocess.check_call(["git", "fetch", "check-dco", "master"], - stdout=3Dsubprocess.DEVNULL, - stderr=3Dsubprocess.DEVNULL) +print(f"adding upstream git repo @ {repourl}") +subprocess.run(["git", "remote", "add", "check-dco", repourl], + check=3DTrue, capture_output=3DTrue) +subprocess.run(["git", "fetch", "check-dco", "master"], + check=3DTrue, capture_output=3DTrue) =20 ancestor =3D subprocess.check_output(["git", "merge-base", "check-dco/master", "HEAD"], diff --git a/.gitlab-ci.d/check-patch.py b/.gitlab-ci.d/check-patch.py index 39e2b403c9..94afdce555 100755 --- a/.gitlab-ci.d/check-patch.py +++ b/.gitlab-ci.d/check-patch.py @@ -19,13 +19,14 @@ reponame =3D os.path.basename(cwd) repourl =3D "https://gitlab.com/%s/%s.git" % (namespace, reponame) =20 +print(f"adding upstream git repo @ {repourl}") # GitLab CI environment does not give us any direct info about the # base for the user's branch. We thus need to figure out a common # ancestor between the user's branch and current git master. -subprocess.check_call(["git", "remote", "add", "check-patch", repourl]) -subprocess.check_call(["git", "fetch", "check-patch", "master"], - stdout=3Dsubprocess.DEVNULL, - stderr=3Dsubprocess.DEVNULL) +subprocess.run(["git", "remote", "add", "check-patch", repourl], + check=3DTrue, capture_output=3DTrue) +subprocess.run(["git", "fetch", "check-patch", "master"], + check=3DTrue, capture_output=3DTrue) =20 ancestor =3D subprocess.check_output(["git", "merge-base", "check-patch/master", "HEAD"], --=20 2.39.5 From nobody Tue Oct 22 22:17:16 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=1729594745; cv=none; d=zohomail.com; s=zohoarc; b=CkE5Esgcfa1nFDKcpnTGmBrPKqnWu1QqELD0OapGPlmlyP1OgEWOEBd9S22bKSBAnP3f/gUYq617evcRUwIn7+jLmaqzaZuTKt83MjI/0mXfNlfq+nUwpQp1Nng2g7sLLFYWOplAZCgXtKT6RNcvXoVghLBjJBJj4n0uDIkoIbo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1729594745; 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=p2jXJE3FbWlzhHC2JLNXh46hRwsq96dE8ivUr/Ry4PY=; b=BaCEt3hNIJ9vDbsOCMHo2tkhNUzwqlbDoYEhmRSs+QuIk5SmqCjxAsRgnkUdZubrogYD25JkS5A7GF6JxzFDcmocMTQgLEFeB59+lNbOtNeTcx0BTrHnyvncUa8P5oeOZXgLkdqTvLr0WwZ9N6eKjBoyUHyHTZNZArAItMjdHeI= 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 1729594745688581.2319044518781; Tue, 22 Oct 2024 03:59:05 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t3CZi-0002dQ-7j; Tue, 22 Oct 2024 06:57:18 -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 1t3CZ1-0001p2-17 for qemu-devel@nongnu.org; Tue, 22 Oct 2024 06:56:36 -0400 Received: from mail-ej1-x62f.google.com ([2a00:1450: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 1t3CYy-00024d-Is for qemu-devel@nongnu.org; Tue, 22 Oct 2024 06:56:34 -0400 Received: by mail-ej1-x62f.google.com with SMTP id a640c23a62f3a-a99eb8b607aso588256466b.2 for ; Tue, 22 Oct 2024 03:56:32 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a9a912edc33sm321455366b.58.2024.10.22.03.56.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 22 Oct 2024 03:56:28 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 99FE35FA0B; Tue, 22 Oct 2024 11:56:15 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1729594591; x=1730199391; 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=p2jXJE3FbWlzhHC2JLNXh46hRwsq96dE8ivUr/Ry4PY=; b=itvKW5FyYgWnPx6VY1MhYfAcczcT2WZGWcPHTBM/4/I+0zdtsgRW84Kao7sBue26CF G/EsiBvcm7YkrxSN23L33NIM6M5Wsp1zMuBuHjr+rmorWjk+Q19Jdv8QfHhDJsCrhI27 EpT5nSEHUG+9vyNfwEZ5DEJEzxJp+fvmi/dzmI6iGDMJEfMZ/6pgPTa8ZwOqUKfSRsbM cKTNNGbD1SLmxN92m6c+rCvze3wDfmN1b7Q1hhvJDcUCnQOowQMbVjtJMwTNU68AzgQr ohfsOxexNXTEm76CzJgf1TRlUyQDCiebJqNj24LfooC5x8VwXUWiGWrMBklb00I5/UMc EZyQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729594591; x=1730199391; 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=p2jXJE3FbWlzhHC2JLNXh46hRwsq96dE8ivUr/Ry4PY=; b=QLO7tJm1pTJss1p3jErNm4J0ir30oI5acoKwE1V0LZfleESxEiIAOjKxV8iFZ1vnkK 1J8pVyQ9U2wYHbRg/xQSnwS7LYJ34OLzCcPDMpAY69CiSvOacsbsQGNcpbHWeUGAoWuC PS13ZYj5EdVG7f1Py6+c544ziL4SwXe/PaZBdXe8v3DMgL8pffNRqUcswGTMWDsgKtQl n5LiuLL5JoxYgzAUCpIQitJLkb2WA+74rgcGcB+W7qN9uSnZQyixR4KD4lgoPXWn1y05 IguixgI0/ECatagFfjplkqAWonpgLBWKBuK4KRJHChS+renIo3msTM5teQlzPuxJk79o 0+ew== X-Gm-Message-State: AOJu0YwBoBuivX0eurMbxf25bMivhn5QfTIrgQ711JwjENDKtIFL01+3 HyrQ9NsUvJaHQVXpe1AmyxL8U2iSWj2/DdC/DyQWDTWIweKlIYDLFtn1yS9tDg0= X-Google-Smtp-Source: AGHT+IGUejPeSVv+t0DCi7SW64a6BptBW33UQRq4rjvBjk+8TQgWaYTlBD5pezBspgvI4FXlscux/w== X-Received: by 2002:a17:907:7da5:b0:a99:4aa7:4d6f with SMTP id a640c23a62f3a-a9a6995d6f8mr1533790966b.12.1729594590554; Tue, 22 Oct 2024 03:56:30 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Beraldo Leal , Laurent Vivier , Wainer dos Santos Moschetta , Mahmoud Mandour , Jiaxun Yang , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Yanan Wang , Thomas Huth , John Snow , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , qemu-arm@nongnu.org, =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Eduardo Habkost , devel@lists.libvirt.org, Cleber Rosa , kvm@vger.kernel.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Alexandre Iooss , Peter Maydell , Richard Henderson , Riku Voipio , Zhao Liu , Marcelo Tosatti , "Edgar E. Iglesias" , Marcel Apfelbaum , Pierrick Bouvier , Paolo Bonzini Subject: [PATCH v2 11/20] MAINTAINERS: mention my gdbstub/next tree Date: Tue, 22 Oct 2024 11:56:05 +0100 Message-Id: <20241022105614.839199-12-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241022105614.839199-1-alex.bennee@linaro.org> References: <20241022105614.839199-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::62f; envelope-from=alex.bennee@linaro.org; helo=mail-ej1-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 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: 1729594747364116600 Make it easy for people to see what is already queued. Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Thomas Huth --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index b84787ae1b..81396c9f15 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -2978,6 +2978,7 @@ F: gdb-xml/ F: tests/tcg/multiarch/gdbstub/* F: scripts/feature_to_c.py F: scripts/probe-gdb-support.py +T: git https://gitlab.com/stsquad/qemu gdbstub/next =20 Memory API M: Paolo Bonzini --=20 2.39.5 From nobody Tue Oct 22 22:17:16 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=1729594676; cv=none; d=zohomail.com; s=zohoarc; b=gYHrRy9GiEd9fUgXI/BRFhIdV63OyO37jNJpml8+aue4JjjMQeX9A0qHgIFv8hQsS52JdhLqAkHPB2kOZ29oXUyya06JOaVye5KCEv17bvVNxHE296MuJi4vji7VAjp3STlXQEfr4oMFEOxRlSJXnH5XG1U6JZNDo4R9qWcwfbI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1729594676; 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=nuVL16OURPo6SfQxD2PzScmfjsPxu4HizBAVk8u7e/E=; b=aiCCuzUqk7S+KJfWJ2VuH7sAi6iQsiuEdDo4ezgLjtu1Q6jthjxwKIOXmH/6zSBz04rfeoG1Ufo6j8bfDKzHRkyk/PwePoSqKC6Bjg06QygEB+9qqF6BhZ6h7WkL68DHyGak7Bj5/1YXfCBQc+kmVzYU/MDDN+PP2sOWdPsP0sM= 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 1729594676287246.1967850723363; Tue, 22 Oct 2024 03:57:56 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t3CZJ-0001w1-Mn; Tue, 22 Oct 2024 06:56:56 -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 1t3CZ1-0001p1-0u for qemu-devel@nongnu.org; Tue, 22 Oct 2024 06:56:36 -0400 Received: from mail-ed1-x52e.google.com ([2a00:1450:4864:20::52e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t3CYx-00023z-Df for qemu-devel@nongnu.org; Tue, 22 Oct 2024 06:56:32 -0400 Received: by mail-ed1-x52e.google.com with SMTP id 4fb4d7f45d1cf-5c937b5169cso1155614a12.1 for ; Tue, 22 Oct 2024 03:56:30 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5cb66c7255esm3123937a12.80.2024.10.22.03.56.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 22 Oct 2024 03:56:28 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id ADE0A5FABE; Tue, 22 Oct 2024 11:56:15 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1729594590; x=1730199390; 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=nuVL16OURPo6SfQxD2PzScmfjsPxu4HizBAVk8u7e/E=; b=yEgmR/iucv08DNiZ7m008A6CAAh3GaZt5k0f/0SCmq6RK3bXS27FBvrPerjCf387AW WQnJLAB5boaVNUizxzqMfclYYhIrDpJvh3FlW4yqJop0THj6ZfFxdJDPfyBxmolAcPF+ Gb/wNUNpnzPctM+mvYL7M/mxLScxLmEfUMNfPJAG4C9gBy8grZTG85zm+uD3L37TLBUw CjQNCSiRKXY17nY7WemyUd2R97/sYuQsGCpqQdDSi/r78p1plUQCeilcLR2qjijmjLng 9s2nWZxo0kq9IkgNPXSPNJRiGTtNxsKRXOLLPwaIHnVCOsgGlIibMjv5h3B2kBBFyXR/ wnpw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729594590; x=1730199390; 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=nuVL16OURPo6SfQxD2PzScmfjsPxu4HizBAVk8u7e/E=; b=WgY3qv4NiDGRCHJzB6WZr2mGT2uoRRu6z1bp3TfGGwLXg8+21KYYuR4tSZkLVHaP14 YlF/yselihVUQzTHWWOXlBNiP3VVX1WkxxGeGoIRGbWrjmxYxv9oe7beJf3lYMTuDUju 0mU0glJtrBc7OdGIIoMgGzTV1z+8dkmI+EPWq+Is2E+C7FpBq82b58DRU35Kl/+E7Gk/ BwyG/TEcMkJMmwpVptpuDHorvaVfqreWQ5WWVVFI4TsLZ0Z5vr/HLHiI+b/z1K0LnLC8 JCkOzYS5kzB/nW08vNoPUT57Lz9rdWPhpcIBqCWA1dGOw4QRTBCHQy1E5hloKd+axu04 x22Q== X-Gm-Message-State: AOJu0Ywj9tJoBaxwpJyTZc4a9pxOQrq5mt0tzmiqQnCkanbSYrZkJqSN 8bxa/5A4pbZNIPC5WHOuXZT3LkrcsIgus/92LaBP9Tqj/pNCKuhxRNJUYt/rqKg= X-Google-Smtp-Source: AGHT+IHwi1+vxmbQ3YLA9r6WePtD03FZyJBvumSeivnyntfSu8jv5XX9sGc6cj7ZvugURHt1idsIcQ== X-Received: by 2002:a05:6402:35c2:b0:5c9:3070:701e with SMTP id 4fb4d7f45d1cf-5cb794670eemr2833546a12.9.1729594589755; Tue, 22 Oct 2024 03:56:29 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Beraldo Leal , Laurent Vivier , Wainer dos Santos Moschetta , Mahmoud Mandour , Jiaxun Yang , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Yanan Wang , Thomas Huth , John Snow , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , qemu-arm@nongnu.org, =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Eduardo Habkost , devel@lists.libvirt.org, Cleber Rosa , kvm@vger.kernel.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Alexandre Iooss , Peter Maydell , Richard Henderson , Riku Voipio , Zhao Liu , Marcelo Tosatti , "Edgar E. Iglesias" , Marcel Apfelbaum , Pierrick Bouvier , Paolo Bonzini Subject: [PATCH v2 12/20] config/targets: update aarch64_be-linux-user gdb XML list Date: Tue, 22 Oct 2024 11:56:06 +0100 Message-Id: <20241022105614.839199-13-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241022105614.839199-1-alex.bennee@linaro.org> References: <20241022105614.839199-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::52e; envelope-from=alex.bennee@linaro.org; helo=mail-ed1-x52e.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 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: 1729594677167116600 Attempting to run the binary asserts when it can't find the XML entry. We can fix it so we don't although I suspect other stuff is broken. Fixes: https://gitlab.com/qemu-project/qemu/-/issues/2580 Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Pierrick Bouvier --- configs/targets/aarch64_be-linux-user.mak | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configs/targets/aarch64_be-linux-user.mak b/configs/targets/aa= rch64_be-linux-user.mak index 778d22b2a9..dcef597a80 100644 --- a/configs/targets/aarch64_be-linux-user.mak +++ b/configs/targets/aarch64_be-linux-user.mak @@ -1,7 +1,7 @@ TARGET_ARCH=3Daarch64 TARGET_BASE_ARCH=3Darm TARGET_BIG_ENDIAN=3Dy -TARGET_XML_FILES=3D gdb-xml/aarch64-core.xml gdb-xml/aarch64-fpu.xml gdb-x= ml/aarch64-pauth.xml +TARGET_XML_FILES=3D gdb-xml/aarch64-core.xml gdb-xml/aarch64-fpu.xml gdb-x= ml/aarch64-pauth.xml gdb-xml/aarch64-mte.xml TARGET_HAS_BFLT=3Dy CONFIG_SEMIHOSTING=3Dy CONFIG_ARM_COMPATIBLE_SEMIHOSTING=3Dy --=20 2.39.5 From nobody Tue Oct 22 22:17:16 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=1729594726; cv=none; d=zohomail.com; s=zohoarc; b=c+tKA5Uyx8xxCPE31lF0Tn3YROr8uOvmq3O7Sva0PVCF2+ZJj/ii5fAEoIsLCi05l2/J4XNaDCB8xBIqgL6obSkavdHZroPcDoiJvJEtek1iA9T4GTX6Mr9W18yttSabjIIYNvsQl/u9gR70cgT3i6Mxn0aMKpSFU1K0aQW63gM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1729594726; 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=pf3uq1o/PXtMWzbvWkPU0TjSlCT93/aG9VyjOMqKoJo=; b=KuOiLxhObn04TXLpmt00ivM6srNE8ldIlF8M7CvhVdBNqo6okureZbm03Rf0OJ2OYQcBRfe9whyFkuNtGKP+YXh4n6yQQlnwJPos1Lio0UX+qSarxbR8e2COakJoIN6hz2CkUsioVzOUVoWMyrPNsiU8eWzcAjPwWp9tuwOy3Fg= 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 1729594726969456.63217210226696; Tue, 22 Oct 2024 03:58:46 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t3CZi-0002cK-6w; Tue, 22 Oct 2024 06:57:18 -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 1t3CZ2-0001p8-Hm for qemu-devel@nongnu.org; Tue, 22 Oct 2024 06:56:36 -0400 Received: from mail-ed1-x52f.google.com ([2a00:1450:4864:20::52f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t3CZ0-000257-O1 for qemu-devel@nongnu.org; Tue, 22 Oct 2024 06:56:36 -0400 Received: by mail-ed1-x52f.google.com with SMTP id 4fb4d7f45d1cf-5c941623a5aso10852828a12.0 for ; Tue, 22 Oct 2024 03:56:33 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a9a9155a1c9sm323018666b.129.2024.10.22.03.56.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 22 Oct 2024 03:56:28 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id C52CB5FBDC; Tue, 22 Oct 2024 11:56:15 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1729594592; x=1730199392; 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=pf3uq1o/PXtMWzbvWkPU0TjSlCT93/aG9VyjOMqKoJo=; b=SrLSuTCGrnU2yecchuPfJahtlADKRbnkyk0UZHBIlvm4AWbVsc6HUJvxBwHhRvFfv/ FkSXuwhrfbssP6VN6Gz8WLfP33mw0yyzPfMlXteyUlzgxwXVb+j+Z97WPXp6C7sVC9rK r5AhPYP6yzGwbYFTG4Czfa7wGGIX7R5dCghKvUd17aqC/rM4qSDLz1DJfabXMfraHdwG KyTDBNb+fbi7nP8D/96/Ya3irymygw7jA58X+17u08LF6SbVWk+maEoUK7I1yqGSC6Lz SVptKbE8YYbN2kJxnPcYgqSpkFy2gZMPqSZVJGGo8e71FCkjKnNIjssERA0cJ8pyrINS XRRg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729594592; x=1730199392; 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=pf3uq1o/PXtMWzbvWkPU0TjSlCT93/aG9VyjOMqKoJo=; b=mSSUILpojNz7U8/cY07phLHKBopj5xTQQva0iS4Me46m8z3R1KWJQxRW1EIcYhBPlb bckrdw4Ndy97RAho8J/foE8AblRx3YyXDhKix5VUgY6HFn5lBDpA0mevGuZwoz4Gu7Fn nHtd/SRmU+kZ3HEIZ1JJ6tc1pKMViNnvfBH3vZcMJH5J5kXSKmI7KV4Ft5rWsaTi8kZI tg3yUOSbpdaBYQdrlc8UMwHJOIaY8u9FWcE6Jts9a4q2RbuYhiaQ5czU9XnvSGgJ4uvN Qtf8MopDapLPASpZmzkXHeywLDWsHMEK47iYhSh7GNObci3KOxiTa6Rq9TxfMQxaPAYk 8K3A== X-Gm-Message-State: AOJu0YzszIXRb6k4vO4Jcw0bU4cbLnHF0bn9P5LT06OKxlIbfF9q/B14 qLDB8yCugW5+O1oNNSlaOMIG1hNTmKBPvyfaJsidRKK2cZFzgk/yv6G4ZPwGKdg= X-Google-Smtp-Source: AGHT+IFr+0mLMKe2JQJOUJSSxtHXWPXM2EDoaQ4nyTBJKccw5XUwjD1MaeL5ICuPvGV4e9NH5KWjRQ== X-Received: by 2002:a17:906:c116:b0:a9a:1575:23e3 with SMTP id a640c23a62f3a-a9aaa5428e4mr236057266b.19.1729594592209; Tue, 22 Oct 2024 03:56:32 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Beraldo Leal , Laurent Vivier , Wainer dos Santos Moschetta , Mahmoud Mandour , Jiaxun Yang , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Yanan Wang , Thomas Huth , John Snow , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , qemu-arm@nongnu.org, =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Eduardo Habkost , devel@lists.libvirt.org, Cleber Rosa , kvm@vger.kernel.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Alexandre Iooss , Peter Maydell , Richard Henderson , Riku Voipio , Zhao Liu , Marcelo Tosatti , "Edgar E. Iglesias" , Marcel Apfelbaum , Pierrick Bouvier , Paolo Bonzini Subject: [PATCH v2 13/20] tests/tcg: enable basic testing for aarch64_be-linux-user Date: Tue, 22 Oct 2024 11:56:07 +0100 Message-Id: <20241022105614.839199-14-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241022105614.839199-1-alex.bennee@linaro.org> References: <20241022105614.839199-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::52f; envelope-from=alex.bennee@linaro.org; helo=mail-ed1-x52f.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 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: 1729594727303116600 We didn't notice breakage of aarch64_be because we don't have any TCG tests for it. However while the existing aarch64 compiler can target big-endian builds no one packages a BE libc. Instead we bang some rocks together to do the most basic of hello world with a nostdlib syscall test. Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Pierrick Bouvier Reviewed-by: Richard Henderson --- v2 - fix checkpatch complaints --- configure | 5 ++++ tests/tcg/aarch64_be/hello.c | 35 ++++++++++++++++++++++++++++ tests/tcg/Makefile.target | 7 +++++- tests/tcg/aarch64_be/Makefile.target | 17 ++++++++++++++ 4 files changed, 63 insertions(+), 1 deletion(-) create mode 100644 tests/tcg/aarch64_be/hello.c create mode 100644 tests/tcg/aarch64_be/Makefile.target diff --git a/configure b/configure index 72d1a94225..7dd3400ccb 100755 --- a/configure +++ b/configure @@ -1418,6 +1418,7 @@ probe_target_compiler() { target_arch=3D${1%%-*} case $target_arch in aarch64) container_hosts=3D"x86_64 aarch64" ;; + aarch64_be) container_hosts=3D"x86_64 aarch64" ;; alpha) container_hosts=3Dx86_64 ;; arm) container_hosts=3D"x86_64 aarch64" ;; hexagon) container_hosts=3Dx86_64 ;; @@ -1447,6 +1448,10 @@ probe_target_compiler() { case $target_arch in # debian-all-test-cross architectures =20 + aarch64_be) + container_image=3Ddebian-all-test-cross + container_cross_prefix=3Daarch64-linux-gnu- + ;; hppa|m68k|mips|riscv64|sparc64) container_image=3Ddebian-all-test-cross ;; diff --git a/tests/tcg/aarch64_be/hello.c b/tests/tcg/aarch64_be/hello.c new file mode 100644 index 0000000000..a9b2ab45de --- /dev/null +++ b/tests/tcg/aarch64_be/hello.c @@ -0,0 +1,35 @@ +/* + * Non-libc syscall hello world for Aarch64 BE + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + +#define __NR_write 64 +#define __NR_exit 93 + +int write(int fd, char *buf, int len) +{ + register int x0 __asm__("x0") =3D fd; + register char *x1 __asm__("x1") =3D buf; + register int x2 __asm__("x2") =3D len; + register int x8 __asm__("x8") =3D __NR_write; + + asm volatile("svc #0" : : "r"(x0), "r"(x1), "r"(x2), "r"(x8)); + + return len; +} + +void exit(int ret) +{ + register int x0 __asm__("x0") =3D ret; + register int x8 __asm__("x8") =3D __NR_exit; + + asm volatile("svc #0" : : "r"(x0), "r"(x8)); + __builtin_unreachable(); +} + +void _start(void) +{ + write(1, "Hello World\n", 12); + exit(0); +} diff --git a/tests/tcg/Makefile.target b/tests/tcg/Makefile.target index 2da70b2fcf..9722145b97 100644 --- a/tests/tcg/Makefile.target +++ b/tests/tcg/Makefile.target @@ -103,9 +103,14 @@ ifeq ($(filter %-softmmu, $(TARGET)),) # then the target. If there are common tests shared between # sub-targets (e.g. ARM & AArch64) then it is up to # $(TARGET_NAME)/Makefile.target to include the common parent -# architecture in its VPATH. +# architecture in its VPATH. However some targets are so minimal we +# can't even build the multiarch tests. +ifneq ($(filter $(TARGET_NAME),aarch64_be),) +-include $(SRC_PATH)/tests/tcg/$(TARGET_NAME)/Makefile.target +else -include $(SRC_PATH)/tests/tcg/multiarch/Makefile.target -include $(SRC_PATH)/tests/tcg/$(TARGET_NAME)/Makefile.target +endif =20 # Add the common build options CFLAGS+=3D-Wall -Werror -O0 -g -fno-strict-aliasing diff --git a/tests/tcg/aarch64_be/Makefile.target b/tests/tcg/aarch64_be/Ma= kefile.target new file mode 100644 index 0000000000..297d2cf71c --- /dev/null +++ b/tests/tcg/aarch64_be/Makefile.target @@ -0,0 +1,17 @@ +# -*- Mode: makefile -*- +# +# A super basic AArch64 BE makefile. As we don't have any big-endian +#l ibc available the best we can do is a basic Hello World. + +AARCH64BE_SRC=3D$(SRC_PATH)/tests/tcg/aarch64_be +VPATH +=3D $(AARCH64BE_SRC) + +AARCH64BE_TEST_SRCS=3D$(notdir $(wildcard $(AARCH64BE_SRC)/*.c)) +AARCH64BE_TESTS=3D$(AARCH64BE_TEST_SRCS:.c=3D) +#MULTIARCH_TESTS =3D $(MULTIARCH_SRCS:.c=3D) + +# We need to specify big-endian cflags +CFLAGS +=3D-mbig-endian -ffreestanding +LDFLAGS +=3D-nostdlib + +TESTS +=3D $(AARCH64BE_TESTS) --=20 2.39.5 From nobody Tue Oct 22 22:17:16 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=1729594752; cv=none; d=zohomail.com; s=zohoarc; b=Lh/OaJXV72HOAiWkRaQyVXRMWKmJw57IFIB9lkweSFbwGtjw8R4rRsjPM1wtZdKWkKxWbGfeX96PYxYTXPzUdFqwTlkxgaqDFAnJVfIAwlr+JFR7t6S6SLP6eXYlzoIrC2SRLhvDd4ioBP9pYF/dL2N7S4yEtiAR6vcdMTDR+WM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1729594752; 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=Pgb6ox3Ya7i122uZlocXrETTS1VOKhPW7bSAndX3jjQ=; b=NQi/g+C3tBeNq7Eo9W3bhZZ50yKMvQYNsa7pk2HEww/f2pAp1VuJq4IBs3fP5j1V+/dhxcU+g9HS0/vXL996CHrwcx4mFrdndoKBB7bcokoDgEcnZ9IHbpONZ4CzWFggAwqXMsLtQMiXA6FYT4p1Qjjt/wYByiUVU//I0/k207w= 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 17295947527601002.8043345409596; Tue, 22 Oct 2024 03:59:12 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t3CZl-0002ma-98; Tue, 22 Oct 2024 06:57:21 -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 1t3CZ4-0001qi-Jw for qemu-devel@nongnu.org; Tue, 22 Oct 2024 06:56:38 -0400 Received: from mail-ej1-x633.google.com ([2a00:1450:4864:20::633]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t3CZ0-00025C-Ot for qemu-devel@nongnu.org; Tue, 22 Oct 2024 06:56:37 -0400 Received: by mail-ej1-x633.google.com with SMTP id a640c23a62f3a-a9a6b4ca29bso442420366b.3 for ; Tue, 22 Oct 2024 03:56:33 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a9a912d838csm323114066b.8.2024.10.22.03.56.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 22 Oct 2024 03:56:28 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id D97B25FC0F; Tue, 22 Oct 2024 11:56:15 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1729594593; x=1730199393; 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=Pgb6ox3Ya7i122uZlocXrETTS1VOKhPW7bSAndX3jjQ=; b=X02Ook7/58CsBExkq0/lvB1P8dip2HNM/87gbjsnCpsXVg/uzlJ43DJ19XP+kAL910 4bQKFRMW9BdFhVO5im+FI3FWpjBxn4WPK4VAwzcNWMP5cHVU8VnBlW1Ko8CBU65S9khW ondalbrvdcf5M3e9A4aW1LfSKZLjsnANn/cyBPlpgAqtc5qc0uNlQTihh/w24u6K5ixE OJU3dnrUlqnTHNdKx2OwSBerjxcPsKtokos4rsteSM7KzMWsV36/PvpVqxUpBo7eFRG/ PDxj7TIns5gymfEb5K/pcD7dQjog0SsVGizXvskkZi8MDJc/52aLSp3m1bsYxhCM0Ool ebMQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729594593; x=1730199393; 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=Pgb6ox3Ya7i122uZlocXrETTS1VOKhPW7bSAndX3jjQ=; b=hrKu8Fmj18EbFP60iIi9yl8feZH4naHcnKDOl7sBA1C0m4HADpNh5MNRP4mYchn+a5 3S4YgksLrUg9GSSsQDiHU3oAkHAtjcQebZmr1tCTxKnzOhTqxwyF2aYkyvtMkp+q/9c/ DH6ruLrf2S1KUgmnzZzhGIuGFJqFLdvvfEzStmjGRwp16fGgvse35Ue9fuxzFBr/6Clq hJfhDLcQ400R3gU+Rx6A/wX0ZZcpn6DQ0c7Z7gVFH6EgT7p7WgUMnqU0CuaQqthAwtxK uwZL5jTLbPfn1sZFKrOa9if/RhMl+eTgkKHTkzdGhwzY4Ci4M043O4ZBOxWBYHLsKtga TZaQ== X-Gm-Message-State: AOJu0Yw4aq1kfuMDSxapRvNRWIEaWKKboZ5aw7Yttj/3eqe8yhY6YxRz lDzg/iQt4CHmDWnOtgI9JrDC6BLvrSl0pEix8JoS+ENlwUXkIsKx34FXt4xT5Ls= X-Google-Smtp-Source: AGHT+IGPREmWhIG8Sxc2dRJUVUnivk8DPIAg98Rjd0GSZmqkbNvMhBR1OB4OKQK6ufaSF5tJ1fK0uw== X-Received: by 2002:a17:907:97d2:b0:a99:fb56:39cc with SMTP id a640c23a62f3a-a9aace98a17mr198686166b.38.1729594592591; Tue, 22 Oct 2024 03:56:32 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Beraldo Leal , Laurent Vivier , Wainer dos Santos Moschetta , Mahmoud Mandour , Jiaxun Yang , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Yanan Wang , Thomas Huth , John Snow , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , qemu-arm@nongnu.org, =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Eduardo Habkost , devel@lists.libvirt.org, Cleber Rosa , kvm@vger.kernel.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Alexandre Iooss , Peter Maydell , Richard Henderson , Riku Voipio , Zhao Liu , Marcelo Tosatti , "Edgar E. Iglesias" , Marcel Apfelbaum , Pierrick Bouvier , Paolo Bonzini , Gustavo Romero Subject: [PATCH v2 14/20] tests/tcg/aarch64: Use raw strings for regexes in test-mte.py Date: Tue, 22 Oct 2024 11:56:08 +0100 Message-Id: <20241022105614.839199-15-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241022105614.839199-1-alex.bennee@linaro.org> References: <20241022105614.839199-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::633; envelope-from=alex.bennee@linaro.org; helo=mail-ej1-x633.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 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: 1729594753671116600 From: Gustavo Romero Use Python's raw string notation instead of string literals for regex so it's not necessary to double backslashes when regex special forms are used. Raw notation is preferred for regex and easier to read. Signed-off-by: Gustavo Romero Reviewed-by: Philippe Mathieu-Daud=C3=A9 Message-Id: <20241015140806.385449-1-gustavo.romero@linaro.org> Signed-off-by: Alex Benn=C3=A9e --- tests/tcg/aarch64/gdbstub/test-mte.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/tcg/aarch64/gdbstub/test-mte.py b/tests/tcg/aarch64/gdbs= tub/test-mte.py index a4cae6caa0..9ad98e7a54 100644 --- a/tests/tcg/aarch64/gdbstub/test-mte.py +++ b/tests/tcg/aarch64/gdbstub/test-mte.py @@ -23,8 +23,8 @@ from test_gdbstub import arg_parser, main, report =20 =20 -PATTERN_0 =3D "Memory tags for address 0x[0-9a-f]+ match \\(0x[0-9a-f]+\\)= ." -PATTERN_1 =3D ".*(0x[0-9a-f]+)" +PATTERN_0 =3D r"Memory tags for address 0x[0-9a-f]+ match \(0x[0-9a-f]+\)." +PATTERN_1 =3D r".*(0x[0-9a-f]+)" =20 =20 def run_test(): --=20 2.39.5 From nobody Tue Oct 22 22:17:16 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=1729594742; cv=none; d=zohomail.com; s=zohoarc; b=LQQ4TX2O2YkggZYyYrf9iujpcg8flWwdbhvN5SU9gYLb+Eg3qiJfplS7V5E5Z4W64opIPpEKnBUCerUlOMKxp7ebma2Q2SeB2R0jOO7z28aQAt+cNktdT98bvGiSshRKs12Nm3HmMSzWLoa/a1ydi6UPIXZNP7Tj9F4zzfQM7Bs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1729594742; 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=rLOsiFp7nSYSKf/se2Emh5FqkyaR/LV5KofnrCQ0C68=; b=AiJV7EIrz2326xg/6mx4mh5hzzwgO+lZT8GF6nc9Oyg/eslyN+4RRgDX898zjs9V6VHUQJptjC3BPCACZLB1O0UkIObiwBs8tPBK/K815OYhIVTF1k2e8IfXFvJTtJHnJld0hjA1lzXVszutKzVnWQpEMFps49lK8b3XhgcODa4= 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 1729594742479370.7141308784477; Tue, 22 Oct 2024 03:59:02 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t3CZg-0002TH-Nq; Tue, 22 Oct 2024 06:57:16 -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 1t3CZ1-0001oz-0Q for qemu-devel@nongnu.org; Tue, 22 Oct 2024 06:56:36 -0400 Received: from mail-ej1-x62c.google.com ([2a00:1450: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 1t3CYx-00024L-Se for qemu-devel@nongnu.org; Tue, 22 Oct 2024 06:56:33 -0400 Received: by mail-ej1-x62c.google.com with SMTP id a640c23a62f3a-a9a3dc089d8so763055166b.3 for ; Tue, 22 Oct 2024 03:56:31 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a9a912d6355sm324467166b.37.2024.10.22.03.56.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 22 Oct 2024 03:56:28 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id ECA855FC11; Tue, 22 Oct 2024 11:56:15 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1729594590; x=1730199390; 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=rLOsiFp7nSYSKf/se2Emh5FqkyaR/LV5KofnrCQ0C68=; b=UbY5ohl8Tq3r6oyeREt35aX2B3LpoO/9UggZwAPQVIcx1mMQckDgp4HNoZmC9xGfOn eOiOb54x611JeEjN997BoalrBOLowFARFUNxjmxZrbXDAi+IgeTukrCyOD87I+Kj2X5A U4dDLqp5g6z+febzw4/PVaOyNCJscVowrIsAl441cwfsNt8dSPNXY+uMvTQLpgtBrvBA Ic5sMugk1D/Ivtba6AijAZ+My95pO/5j4+l4oMofFH5zJnHs3gJKJE0rSpDbjeaYGys/ dDnES4VgEX+IXe70yLxcVVnzFaEVt7pZsWrYUatpxQOUoqJCTZvAeN4JtnNX21IjvqWI /mZw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729594590; x=1730199390; 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=rLOsiFp7nSYSKf/se2Emh5FqkyaR/LV5KofnrCQ0C68=; b=BxMENMefWvgZoTlflj4yznQD9PP5TtTmyD88RpeBZMxHpCIq9YfiBYjZez6mNdTzyE qNCmo1gjHg3CKTkkCf5CGNVaWFG0ZN9tVqmPGs0bMZTpkCSWfgcMNvcKDzZI+iiZOGYw 691wUBqo7DFhc5L7Z1IdDIjLDfcbgDFxVxTXz5XdYqL3LmhMwXRM4+855R49vbM13QpK g8BeUMPySjtK41rTFkL4xRXGlI/mjhh7Yj5jZu8ArzUePALTLQ1HsjgUN3z/rNzAjAeB eKh6rmq3rIhgISqLJZXz+EkBc0xOMkDLKJb9BT3CErg1xVM1tQ9GcW00BlB+MwZb0aIS DtTQ== X-Gm-Message-State: AOJu0YyxuZWGr10MT55RjYm6x4eJIykFCSqEY2qJWssC3H1qRh4yvoF1 UkSUsl4qk1REv9QJdGUZVs34+ODCRL8ULA+n40xVYp/JelBWkUCXTLP9QOkNZAY= X-Google-Smtp-Source: AGHT+IFvlb/CmT8eWULIjRtzdfUNfGcd5+oEeP4MY3wCJkBrE+WrjT0rHQJ8GXb9kTKmNzYQI1ufsA== X-Received: by 2002:a17:907:3182:b0:a9a:a7fd:d840 with SMTP id a640c23a62f3a-a9aa7fdd87bmr350993366b.1.1729594590177; Tue, 22 Oct 2024 03:56:30 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Beraldo Leal , Laurent Vivier , Wainer dos Santos Moschetta , Mahmoud Mandour , Jiaxun Yang , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Yanan Wang , Thomas Huth , John Snow , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , qemu-arm@nongnu.org, =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Eduardo Habkost , devel@lists.libvirt.org, Cleber Rosa , kvm@vger.kernel.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Alexandre Iooss , Peter Maydell , Richard Henderson , Riku Voipio , Zhao Liu , Marcelo Tosatti , "Edgar E. Iglesias" , Marcel Apfelbaum , Pierrick Bouvier , Paolo Bonzini , Gustavo Romero Subject: [PATCH v2 15/20] testing: Enhance gdb probe script Date: Tue, 22 Oct 2024 11:56:09 +0100 Message-Id: <20241022105614.839199-16-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241022105614.839199-1-alex.bennee@linaro.org> References: <20241022105614.839199-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::62c; envelope-from=alex.bennee@linaro.org; helo=mail-ej1-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 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: 1729594743578116600 From: Gustavo Romero Use list and set comprehension to simplify code. Also, gently handle invalid gdb filenames. Signed-off-by: Gustavo Romero Message-Id: <20241015145848.387281-1-gustavo.romero@linaro.org> Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Pierrick Bouvier --- scripts/probe-gdb-support.py | 75 +++++++++++++++++++----------------- 1 file changed, 39 insertions(+), 36 deletions(-) diff --git a/scripts/probe-gdb-support.py b/scripts/probe-gdb-support.py index 6dc58d06c7..6bcadce150 100644 --- a/scripts/probe-gdb-support.py +++ b/scripts/probe-gdb-support.py @@ -19,58 +19,61 @@ =20 import argparse import re -from subprocess import check_output, STDOUT +from subprocess import check_output, STDOUT, CalledProcessError +import sys =20 -# mappings from gdb arch to QEMU target -mappings =3D { - "alpha" : "alpha", +# Mappings from gdb arch to QEMU target +MAP =3D { + "alpha" : ["alpha"], "aarch64" : ["aarch64", "aarch64_be"], - "armv7": "arm", + "armv7": ["arm"], "armv8-a" : ["aarch64", "aarch64_be"], - "avr" : "avr", + "avr" : ["avr"], # no hexagon in upstream gdb - "hppa1.0" : "hppa", - "i386" : "i386", - "i386:x86-64" : "x86_64", - "Loongarch64" : "loongarch64", - "m68k" : "m68k", - "MicroBlaze" : "microblaze", + "hppa1.0" : ["hppa"], + "i386" : ["i386"], + "i386:x86-64" : ["x86_64"], + "Loongarch64" : ["loongarch64"], + "m68k" : ["m68k"], + "MicroBlaze" : ["microblaze"], "mips:isa64" : ["mips64", "mips64el"], - "or1k" : "or1k", - "powerpc:common" : "ppc", + "or1k" : ["or1k"], + "powerpc:common" : ["ppc"], "powerpc:common64" : ["ppc64", "ppc64le"], - "riscv:rv32" : "riscv32", - "riscv:rv64" : "riscv64", - "s390:64-bit" : "s390x", + "riscv:rv32" : ["riscv32"], + "riscv:rv64" : ["riscv64"], + "s390:64-bit" : ["s390x"], "sh4" : ["sh4", "sh4eb"], - "sparc": "sparc", - "sparc:v8plus": "sparc32plus", - "sparc:v9a" : "sparc64", + "sparc": ["sparc"], + "sparc:v8plus": ["sparc32plus"], + "sparc:v9a" : ["sparc64"], # no tricore in upstream gdb "xtensa" : ["xtensa", "xtensaeb"] } =20 + def do_probe(gdb): - gdb_out =3D check_output([gdb, - "-ex", "set architecture", - "-ex", "quit"], stderr=3DSTDOUT) + try: + gdb_out =3D check_output([gdb, + "-ex", "set architecture", + "-ex", "quit"], stderr=3DSTDOUT, encoding= =3D"utf-8") + except (OSError) as e: + sys.exit(e) + except CalledProcessError as e: + sys.exit(f'{e}. Output:\n\n{e.output}') + + found_gdb_archs =3D re.search(r'Valid arguments are (.*)', gdb_out) =20 - m =3D re.search(r"Valid arguments are (.*)", - gdb_out.decode("utf-8")) + targets =3D set() + if found_gdb_archs: + gdb_archs =3D found_gdb_archs.group(1).split(", ") + mapped_gdb_archs =3D [arch for arch in gdb_archs if arch in MAP] =20 - valid_arches =3D set() + targets =3D {target for arch in mapped_gdb_archs for target in MAP= [arch]} =20 - if m.group(1): - for arch in m.group(1).split(", "): - if arch in mappings: - mapping =3D mappings[arch] - if isinstance(mapping, str): - valid_arches.add(mapping) - else: - for entry in mapping: - valid_arches.add(entry) + # QEMU targets + return targets =20 - return valid_arches =20 def main() -> None: parser =3D argparse.ArgumentParser(description=3D'Probe GDB Architectu= res') --=20 2.39.5 From nobody Tue Oct 22 22:17:16 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=1729595090; cv=none; d=zohomail.com; s=zohoarc; b=oAEQPpzwbO0zSrx5X3C1BC5ltUbp0M3AP6arG0wPgIvH+655F5tFE8SB21RHy5sKkvyRNzt9NP1R5x1i/74y2/O0RS5Th2PqvLX+5vwaTqePQaexAzrjPgelU/L0+8c9yflXV4h3eheRqGxsqe9WdgF8JFQwDDN8+D4uPrE7Io4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1729595090; 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=xhZwhDsyP9u5fu/gLDiAkir8lHLMK7A4MI+ExEvLX/4=; b=EqfoDF4SdNj1sRk2DXuBXmkXTSrAYVr1wVgZMSJFZz7wbO1qTiHDnL5TScFwGXPg3vSqjOV1tG8NV0MpTAAp+l00friMrHeZjz33tbFIjF8O7l0cBzAeHmJYPbVBcU15COCM20oDimrdOKdb0bKxuaWyux5Nz5bHP7c003QUfX0= 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 1729595090796142.13207922405672; Tue, 22 Oct 2024 04:04:50 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t3Cgq-00073i-Ii; Tue, 22 Oct 2024 07:04:41 -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 1t3Cge-0006zi-0J for qemu-devel@nongnu.org; Tue, 22 Oct 2024 07:04:32 -0400 Received: from mail-ed1-x533.google.com ([2a00:1450:4864:20::533]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t3CgW-00035b-7w for qemu-devel@nongnu.org; Tue, 22 Oct 2024 07:04:26 -0400 Received: by mail-ed1-x533.google.com with SMTP id 4fb4d7f45d1cf-5c9552d02e6so6994240a12.2 for ; Tue, 22 Oct 2024 04:03:56 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5cb66a6a6efsm3001448a12.53.2024.10.22.04.03.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 22 Oct 2024 04:03:54 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 0BE3F5FC19; Tue, 22 Oct 2024 11:56:16 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1729595035; x=1730199835; 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=xhZwhDsyP9u5fu/gLDiAkir8lHLMK7A4MI+ExEvLX/4=; b=XRSBRYAD4Qd7pnBwiz5a5vIHHE27BmtWB2IOMOgUsSEWejCyvuQ2qxVuuvJ1z4Y5gn kuQ3d+pGx0NQdjtFWNrSc8mT1YqKmT8t7Zhb27vevRXS7CVlO2IpXlDkBi0QR1Vmxh9x RnVBeCjG78UsHTfjFNZTe8WaG9d5XB9vyDpSFSqQjCqaKEy1cz/ve/hDYssDYndwsHuI Eh6RWotLfzq+4fPfHmDhPzb89jiD2CqYEkb7T3cgy0p+kcIrqRK5dWGAn5xtkykBr95x vvePsTdNKvzUM6jQxvJnE8keYtm7PKq6nsB7h00g7suq1xTxIhzxf+Z6QjVo0TBY6I2v ZNmQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729595035; x=1730199835; 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=xhZwhDsyP9u5fu/gLDiAkir8lHLMK7A4MI+ExEvLX/4=; b=Co2Psi70diMXZc7rjX6FKw1TUhpv9BNDj7g12WLkfmOTqx/sIvo2zhnJGT50w0Fnel zPuszsF2JQOOBudYBygr4NyQsy+I6axiXl7LKJLA2wDiD7rNSaL+aa1hVyNFAjMnxuit bte4p6oa7wW61feo64v8fa9S7pqe42PIIioJgj8TZ0ya9AWHRI8SbWwbWNMuHmTry57K V6orBqO/7BK3+Q/LL67EyG9/iIBtTe3FlWk7efNnv4uD74ur8omyApO0s03m33+DykvO VXBZ17y0Nv0btJU8rLhdhfJ78a60wv9oq05xjuXka6pS8xtqzpLXyeBQQx/OsXX2uatE MJJQ== X-Gm-Message-State: AOJu0YxERu3/ielKqN5Cxhnr5VfuGo7uX36CHTAqpJ/K1K5uwFrYBisN hcgrDbFCj7DkJ6HgGp2WHCELuFgaikEpkYEvC8PJv57xStSxz4H8hwEO5PqFclw= X-Google-Smtp-Source: AGHT+IGrsXwXm6QQRI2EJsc5NTDWH/8THorwiRLqjS3xUSuBrUIQM0t1N7fBGivyxVye6YEvh9zvEA== X-Received: by 2002:a05:6402:13cf:b0:5cb:7295:49b with SMTP id 4fb4d7f45d1cf-5cb72950e50mr4337266a12.34.1729595035184; Tue, 22 Oct 2024 04:03:55 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Beraldo Leal , Laurent Vivier , Wainer dos Santos Moschetta , Mahmoud Mandour , Jiaxun Yang , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Yanan Wang , Thomas Huth , John Snow , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , qemu-arm@nongnu.org, =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Eduardo Habkost , devel@lists.libvirt.org, Cleber Rosa , kvm@vger.kernel.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Alexandre Iooss , Peter Maydell , Richard Henderson , Riku Voipio , Zhao Liu , Marcelo Tosatti , "Edgar E. Iglesias" , Marcel Apfelbaum , Pierrick Bouvier , Paolo Bonzini Subject: [PATCH v2 16/20] MAINTAINERS: mention my plugins/next tree Date: Tue, 22 Oct 2024 11:56:10 +0100 Message-Id: <20241022105614.839199-17-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241022105614.839199-1-alex.bennee@linaro.org> References: <20241022105614.839199-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::533; envelope-from=alex.bennee@linaro.org; helo=mail-ed1-x533.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 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: 1729595091326116600 Make it easier to find where plugin patches are being staged. Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Pierrick Bouvier --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index 81396c9f15..02b8b2dfd6 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -3702,6 +3702,7 @@ F: include/tcg/ =20 TCG Plugins M: Alex Benn=C3=A9e +T: git https://gitlab.com/stsquad/qemu plugins/next R: Alexandre Iooss R: Mahmoud Mandour R: Pierrick Bouvier --=20 2.39.5 From nobody Tue Oct 22 22:17:16 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=1729594751; cv=none; d=zohomail.com; s=zohoarc; b=lD5gXimHXxcLcMilkokltBYT+crCNVy4wDUXNHeN4pjM+ypMWRiToR+EQiOdvbyr9Yp0ST879Y60hkrBKx92vuoSnKJeRTGAjo0tFNMXholMQDsbE/qpEZdCxN0MNR3sQ9ujpGTSSpv4soPtj29zQpNDwLN5EbRp8ptuC9O8YnU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1729594751; 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=ncBC08IoBkP10ef5QDpG5SV+FPj/pwrW84Mb8BGJC6M=; b=KmUVE9OAFeysxFrAsdGIVWcE1ArnVvtVDQP9onF2/SVfVAB8ZhHltVbQrRPyA6KMiOiMrbJwvTvncQrHy0AzD06NPgZPG5iH8qE6mKQgV0yqX98ci8QB9pbGzWJbtu/aiN5MbGfRhPfE09g1IzRGIgO2KdlGUOrjeQKvAum3Wb4= 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 1729594751011996.1991491442707; Tue, 22 Oct 2024 03:59:11 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t3CZl-0002n7-CY; Tue, 22 Oct 2024 06:57:21 -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 1t3CZ4-0001qk-PK for qemu-devel@nongnu.org; Tue, 22 Oct 2024 06:56:38 -0400 Received: from mail-ej1-x634.google.com ([2a00:1450:4864:20::634]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t3CZ2-000260-Mc for qemu-devel@nongnu.org; Tue, 22 Oct 2024 06:56:38 -0400 Received: by mail-ej1-x634.google.com with SMTP id a640c23a62f3a-a86e9db75b9so710440466b.1 for ; Tue, 22 Oct 2024 03:56:36 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a9a91559951sm321731866b.106.2024.10.22.03.56.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 22 Oct 2024 03:56:28 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 2565B5FC34; Tue, 22 Oct 2024 11:56:16 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1729594595; x=1730199395; 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=ncBC08IoBkP10ef5QDpG5SV+FPj/pwrW84Mb8BGJC6M=; b=ANmHrUZhQRwGwzgFbQBxlEKpB/wrKEFGuckawy2mwC4MfaX8BW92MyY/mCGboH7M1B DriFw2NMOSgdbRhJoZXPoE/4jXmKLmKhIRlAKGryOZMWwz6gDyfnzC6bdWWeLCq1AFB/ uoJRNtCs4BSks536GKGBtWQnq3dJXbDcRGWXByqwi7pFjnmzBhaqOoovUAwkTl2s5JcW U6vBzPHkZoTUenTm+FuTU2hcTyHu/RYKX5FfwzbfUU87azXxBG6aFCUh6WamRVjzuXgF 5nA02UA3BOIR9qxyp/vZytKG+vQNI2HXMxjVfYGcN6nTizwFekGSnJz0XGkFm+oBPqKX 39eg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729594595; x=1730199395; 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=ncBC08IoBkP10ef5QDpG5SV+FPj/pwrW84Mb8BGJC6M=; b=PVcCtbZqNfp3u3Nw6alqBE7FAYXiQxJUJynN1PU+X/wokTJuoqVYptjPA5af9lKDxb weWvhkv/D17g96gvmbbh5RnCS5MRJyuSQKNGHfxUopJCyzB12Lxd3ErRaRB64ppU8Nif wPas0WFrJQmVvfqc7smC4Z+y6EbYtU9AtwkV8/0DXAz3oXeB1UhLc0q4bzoaaIghA9Qv UA0U/sAvopsA7bqx6KcdisuXoKvfeBForEpNO2aewE3mr/5HChZsjKETeFTAMyKAhQAK Uc3MIYVkiZJ3n3+RtOTUgNSCcuicepwPq3wnvPXGZzxbD4LcIOnhvSlIeDRKBZgTLb3R beuA== X-Gm-Message-State: AOJu0Yx3qlSVxerQXM5gtTTJy29qXKAtBh5AQuZftKK0ArZ0DJxthUDk tGoAmTUyq63Ekymv43Ke61bwxygkCeCRrW90RBbisHrXTYp48w7v4R7TYiAb4ZU= X-Google-Smtp-Source: AGHT+IHBLyW0mHPJl2GnPpKKp3UGFXSgagg2mGtBM8c3JT2vxTQvXvz98RyNa3XJTjQV1wo5eVGMhQ== X-Received: by 2002:a17:906:c10b:b0:a9a:6bd:95dc with SMTP id a640c23a62f3a-a9aad3715ccmr189373366b.46.1729594594783; Tue, 22 Oct 2024 03:56:34 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Beraldo Leal , Laurent Vivier , Wainer dos Santos Moschetta , Mahmoud Mandour , Jiaxun Yang , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Yanan Wang , Thomas Huth , John Snow , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , qemu-arm@nongnu.org, =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Eduardo Habkost , devel@lists.libvirt.org, Cleber Rosa , kvm@vger.kernel.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Alexandre Iooss , Peter Maydell , Richard Henderson , Riku Voipio , Zhao Liu , Marcelo Tosatti , "Edgar E. Iglesias" , Marcel Apfelbaum , Pierrick Bouvier , Paolo Bonzini Subject: [PATCH v2 17/20] plugins: add ability to register a GDB triggered callback Date: Tue, 22 Oct 2024 11:56:11 +0100 Message-Id: <20241022105614.839199-18-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241022105614.839199-1-alex.bennee@linaro.org> References: <20241022105614.839199-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::634; envelope-from=alex.bennee@linaro.org; helo=mail-ej1-x634.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 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: 1729594751496116600 Now gdbstub has gained the ability to extend its command tables we can allow it to trigger plugin callbacks. This is probably most useful for QEMU developers debugging plugins themselves but might be useful for other stuff. Trigger the callback by sending: maintenance packet Qqemu.plugin_cb I've extended the memory plugin to report on the packet. Signed-off-by: Alex Benn=C3=A9e --- include/qemu/plugin-event.h | 1 + include/qemu/qemu-plugin.h | 16 ++++++++++++++++ plugins/plugin.h | 9 +++++++++ plugins/api.c | 18 ++++++++++++++++++ plugins/core.c | 37 ++++++++++++++++++++++++++++++++++++ tests/tcg/plugins/mem.c | 11 +++++++++-- plugins/qemu-plugins.symbols | 1 + 7 files changed, 91 insertions(+), 2 deletions(-) diff --git a/include/qemu/plugin-event.h b/include/qemu/plugin-event.h index 7056d8427b..d9aa56cf4f 100644 --- a/include/qemu/plugin-event.h +++ b/include/qemu/plugin-event.h @@ -20,6 +20,7 @@ enum qemu_plugin_event { QEMU_PLUGIN_EV_VCPU_SYSCALL_RET, QEMU_PLUGIN_EV_FLUSH, QEMU_PLUGIN_EV_ATEXIT, + QEMU_PLUGIN_EV_GDBSTUB, QEMU_PLUGIN_EV_MAX, /* total number of plugin events we support */ }; =20 diff --git a/include/qemu/qemu-plugin.h b/include/qemu/qemu-plugin.h index 622c9a0232..99c3b365aa 100644 --- a/include/qemu/qemu-plugin.h +++ b/include/qemu/qemu-plugin.h @@ -802,6 +802,22 @@ QEMU_PLUGIN_API void qemu_plugin_register_atexit_cb(qemu_plugin_id_t id, qemu_plugin_udata_cb_t cb, void *userd= ata); =20 + +/** + * qemu_plugin_register_gdb_cb() - register a gdb callback + * @id: plugin ID + * @cb: callback + * @userdata: user data for callback + * + * When using the gdbstub to debug a guest you can send a command that + * will trigger the callback. This is useful if you want the plugin to + * print out collected state at particular points when debugging a + * program. + */ +QEMU_PLUGIN_API +void qemu_plugin_register_gdb_cb(qemu_plugin_id_t id, + qemu_plugin_udata_cb_t cb, void *userdata= ); + /* returns how many vcpus were started at this point */ int qemu_plugin_num_vcpus(void); =20 diff --git a/plugins/plugin.h b/plugins/plugin.h index 30e2299a54..f37667c9fb 100644 --- a/plugins/plugin.h +++ b/plugins/plugin.h @@ -118,4 +118,13 @@ struct qemu_plugin_scoreboard *plugin_scoreboard_new(s= ize_t element_size); =20 void plugin_scoreboard_free(struct qemu_plugin_scoreboard *score); =20 +/** + * plugin_register_gdbstub_commands - register gdbstub commands + * + * This should only be called once to register gdbstub commands so we + * can trigger callbacks if needed. + */ +void plugin_register_gdbstub_commands(void); + + #endif /* PLUGIN_H */ diff --git a/plugins/api.c b/plugins/api.c index 24ea64e2de..62141616f4 100644 --- a/plugins/api.c +++ b/plugins/api.c @@ -681,3 +681,21 @@ void qemu_plugin_update_ns(const void *handle, int64_t= new_time) } #endif } + +/* + * gdbstub hooks + */ + +static bool gdbstub_callbacks; + +void qemu_plugin_register_gdb_cb(qemu_plugin_id_t id, + qemu_plugin_udata_cb_t cb, + void *udata) +{ + plugin_register_cb_udata(id, QEMU_PLUGIN_EV_GDBSTUB, cb, udata); + + if (!gdbstub_callbacks) { + plugin_register_gdbstub_commands(); + gdbstub_callbacks =3D true; + } +} diff --git a/plugins/core.c b/plugins/core.c index bb105e8e68..e7fce08799 100644 --- a/plugins/core.c +++ b/plugins/core.c @@ -23,6 +23,7 @@ #include "qemu/xxhash.h" #include "qemu/rcu.h" #include "hw/core/cpu.h" +#include "gdbstub/commands.h" =20 #include "exec/exec-all.h" #include "exec/tb-flush.h" @@ -147,6 +148,7 @@ static void plugin_cb__udata(enum qemu_plugin_event ev) =20 switch (ev) { case QEMU_PLUGIN_EV_ATEXIT: + case QEMU_PLUGIN_EV_GDBSTUB: QLIST_FOREACH_SAFE_RCU(cb, &plugin.cb_lists[ev], entry, next) { qemu_plugin_udata_cb_t func =3D cb->f.udata; =20 @@ -768,3 +770,38 @@ void plugin_scoreboard_free(struct qemu_plugin_scorebo= ard *score) g_array_free(score->data, TRUE); g_free(score); } + +/* + * gdbstub integration + */ + +static void handle_plugin_cb(GArray *params, void *user_ctx) +{ + plugin_cb__udata(QEMU_PLUGIN_EV_GDBSTUB); + gdb_put_packet("OK"); +} + +enum Command { + PluginCallback, + NUM_GDB_CMDS +}; + +static const GdbCmdParseEntry cmd_handler_table[NUM_GDB_CMDS] =3D { + [PluginCallback] =3D { + .handler =3D handle_plugin_cb, + .cmd_startswith =3D true, + .cmd =3D "qemu.plugin_cb", + .schema =3D "s?", + }, +}; + +void plugin_register_gdbstub_commands(void) +{ + g_autoptr(GPtrArray) set_table =3D g_ptr_array_new(); + + for (int i =3D 0; i < NUM_GDB_CMDS; i++) { + g_ptr_array_add(set_table, (gpointer) &cmd_handler_table[PluginCal= lback]); + } + + gdb_extend_set_table(set_table); +} diff --git a/tests/tcg/plugins/mem.c b/tests/tcg/plugins/mem.c index b0fa8a9f27..d416d92fc2 100644 --- a/tests/tcg/plugins/mem.c +++ b/tests/tcg/plugins/mem.c @@ -75,8 +75,7 @@ static gint addr_order(gconstpointer a, gconstpointer b) return na->region_address > nb->region_address ? 1 : -1; } =20 - -static void plugin_exit(qemu_plugin_id_t id, void *p) +static void plugin_report(qemu_plugin_id_t id, void *p) { g_autoptr(GString) out =3D g_string_new(""); =20 @@ -90,6 +89,7 @@ static void plugin_exit(qemu_plugin_id_t id, void *p) } qemu_plugin_outs(out->str); =20 + g_mutex_lock(&lock); =20 if (do_region_summary) { GList *counts =3D g_hash_table_get_values(regions); @@ -114,6 +114,12 @@ static void plugin_exit(qemu_plugin_id_t id, void *p) qemu_plugin_outs(out->str); } =20 + g_mutex_unlock(&lock); +} + +static void plugin_exit(qemu_plugin_id_t id, void *p) +{ + plugin_report(id, p); qemu_plugin_scoreboard_free(counts); } =20 @@ -400,6 +406,7 @@ QEMU_PLUGIN_EXPORT int qemu_plugin_install(qemu_plugin_= id_t id, counts, CPUCount, mem_count); io_count =3D qemu_plugin_scoreboard_u64_in_struct(counts, CPUCount, io= _count); qemu_plugin_register_vcpu_tb_trans_cb(id, vcpu_tb_trans); + qemu_plugin_register_gdb_cb(id, plugin_report, NULL); qemu_plugin_register_atexit_cb(id, plugin_exit, NULL); return 0; } diff --git a/plugins/qemu-plugins.symbols b/plugins/qemu-plugins.symbols index 032661f9ea..d272e8e0f3 100644 --- a/plugins/qemu-plugins.symbols +++ b/plugins/qemu-plugins.symbols @@ -25,6 +25,7 @@ qemu_plugin_read_register; qemu_plugin_register_atexit_cb; qemu_plugin_register_flush_cb; + qemu_plugin_register_gdb_cb; qemu_plugin_register_vcpu_exit_cb; qemu_plugin_register_vcpu_idle_cb; qemu_plugin_register_vcpu_init_cb; --=20 2.39.5 From nobody Tue Oct 22 22:17:16 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=1729594753; cv=none; d=zohomail.com; s=zohoarc; b=bgkp9dsIze/VCIXvjs2lwU4sF0QjYkjcv6eUSZNA895Ue93D4beCz/bkL88TkpQ8+PBJIuRw+cIE5rMnjqEG0kbgHNsxWfytkULO1l3jTO8XyrVfc3ZL45JgKdFmK94aJi4U1dt6r/XWEgv6ubZqq/B2KLCx7KNkI8rRMCUUT2w= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1729594753; 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=59EXaptdsAtTsnL7N0QHtzvibi/ktz9wJ6DO/DYK14s=; b=hy1pvEhzeEeR9DAun2hyD05DYTZO2BDunpfPh8bcR5wcuqeKeROzd16sCByUmhKX5MyNS2VZDaqXCxBHqLwKU8iKJuepsAQmvHKBtHwxvxLFuPV41p7i2pLivCSTOxr/haVBDiXkBnovsJMHJwieoK14YKF58tTJ6060ZF7ZY+A= 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 172959475343010.101830530271286; Tue, 22 Oct 2024 03:59:13 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t3CZf-0002Ip-7h; Tue, 22 Oct 2024 06:57:15 -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 1t3CZ6-0001rU-7v for qemu-devel@nongnu.org; Tue, 22 Oct 2024 06:56:40 -0400 Received: from mail-ej1-x631.google.com ([2a00:1450:4864:20::631]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t3CZ4-00026O-DC for qemu-devel@nongnu.org; Tue, 22 Oct 2024 06:56:39 -0400 Received: by mail-ej1-x631.google.com with SMTP id a640c23a62f3a-a9932aa108cso812869566b.2 for ; Tue, 22 Oct 2024 03:56:36 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a9a915a48aesm326490066b.221.2024.10.22.03.56.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 22 Oct 2024 03:56:32 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 394875FC3D; Tue, 22 Oct 2024 11:56:16 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1729594596; x=1730199396; 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=59EXaptdsAtTsnL7N0QHtzvibi/ktz9wJ6DO/DYK14s=; b=Bc68p+6hpnuftkBuFHQxm1WhLl1f7/VxrrXXNItalKXkNBaBWOsre4i30t5qdd7Q+j Un2yT30GPG/2xnbZS5MuYX9jZvAQtBRBsOcmi7A3mATdlOgcae4kFf279NC5gS/7Hzp+ 5eNl8I3nCEHgbNkjXF9b4WV5aZCE5+38CdMBJgnjwvzkwj9zDEC3T/q9J37akU0m2U8E RL+c4EtzKszmc5Wagpc4kT0ysbQUH4wqywEF/pU18sE2jhgzxxrH9GiQDvjiy55jdFrS sJbpgjYTaJbaKdAIcLmsXcCL9JAHLXfMcr5d4G+fX79qeH+wYqiCCN4XZEI4Fp/mA7QA SLew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729594596; x=1730199396; 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=59EXaptdsAtTsnL7N0QHtzvibi/ktz9wJ6DO/DYK14s=; b=I6vkeJdgUMuGmoWfIcJXk2D61AoKsFOxGDFO/NPEuzALYpwuC6k88WVeROpvfNCF2v pp10hqUb9h660AzYA96qiD8oecVjgdkd185ZP1avyJ/eZ0CcHlYNVA8YjF9AMG3k8WTo hqat5igKo3RVRg9TohAkm4zWLwytaKJbaZDmnp305M9/pceKmU8Cp+dlkyxCYbBPBdXF hlnAn0Cp+3YbWtsyuEtGG5w9XaLIOHv6ir9I+Jfu5AqYOTG7gtO+ISB6Fjc+CftS3I0q HZ7RIeYkDBmPo9OgndfZ6An6ny/6UesXme+ILS2dFB26VpC2Jl1o5EdPbTR1YUwP/6tF NnsQ== X-Gm-Message-State: AOJu0Yy3mYlZ01xXNCh7UDY/4nEAAW3sAznSJvTjYJ6LhS82vo4x+6MT EVcjX9k+B1OsM1xSIFGFT+PXTMzuxiw4CJRH+W8utbHvO73rMZYTWYPKIr8Dkr0= X-Google-Smtp-Source: AGHT+IESzzC72mFFjVxSlJ9yKckkgejJYGt9NcC+1VBYY14emqGj0/mOgmagBB965bWs6j/k5E+0qQ== X-Received: by 2002:a17:907:d2a:b0:a9a:5e3a:641d with SMTP id a640c23a62f3a-a9aad376421mr153636366b.59.1729594595748; Tue, 22 Oct 2024 03:56:35 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Beraldo Leal , Laurent Vivier , Wainer dos Santos Moschetta , Mahmoud Mandour , Jiaxun Yang , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Yanan Wang , Thomas Huth , John Snow , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , qemu-arm@nongnu.org, =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Eduardo Habkost , devel@lists.libvirt.org, Cleber Rosa , kvm@vger.kernel.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Alexandre Iooss , Peter Maydell , Richard Henderson , Riku Voipio , Zhao Liu , Marcelo Tosatti , "Edgar E. Iglesias" , Marcel Apfelbaum , Pierrick Bouvier , Paolo Bonzini Subject: [PATCH v2 18/20] meson: build contrib/plugins with meson Date: Tue, 22 Oct 2024 11:56:12 +0100 Message-Id: <20241022105614.839199-19-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241022105614.839199-1-alex.bennee@linaro.org> References: <20241022105614.839199-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::631; envelope-from=alex.bennee@linaro.org; helo=mail-ej1-x631.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 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: 1729594755380116600 From: Pierrick Bouvier Tried to unify this meson.build with tests/tcg/plugins/meson.build but the resulting modules are not output in the right directory. Originally proposed by Anton Kochkov, thank you! Solves: https://gitlab.com/qemu-project/qemu/-/issues/1710 Signed-off-by: Pierrick Bouvier Message-Id: <20240925204845.390689-2-pierrick.bouvier@linaro.org> Signed-off-by: Alex Benn=C3=A9e --- meson.build | 4 ++++ contrib/plugins/meson.build | 23 +++++++++++++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 contrib/plugins/meson.build diff --git a/meson.build b/meson.build index bdd67a2d6d..3ea03c451b 100644 --- a/meson.build +++ b/meson.build @@ -3678,6 +3678,10 @@ subdir('accel') subdir('plugins') subdir('ebpf') =20 +if 'CONFIG_TCG' in config_all_accel + subdir('contrib/plugins') +endif + common_user_inc =3D [] =20 subdir('common-user') diff --git a/contrib/plugins/meson.build b/contrib/plugins/meson.build new file mode 100644 index 0000000000..a0e026d25e --- /dev/null +++ b/contrib/plugins/meson.build @@ -0,0 +1,23 @@ +t =3D [] +if get_option('plugins') + foreach i : ['cache', 'drcov', 'execlog', 'hotblocks', 'hotpages', 'howv= ec', + 'hwprofile', 'ips', 'lockstep', 'stoptrigger'] + if host_os =3D=3D 'windows' + t +=3D shared_module(i, files(i + '.c') + 'win32_linker.c', + include_directories: '../../include/qemu', + link_depends: [win32_qemu_plugin_api_lib], + link_args: ['-Lplugins', '-lqemu_plugin_api'], + dependencies: glib) + + else + t +=3D shared_module(i, files(i + '.c'), + include_directories: '../../include/qemu', + dependencies: glib) + endif + endforeach +endif +if t.length() > 0 + alias_target('contrib-plugins', t) +else + run_target('contrib-plugins', command: find_program('true')) +endif --=20 2.39.5 From nobody Tue Oct 22 22:17:16 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=1729594629; cv=none; d=zohomail.com; s=zohoarc; b=FAkDdb1d+RfQSHgZOS65LR5ZHhilwmlp/ATN1yA/JO5z1MRM5Wp95W6QV6XELnUF1Ye7V6ZVxcxH0N1SM6nb+nu/U0BLH60PTFV4+AQSqnKZyr3DPt6jifmduOySJFtRhH1/YEOo4h0gN/p+k7SjqzcyCXO1+jxS7sFEl/v9iZ4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1729594629; 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=A1RT2huJ5JZoTziBJ4jD+CCwuEKWgio+GHjHj5uuvtc=; b=JHnaNVDRvrWKg9fXxHmj4CDqUYeWVyxYFhC4LV3voa6iKGLnImswJx2hUF/elDiQiNrIZ5vxuU/8bShgopyNPTRPEBLAPFhbCXcDFKwyPgG6JsPXhQeXpCiUltGAi0avp5WsU1IDZhrVLMo0ihuqTl4TamWAtZ4SaK7wK3ISPeE= 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 1729594629231303.42226877364794; Tue, 22 Oct 2024 03:57:09 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t3CZJ-0001vR-DX; Tue, 22 Oct 2024 06:56:53 -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 1t3CZ6-0001rs-KQ for qemu-devel@nongnu.org; Tue, 22 Oct 2024 06:56:40 -0400 Received: from mail-ed1-x529.google.com ([2a00:1450:4864:20::529]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t3CZ4-000267-D2 for qemu-devel@nongnu.org; Tue, 22 Oct 2024 06:56:40 -0400 Received: by mail-ed1-x529.google.com with SMTP id 4fb4d7f45d1cf-5cb74434bc5so1915194a12.0 for ; Tue, 22 Oct 2024 03:56:36 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a9a912ee04asm324230166b.61.2024.10.22.03.56.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 22 Oct 2024 03:56:30 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 4FCF95FC47; Tue, 22 Oct 2024 11:56:16 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1729594595; x=1730199395; 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=A1RT2huJ5JZoTziBJ4jD+CCwuEKWgio+GHjHj5uuvtc=; b=eRRTui8dFElUKek1bC7zmLjWjpyj4q9Hj2EmMXoEoCslOwqIfrWCqKXabpg+zsJzs3 RaMyciYR2Fzu1vjKAjDMJ08bg2xa0cYlqiWDlWmx2VMXDvrfbHN8WS7OTcujImDJHCeL 228hzPaaTTIn+WyeUohGQS6kWwpHjU3FjE2WjfO3YC/tQ0LXy5ssP8Tw6mCxNZouGk3C 0MgjDXkfibWvRqxrzE4jfIE3ZM7/xbFyo2O0nWi9Toz73Yl1IWgcqR+KFOLNU8oy0CWy Fz4yzvbRVco3YO0uP7vWTYYNutL8cyzbRSHn7ojBfE0SJlNUUj56Pm2gR0Dm0oBoERjC Xnfg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729594595; x=1730199395; 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=A1RT2huJ5JZoTziBJ4jD+CCwuEKWgio+GHjHj5uuvtc=; b=cmOJTJ8799d4Z5InAGQgkDEwVYRg1PkN43viL9x/FvUgPoS0Qa6920wUjuQheEBooF wsTMYueCLxzaKw17OUa62khtJxMv1Rs/04KzrNIW8Fh/mBByhyp34dQvFVUS441SHMmK HwoXlmBIUiOyMPFpymivMNlYmtoVGVYQSCJf6zsqqZuGZXPVU1DJC9kcogYbxIAj9qZq /kztssd/SUjA6PqoiJaq8+PA0VHpog7JEiQo++zuVkKDu8ChIJjKhPQTYKlqV1HgwJqS OXpC5tZgtvKAbUwWtrCwj2UCHc8t1Un36kBiM4RXodaELb0W68LYnaXrtJDmaG22sp1i WG4Q== X-Gm-Message-State: AOJu0YwCnyOgvKFVqR4u8jodXGfvGU06neOmDOoNhNVMNeWPauUmeBig NwcQI8b4h/gn/c0ZyB4Jx6wYpqu5C6+LAS4bNAF2BJGj5aPf9G7skXpSFgxoagc= X-Google-Smtp-Source: AGHT+IH8FwAH1RdgvHht2IWETizlhtV8RNte8pvJdWVu1cT97HP0xl8CflJaCO4tn8KeVgLbDH6oBA== X-Received: by 2002:a17:907:6d0b:b0:a77:c30c:341 with SMTP id a640c23a62f3a-a9a694c71b9mr1507028066b.0.1729594595306; Tue, 22 Oct 2024 03:56:35 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Beraldo Leal , Laurent Vivier , Wainer dos Santos Moschetta , Mahmoud Mandour , Jiaxun Yang , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Yanan Wang , Thomas Huth , John Snow , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , qemu-arm@nongnu.org, =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Eduardo Habkost , devel@lists.libvirt.org, Cleber Rosa , kvm@vger.kernel.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Alexandre Iooss , Peter Maydell , Richard Henderson , Riku Voipio , Zhao Liu , Marcelo Tosatti , "Edgar E. Iglesias" , Marcel Apfelbaum , Pierrick Bouvier , Paolo Bonzini Subject: [PATCH v2 19/20] contrib/plugins: remove Makefile for contrib/plugins Date: Tue, 22 Oct 2024 11:56:13 +0100 Message-Id: <20241022105614.839199-20-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241022105614.839199-1-alex.bennee@linaro.org> References: <20241022105614.839199-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::529; envelope-from=alex.bennee@linaro.org; helo=mail-ed1-x529.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 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: 1729594631181116600 From: Pierrick Bouvier Now replaced by meson build. Signed-off-by: Pierrick Bouvier Message-Id: <20240925204845.390689-3-pierrick.bouvier@linaro.org> Signed-off-by: Alex Benn=C3=A9e --- configure | 18 --------- Makefile | 10 ----- contrib/plugins/Makefile | 87 ---------------------------------------- 3 files changed, 115 deletions(-) delete mode 100644 contrib/plugins/Makefile diff --git a/configure b/configure index 7dd3400ccb..101ca9ace9 100755 --- a/configure +++ b/configure @@ -1073,7 +1073,6 @@ if test "$plugins" !=3D "no" && test $host_bits -eq 6= 4; then plugins=3D"no" else plugins=3Dyes - subdirs=3D"$subdirs contrib/plugins" fi fi =20 @@ -1704,7 +1703,6 @@ LINKS=3D"$LINKS .gdbinit scripts" # scripts needed by= relative path in .gdbinit LINKS=3D"$LINKS tests/avocado tests/data" LINKS=3D"$LINKS tests/qemu-iotests/check tests/qemu-iotests/Makefile" LINKS=3D"$LINKS python" -LINKS=3D"$LINKS contrib/plugins/Makefile " for f in $LINKS ; do if [ -e "$source_path/$f" ]; then symlink "$source_path/$f" "$f" @@ -1790,22 +1788,6 @@ if test "$default_targets" =3D "yes"; then echo "CONFIG_DEFAULT_TARGETS=3Dy" >> $config_host_mak fi =20 -# contrib/plugins configuration -echo "# Automatically generated by configure - do not modify" > contrib/pl= ugins/$config_host_mak -echo "SRC_PATH=3D$source_path/contrib/plugins" >> contrib/plugins/$config_= host_mak -echo "PKG_CONFIG=3D${pkg_config}" >> contrib/plugins/$config_host_mak -echo "CC=3D$cc $CPU_CFLAGS" >> contrib/plugins/$config_host_mak -echo "CFLAGS=3D${CFLAGS-$default_cflags} $EXTRA_CFLAGS" >> contrib/plugins= /$config_host_mak -if test "$host_os" =3D windows; then - echo "DLLTOOL=3D$dlltool" >> contrib/plugins/$config_host_mak -fi -if test "$host_os" =3D darwin; then - echo "CONFIG_DARWIN=3Dy" >> contrib/plugins/$config_host_mak -fi -if test "$host_os" =3D windows; then - echo "CONFIG_WIN32=3Dy" >> contrib/plugins/$config_host_mak -fi - # tests/tcg configuration mkdir -p tests/tcg echo "# Automatically generated by configure - do not modify" > tests/tcg/= $config_host_mak diff --git a/Makefile b/Makefile index 917c9a34d1..b65b0bd41a 100644 --- a/Makefile +++ b/Makefile @@ -187,11 +187,6 @@ SUBDIR_RULES=3D$(foreach t, all clean distclean, $(add= suffix /$(t), $(SUBDIRS))) $(SUBDIR_RULES): $(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C $(dir $@) V=3D"$(V)" = TARGET_DIR=3D"$(dir $@)" $(notdir $@),) =20 -ifneq ($(filter contrib/plugins, $(SUBDIRS)),) -.PHONY: plugins -plugins: contrib/plugins/all -endif - .PHONY: recurse-all recurse-clean recurse-all: $(addsuffix /all, $(SUBDIRS)) recurse-clean: $(addsuffix /clean, $(SUBDIRS)) @@ -307,11 +302,6 @@ help: $(call print-help,cscope,Generate cscope index) $(call print-help,sparse,Run sparse on the QEMU source) @echo '' -ifneq ($(filter contrib/plugins, $(SUBDIRS)),) - @echo 'Plugin targets:' - $(call print-help,plugins,Build the example TCG plugins) - @echo '' -endif @echo 'Cleaning targets:' $(call print-help,clean,Remove most generated files but keep the config) $(call print-help,distclean,Remove all generated files) diff --git a/contrib/plugins/Makefile b/contrib/plugins/Makefile deleted file mode 100644 index bbddd4800f..0000000000 --- a/contrib/plugins/Makefile +++ /dev/null @@ -1,87 +0,0 @@ -# -*- Mode: makefile -*- -# -# This Makefile example is fairly independent from the main makefile -# so users can take and adapt it for their build. We only really -# include config-host.mak so we don't have to repeat probing for -# programs that the main configure has already done for us. -# - -include config-host.mak - -TOP_SRC_PATH =3D $(SRC_PATH)/../.. - -VPATH +=3D $(SRC_PATH) - -NAMES :=3D -NAMES +=3D bbv -NAMES +=3D execlog -NAMES +=3D hotblocks -NAMES +=3D hotpages -NAMES +=3D howvec - -# The lockstep example communicates using unix sockets, -# and can't be easily made to work on windows. -ifneq ($(CONFIG_WIN32),y) -NAMES +=3D lockstep -endif - -NAMES +=3D hwprofile -NAMES +=3D cache -NAMES +=3D drcov -NAMES +=3D ips -NAMES +=3D stoptrigger -NAMES +=3D cflow - -ifeq ($(CONFIG_WIN32),y) -SO_SUFFIX :=3D .dll -LDLIBS +=3D $(shell $(PKG_CONFIG) --libs glib-2.0) -else -SO_SUFFIX :=3D .so -endif - -SONAMES :=3D $(addsuffix $(SO_SUFFIX),$(addprefix lib,$(NAMES))) - -# The main QEMU uses Glib extensively so it is perfectly fine to use it -# in plugins (which many example do). -PLUGIN_CFLAGS :=3D $(shell $(PKG_CONFIG) --cflags glib-2.0) -PLUGIN_CFLAGS +=3D -fPIC -Wall -PLUGIN_CFLAGS +=3D -I$(TOP_SRC_PATH)/include/qemu - -# Helper that honours V=3D1 so we get some output when compiling -quiet-@ =3D $(if $(V),,@$(if $1,printf " %-7s %s\n" "$(strip $1)" "$(stri= p $2)" && )) -quiet-command =3D $(call quiet-@,$2,$3)$1 - -# for including , in command strings -COMMA :=3D , - -all: $(SONAMES) - -%.o: %.c - $(call quiet-command, \ - $(CC) $(CFLAGS) $(PLUGIN_CFLAGS) -c -o $@ $<, \ - BUILD, plugin $@) - -ifeq ($(CONFIG_WIN32),y) -lib%$(SO_SUFFIX): %.o win32_linker.o ../../plugins/libqemu_plugin_api.a - $(call quiet-command, \ - $(CC) -shared -o $@ $^ $(LDLIBS), \ - LINK, plugin $@) -else ifeq ($(CONFIG_DARWIN),y) -lib%$(SO_SUFFIX): %.o - $(call quiet-command, \ - $(CC) -bundle -Wl$(COMMA)-undefined$(COMMA)dynamic_lookup -o $@ $^ $(LDL= IBS), \ - LINK, plugin $@) -else -lib%$(SO_SUFFIX): %.o - $(call quiet-command, \ - $(CC) -shared -o $@ $^ $(LDLIBS), \ - LINK, plugin $@) -endif - - -clean distclean: - rm -f *.o *$(SO_SUFFIX) *.d - rm -Rf .libs - -.PHONY: all clean -.SECONDARY: --=20 2.39.5 From nobody Tue Oct 22 22:17:16 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=1729595135; cv=none; d=zohomail.com; s=zohoarc; b=PE4MoqBLF150VkKvd4ZabA38LeGU9pxvWdvbl+ZqLMcyZIVCAe6WfhvfTPLcqwCDhB1pceC3bVjs0UbvgB9GDnBoBrK8xoWK/Cy2fpffxJPoAwykESkz7C5wosZwb4YnPfVanKOrjqyaBnVQ3GosC3BuLf+/7iM3A7SD9cLhb0g= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1729595135; 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=0yP4SNsaEappmzZc/gnms0PRD/uAmEAQCRgu6RQMiI8=; b=HdNJtEbI5p3h78K7Z3BjbA+s4EDjM4ba0eqRrx7V20loAzIasVzHZglPUU4XLookwHlbSEk95L5w6k2ANNluJ+8oO+K7ZszWcQ6mmYdTD2ZaPLFYVKmAk23B9WUJbNsK2y8Qzj3Jzl7IKRef+wiO5fvdeHHrrYhCZBtwb5XV+wc= 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 172959513534719.00830634260035; Tue, 22 Oct 2024 04:05:35 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t3Cgu-00076c-F8; Tue, 22 Oct 2024 07:04: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 1t3Cgo-00072D-LZ for qemu-devel@nongnu.org; Tue, 22 Oct 2024 07:04:38 -0400 Received: from mail-lf1-x131.google.com ([2a00:1450:4864:20::131]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t3Cgh-00035h-59 for qemu-devel@nongnu.org; Tue, 22 Oct 2024 07:04:35 -0400 Received: by mail-lf1-x131.google.com with SMTP id 2adb3069b0e04-539f84907caso6181014e87.3 for ; Tue, 22 Oct 2024 04:03:56 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5cb66c6b120sm3010139a12.59.2024.10.22.04.03.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 22 Oct 2024 04:03:54 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 62F045FC48; Tue, 22 Oct 2024 11:56:16 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1729595035; x=1730199835; 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=0yP4SNsaEappmzZc/gnms0PRD/uAmEAQCRgu6RQMiI8=; b=RBuwLTTfBoDy2tgBI+oVY11RuQeRF3xUZT1TVevJ11C2dA2aIj02N1b0qy1cqz2B6U V3mI/G1bKm3S+/P8drX95tSwmQFsT2IZfOwl/gyGRPPNOYmx4KCBk6dfGykmJTbWY0by p2S3aqYa5mn47g2mF/N1C+RDRwDSIO6CS55J+XUHpz9jxob4GpFns3xmkanuygEMDV/R zTFHss718oiHzMEoqCzPtcDtJA85kVYOgNOUPGggf75kkDWT0vpKFXr9/lBWzIBLnunp pAz+zlQoGkXAGaxI9xaauQtw2sDQP9XbAe7ArQ6QlG3i5uIqunDPFPRQXTqcX7erKQzG 1N9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729595035; x=1730199835; 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=0yP4SNsaEappmzZc/gnms0PRD/uAmEAQCRgu6RQMiI8=; b=hpMoDPw9UWuFUzuVoUl7eG9Ksc+Ox7K3zzJbwZXUt3H2v8T03Az1bo2TUQOeGBPCLM JfCCAmTPYqwhglVKIbuTapUKGJ+i1pCugLqWHkp4/y+csKykHrY2An2o+HKaHtUcnUM7 J5URaD5THJP9yqx90QeHyoa9v3pRuvhjMfuEP4B8Thx8fayhnvxl33+oKQpvOXhlK9Ll 6PJQcDxo4HnMAzs55BIXLZPE9LrpteI4spdNurWa/PALLcQCFZACa96F9troKxoDBJ6f pDBjxAT512pb1TzM6UDvXt2S/UoWLgHaV79AmTRkZXt9E+v7pFbpsyTLWuqW2kn65Wvk zDWw== X-Gm-Message-State: AOJu0YzSdB9oy32RBHDmWlA73G1WOwPB2X3Eld+9G8r+YZ91H2hW84XM wu2swDnuPgjJY51SlhjcRMHtSq6cAuNSQ8sQ6MybYDdGBsToCNiKIFYWcKvTK8s= X-Google-Smtp-Source: AGHT+IEerx6lkR1+H7tItyS3VilRAHodTVWStIRDZTkyjhuKwUz1Vl6o1rNVP7ypMvtICJM1uC4+EA== X-Received: by 2002:a05:6512:3185:b0:539:f65b:3d1 with SMTP id 2adb3069b0e04-53a152198c9mr7757327e87.21.1729595035308; Tue, 22 Oct 2024 04:03:55 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Beraldo Leal , Laurent Vivier , Wainer dos Santos Moschetta , Mahmoud Mandour , Jiaxun Yang , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Yanan Wang , Thomas Huth , John Snow , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , qemu-arm@nongnu.org, =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Eduardo Habkost , devel@lists.libvirt.org, Cleber Rosa , kvm@vger.kernel.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Alexandre Iooss , Peter Maydell , Richard Henderson , Riku Voipio , Zhao Liu , Marcelo Tosatti , "Edgar E. Iglesias" , Marcel Apfelbaum , Pierrick Bouvier , Paolo Bonzini , Robbin Ehn Subject: [PATCH v2 20/20] plugins: fix qemu_plugin_reset Date: Tue, 22 Oct 2024 11:56:14 +0100 Message-Id: <20241022105614.839199-21-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241022105614.839199-1-alex.bennee@linaro.org> References: <20241022105614.839199-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::131; envelope-from=alex.bennee@linaro.org; helo=mail-lf1-x131.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 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: 1729595137508116600 From: Pierrick Bouvier 34e5e1 refactored the plugin context initialization. After this change, tcg_ctx->plugin_insn is not reset inconditionnally anymore, but only if one plugin at least is active. When uninstalling the last plugin active, we stopped reinitializing tcg_ctx->plugin_insn, which leads to memory callbacks being emitted. This results in an error as they don't appear in a plugin op sequence as expected. The correct fix is to make sure we reset plugin translation variables after current block translation ends. This way, we can catch any potential misuse of those after a given block, in more than fixing the current bug. Fixes: https://gitlab.com/qemu-project/qemu/-/issues/2570 Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier Tested-by: Robbin Ehn Message-Id: <20241015003819.984601-1-pierrick.bouvier@linaro.org> [AJB: trim patch version details from commit msg] Signed-off-by: Alex Benn=C3=A9e --- accel/tcg/plugin-gen.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/accel/tcg/plugin-gen.c b/accel/tcg/plugin-gen.c index 2ee4c22bef..0f47bfbb48 100644 --- a/accel/tcg/plugin-gen.c +++ b/accel/tcg/plugin-gen.c @@ -467,4 +467,8 @@ void plugin_gen_tb_end(CPUState *cpu, size_t num_insns) =20 /* inject the instrumentation at the appropriate places */ plugin_gen_inject(ptb); + + /* reset plugin translation state (plugin_tb is reused between blocks)= */ + tcg_ctx->plugin_db =3D NULL; + tcg_ctx->plugin_insn =3D NULL; } --=20 2.39.5