From patchwork Tue Oct 22 10:55:55 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 837547 Delivered-To: patch@linaro.org Received: by 2002:a5d:50c9:0:b0:37d:45d0:187 with SMTP id f9csp2475843wrt; Tue, 22 Oct 2024 03:59:10 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUt35gpuCBvJ3W5tft6oZDQQixm/xBab8Lr60DRQtZt0jdUBNzaTvY8Kk5MD+SipwY2qxh6vg==@linaro.org X-Google-Smtp-Source: AGHT+IGT957BCZ+mI3jHqefOVv8Kc7K7NB8lfA9dESbuj6plvIGpH+OCDIZlWHBQ2zWx5+zaCzF5 X-Received: by 2002:ac8:7d51:0:b0:460:940d:63de with SMTP id d75a77b69052e-460ff534bf6mr38142241cf.18.1729594749811; Tue, 22 Oct 2024 03:59:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1729594749; cv=none; d=google.com; s=arc-20240605; b=RlBVZBsDCeR3w6a5b87/bmcaG7aJ5NnDKH828zyZ9lBxM4WC2/DS4vVFQXVru0UE1Y RjuEVgt02ftsBeVQYXo13s6pHFZFEH2sz4rsoBOXmnTTL6BWAnDHF/4aeZ4Hlbb7/tPc 9Qrv3l4KlYMuUV9PouS+0KFDEtIbORNEPh5fLymQnrkF17M445KUYFGTrWFKk3Vlzo2a uLrP3C9VPGu8kKkAXRPEAcPexDq6xeFqGQ5hxzT13gzlMnCkzrlY2g1uHrDpCJsCDh19 cmTEiNjyvx0QtpcI+al171foV42hHdX26lOLen3RZmQZXLaatpFGyDPV8xpUikTcjsx/ Yv5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=FXjwiUjPDmRUKmjejukivCx1FVXlutJ/frWtXF30WgI=; fh=JIYLOQ6EaccVC1Ctq0ikRtDAeee/qFNo76yJPhd9cec=; b=BT35e9q2xnEEk4MssYQMsnnV7ZUuf0p2B5Gjx2PDxxuxJv+VHJAN1V8Y27vhbg3F7K ws4uLIZyCqdieRrAjv5G97Z3/sxdgBx6ZMMFf5vvHEC3keFFXatBUEJWaTLoH3+YmdKU TXGDwga8S6qAnRVsNGuukI0snFpuo4BOXPRpoFFuXjweCSK6D6TBRDok7cw7RJp44NyP XDmc3zsCATOUO/+/Htj3SFGBAjTks71mQXQqM2TqtGsUzJx+A30vHc9Y6O0Y5SezFdRa qylx+C+zIeuJg/8yxkgh1bgLN9beg1LdskmXVCbE1jzTMveZhHcl7h4E5zZyFsjPQ4F3 gtWQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Ukl5X34A; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-460d3ce6279si59497201cf.302.2024.10.22.03.59.09 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 22 Oct 2024 03:59:09 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Ukl5X34A; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 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) 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-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) 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) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Beraldo Leal , Laurent Vivier , Wainer dos Santos Moschetta , Mahmoud Mandour , Jiaxun Yang , =?utf-8?q?Alex_Benn=C3=A9e?= , Yanan Wang , Thomas Huth , John Snow , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , qemu-arm@nongnu.org, =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Eduardo Habkost , devel@lists.libvirt.org, Cleber Rosa , kvm@vger.kernel.org, =?utf-8?q?Philippe_Mat?= =?utf-8?q?hieu-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 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org 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ée 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-toolchain.sh b/tests/docker/dockerfiles/debian-microblaze-cross.d/build-toolchain.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=/usr/local TOOLCHAIN_BIN=${TOOLCHAIN_INSTALL}/bin CROSS_SYSROOT=${TOOLCHAIN_INSTALL}/$TARGET/sys-root +GCC_PATCH0_URL=https://raw.githubusercontent.com/Xilinx/meta-xilinx/refs/tags/xlnx-rel-v2024.1/meta-microblaze/recipes-devtools/gcc/gcc-12/0009-Patch-microblaze-Fix-atomic-boolean-return-value.patch + export PATH=${TOOLCHAIN_BIN}:$PATH # @@ -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 +# +# 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 diff --git a/tests/docker/dockerfiles/debian-toolchain.docker b/tests/docker/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. +RUN sed 's/^deb /deb-src /' /etc/apt/sources.list.d/deb-src.list + RUN apt update && \ DEBIAN_FRONTEND=noninteractive apt install -yy eatmydata && \ DEBIAN_FRONTEND=noninteractive 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=noninteractive apt install -yy eatmydata && \ + DEBIAN_FRONTEND=noninteractive eatmydata \ + apt install -y --no-install-recommends \ + libmpc3 COPY --from=0 /usr/local /usr/local # As a final step configure the user (if env is defined) ARG USER From patchwork Tue Oct 22 10:55:56 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 837552 Delivered-To: patch@linaro.org Received: by 2002:a5d:50c9:0:b0:37d:45d0:187 with SMTP id f9csp2475974wrt; Tue, 22 Oct 2024 03:59:35 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCV7L8kFmGF4C4DSrL2dUZngNOPtFvDr8WutbnvV6oYjkAAQ6wK7e7Q1h0ytlpNQROE7HJlwXw==@linaro.org X-Google-Smtp-Source: AGHT+IEpoFU4mDvfZEwLZwGi9o2iFChrcAInYJTuRv8XX5HeRIvUmrEhQxbYSZutdiiERNp57Lnn X-Received: by 2002:ac8:5fd1:0:b0:458:3a5a:94c5 with SMTP id d75a77b69052e-460aed034dcmr235561781cf.1.1729594775710; Tue, 22 Oct 2024 03:59:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1729594775; cv=none; d=google.com; s=arc-20240605; b=bngUdMrtRc2G1zlnYD6rAI90f2X3QxUyesN31MIB0h0RhDQyH0XbiQYDY2Ps36c+5L JN35XlXFnKz6lbIYCHgM2ixa/zLiUHr3BPbsQdaGIOEEr2i6QK4VpKOU9D8fLYQdqvjA jwqXDU6GkBOJ5NcEwmR0iF2zCfvWs78C9moEIKqhq1t41I1Vv8MYWpDNPAdFPa4twLN9 qHunZc6h4puMuKcX///3GwFX2WfVG8RxTN0TJVSxCotW2Wz3tk6RFpy3l5GZkZB/+iKI D58nvaqMzCURh1Gq7EOvPC71bBPQYicaNCc5KVUc5ifu0IlD7+/OiUUPYCT3p+8j8yXI kbTQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=LfxPswSzpy5PJY7wIfJ4Znven71oBCSA3p2JUb9OqOg=; fh=pVjH8310hlVyksknvNC3/D3AfgLq4a8e+T5MCg3/MHg=; b=Is28fIJSzO13jHiYy1cXaCrAlTWh2TaFOPATdY3IL7Y5vddXbvm8V9PhucNT7RoCnZ rzQvD87uEYcuvsJPSUsglN05YH5nttkztauM70fOK9+yDMnsJHbYdmup8XDLt92W9MNq r7VdirM01LspF69jqmTUnSvNZfq0Jjj+D08LFXcyLXYwpGGUOdu3Z5BkGRAbiF80dJQj DBY5sRJWxu8ggD2XqOnja1SydQB9yXgEXbXULObiOuSBSEXg0PgaxpeXV9rvOmM/HXin 7CSV4KsPufQctf+7I/sqWrRVIr4redQH6e6aNYbtAMUpWpFlCAnWIy5s8tfXQJ5Yo3Dn 02wg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=hXzWgu13; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-460d3d5abc0si58667091cf.571.2024.10.22.03.59.35 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 22 Oct 2024 03:59:35 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=hXzWgu13; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 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) 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-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) 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) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Beraldo Leal , Laurent Vivier , Wainer dos Santos Moschetta , Mahmoud Mandour , Jiaxun Yang , =?utf-8?q?Alex_Benn=C3=A9e?= , Yanan Wang , Thomas Huth , John Snow , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , qemu-arm@nongnu.org, =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Eduardo Habkost , devel@lists.libvirt.org, Cleber Rosa , kvm@vger.kernel.org, =?utf-8?q?Philippe_Mat?= =?utf-8?q?hieu-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 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org 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ée 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=1 debian-toolchain-run = \ - $(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=$$BACKEND Enable virtual network interface with $$BACKEND.' @echo ' NOUSER=1 Define to disable adding current user to containers passwd.' @echo ' NOCACHE=1 Ignore cache when build images.' + @echo ' NOFETCH=1 Do not fetch from the registry.' @echo ' EXECUTABLE= Include executable in image.' @echo ' EXTRA_FILES=" [... ]"' @echo ' Include extra files in image.' From patchwork Tue Oct 22 10:55:58 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 837541 Delivered-To: patch@linaro.org Received: by 2002:a5d:50c9:0:b0:37d:45d0:187 with SMTP id f9csp2475501wrt; Tue, 22 Oct 2024 03:58:01 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCU6NdVIyFe/vL/v2aFhUy94fedzWFZaovWzvUxZSfUes7gXr+qtATkBI4IkcUe9VL2fpTR4OQ==@linaro.org X-Google-Smtp-Source: AGHT+IFmmrmMvCO0UvyJny+ZMkkm6aNddBGvZW1QIYpCoUsMNds7fcjohpxKzK2kdTXI6cddN0By X-Received: by 2002:a05:6102:41a2:b0:4a4:781f:1659 with SMTP id ada2fe7eead31-4a73fc97dbamr3822717137.24.1729594681617; Tue, 22 Oct 2024 03:58:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1729594681; cv=none; d=google.com; s=arc-20240605; b=ZSymxj3lfe1tmlmT09SNf2yEWaH3rYDjs++Qqudwa7H53SMMEtWmSBF2V/Vfbn44Ii /PqSgpitMmydfxHODMhbZMImk4JxYHJhc6Ewn5HFLifD96PZ3d3/fUjYMyTELtmqpTDG 2+FRgejJC19Nf5SytxmNsE1WbkskgXnOTPicZ1C+PjFcUBaRHXgEGywS9AfGm8q5itfz +rCrt9u8WC1oFeYGPdOkEedbgcNHdPc5E1pNQsMXhx20oCp2R/CkKHLmk4eR9GdGGO5j bpry9ysvdtMJ1AzZbX9ZJ5f1YX2+2QBcreoGZaSc8/USOFhiMxHpqaOQXFMPiDEFDOT+ W38w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=/9/+YXB0yFn3lOXE+wDfnOMUk7oakkE6QbrJ6dxZQ+4=; fh=pVjH8310hlVyksknvNC3/D3AfgLq4a8e+T5MCg3/MHg=; b=RaNVIaBtswavgXnn6UnZ/+QaiochXLtS0kSTU5QCR731n0fd9hp+sOYKFn3SYJMTaO wluxDO1I55vVFWvRGfq85rnufT0rHL86RfhSaRWkENhsstNRxdRF6dfea8E8XWyONigh v+hywWD9PessTVYxeAmHlKALEHSOulLim+CKqzyV6VVlxVu3iCoj9ZQkih+nFkC6EOo+ qKrwFNZAt1yAW8QYvIeNdWbV0mknH9JMrSBEngbn8D6vHa5DQBmYXgI72HL/hthwZLy1 da3T/ti3mYNl7S+sZgTcAFzJiPsQjRkO0Pm9WFavj7jggc40VV/d5WcL1UFIMtq3k9oy Sxmw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=s7vdUzlf; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 6a1803df08f44-6ce009b7529si63498496d6.326.2024.10.22.03.58.01 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 22 Oct 2024 03:58:01 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=s7vdUzlf; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 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) 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-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) 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) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Beraldo Leal , Laurent Vivier , Wainer dos Santos Moschetta , Mahmoud Mandour , Jiaxun Yang , =?utf-8?q?Alex_Benn=C3=A9e?= , Yanan Wang , Thomas Huth , John Snow , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , qemu-arm@nongnu.org, =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Eduardo Habkost , devel@lists.libvirt.org, Cleber Rosa , kvm@vger.kernel.org, =?utf-8?q?Philippe_Mat?= =?utf-8?q?hieu-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 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Pierrick Bouvier When building with gcc-12 -fsanitize=thread, gcc reports some constructions not supported with tsan. Found on debian stable. qemu/include/qemu/atomic.h:36:52: error: ‘atomic_thread_fence’ is not supported with ‘-fsanitize=thread’ [-Werror=tsan] 36 | #define smp_mb() ({ barrier(); __atomic_thread_fence(__ATOMIC_SEQ_CST); }) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Pierrick Bouvier Reviewed-by: Thomas Huth Message-Id: <20240910174013.1433331-2-pierrick.bouvier@linaro.org> Signed-off-by: Alex Bennée --- 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 = ['-fsanitize=thread'] + qemu_cflags + tsan_warn_suppress = [] + # gcc (>=11) will report constructions not supported by tsan: + # "error: ‘atomic_thread_fence’ is not supported with ‘-fsanitize=thread’" + # https://gcc.gnu.org/gcc-11/changes.html + # However, clang does not support this warning and this triggers an error. + if cc.has_argument('-Wno-tsan') + tsan_warn_suppress = ['-Wno-tsan'] + endif + qemu_cflags = ['-fsanitize=thread'] + tsan_warn_suppress + qemu_cflags qemu_ldflags = ['-fsanitize=thread'] + qemu_ldflags endif From patchwork Tue Oct 22 10:55:59 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 837538 Delivered-To: patch@linaro.org Received: by 2002:a5d:50c9:0:b0:37d:45d0:187 with SMTP id f9csp2475274wrt; Tue, 22 Oct 2024 03:57:16 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXH6dOGiJxDgEjNTcSmKg5koMQVixRiuJEU8UtWgMMvSM8EKtvsO5v/eTgJlaTerfJyqg4bYQ==@linaro.org X-Google-Smtp-Source: AGHT+IEnEtyGhKIrf4+68zcBs7KU08tze+NTuGht3zuSKanhyvKj8XNQJx/VmF6y7Jx3gwzq9GKY X-Received: by 2002:a0c:f410:0:b0:6cc:42c:feb with SMTP id 6a1803df08f44-6cde14bdfd5mr207368506d6.2.1729594636750; Tue, 22 Oct 2024 03:57:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1729594636; cv=none; d=google.com; s=arc-20240605; b=gTJLH33IOIXnndrjmbJVD2XB++Pxj/QH2NQGte7yRuf/1DZ8+fJS/zeY7ivpDsLbwh e0r04/DC1LMh5UzA2SQ2Jx19uxtnyKZTc8kcFj6CW6FsqbZkIdD225Gn5eZvwQtU35TI tNVusE7tvhazMWEyxwvCPlUxMklD7dzHGBVG4dkARnCQbwd5oeUI6XfBx0F7tsK1D2CS q5zng+70FT4iEvDgqiFkegnyuI5tWhBIwwquLiXG90TAref2jq25OWMjw0fufYW3eY0T ComhrJ7QEtQyeUtbSsY7874GMhhGMMAzVJ2ay+nOUqxAaRB1j6GpzNtI1qlA9B7FzvE9 ZMNQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=iZZo1oPZPqzjBeoixQ7wpptFRyTvJhgIff9wczeHXgQ=; fh=pVjH8310hlVyksknvNC3/D3AfgLq4a8e+T5MCg3/MHg=; b=U76ki3zSNIeZMgxi6/9ZELqXpd7h+wQ1M/8mVihrUodCOyZgyl9cYY23H7PkFibJX7 xAw8K4CUEfTjsX7ocvbEkP1mgVNQhLi3NPyxDvBQsa0VMtbGrelUXMNrev9O3vNZ4qVh yE+fVL+er7U/eq40xYJ5LC0y9BVyMA148m0uByiPApA37N/mYl9Qkst5aske6UdXzb72 mWqE8s4pF1RIki9BC5HtKZuDSJgR3BHvsgN82cF8fYbAvmnRCWPjlsnpaiTlmeoHHXe+ he6a5B18ShoH1qa0rjDt6WoTwtcca2NZgJxT7El4a+tYepO2jlMJGfqL77G8mEMwzZ7l 5lIA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Z2AcBfUK; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 6a1803df08f44-6ce009ce9f9si67941046d6.321.2024.10.22.03.57.16 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 22 Oct 2024 03:57:16 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Z2AcBfUK; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 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) 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-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) 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) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Beraldo Leal , Laurent Vivier , Wainer dos Santos Moschetta , Mahmoud Mandour , Jiaxun Yang , =?utf-8?q?Alex_Benn=C3=A9e?= , Yanan Wang , Thomas Huth , John Snow , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , qemu-arm@nongnu.org, =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Eduardo Habkost , devel@lists.libvirt.org, Cleber Rosa , kvm@vger.kernel.org, =?utf-8?q?Philippe_Mat?= =?utf-8?q?hieu-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 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org 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ée --- 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. -There is a one time patch needed in clang-9 or clang-10 at this time: +TSan is supported for clang and gcc. +One particularity of sanitizers is that all the code, including shared objects +dependencies, should be built with it. +In the case of TSan, any synchronization primitive from glib (GMutex for +instance) will not be recognized, and will lead to false positives. + +To build a tsan version of glib: .. code:: - sed -i 's/^const/static const/g' \ - /usr/lib/llvm-10/lib/clang/10.0.0/include/sanitizer/tsan_interface.h + $ git clone --depth=1 --branch=2.81.0 https://github.com/GNOME/glib.git + $ cd glib + $ CFLAGS="-O2 -g -fsanitize=thread" meson build + $ ninja -C build To configure the build for TSan: .. code:: - ../configure --enable-tsan --cc=clang-10 --cxx=clang++-10 \ + ../configure --enable-tsan \ --disable-werror --extra-cflags="-O0" +When executing qemu, don't forget to point to tsan glib: + +.. code:: + + $ glib_dir=/path/to/glib + $ export LD_LIBRARY_PATH=$glib_dir/build/gio:$glib_dir/build/glib:$glib_dir/build/gmodule:$glib_dir/build/gobject:$glib_dir/build/gthread + # check correct version is used + $ ldd build/qemu-x86_64 | grep glib + $ qemu-system-x86_64 ... + The runtime behavior of TSAN is controlled by the TSAN_OPTIONS environment variable. From patchwork Tue Oct 22 10:56:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 837539 Delivered-To: patch@linaro.org Received: by 2002:a5d:50c9:0:b0:37d:45d0:187 with SMTP id f9csp2475460wrt; Tue, 22 Oct 2024 03:57:51 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXuosbesbiCv7gKO6JGRQrnNGm8wamp6rX0SIHDV2PIxe8UEpFMM6ucrQ1msdKs76wnEYk1Mw==@linaro.org X-Google-Smtp-Source: AGHT+IFb9eHvxFevc5C5UQBcxaGXjz8oD2PElvJTt66vNuAMc1sQhiBECWLVfFzJzF0/QOODvZMv X-Received: by 2002:a05:6122:d0f:b0:50d:3ec1:1531 with SMTP id 71dfb90a1353d-50dda41dcfemr12745806e0c.8.1729594671674; Tue, 22 Oct 2024 03:57:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1729594671; cv=none; d=google.com; s=arc-20240605; b=dGdVIFpEwYPntGLEiJ6je0t0QcBlVwbzy7rlyBjYqKqHLe4i1Ypw6/KxeKbosbZIXO lgD8OOkyoG5iIE4jM6M7fx0T0P/w115eBs/NvRnN+OAE5s7JeFgUHXrhqFffAstk4h54 QtObeN3LTbkV/2V2uL349NSF3LZrCbls5KFOx2EVIUPHNnlQWN4bGRCaXLzIBMhWUAPe XOxtrRkPZe/gUP6hAN66LW7AGK+326NjzF/Bzx8+gKPQ+GCRNSC+9t5Z8hNa0d3NshQd RgJrfHlho0vPuRu32bwYahMB6wR7w+Mhn85ivD+UeFz5rqyzlhNEWtkcrse0CLa+AyPX 0QHg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=COTB8IX9EL+KvqwMSRlZ5WoxH3jy7uQtMVM8wKCP4/g=; fh=pVjH8310hlVyksknvNC3/D3AfgLq4a8e+T5MCg3/MHg=; b=FtvJy2nPfayRF7Cih/v5ZNqozIB7zGVpZmM/0qzmVbbzRtehGmOWf24ilGRXZUBLXh Vs75krovIiZOToDadMTy52s/cdXXgvLYgTEeiXG1rjO5QyhWVtG6YECX0EuNht/jTt4W BbWZeVYXTxIejEgyDKM57hsA3odqogbC+4sTHqVixj2+XEbAYk0Iy5u1dCjX9vcPYAvX kdUfHsifoF10UZuYAQPYCgqCIOubc20OitTPsW4N6ILvOh1KlzrvW65B407GuY9rsNE2 BLJlZo0uMQ/TfXDH01v4ih1/3KNEN4TevOn76/Xip4s30AvTm+ymkzzkntC+fMFa++uX jNLQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=p5QDVz2p; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7b165a6a278si610785685a.374.2024.10.22.03.57.51 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 22 Oct 2024 03:57:51 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=p5QDVz2p; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 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) 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-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) 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) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Beraldo Leal , Laurent Vivier , Wainer dos Santos Moschetta , Mahmoud Mandour , Jiaxun Yang , =?utf-8?q?Alex_Benn=C3=A9e?= , Yanan Wang , Thomas Huth , John Snow , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , qemu-arm@nongnu.org, =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Eduardo Habkost , devel@lists.libvirt.org, Cleber Rosa , kvm@vger.kernel.org, =?utf-8?q?Philippe_Mat?= =?utf-8?q?hieu-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 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org 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ée 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/setup/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'] == 'Ubuntu' - ansible_facts['distribution_version'] == '22.04' - - ansible_facts['architecture'] == 'aarch64' or ansible_facts['architecture'] == 'x86_64' - name: Install packages for QEMU on Ubuntu 22.04 package: @@ -47,7 +46,6 @@ when: - ansible_facts['distribution'] == 'Ubuntu' - ansible_facts['distribution_version'] == '22.04' - - ansible_facts['architecture'] == 'aarch64' or ansible_facts['architecture'] == 'x86_64' - name: Install armhf cross-compile packages to build QEMU on AArch64 Ubuntu 22.04 package: From patchwork Tue Oct 22 10:56:01 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 837551 Delivered-To: patch@linaro.org Received: by 2002:a5d:50c9:0:b0:37d:45d0:187 with SMTP id f9csp2475962wrt; Tue, 22 Oct 2024 03:59:33 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWTnkixlV2ql+bL7a3QOM3UA0wHyOesFFvXw+1KiUKOifeuM10uAFOSOjk5MOItytgyuIzKFw==@linaro.org X-Google-Smtp-Source: AGHT+IEinQwaGoxLXTvWSCBrRnFV2miP7YyKqMhooFw3pywjIhwxNTJeoh6JA0abRj6Vb9+sxvy0 X-Received: by 2002:a05:620a:48d:b0:7af:cff1:c770 with SMTP id af79cd13be357-7b157becf8cmr1731352285a.55.1729594773367; Tue, 22 Oct 2024 03:59:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1729594773; cv=none; d=google.com; s=arc-20240605; b=c/ql1q5HdzPok7OQIOQrEJWX6N06HpEwxk5BmsRRcOP9SsLHykdiXEOzvY1PQUOn90 1tXcc8balGR1x5lSebV915q+61BCB6is+riFc3laWF6w1o9hppuplsoIcZi/5KetJOov VfqE/6+Q9Oj21St1TxvBmBtoqI3WPAPtKQbpI+elN/3bB99SW/Q9TIqnKl5njq0q80Pj 08BTcvkFndBdU6fe3keKneb1BcKJzRUNZAcwzBcCigFMxu83TnZf/RiFIuCLD3aK5rmu MeSG0rIorUj6LSynzDpwzgrvv7RiGnq8iJfLKRzE8trc79ASrAaHSGQZE1IdsImT2Qws /mKw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=HOyxXWkbmxyeJp1271bZ6nHrEgwT9agO1ZydqcSHiVY=; fh=JIYLOQ6EaccVC1Ctq0ikRtDAeee/qFNo76yJPhd9cec=; b=U2a5R9ejcN+/FqU4V3SNyr2Vm4IYr8J3otcLrHulHOiYztfKaJniuuGJj23oemLGjj 0CuTObgL/aGH5TeJgQgqhnqegjswsil+k7UtpUPmquzi1U4asVCzI9P1VqtFjTisbwg4 dY4vvPyM7mHOY4QPMT3FLWGll6MdIsh/AcuBPkyzlKjLTZ+1vdEwYnDRdCmFpp0Jpo92 8nYwFOLr5bGO6XGujg38YYUzW/3YCkruu1IloYH7/Z/AqX/dfi/grFqdFfSYU1EZiY1C 1AvQWssfpSIK6IhMdXDWGRKtaCF7IpDz3UYMddvh/pIRq5XnrXrBZwSKCaoLvYoADL5a eNng==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=VZn8DrFi; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7b165a69efasi606233285a.276.2024.10.22.03.59.33 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 22 Oct 2024 03:59:33 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=VZn8DrFi; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 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) 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-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) 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) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Beraldo Leal , Laurent Vivier , Wainer dos Santos Moschetta , Mahmoud Mandour , Jiaxun Yang , =?utf-8?q?Alex_Benn=C3=A9e?= , Yanan Wang , Thomas Huth , John Snow , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , qemu-arm@nongnu.org, =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Eduardo Habkost , devel@lists.libvirt.org, Cleber Rosa , kvm@vger.kernel.org, =?utf-8?q?Philippe_Mat?= =?utf-8?q?hieu-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 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org 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ée Reviewed-by: Pierrick Bouvier 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/cross-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 cooperation 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 = 0x0026748d; /* nop */ + + while (true) { + switch (__atomic_load_n((int *)arg, __ATOMIC_SEQ_CST)) { + case THREAD_WAIT: + break; + case THREAD_PATCH: + val = __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 = THREAD_WAIT; + pthread_t thread; + long x = 0; + int err; + int i; + + err = pthread_create(&thread, NULL, &thread_func, &command); + assert(err == 0); + + __atomic_store_n(&command, THREAD_PATCH, __ATOMIC_SEQ_CST); + for (i = 0; i < COUNT; i++) { + add1_or_nop(&x); + } + __atomic_store_n(&command, THREAD_STOP, __ATOMIC_SEQ_CST); + + err = pthread_join(thread, NULL); + assert(err == 0); + + assert(x >= INITIAL); + assert(x <= INITIAL + COUNT); + + return EXIT_SUCCESS; +} diff --git a/tests/tcg/x86_64/Makefile.target b/tests/tcg/x86_64/Makefile.target 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 += cmpxchg X86_64_TESTS += adox X86_64_TESTS += test-1648 X86_64_TESTS += test-2175 +X86_64_TESTS += cross-modifying-code TESTS=$(MULTIARCH_TESTS) $(X86_64_TESTS) test-x86_64 else TESTS=$(MULTIARCH_TESTS) @@ -27,6 +28,9 @@ adox: CFLAGS=-O2 run-test-i386-ssse3: QEMU_OPTS += -cpu max run-plugin-test-i386-ssse3-%: QEMU_OPTS += -cpu max +cross-modifying-code: CFLAGS+=-pthread +cross-modifying-code: LDFLAGS+=-pthread + test-x86_64: LDFLAGS+=-lm -lc test-x86_64: test-i386.c test-i386.h test-i386-shift.h test-i386-muldiv.h $(CC) $(CFLAGS) $< -o $@ $(LDFLAGS) From patchwork Tue Oct 22 10:56:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 837537 Delivered-To: patch@linaro.org Received: by 2002:a5d:50c9:0:b0:37d:45d0:187 with SMTP id f9csp2475244wrt; Tue, 22 Oct 2024 03:57:12 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCV5lsyxWo7LbkxpvXnnguYyYHKpNjHRaZ4JHYxOOGE5ll9ZDtpEc7pF5RWlP+blQwEzF7djjg==@linaro.org X-Google-Smtp-Source: AGHT+IGhAAoP0MywXoFq7dlxGZ7h6lKnhVyjVWD4KTNw+VZINJhxJGFNoGh0OODahc9l9SPoa0SF X-Received: by 2002:a05:6102:291f:b0:4a4:8f96:8b5a with SMTP id ada2fe7eead31-4a5d6add239mr11784611137.10.1729594632320; Tue, 22 Oct 2024 03:57:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1729594632; cv=none; d=google.com; s=arc-20240605; b=Mccf0ow/Cp5linQMgB6AGDIH9PMO/MFyjN7EYC9OKpl304xpaa1hOc7m1bdvJe4IF9 V8mKsaY+xJe0Dl9buIslXv2dSZyKWTM6b8VSVy6h/zLVI8xlCcTa0qz3XetLib5p6PUD hS88rl4ZCBwtnqU7BlPeVp5mhJ8ov78siG2Nb4RULX7ApAlK0Bm0R7kWkGi++7g5fGOh 5uUeIaT7bdXbaHLFzBeiB8QKcyXGMJEd3imzFRBU91UGoJhZBqpKkbnbsqSJvl6268bd pV390+seF1t4djPEgoOp/5leHCnbmo+SxNT1sUymj2rns+rOhM1sWxzCfPzXFCwfpTvL TVYw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=CnSO5MY5LW+ONfwtsvf8QoavFQHBZ1D8g95DfEWZbMI=; fh=pVjH8310hlVyksknvNC3/D3AfgLq4a8e+T5MCg3/MHg=; b=LEoXcXJYyQ66NoyFrtnt415omzLqqd++v1QRRUEdvMmjfDHkC0EQ4AYbjTyo8Z8A2Q FjwnbnUCnwTCrIzuZC8nkUYzfG0FuYa0fJZzmGNHEnBq5Kr/pOb0S2+DPPFGDCQsPL3e GiFD+hhFUrigq5Xl/ig3QfJIdCks9KOzMRrUY1TplofSa06eRx2zWBp/4ssHHTV6C2sM sqCU/w8DmVI5XCGLz68/MDuUfVi+xn9WNpA62paTnJE+TnPqMMpzV4oscX3PRvpZSYtO iBSAZCcCGzyodTB/enK3i+5uqDTZ56nZ0fGQaG+LX+vtnFScO2XtSAT+w3kx723rZZtP +aLQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=krAPCbK6; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7b1659fd6c5si609656285a.211.2024.10.22.03.57.12 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 22 Oct 2024 03:57:12 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=krAPCbK6; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 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) 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-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) 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) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Beraldo Leal , Laurent Vivier , Wainer dos Santos Moschetta , Mahmoud Mandour , Jiaxun Yang , =?utf-8?q?Alex_Benn=C3=A9e?= , Yanan Wang , Thomas Huth , John Snow , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , qemu-arm@nongnu.org, =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Eduardo Habkost , devel@lists.libvirt.org, Cleber Rosa , kvm@vger.kernel.org, =?utf-8?q?Philippe_Mat?= =?utf-8?q?hieu-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 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org 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=virt,virtualization=on,pflash0=rom,pflash1=efivars,gic-version=max \ -smp 4 \ -accel tcg \ -device virtio-net-pci,netdev=unet \ -device virtio-scsi-pci \ -device scsi-hd,drive=hd \ -netdev user,id=unet,hostfwd=tcp::2222-:22 \ -blockdev driver=raw,node-name=hd,file.driver=host_device,file.filename=/dev/zen-ssd2/trixie-arm64,discard=unmap \ -serial mon:stdio \ -blockdev node-name=rom,driver=file,filename=(pwd)/pc-bios/edk2-aarch64-code.fd,read-only=true \ -blockdev node-name=efivars,driver=file,filename=$HOME/images/qemu-arm64-efivars \ -m 8192 \ -object memory-backend-memfd,id=mem,size=8G,share=on \ -kernel /home/alex/lsrc/linux.git/builds/arm64/arch/arm64/boot/Image -append "root=/dev/sda2 console=ttyAMA0 systemd.unit=benchmark-stress-ng.service" \ -display none -d trace:load_atom\*_fallback,trace:store_atom\*_fallback With: -cpu neoverse-v1,pauth-impdef=on => 2203343 With: -cpu cortex-a76 => 0 Signed-off-by: Alex Bennée 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, uintptr_t ra, void *pv) #endif /* Ultimate fallback: re-execute in serial context. */ + trace_load_atom8_or_exit_fallback(ra); cpu_loop_exit_atomic(cpu, ra); } @@ -212,6 +213,7 @@ static Int128 load_atomic16_or_exit(CPUState *cpu, uintptr_t ra, void *pv) } /* Ultimate fallback: re-execute in serial context. */ + trace_load_atom16_or_exit_fallback(ra); cpu_loop_exit_atomic(cpu, ra); } @@ -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 = 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 = load_atom_extract_al8x2(pv); @@ -897,6 +902,7 @@ static void store_atom_2(CPUState *cpu, uintptr_t ra, g_assert_not_reached(); } + trace_store_atom2_fallback(memop, ra); cpu_loop_exit_atomic(cpu, ra); } @@ -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); } @@ -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 # 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:0x%"PRIxPTR"" From patchwork Tue Oct 22 10:56:03 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 837544 Delivered-To: patch@linaro.org Received: by 2002:a5d:50c9:0:b0:37d:45d0:187 with SMTP id f9csp2475745wrt; Tue, 22 Oct 2024 03:58:52 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXDrViGzRapNzLoLhaaPs5sAg6gYWQk5hDGADSQXGBa3Ia0pG0hZILzmNESmeGGsq2vOkzE+g==@linaro.org X-Google-Smtp-Source: AGHT+IHJ0bxF2yskkDutPT72QCdnBRjID1snjd87hl9xx5w9/WBLpO902+UGZ5Hr5sGl0mZyk2gJ X-Received: by 2002:a05:620a:199c:b0:7b1:522a:b0e with SMTP id af79cd13be357-7b157b3e685mr1903702885a.7.1729594732618; Tue, 22 Oct 2024 03:58:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1729594732; cv=none; d=google.com; s=arc-20240605; b=kjEI7qD+TiX4Px8Lt+mEz126qqxp/FwpPFUPB/JDRLoLpe56eg54pmdTQ8o9EoqGZ3 gPw74RnP5trXpTEMPNp8F9jKcU+C7lyEjcROdUvf9ofTKELT5AYHV3a+G1jJMjdCSMV6 +GxcRDLu3F5FVCNa8gxjAIdU+dxYMdLYXSGLXa+vGcJV/wIVA4tnoB5FKBJaG9ejC/fl TWNfJVDPpZS4R91HqbIroHTzqPfNcTR9iH+rrsNuC5SjOh0Tb8xgZruajDabuSMBTWr/ 07JEdDifr/RKBhubp50zaGctJHu9ZAA+X2VekFEwUSXmcfMz1Yt2P05JIl8XSLgwyHBp 6R2g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=dc/d/VIiG49L+/d6qxDj8y/ZsZGo0rIznhJwT5hb3KQ=; fh=pVjH8310hlVyksknvNC3/D3AfgLq4a8e+T5MCg3/MHg=; b=WHclyaw5TX++8zvrVXg9vwUrY2x+MR+2Q9v8aSQbFO+t+Wlydg7LwjovXQZb4kfQov dviPk4kCJwajF4aIN7GDzXttolu4vJrKF1PqZzIwh5XFwcrurAIjXnyvTj+Tem42avNd 9i6Z6O+sTMMNlYAiwVhNOM/Tk2flWV/Hc645ufDpgXlFMieGx6ltFOaQof6fy7e/tfdD B7wJveogt0Qj5cuP55/CRJh1WUH9OnG8CpCnpwtxawm9Dhr+nLSeB0JdRmAK/Js5GdRM a9IJ1SWjBlKsAyjRm5FeOWTjt2BNyVmy394rcEsVRXlArWZVefjnXiNOvPZ/fOBl+FLj afWQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=IsYcSQnH; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7b1659d08f5si620120085a.25.2024.10.22.03.58.52 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 22 Oct 2024 03:58:52 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=IsYcSQnH; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 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) 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-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) 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) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Beraldo Leal , Laurent Vivier , Wainer dos Santos Moschetta , Mahmoud Mandour , Jiaxun Yang , =?utf-8?q?Alex_Benn=C3=A9e?= , Yanan Wang , Thomas Huth , John Snow , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , qemu-arm@nongnu.org, =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Eduardo Habkost , devel@lists.libvirt.org, Cleber Rosa , kvm@vger.kernel.org, =?utf-8?q?Philippe_Mat?= =?utf-8?q?hieu-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 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org 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=1 Signed-off-by: Pierrick Bouvier Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth Message-Id: <20241020213759.2168248-1-pierrick.bouvier@linaro.org> Signed-off-by: Alex Bennée --- 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/releases/download/2023.08. ENV PATH $PATH:/opt/cross-tools/bin ENV LD_LIBRARY_PATH /opt/cross-tools/lib:/opt/cross-tools/loongarch64-unknown-linux-gnu/lib:$LD_LIBRARY_PATH -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 # As a final step configure the user (if env is defined) From patchwork Tue Oct 22 10:56:04 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 837553 Delivered-To: patch@linaro.org Received: by 2002:a5d:50c9:0:b0:37d:45d0:187 with SMTP id f9csp2476056wrt; Tue, 22 Oct 2024 03:59:48 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUb1DvAG41M/M2RdqDq81N4ZfPPlU9h+G2VZ++V0XG+MUdjAII/vB8k6QJVp+Wy0bwhDdeXrA==@linaro.org X-Google-Smtp-Source: AGHT+IHyBanwvfis4g3O+woboN+jj4xh3rY2qGq3EgZnxI0wdmZuigqn5tOUFApBqVLfFyMgbECq X-Received: by 2002:a05:620a:29d3:b0:7b1:4174:ac78 with SMTP id af79cd13be357-7b1579b37c4mr2348028285a.0.1729594788662; Tue, 22 Oct 2024 03:59:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1729594788; cv=none; d=google.com; s=arc-20240605; b=ULmjJGkyAFbvLnOCkq4vSgocY0bReMjfelsOecvu8SyFF2nCBObFAkPUcz3QOU8DYB MCU9aEtRsoe2p9EcyMmsTeDnzYkOxlYOsqyRKVWfRts5c49/Z7eyoFTt6sCqoqgAhhW4 aGrgn8ajTe47SUJGvKMkoO3mkjvUtNb4KPpxZYwQ5Sd+wOAGUTYtPXaDvTgnocmFpH7w GlOZXTFJ4s+/gzBloPAw9Cr2QE35sLMiis/91jHBKSIqthY+LtBUhlPyLDMYYOWXqDBD tezxNRptEdnHeLNiXiM+r8Rw9l3fxbKpvOvtDGxbtEbQZOy61WGAELat7FV1M7XudYHr l13Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=/thHQrDD74xWhDO5ZvpNfmAfgwRl7ohsH8B1mB/WTo0=; fh=pVjH8310hlVyksknvNC3/D3AfgLq4a8e+T5MCg3/MHg=; b=dk3YyMrWEtjQ3nOlYqrI121kyl5FLYL69YDCvVDBVt1jlTMdOZqCfUiupN73BAHsWJ HQzOkR1+ZWkuF6kcknlQ7v8Nklgz32iyAMdkPc74y/GFihKOziP8c4k87SUV2LbTHKwj GBkbl1xgZKoxGRyTVRGSYaIzDdRZGTq/SVSYDFuJ1GY02l5HlprnUQ7/PUvdLU2JWQIe wxFUkOOoEGu0ggtS7pS+fjuCbvi2AXo+Y35WDkF3Uy5lhjkNK3l9maPuPaZO2y6jGW0n sJGl8Q23qc+78JIVEoGVhBjUCNDUjMPrwSIwgTraGrSL2JD1yKicxVUIDIDMO0s/ouZl zojA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=z3VxdBuI; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7b165a87c02si623094385a.448.2024.10.22.03.59.48 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 22 Oct 2024 03:59:48 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=z3VxdBuI; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 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) 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-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) 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) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Beraldo Leal , Laurent Vivier , Wainer dos Santos Moschetta , Mahmoud Mandour , Jiaxun Yang , =?utf-8?q?Alex_Benn=C3=A9e?= , Yanan Wang , Thomas Huth , John Snow , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , qemu-arm@nongnu.org, =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Eduardo Habkost , devel@lists.libvirt.org, Cleber Rosa , kvm@vger.kernel.org, =?utf-8?q?Philippe_Mat?= =?utf-8?q?hieu-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 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org 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ée 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 = os.path.basename(cwd) repourl = "https://gitlab.com/%s/%s.git" % (namespace, reponame) -subprocess.check_call(["git", "remote", "add", "check-dco", repourl]) -subprocess.check_call(["git", "fetch", "check-dco", "master"], - stdout=subprocess.DEVNULL, - stderr=subprocess.DEVNULL) +print(f"adding upstream git repo @ {repourl}") +subprocess.run(["git", "remote", "add", "check-dco", repourl], + check=True, capture_output=True) +subprocess.run(["git", "fetch", "check-dco", "master"], + check=True, capture_output=True) ancestor = 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 = os.path.basename(cwd) repourl = "https://gitlab.com/%s/%s.git" % (namespace, reponame) +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=subprocess.DEVNULL, - stderr=subprocess.DEVNULL) +subprocess.run(["git", "remote", "add", "check-patch", repourl], + check=True, capture_output=True) +subprocess.run(["git", "fetch", "check-patch", "master"], + check=True, capture_output=True) ancestor = subprocess.check_output(["git", "merge-base", "check-patch/master", "HEAD"], From patchwork Tue Oct 22 10:56:05 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 837546 Delivered-To: patch@linaro.org Received: by 2002:a5d:50c9:0:b0:37d:45d0:187 with SMTP id f9csp2475825wrt; Tue, 22 Oct 2024 03:59:05 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVrN7rJPvoXxqtrNGu6lsUbvU4Rx38prHPM3vEFJVMG64ZSgho5UXYNWr0H5ZU0hbCf7nXikw==@linaro.org X-Google-Smtp-Source: AGHT+IEhSG/z1CIBN5g/OwhXHsbn0trd7Z/YJ11FaYCg82OhItnouXqGSuvy23O7Q6XkQ4KnAzjJ X-Received: by 2002:a05:6214:260c:b0:6cb:5bde:d78 with SMTP id 6a1803df08f44-6ce2178ecd2mr48129476d6.3.1729594745231; Tue, 22 Oct 2024 03:59:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1729594745; cv=none; d=google.com; s=arc-20240605; b=flVptj9mz6KNB3GbvI6scFXydcBboW8p7f7y0FYIpV72DYyIia2sKlg7M3rk5qpIPx XxL4SMVZBPtmkOUMKwAy4Y6ZMddsXqnxv+uunjePkL2mNj+4AofnzKS3mlpin305p8zt MPkUJTnwGVFuL0KI9bUZFLnBh3VTa1AE3q/VhN+na7m1ul+eujiMTZGd3Cs0gw/C00w/ lhWK2MKuMBmQhok2P5VA+Gqmq2L3I/FvXsGNZf8rbugZP1u1ub4bS8602UCAZqg864LI VkpxCs93sEoSfmPW7ZBsQFEFYUjEKwwFnJlpPpBWnjdg7fDnAAofd5SaPSgXLhsc1UMU ifrQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=p2jXJE3FbWlzhHC2JLNXh46hRwsq96dE8ivUr/Ry4PY=; fh=pVjH8310hlVyksknvNC3/D3AfgLq4a8e+T5MCg3/MHg=; b=T4X1Ep5RSI229p4J6ssSd1CckoqS0eopZkLt4YeXnjoGNcsplqp9laCnlM3CkSA9N7 u/elDvu7cPGddGT/iT8Kl60VJzfzJoQQ/3mRZMzOeW3gGg+n1K82a1dp+uf6UUfsOXjf QF3TD+uSkDK/8PeXAjr2PytlOCdy7U0+PrKaBpU3XX0YxT8iRIfGbQxUI527XerZhHEO Iak9UmS6U2D32gt0tl63//YXbNCAr/KM8UIf9AD1CieRBrJ2G6Pn82u452B1o+OiV3Jw 6Rcgap31IFFoTqlMvKes5jEP4EGFJP7TqWFGtMjM8zBGwluHEzT6/Y1RQpUzhbY8hxz3 EUjw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=itvKW5Fy; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-460d3ce70ccsi59925421cf.372.2024.10.22.03.59.05 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 22 Oct 2024 03:59:05 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=itvKW5Fy; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 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) 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-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) 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) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Beraldo Leal , Laurent Vivier , Wainer dos Santos Moschetta , Mahmoud Mandour , Jiaxun Yang , =?utf-8?q?Alex_Benn=C3=A9e?= , Yanan Wang , Thomas Huth , John Snow , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , qemu-arm@nongnu.org, =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Eduardo Habkost , devel@lists.libvirt.org, Cleber Rosa , kvm@vger.kernel.org, =?utf-8?q?Philippe_Mat?= =?utf-8?q?hieu-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 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Make it easy for people to see what is already queued. Signed-off-by: Alex Bennée --- 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 Memory API M: Paolo Bonzini From patchwork Tue Oct 22 10:56:06 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 837540 Delivered-To: patch@linaro.org Received: by 2002:a5d:50c9:0:b0:37d:45d0:187 with SMTP id f9csp2475484wrt; Tue, 22 Oct 2024 03:57:56 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXfJF/kpHEbZcxKqsNXwidzhPFwagvJX3Ox79o1E9eYZ18PNFr6jdcxpzYEKUjMZpkuJ+/hgw==@linaro.org X-Google-Smtp-Source: AGHT+IGS5OCyXkr4PG5sLpMBEEcaEUCqRYKCsGYNmgIRhUTrj/W3Un6fa72wptblb0tdznsNq+Jh X-Received: by 2002:a05:620a:270f:b0:7b1:4a2a:9ae0 with SMTP id af79cd13be357-7b175583db7mr488761985a.9.1729594676234; Tue, 22 Oct 2024 03:57:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1729594676; cv=none; d=google.com; s=arc-20240605; b=fPyqyYrW1vwrwl4O058Rrwp4vdXuxkFRzkDPF/BsCbmcZNLz4C8lt4M8ZCryCc0Dla H5MhgC6vbxUkFmpekhO9RerV529kYp1O03ZxFjqmEfXKgzBlMpT+nGMS26ekOQqc0fMF /GCz/GQlaYwlVr1ZwFJzTHx3nC2fES/8kcAwC03+zRenivxi4NLHzDzYV1eh7YIfvcBe WgnGXoKj3ttjEjYbH0u1ENJ2+VkqeKZhMJ3FqeyzTB2Jn3GOxqUGl28xM8IPDjzU40J1 g0/rpa/HzkIRpUsadmO+fnz5IXJWEOCOo3T7OOKJmzzrOSS5ar9teJesaD5wQXpmQKuz qPKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=nuVL16OURPo6SfQxD2PzScmfjsPxu4HizBAVk8u7e/E=; fh=pVjH8310hlVyksknvNC3/D3AfgLq4a8e+T5MCg3/MHg=; b=KbePmjC83+gCwTF1cTuj1QZo81mgOv+zC03yGHmojIE/N7OZ3bu7ZOZsxaQxjBTbb+ Vw6ON4vAS9tdWYtTRR3tUQoqoMyBninaSDOn3Nzlxpa4cUXF0GbNuVwt0BaSp3E/CBCL EK0K32OD0/xygJwke3XNVUWClD9cv6NJZXk4FOv5m1WYpeBhS1UQ4M4mggdX03OrErb5 7VWBzAjFj5hC8hoRr8aFpCjVdzvhTHbj6r13aZcenNJJu2bi6ekE45uQ+1VCbr4XG3kc d4IKZpMXRpZF7N4r6vpXEmYfWy3fNDt44G8Qyx1Ha0rLJCoddu9yXPsGo1xvumMzWNjm S/SQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="yEgmR/iu"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7b1659d114fsi660278285a.118.2024.10.22.03.57.56 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 22 Oct 2024 03:57:56 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="yEgmR/iu"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 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) 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-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) 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) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Beraldo Leal , Laurent Vivier , Wainer dos Santos Moschetta , Mahmoud Mandour , Jiaxun Yang , =?utf-8?q?Alex_Benn=C3=A9e?= , Yanan Wang , Thomas Huth , John Snow , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , qemu-arm@nongnu.org, =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Eduardo Habkost , devel@lists.libvirt.org, Cleber Rosa , kvm@vger.kernel.org, =?utf-8?q?Philippe_Mat?= =?utf-8?q?hieu-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 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org 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ée 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/aarch64_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=aarch64 TARGET_BASE_ARCH=arm TARGET_BIG_ENDIAN=y -TARGET_XML_FILES= gdb-xml/aarch64-core.xml gdb-xml/aarch64-fpu.xml gdb-xml/aarch64-pauth.xml +TARGET_XML_FILES= gdb-xml/aarch64-core.xml gdb-xml/aarch64-fpu.xml gdb-xml/aarch64-pauth.xml gdb-xml/aarch64-mte.xml TARGET_HAS_BFLT=y CONFIG_SEMIHOSTING=y CONFIG_ARM_COMPATIBLE_SEMIHOSTING=y From patchwork Tue Oct 22 10:56:07 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 837543 Delivered-To: patch@linaro.org Received: by 2002:a5d:50c9:0:b0:37d:45d0:187 with SMTP id f9csp2475719wrt; Tue, 22 Oct 2024 03:58:46 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXscQ2VOgVh06VNW3dkb9ACPBnMqdt8zbb7vGSBbnf7XDCwkkizS1kJgDAuOPTmVN1UKZ7pew==@linaro.org X-Google-Smtp-Source: AGHT+IGM9kpt5RGgMZr/PqyXZQGYLpz5etmsXeeY11UNuIK6voSKhuazXtm+2CMM7dYLLXvdSzDK X-Received: by 2002:a05:6214:4698:b0:6cb:82fc:2741 with SMTP id 6a1803df08f44-6cde163e36amr232529696d6.49.1729594726698; Tue, 22 Oct 2024 03:58:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1729594726; cv=none; d=google.com; s=arc-20240605; b=HgHMv5OpZo4bNQMp6HGpt35Csk6AAXGXFi0EipqidppcgZydr9geT0wth8lC13pB0i WSrP7iq4FtOaqWszaGdoozVyn3xj06NP4g20hvQj5nTWZBFQYnkvbRuKcoSsRVL2tYh4 vQQ6OeHWdOUPmZBHiy+arEAnsT+b593iRUdDbaEfx1qn5eP07jdwwS6ygUoj7pGXZT74 gsutU1Kq+HJRNOB1opldpdUM47jQrz8Lh8KSvWN9CzENhtF/LRrn3AasxDIcTOqGGlTw 5KPR2VHX31OzW6+BbL08FXv9WfvPkU38F6XuyE958eNXwuLSXZkZQ3deJpC93z3BtqYU 0mkw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=pf3uq1o/PXtMWzbvWkPU0TjSlCT93/aG9VyjOMqKoJo=; fh=pVjH8310hlVyksknvNC3/D3AfgLq4a8e+T5MCg3/MHg=; b=OTIZ35gz781CnTaypkW3u990ntajc3ILSB2o+LXrpFiYlTPgrQXGMa53Z9xXJc7X8C k550ESAM2HcSDKPxt0TS99X15z0Wv5YU/cuYDH1t0tN34j3o1UpFTpdQ6c2a7FcHBJ6J muvaoMG4qlCTc8gmqTGJ74FoOVB0nIqS6CFncplA2D9xITSMx9qFA+9HfCSUlBbXLt89 gO5xrrj632ERcHVKXgks6JeLhGHHN2R5CCk7myMYQnMW8Ruw9ps62bYjiPQbMatUwBYO JYFQ2vk0dGT68yX7P/H0Gnji4hvVgQdcdjdunCT0EOXjGkeb/TdQ9PgMbnzlvFcqYJyK MZlw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=SrLSuTCG; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 6a1803df08f44-6ce009dcef7si59836386d6.414.2024.10.22.03.58.46 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 22 Oct 2024 03:58:46 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=SrLSuTCG; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 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) 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-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) 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) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Beraldo Leal , Laurent Vivier , Wainer dos Santos Moschetta , Mahmoud Mandour , Jiaxun Yang , =?utf-8?q?Alex_Benn=C3=A9e?= , Yanan Wang , Thomas Huth , John Snow , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , qemu-arm@nongnu.org, =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Eduardo Habkost , devel@lists.libvirt.org, Cleber Rosa , kvm@vger.kernel.org, =?utf-8?q?Philippe_Mat?= =?utf-8?q?hieu-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 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org 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ée Reviewed-by: Richard Henderson Reviewed-by: Pierrick Bouvier Reviewed-by: Philippe Mathieu-Daudé --- 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=${1%%-*} case $target_arch in aarch64) container_hosts="x86_64 aarch64" ;; + aarch64_be) container_hosts="x86_64 aarch64" ;; alpha) container_hosts=x86_64 ;; arm) container_hosts="x86_64 aarch64" ;; hexagon) container_hosts=x86_64 ;; @@ -1447,6 +1448,10 @@ probe_target_compiler() { case $target_arch in # debian-all-test-cross architectures + aarch64_be) + container_image=debian-all-test-cross + container_cross_prefix=aarch64-linux-gnu- + ;; hppa|m68k|mips|riscv64|sparc64) container_image=debian-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") = fd; + register char *x1 __asm__("x1") = buf; + register int x2 __asm__("x2") = len; + register int x8 __asm__("x8") = __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") = ret; + register int x8 __asm__("x8") = __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 # Add the common build options CFLAGS+=-Wall -Werror -O0 -g -fno-strict-aliasing diff --git a/tests/tcg/aarch64_be/Makefile.target b/tests/tcg/aarch64_be/Makefile.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=$(SRC_PATH)/tests/tcg/aarch64_be +VPATH += $(AARCH64BE_SRC) + +AARCH64BE_TEST_SRCS=$(notdir $(wildcard $(AARCH64BE_SRC)/*.c)) +AARCH64BE_TESTS=$(AARCH64BE_TEST_SRCS:.c=) +#MULTIARCH_TESTS = $(MULTIARCH_SRCS:.c=) + +# We need to specify big-endian cflags +CFLAGS +=-mbig-endian -ffreestanding +LDFLAGS +=-nostdlib + +TESTS += $(AARCH64BE_TESTS) From patchwork Tue Oct 22 10:56:08 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 837549 Delivered-To: patch@linaro.org Received: by 2002:a5d:50c9:0:b0:37d:45d0:187 with SMTP id f9csp2475856wrt; Tue, 22 Oct 2024 03:59:12 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCU5xWoDAV5e2WNnyO4RLmgmmY2wlRbVgVF5FVLY+3f8VpDESBiQP3rVYYiwzEJRhnk1Wh6e3w==@linaro.org X-Google-Smtp-Source: AGHT+IHZ4FFIKogKT8elsuQIQcfut8MA0z9QaSTpZR3kKZ5jV9erNmdBAc5TpbNoXebe4HdvmfCN X-Received: by 2002:a05:6214:440a:b0:6cc:8705:b5cf with SMTP id 6a1803df08f44-6ce2044362amr26961506d6.22.1729594752376; Tue, 22 Oct 2024 03:59:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1729594752; cv=none; d=google.com; s=arc-20240605; b=EH0/wFcOzxCxikDugvro4MEipKVqR59XfdGNST2J2LEj95ypZyXJAy4TL4hRr/0T/2 1ZspAv+eyPcCF9WLAh9LzzdIBlRcq36hizgGbl21juIHDf/ykhjpckojc4KC483TqsV8 zkFlUpqaxfmAWvfZLRTfAW+AmIaRDeqflqtGLVfRLgZ1VM9XUyKMz2TV8apOyO0D5IJ+ Eklw31q0Eg2yoMdBtXGgzuem6+mwRmaLVfSxEz/bUPmOQAq9KrFMOij+Z4BR2sMsKjF7 wLRxFI8wmo5zhwu/+XATRDYj9LvImEMftVyYlFsf0BabFUdpmuIQMqsZdj7QvQgRd+kh /msg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Pgb6ox3Ya7i122uZlocXrETTS1VOKhPW7bSAndX3jjQ=; fh=TliP8gu8zXfyTr07vi8XCJx2pv3j20R8WlOer8ddxq4=; b=clww/qedpZR61jJI1l+gkJNOQwNPMewAgBfGnhnvWM8ozgv7hjvft/ID5kJbKgFVCa Uho8VE+durfaOs6KJLs6KBLWidbFUpTL+frbKmZD2QFbI+3vG7mbv0pb2IgV30HSrTn5 Sh/nS815F5GB2nVhdPh2wTHKMjjlzZJV0ts1+xYOdxLPvYnPCNYSd/3ZkYseIdJfNY6K b1eEro1kSucV2baWqZvphlTfWQobAFfHKrJ69GeZCBoleZ6fyagpzt7sdXcFhZXDCKnM jh8DTSbeW4noJVhslgW8OT1aw06vzQmwck7EWkCBf8cgJ2jlkO1bU3l305MX3kfE2QYd EZsA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="X02Ook7/"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 6a1803df08f44-6ce0098aedasi60945146d6.224.2024.10.22.03.59.12 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 22 Oct 2024 03:59:12 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="X02Ook7/"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 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) 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-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) 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) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Beraldo Leal , Laurent Vivier , Wainer dos Santos Moschetta , Mahmoud Mandour , Jiaxun Yang , =?utf-8?q?Alex_Benn=C3=A9e?= , Yanan Wang , Thomas Huth , John Snow , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , qemu-arm@nongnu.org, =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Eduardo Habkost , devel@lists.libvirt.org, Cleber Rosa , kvm@vger.kernel.org, =?utf-8?q?Philippe_Mat?= =?utf-8?q?hieu-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 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org 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é Message-Id: <20241015140806.385449-1-gustavo.romero@linaro.org> Signed-off-by: Alex Bennée --- 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/gdbstub/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 -PATTERN_0 = "Memory tags for address 0x[0-9a-f]+ match \\(0x[0-9a-f]+\\)." -PATTERN_1 = ".*(0x[0-9a-f]+)" +PATTERN_0 = r"Memory tags for address 0x[0-9a-f]+ match \(0x[0-9a-f]+\)." +PATTERN_1 = r".*(0x[0-9a-f]+)" def run_test(): From patchwork Tue Oct 22 10:56:09 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 837545 Delivered-To: patch@linaro.org Received: by 2002:a5d:50c9:0:b0:37d:45d0:187 with SMTP id f9csp2475805wrt; Tue, 22 Oct 2024 03:59:02 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWIuKW2Ud+YJJlb6unTqKmC39j9F1wXCVxBXGrBNwbzr1uEJUurp1AefTomaOLMY815XId9tg==@linaro.org X-Google-Smtp-Source: AGHT+IGOgc9S3Adi8nY2HCv1Zrmuxrep6iaYrI9pAKBS51AVAOduHmXCB57/nLbuvPHdPvciqaJ0 X-Received: by 2002:a05:6102:54a9:b0:4a3:a137:ba7 with SMTP id ada2fe7eead31-4a742d3424bmr2547592137.9.1729594742168; Tue, 22 Oct 2024 03:59:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1729594742; cv=none; d=google.com; s=arc-20240605; b=DTcPZSoxGJAq0mn8OP1RMbIn6lxmAqc2GmEa1v2ijqjarhtgQUonTWCBDSfZ5HNvhd zSov1PzzwZgyZ1DTybQaWeLAowcdsqfvaD31QceT56P4kI6ucNHNaIzuvOYv0J9L/1j0 PZC7Bfz0xYq6u5S9BOFbTPMUi2jMqAHvp/ACH/qYdcm9nDRJV/CbjtJhWsAlsoli1RRQ Jsk7aBHItAWeonBvQ2udLJwWtjrVn8e7GJTOLiJhg1s0xGZb3TRGGAyCWVMM08VHHLiG w6NFstkRevgCXCKR0Tj318cX/JZ+fQmOi6DH5/d5aKqXNx4KjAi3vC0ENfaFxDU8q9dX Mptw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=rLOsiFp7nSYSKf/se2Emh5FqkyaR/LV5KofnrCQ0C68=; fh=TliP8gu8zXfyTr07vi8XCJx2pv3j20R8WlOer8ddxq4=; b=G2qTMYhkk4sOsZu09E6lke+9O0l9pPni5H9K1FiXYyWnnafIHPUuOi2ek+wrIWPtKR u397tMjl+Pi6nHnvG0cp59gECGvzXWebU0euCvtlJxTDq0GG0NOFJtV1eOErStPGM/Aw jqjn8V8b58ZOHuIzuES9rOZ2wavPo1E4Fael3so1HdPGVoHOBEXgqoE6htqgpHgMJGg1 COBA1ri1xMB2spWbuJQfp1vBZgui3mYpqM24VUhz5n4kK8pT5WYk1E2n3V5Iti5ZjcSS UlimzDVkyiZBPxSjTW7MCc3Jq4olkqKbmLYJynboL5IAyjTZOyV3BzqErxdwB2k4ylCn dC6g==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=UbY5ohl8; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7b165a87c23si622563685a.452.2024.10.22.03.59.01 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 22 Oct 2024 03:59:02 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=UbY5ohl8; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 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) 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-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) 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) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Beraldo Leal , Laurent Vivier , Wainer dos Santos Moschetta , Mahmoud Mandour , Jiaxun Yang , =?utf-8?q?Alex_Benn=C3=A9e?= , Yanan Wang , Thomas Huth , John Snow , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , qemu-arm@nongnu.org, =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Eduardo Habkost , devel@lists.libvirt.org, Cleber Rosa , kvm@vger.kernel.org, =?utf-8?q?Philippe_Mat?= =?utf-8?q?hieu-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 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org 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ée 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 @@ import argparse import re -from subprocess import check_output, STDOUT +from subprocess import check_output, STDOUT, CalledProcessError +import sys -# mappings from gdb arch to QEMU target -mappings = { - "alpha" : "alpha", +# Mappings from gdb arch to QEMU target +MAP = { + "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"] } + def do_probe(gdb): - gdb_out = check_output([gdb, - "-ex", "set architecture", - "-ex", "quit"], stderr=STDOUT) + try: + gdb_out = check_output([gdb, + "-ex", "set architecture", + "-ex", "quit"], stderr=STDOUT, encoding="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 = re.search(r'Valid arguments are (.*)', gdb_out) - m = re.search(r"Valid arguments are (.*)", - gdb_out.decode("utf-8")) + targets = set() + if found_gdb_archs: + gdb_archs = found_gdb_archs.group(1).split(", ") + mapped_gdb_archs = [arch for arch in gdb_archs if arch in MAP] - valid_arches = set() + targets = {target for arch in mapped_gdb_archs for target in MAP[arch]} - if m.group(1): - for arch in m.group(1).split(", "): - if arch in mappings: - mapping = mappings[arch] - if isinstance(mapping, str): - valid_arches.add(mapping) - else: - for entry in mapping: - valid_arches.add(entry) + # QEMU targets + return targets - return valid_arches def main() -> None: parser = argparse.ArgumentParser(description='Probe GDB Architectures') From patchwork Tue Oct 22 10:56:10 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 837554 Delivered-To: patch@linaro.org Received: by 2002:a5d:50c9:0:b0:37d:45d0:187 with SMTP id f9csp2479042wrt; Tue, 22 Oct 2024 04:04:50 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUuhMmV76DCHDhfRv4AF2915/1pHjPARNHn/r4oNZCbPLsmyvaiPW+ZdAbBt4TDZQpEHvFr5A==@linaro.org X-Google-Smtp-Source: AGHT+IGpv6meCq4m1Y/J2r0Lj2ONeqTbAOG00/S3Tr1OyRM62Fzj7XRUuc+zr4AOyM/72J/o0GDH X-Received: by 2002:a05:6808:bd3:b0:3e3:8be6:c4f5 with SMTP id 5614622812f47-3e602deaad9mr10543621b6e.45.1729595090682; Tue, 22 Oct 2024 04:04:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1729595090; cv=none; d=google.com; s=arc-20240605; b=Feuq9Cfotq7dJyDwZvmEQCj67FNyU0NzL601C9ohKeU6vVHieNiK2yUpH8/DnMQ5d+ DRVKtZO5GWLvyXMegS1fm6UirVnIH4h/jBkqTDBFGXmL3D70wV1Kw4wh+LBKxfyBcmY1 UuwayKaxYiCx9QmPv5b5LmXukS7bkbZI5T24gLYSPxAzieE+R4KGA0Aa8Fw9B09vI0n4 g088fAfW9nlgSOIn8Jo/Qn58uKlZ9tGhLxATLpUec80k53G/5Tx8rRejNegEU5r0wxUm iGGxSxtr9ApnborKwxtRpVXKLz4wzDsR4c3Uc/jVIdn42xrP/SLKmw2GFOZjO2G+M0SR Bthw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=xhZwhDsyP9u5fu/gLDiAkir8lHLMK7A4MI+ExEvLX/4=; fh=pVjH8310hlVyksknvNC3/D3AfgLq4a8e+T5MCg3/MHg=; b=daHjRjBvN7ndv6uMHSDAX/kkQH2/PzHQIJbvVhoiMdWtLIjMPuQQHMgVHhk3hqg/v5 +V5Jm2Mv8+/CwvuYzGrfBUFx6Cwnb8d6DnFSHyJhoD1BU1KAJErBErEJJah/TbbHhUoN ssZDkdvz7GVpP0YmvuM8nP0C4ntLUaMWJ8pjNwXkNYK5SX1+eyql7xMw2U2VtCPlWHX5 Wjqg0LsLBeXCyvXB+HC/bRqtSXKEOTgLGg7oVzCzCaU6OFleWgRlDvatiI4Zj/YmASfd EGhFqrpMzkcIM7t2qAeorMitYfE6x+MXOA4gx8NO1os3W/dX6pc1nBVuH2i2cvW9riQq seqQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=XRSBRYAD; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id ada2fe7eead31-4a5f0c72583si903624137.52.2024.10.22.04.04.50 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 22 Oct 2024 04:04:50 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=XRSBRYAD; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 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) 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-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) 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) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Beraldo Leal , Laurent Vivier , Wainer dos Santos Moschetta , Mahmoud Mandour , Jiaxun Yang , =?utf-8?q?Alex_Benn=C3=A9e?= , Yanan Wang , Thomas Huth , John Snow , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , qemu-arm@nongnu.org, =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Eduardo Habkost , devel@lists.libvirt.org, Cleber Rosa , kvm@vger.kernel.org, =?utf-8?q?Philippe_Mat?= =?utf-8?q?hieu-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 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Make it easier to find where plugin patches are being staged. Signed-off-by: Alex Bennée 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/ TCG Plugins M: Alex Bennée +T: git https://gitlab.com/stsquad/qemu plugins/next R: Alexandre Iooss R: Mahmoud Mandour R: Pierrick Bouvier From patchwork Tue Oct 22 10:56:11 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 837548 Delivered-To: patch@linaro.org Received: by 2002:a5d:50c9:0:b0:37d:45d0:187 with SMTP id f9csp2475848wrt; Tue, 22 Oct 2024 03:59:10 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCX2+qsaH5Uq46SuXorF/UVAVyfIZOPIPGWeHTQ2SyFV+ebtDVGQ62kORDGFhfGRQCWDOHQhcQ==@linaro.org X-Google-Smtp-Source: AGHT+IHd68q326rnAvYCEKYXaDyHNhEW3QM4RCqgZCYnLETMnP0WmeO6Hjg2vvTjCcLWM6uLfIB9 X-Received: by 2002:a05:6102:3f4a:b0:4a3:a7a0:889a with SMTP id ada2fe7eead31-4a742e41930mr2503187137.19.1729594750742; Tue, 22 Oct 2024 03:59:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1729594750; cv=none; d=google.com; s=arc-20240605; b=C2WFhBjDkJKaYSeNov3c4UxzZwOutBX34++3z0fun4r2JXPSPcmAMoOEQVi2/vGhnl 8DVU3AJ2sSSA0RXxNkY/Y2TJB6ODpxqMxx8rdajyjPnsc9v+UQB+II/Df/cWFKnfDwrt ugtNg8pNQqxkQKo4Escgh+l18/atks2Wqlb+C492lao5iJDsefzUPFhJB4BALIwuEMcA lmMZ3HXUQe4QZZ/POxBpfO7T2NRAQ/yAwsyhdry+zITPoT6wVsuGB9el8ylnpTLXkZLn +VsjSOqDfhJwBL5CUZsALbfL5T6caPCVyezAfBFSVH9KuYUzrsx8eI8Bhb9KZaXF5sqJ hsFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=ncBC08IoBkP10ef5QDpG5SV+FPj/pwrW84Mb8BGJC6M=; fh=pVjH8310hlVyksknvNC3/D3AfgLq4a8e+T5MCg3/MHg=; b=crV7GzvzQmUS3h2ETc39OkE+5bivuQJSy/Fm+LzQ8l2dlEUR9lt6vMFZxEDjB1XEB4 iqoPMzcZiL2t6dmi7KjKfFORQsVsFGciS8Bcoi+ljixVLn9jnu3MB3aakL1U4fta7ewt OxDaQCUf/9oX6Hibgd6bw8N4dD8hrEQDUBm/F72yHSibCdymRag+5FtcaL6YNmdvNzEw 5pVINUHAWuV/sPGofXQk6EWYbR6N3mVR4MCx+A1g4KQtTjm1wp7Cd8YBxYm5hChJr6PX HYmVMHIrX5nrNm0kdtJKEjN76eqvqRGQBVdtGyFTI+2taVP3k0Ur5LXMrDASeCMOVd/C GmpA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ANmHrUZh; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-460d3b380c8si61035931cf.2.2024.10.22.03.59.10 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 22 Oct 2024 03:59:10 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ANmHrUZh; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 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) 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-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) 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) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Beraldo Leal , Laurent Vivier , Wainer dos Santos Moschetta , Mahmoud Mandour , Jiaxun Yang , =?utf-8?q?Alex_Benn=C3=A9e?= , Yanan Wang , Thomas Huth , John Snow , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , qemu-arm@nongnu.org, =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Eduardo Habkost , devel@lists.libvirt.org, Cleber Rosa , kvm@vger.kernel.org, =?utf-8?q?Philippe_Mat?= =?utf-8?q?hieu-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 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org 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ée --- 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 */ }; 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 *userdata); + +/** + * 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); 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(size_t element_size); void plugin_scoreboard_free(struct qemu_plugin_scoreboard *score); +/** + * 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 = 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" #include "exec/exec-all.h" #include "exec/tb-flush.h" @@ -147,6 +148,7 @@ static void plugin_cb__udata(enum qemu_plugin_event ev) 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 = cb->f.udata; @@ -768,3 +770,38 @@ void plugin_scoreboard_free(struct qemu_plugin_scoreboard *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] = { + [PluginCallback] = { + .handler = handle_plugin_cb, + .cmd_startswith = true, + .cmd = "qemu.plugin_cb", + .schema = "s?", + }, +}; + +void plugin_register_gdbstub_commands(void) +{ + g_autoptr(GPtrArray) set_table = g_ptr_array_new(); + + for (int i = 0; i < NUM_GDB_CMDS; i++) { + g_ptr_array_add(set_table, (gpointer) &cmd_handler_table[PluginCallback]); + } + + 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; } - -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 = g_string_new(""); @@ -90,6 +89,7 @@ static void plugin_exit(qemu_plugin_id_t id, void *p) } qemu_plugin_outs(out->str); + g_mutex_lock(&lock); if (do_region_summary) { GList *counts = 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); } + g_mutex_unlock(&lock); +} + +static void plugin_exit(qemu_plugin_id_t id, void *p) +{ + plugin_report(id, p); qemu_plugin_scoreboard_free(counts); } @@ -400,6 +406,7 @@ QEMU_PLUGIN_EXPORT int qemu_plugin_install(qemu_plugin_id_t id, counts, CPUCount, mem_count); io_count = 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; From patchwork Tue Oct 22 10:56:12 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 837550 Delivered-To: patch@linaro.org Received: by 2002:a5d:50c9:0:b0:37d:45d0:187 with SMTP id f9csp2475862wrt; Tue, 22 Oct 2024 03:59:13 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCU7f+9p+Xg6RQIKiYukKhQeriRPZnYFeFpKj3ATfE/DbFQvk2zYArf3Nd7tqYG7uowTSZs+0g==@linaro.org X-Google-Smtp-Source: AGHT+IFscV0tiXDwwQuZh3HimcKQqsmegVcR41SLnMA2rQSquI5H60qPrw6GD+LvohYrBSgwKqRP X-Received: by 2002:a05:6102:a50:b0:4a4:6858:3365 with SMTP id ada2fe7eead31-4a742e1120emr2491561137.21.1729594753136; Tue, 22 Oct 2024 03:59:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1729594753; cv=none; d=google.com; s=arc-20240605; b=djlhB/RD5Pd8GKYvYmWjIqIofFYNQaBclwa5GtZ+XE/XumT8HfzoO3CXy4UCN60fe1 97r3l1+eF/GK//XvRPzPzhuKI2jk6zP9Y9dluRhfeR3G902ohgwJ5ihLNst9k0p13b73 lpXw54+gxc74ni3vTrl2NNEcb+mQjvkLK7e8G98rp3JCxq/w71BCCl1R9Y90XmRIveph ohf4l6j3hZ8zDE2qu5LtNEB5mFoekFYF4yF5QxB8a7+hAFAvye3HKFfNkF6eHuXZ/44V k3Y/W8pokVt/LTB5UeZ8sJICnOXUwkVsIQAVfiRAQg3d6Dv+FtA9A5ecmMwYwZ5sEeoj iJQw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=59EXaptdsAtTsnL7N0QHtzvibi/ktz9wJ6DO/DYK14s=; fh=pVjH8310hlVyksknvNC3/D3AfgLq4a8e+T5MCg3/MHg=; b=ifbfyauyNNt5FT7MH2ZXpQFAevuBhLE89SYQ8rgpmk+/+RKe8HrBTNtXTTbADNtpw6 cj7VnhbahPn+mNeen+GMP4zy1mcKYUVN92w4GWWLPs+OIxCc1yCSsjGhM4NqP+ymC5tr zTx06rXG/Bnu+5qE3gc2bY4r5ujE2KzPPrpsm9HpvoDqfE5xSZjzEi2NbMWt4ItKjlSP V36e3iTDvAWAyNgfpPFuTIqfGJbZzeeitwI5XxGHAezZ/E1Pl9E5GmZeLiiXdMFYrnxm isQ87+DXBn+/WGWivtmYMoRaq9Bx/BnI+D1uiPbjc6LtcopOv5lKeXkUFcg8WFeWN1Re SrKQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Bc68p+6h; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7b165ab6138si619647385a.750.2024.10.22.03.59.12 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 22 Oct 2024 03:59:13 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Bc68p+6h; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 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) 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-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) 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) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Beraldo Leal , Laurent Vivier , Wainer dos Santos Moschetta , Mahmoud Mandour , Jiaxun Yang , =?utf-8?q?Alex_Benn=C3=A9e?= , Yanan Wang , Thomas Huth , John Snow , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , qemu-arm@nongnu.org, =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Eduardo Habkost , devel@lists.libvirt.org, Cleber Rosa , kvm@vger.kernel.org, =?utf-8?q?Philippe_Mat?= =?utf-8?q?hieu-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 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org 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ée --- 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') +if 'CONFIG_TCG' in config_all_accel + subdir('contrib/plugins') +endif + common_user_inc = [] 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 = [] +if get_option('plugins') + foreach i : ['cache', 'drcov', 'execlog', 'hotblocks', 'hotpages', 'howvec', + 'hwprofile', 'ips', 'lockstep', 'stoptrigger'] + if host_os == 'windows' + t += 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 += 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 From patchwork Tue Oct 22 10:56:13 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 837536 Delivered-To: patch@linaro.org Received: by 2002:a5d:50c9:0:b0:37d:45d0:187 with SMTP id f9csp2475222wrt; Tue, 22 Oct 2024 03:57:09 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXGxhH11em8oJ+zgCC57VZ9HQfsjFYrijK4/o5CLsxgB540iZpVGKrytvIIRCy6OplHon6KUA==@linaro.org X-Google-Smtp-Source: AGHT+IHWqVNlZFo93seqSBcLkcTo49YWWS7iDSCbxcT+PSbegY+C/FJP8tEAy/7Ze+UOrM1pNbbs X-Received: by 2002:a05:620a:4593:b0:7b1:3ada:dc61 with SMTP id af79cd13be357-7b17689c18emr226024685a.60.1729594628884; Tue, 22 Oct 2024 03:57:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1729594628; cv=none; d=google.com; s=arc-20240605; b=aoSmRFDm2lw0uOhaxbjWes5hKKphJLNMbkYha5LlITyqTyfWrRpmNyiR1ij8Oct0LI DMZLcUkBdfr/utNLAd0CHFJy0MzTny3L9QYJqyJ3a1CtZ7HPRgtaE55hXr7FEOOkO+EJ qmSwKq7xhD38NDM5jhAdAnbf65+E7a4kpkfDf0xFzJIgvH/BUVc9/mEzORHDUTVkjfo9 GxDFfBfO106Sg9inbb9SrEqqWeFhdSBb2zR52zUgEw0n8T19xvzPz05QohsYseiNStxW 5dBWBLSHSwQZoGhpkSYpvTgy7pqUaoeEAJ6z0jmuLLYDbQoDy6/oTqOvdTuf2wgtBgrP t1ig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=A1RT2huJ5JZoTziBJ4jD+CCwuEKWgio+GHjHj5uuvtc=; fh=pVjH8310hlVyksknvNC3/D3AfgLq4a8e+T5MCg3/MHg=; b=g0XDVIXPaJC8hZ1ShvatNLOJdX8ydeoH1fO0QCh9hcvGkNED8lZYoZVy7rW0c9SXew HkfMvjwJZvNy6HSuzGm5UeWa4GpG5BJPuciqtV3aCE2Rfd7h3gz0esCM6BLEngMAfDKi 2mw61600PfceAXD0Gax84L3dmxn5WOR+WW3lwMIe9G3tdKheMlmD6bKGrNhToaazzbT4 Ag+zzJRcv1yIgzNOMv9v1aZyMA0UjuBpdoj+s5CzkuThxMKqKngpZN9LnSyGnH9MkmCg YuVzlVcoGMeHMO/oADcPMjsRQC/tUyNEpadwgAfBMeOiu+8Pmn9OzvpFyh2IVNkZ9zgg LdiA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=eRRTui8d; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7b165a6b026si609694985a.301.2024.10.22.03.57.08 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 22 Oct 2024 03:57:08 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=eRRTui8d; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 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) 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-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) 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) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Beraldo Leal , Laurent Vivier , Wainer dos Santos Moschetta , Mahmoud Mandour , Jiaxun Yang , =?utf-8?q?Alex_Benn=C3=A9e?= , Yanan Wang , Thomas Huth , John Snow , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , qemu-arm@nongnu.org, =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Eduardo Habkost , devel@lists.libvirt.org, Cleber Rosa , kvm@vger.kernel.org, =?utf-8?q?Philippe_Mat?= =?utf-8?q?hieu-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 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org 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ée --- 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" != "no" && test $host_bits -eq 64; then plugins="no" else plugins=yes - subdirs="$subdirs contrib/plugins" fi fi @@ -1704,7 +1703,6 @@ LINKS="$LINKS .gdbinit scripts" # scripts needed by relative path in .gdbinit LINKS="$LINKS tests/avocado tests/data" LINKS="$LINKS tests/qemu-iotests/check tests/qemu-iotests/Makefile" LINKS="$LINKS python" -LINKS="$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" = "yes"; then echo "CONFIG_DEFAULT_TARGETS=y" >> $config_host_mak fi -# contrib/plugins configuration -echo "# Automatically generated by configure - do not modify" > contrib/plugins/$config_host_mak -echo "SRC_PATH=$source_path/contrib/plugins" >> contrib/plugins/$config_host_mak -echo "PKG_CONFIG=${pkg_config}" >> contrib/plugins/$config_host_mak -echo "CC=$cc $CPU_CFLAGS" >> contrib/plugins/$config_host_mak -echo "CFLAGS=${CFLAGS-$default_cflags} $EXTRA_CFLAGS" >> contrib/plugins/$config_host_mak -if test "$host_os" = windows; then - echo "DLLTOOL=$dlltool" >> contrib/plugins/$config_host_mak -fi -if test "$host_os" = darwin; then - echo "CONFIG_DARWIN=y" >> contrib/plugins/$config_host_mak -fi -if test "$host_os" = windows; then - echo "CONFIG_WIN32=y" >> 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=$(foreach t, all clean distclean, $(addsuffix /$(t), $(SUBDIRS))) $(SUBDIR_RULES): $(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C $(dir $@) V="$(V)" TARGET_DIR="$(dir $@)" $(notdir $@),) -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 = $(SRC_PATH)/../.. - -VPATH += $(SRC_PATH) - -NAMES := -NAMES += bbv -NAMES += execlog -NAMES += hotblocks -NAMES += hotpages -NAMES += howvec - -# The lockstep example communicates using unix sockets, -# and can't be easily made to work on windows. -ifneq ($(CONFIG_WIN32),y) -NAMES += lockstep -endif - -NAMES += hwprofile -NAMES += cache -NAMES += drcov -NAMES += ips -NAMES += stoptrigger -NAMES += cflow - -ifeq ($(CONFIG_WIN32),y) -SO_SUFFIX := .dll -LDLIBS += $(shell $(PKG_CONFIG) --libs glib-2.0) -else -SO_SUFFIX := .so -endif - -SONAMES := $(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 := $(shell $(PKG_CONFIG) --cflags glib-2.0) -PLUGIN_CFLAGS += -fPIC -Wall -PLUGIN_CFLAGS += -I$(TOP_SRC_PATH)/include/qemu - -# Helper that honours V=1 so we get some output when compiling -quiet-@ = $(if $(V),,@$(if $1,printf " %-7s %s\n" "$(strip $1)" "$(strip $2)" && )) -quiet-command = $(call quiet-@,$2,$3)$1 - -# for including , in command strings -COMMA := , - -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 $@ $^ $(LDLIBS), \ - 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: From patchwork Tue Oct 22 10:56:14 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 837555 Delivered-To: patch@linaro.org Received: by 2002:a5d:50c9:0:b0:37d:45d0:187 with SMTP id f9csp2479461wrt; Tue, 22 Oct 2024 04:05:35 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUDt02+YEc2l3cZloJwHWdbQ2lbakfMrHYPrlMwpFIiORA9qoaUHp4MvmZsg18scL8vtajaaw==@linaro.org X-Google-Smtp-Source: AGHT+IGUlKszoISLjmp4tfrsmZl7HLACV5S5RxqgcNOeQKWq5paS5Zi9oGE1rkMrY5Pnfrc7Yani X-Received: by 2002:a05:620a:4101:b0:7a9:acd5:1b21 with SMTP id af79cd13be357-7b157bdb730mr2015745885a.50.1729595134997; Tue, 22 Oct 2024 04:05:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1729595134; cv=none; d=google.com; s=arc-20240605; b=ZGgzuLKQSptzkLuCNbuZSUJVtwmIycKK5XGUSaq5FSCiI7o4VUWQU/NeY5yRYhTpOh mLq3uiV5ewKreLoDI+IfORcFsKtgtrnX8bVjyvlhgCyQm/81I17FbLf6v0L74hun2iAq WVjI4tNAK+MTebVy132yZvVx6ek0eEO4eqVkEsIapMBKp2T1xkqqXYvvuNazBBswOt6I C/JCRhMnSHWx0imc6T+tdN+2FL/3bDhqSC7KbuYt6wh0EZuyH8FVxDSjAcM/dzu5WbY6 5GLanS7YqF0tNgiYfpLfHksdgr5CP4yC5Gm7LVOd3cy7MMiIVQtt37X0nXwK/bKoqYlt /cPw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=0yP4SNsaEappmzZc/gnms0PRD/uAmEAQCRgu6RQMiI8=; fh=QD25Hc+ygJ0XbcXg3/ArJIMCX64ZGVFFmcpicpFhJT8=; b=k2i9XVu++ncxTd01fCnWalhSYey2I1Xlw58sqnnuXS6hiZKaPk6LjiSVjcx2i9NQWI 7NJlppgqPGj9u4rBJ7VLauDQeoPShi8nxHnP1Z3l0fHIZQZSrBmRWMQJ6kJlMKcA7+EK aneKYh9OtwIaHJ0Ujf2n/LS+aDYeW4K7dHS1AEz2GnUV5M5APdIBQYRfwaZZ4pGTNhH4 lXAXl2rP3X8+P0f7QdXgY/4KxVOxsOOTovq6a5OcfBC6XbKR0e2PfrJGM2vR3UvKLCk8 17wTSG53fDx3CC9W99d4JGiwCVOCVb0csP0v5DbPDq2ucGNHnE68Acn43Ye0/oUkIc+Q aOSw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=RBuwLTTf; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7b165a9c52bsi666627385a.635.2024.10.22.04.05.34 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 22 Oct 2024 04:05:34 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=RBuwLTTf; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 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) 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-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) 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) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Beraldo Leal , Laurent Vivier , Wainer dos Santos Moschetta , Mahmoud Mandour , Jiaxun Yang , =?utf-8?q?Alex_Benn=C3=A9e?= , Yanan Wang , Thomas Huth , John Snow , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , qemu-arm@nongnu.org, =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Eduardo Habkost , devel@lists.libvirt.org, Cleber Rosa , kvm@vger.kernel.org, =?utf-8?q?Philippe_Mat?= =?utf-8?q?hieu-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 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org 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ée --- 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) /* 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 = NULL; + tcg_ctx->plugin_insn = NULL; }