From patchwork Wed Oct 23 11:33:49 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: 13846943 Received: from mail-ed1-f51.google.com (mail-ed1-f51.google.com [209.85.208.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6E3E61AB6C7 for ; Wed, 23 Oct 2024 11:34:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.51 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729683252; cv=none; b=E+EQOeIACBlmHSTp0Y5Qoim1S3Nt+FnvT34jUUXRSQkNTOMdKeRzf7UhTnSMqDgC9yTCPyU2JckWtmJD9MiA3lQdYxnT7vgeNlhOb32JDyRXnaSq3Sr2PgjLL1B/E/cuEIyEeoCx2l43jwCY7Mu6m4ywk5B2RtsKOg/q5mkoMPE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729683252; c=relaxed/simple; bh=0eFsYAly1/qNyLw7uhoTDRrzQM6B2msfiCoMYRmVpDI=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version:Content-Type; b=VgHLg+V9rW/91SmnQrYNLTO/8EZslGXbdM3Vu11pDgI5HVDSmZZ7r3o4yLbtlnLZlTPVRcJZhTP8QizoDnHOh//nIZHQAy/n2a2HTTvM5pu7dhJxa7TqlDzXCjICFB3AGxIIycZjS4QaQv8LDDsP4q8xzDRf4ScvMEplIyVQqk8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=m1DZQxX5; arc=none smtp.client-ip=209.85.208.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="m1DZQxX5" Received: by mail-ed1-f51.google.com with SMTP id 4fb4d7f45d1cf-5cb6b2b7127so3031698a12.1 for ; Wed, 23 Oct 2024 04:34:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1729683249; x=1730288049; darn=vger.kernel.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=+XNjfi7hRi9preQg6Skm6jboyJIHM73C5JCjrQ/Fxa0=; b=m1DZQxX5heZt2Sn/mspxoxpwm+ewV71/DAfaL8cyemEM8r+J2zBLLuzTQtrocQ+2gX 94IGJCeZz5iFdjDqxtAlEWTMWMK/M55o409sa56f/Bfjkzb1HyR9eCGwO9lQuYaHWxXD NN3vPjYGWdqqq+vxG+ti4mNxuD3RzbiXkIvZxwDL7pl6Y6AW1M5lutHZz0qgsgmrSRbd Y+ducYLtV4GUusO5dVDPKoIC2j3ak5MMVoYnVykk9AmTTkOEGLIr/QaWNbP5d1V1z+Rk tsVqsujA34EhTdbW0spT5dEuu6LjI6ScSRoWq767QPr/DernpNegsdO3axrjCdw7Z63D 2H8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729683249; x=1730288049; 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=+XNjfi7hRi9preQg6Skm6jboyJIHM73C5JCjrQ/Fxa0=; b=RE37ht+SreS4J8RxYfaOQ9sM/5+z6ONRXxg7X6jqKQ1ZwCDkG8y49OQLhPjJBXoPP2 3BzYWAtabnpPVIwilsHkh3fod5h1DkrzcsmyjdqodtSDenjyGSnqiLIVFlZ0udjIPq0o 6TlILauolG0NmX/715PFY/b+AjonHfZnFdLjLPTMpTNIUh6yeO08vCfHn5wO338dyv4Q bOUWb7lntGyZ7U5VAwh45gaGXxUZtZ9o2Uc8/K9atZOLPEk0ZCKQoygXX0QFlq77ucRF GcOH9uALKBm+HxGzVMXJD69YuvSU21QcYnLgqjFPHft1GSHZGQbI5joYpOJa/PcRrH+d bHoQ== X-Forwarded-Encrypted: i=1; AJvYcCVRDMzryNedpYCQApQsNzYUJmsrdowGhfTv+R0Z9csnHAZ8HSJgjE8nX+fBP7jpPhR5Ajc=@vger.kernel.org X-Gm-Message-State: AOJu0YzeotnQo9KsmncFCNOrvCRG6kFEnGrScSG2B/wQgd3HXDaJLjCv cOsh71AX+EUcS/M2H7pxtnjZciURmgIhAC0vIHhk7p5oS1Cjase46DSM9T0JmlA= X-Google-Smtp-Source: AGHT+IHbBHuAhyUoRAK6Z+ouKhhEjsA1T4wrJBvMTAuUApw84TIFTJaW/QBSBiQQ9GXdgQDRf9QMxg== X-Received: by 2002:a05:6402:434c:b0:5c4:51b3:d75f with SMTP id 4fb4d7f45d1cf-5cb8af72080mr1849170a12.24.1729683248677; Wed, 23 Oct 2024 04:34:08 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5cb766710d1sm2661378a12.90.2024.10.23.04.34.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Oct 2024 04:34:07 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 11D8C5F8AD; Wed, 23 Oct 2024 12:34:07 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Zhao Liu , Eduardo Habkost , Pierrick Bouvier , Peter Maydell , Yanan Wang , John Snow , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , devel@lists.libvirt.org, Marcelo Tosatti , Riku Voipio , Wainer dos Santos Moschetta , Marcel Apfelbaum , Paolo Bonzini , Mahmoud Mandour , Laurent Vivier , Jiaxun Yang , "Edgar E. Iglesias" , Richard Henderson , Alexandre Iooss , qemu-arm@nongnu.org, =?utf-8?q?Daniel_?= =?utf-8?q?P=2E_Berrang=C3=A9?= , =?utf-8?q?Marc-Andr?= =?utf-8?q?=C3=A9_Lureau?= , Cleber Rosa , kvm@vger.kernel.org, Beraldo Leal , Thomas Huth , =?utf-8?q?Alex_Benn=C3=A9e?= , Ilya Leoshkevich Subject: [PATCH v3 01/18] tests/docker: Fix microblaze atomics Date: Wed, 23 Oct 2024 12:33:49 +0100 Message-Id: <20241023113406.1284676-2-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241023113406.1284676-1-alex.bennee@linaro.org> References: <20241023113406.1284676-1-alex.bennee@linaro.org> Precedence: bulk X-Mailing-List: kvm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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 Reviewed-by: Pierrick Bouvier Message-Id: <20241022105614.839199-2-alex.bennee@linaro.org> Message-Id: <20240919152308.10440-1-iii@linux.ibm.com> Signed-off-by: Alex Bennée --- .../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 Wed Oct 23 11:33:50 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: 13846945 Received: from mail-ej1-f43.google.com (mail-ej1-f43.google.com [209.85.218.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 44E6A1AB6ED for ; Wed, 23 Oct 2024 11:34:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.43 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729683254; cv=none; b=VH4tHI3l3DPC6RlYLIWbH1l4AFfHT8Zgybscb/ps3X3OiXZ8IkGu6vq2FWJoVHDDV/R8xeyOresd/+J75rdjWIqKS0nLAciOQk0OblAlzOrgg2mNnS/kvxJxL4VTpY4t/Lj+IibR/TjpMnCNcR+EPkokd/V8fr5xlzfsYXDnLWI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729683254; c=relaxed/simple; bh=FPDHoQuPMt65ENXagulYYLLxNsp02Qm7mdL6YjheHFc=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version:Content-Type; b=Lvuv2Pze4GqsQp+ADGIUt/0Yf+FKzh3OJqCI8njU7TFTbOWawj44U++6dzcZ2+/DIEoi+7hII9f3yL90wKrePAyCr/BfsqvSxxDyX3yXGv2uokBZ11Qq2d9u2PePTy6P+dmX0jmStiOeHfV/lG2fCH3dM0N1oVhN1qlkkLZ+eMQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=DJIRWssy; arc=none smtp.client-ip=209.85.218.43 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="DJIRWssy" Received: by mail-ej1-f43.google.com with SMTP id a640c23a62f3a-a9a0ef5179dso969550966b.1 for ; Wed, 23 Oct 2024 04:34:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1729683250; x=1730288050; darn=vger.kernel.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=lRYAOn92MElnY+r7ZLHmtJJWBk1GGo3GQl/0Duq+UXc=; b=DJIRWssy3zTQp1JqsLrgNfkgD4mRkElqY/XLkyJa9qBJaR/ka4OEkwVBgUecB39vS6 On4K7DiMJgOKXZp45mloJS1EIaxDmQRJnGtYiIcJaYI7IdvSahVOHKbyGEvnyJjGiKRE iygkC4t5pJhqyK7ce466CH4b47NBqqEk6TdyCBEBCdrQ1JiI1Yj8b+U+B2a1I3QIQrxC qrC/KPGtNmhwH3h852GFI/oX/2HI0uX/yEqJdUb1buhLppbrJm03emL4UFM5ypAjfbRq I9VvIUU+zKtY36nIPmSuDyp9FmOeZ7QwIRVglKdf8ILRB5WWxrAi7qXrzhmifkoeeFdr TCKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729683250; x=1730288050; 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=lRYAOn92MElnY+r7ZLHmtJJWBk1GGo3GQl/0Duq+UXc=; b=J/gtZCrVB21U/uAoJeMMETGCV2MQPuAwJO4cOkIkIVLKdrXNoogwdFw1nz4QbR7U14 dp+p55Wq9adtFUdaDid/GUh9Myl9GluB4kL+Oi3W+UmzsVgWO2MtwtMqBJ7NJdiZ5EQe ojeZpTum2OpOq7nTkMKxoS2uE6eg/l+tIMPT0Tzn8Sa4ZEYQJgw0TMCHgbbGmV4KXTCy gL21WpVHqFeEjIPXXmFUFSkc4jbQ7SvHyutVjgshvObI9NIpC5pCd30au7ImhSe/sA8W LxK1jokcKGTcuw18CbyfzUvwOIO+Jo6w60p5rot8G6/oSLQcTx+AOgJMpo9FEC9P3sra ltNg== X-Forwarded-Encrypted: i=1; AJvYcCX0vseU7kQqa8ZyOpUdj8HnPl1LxXfOJC4FZtjkWw81LJY/jovkLq3Oy5zM3hf3DQn9vVQ=@vger.kernel.org X-Gm-Message-State: AOJu0Yy6WIqwKXi9KFKIx9IrPp6TrNYZRAn2L808nh8PWubS1s5XEgVB SoNho3lPM491sGjsiIGqQhkCGo1I6MMbV0u6POZboIfcaFBCFJjrG3A3Kua5BBg= X-Google-Smtp-Source: AGHT+IG9ed8D/XA3RQ+vEybFyxLY6xveuq9hk50ZZpmXX0BS0cBlAFS0roggteE+iw+87DvUNNlLRQ== X-Received: by 2002:a17:907:7291:b0:a9a:9ab:6233 with SMTP id a640c23a62f3a-a9abf8a7feemr201487366b.34.1729683250497; Wed, 23 Oct 2024 04:34:10 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a9a912d62e4sm461595266b.7.2024.10.23.04.34.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Oct 2024 04:34:07 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 283C55F8B5; Wed, 23 Oct 2024 12:34:07 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Zhao Liu , Eduardo Habkost , Pierrick Bouvier , Peter Maydell , Yanan Wang , John Snow , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , devel@lists.libvirt.org, Marcelo Tosatti , Riku Voipio , Wainer dos Santos Moschetta , Marcel Apfelbaum , Paolo Bonzini , Mahmoud Mandour , Laurent Vivier , Jiaxun Yang , "Edgar E. Iglesias" , Richard Henderson , Alexandre Iooss , qemu-arm@nongnu.org, =?utf-8?q?Daniel_?= =?utf-8?q?P=2E_Berrang=C3=A9?= , =?utf-8?q?Marc-Andr?= =?utf-8?q?=C3=A9_Lureau?= , Cleber Rosa , kvm@vger.kernel.org, Beraldo Leal , Thomas Huth , =?utf-8?q?Alex_Benn=C3=A9e?= Subject: [PATCH v3 02/18] tests/docker: add NOFETCH env variable for testing Date: Wed, 23 Oct 2024 12:33:50 +0100 Message-Id: <20241023113406.1284676-3-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241023113406.1284676-1-alex.bennee@linaro.org> References: <20241023113406.1284676-1-alex.bennee@linaro.org> Precedence: bulk X-Mailing-List: kvm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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. Message-Id: <20241022105614.839199-3-alex.bennee@linaro.org> Reviewed-by: Pierrick Bouvier Signed-off-by: Alex Bennée --- 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 Wed Oct 23 11:33:51 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: 13846944 Received: from mail-ed1-f46.google.com (mail-ed1-f46.google.com [209.85.208.46]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AD1591AB6DC for ; Wed, 23 Oct 2024 11:34:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.46 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729683252; cv=none; b=uJfkD+xFSXiY95LEnRyCiaMZY+H59TfrfEDo1ae/bfXXVzDIbine7W25jqd6K1t0oSQBZQRTD0MUp/MZLIABJbNqxsTDgOWeeadm8qtT2vPrlAgtd1YzP0T4H2TTNBsbrM/pTRexLV5L7IoFOPLlPhJPjwPPjHB/wYT/ZUQChXQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729683252; c=relaxed/simple; bh=zjcSPJ91yLJKzP0GqRiEilkRLEXVKDFuC9XjWvrKC54=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version:Content-Type; b=RoH/uTE7H4R0HqU3Bz2C/MD62fB2zZNHErI1xhA4PmCaIA/O+1TlmH2p6t4+1raHcvPf0o1IjwfDyWh7BVybYry4A/OnJkCD2aUSt0p+rC8VAE6+vIcDbwZ22kEtf5qXCQBeuEKEpebcBgFyxzjW1p29U0u35GAcZsBbAxOlfAA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=ehbIbJqm; arc=none smtp.client-ip=209.85.208.46 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="ehbIbJqm" Received: by mail-ed1-f46.google.com with SMTP id 4fb4d7f45d1cf-5c948c41edeso7512556a12.1 for ; Wed, 23 Oct 2024 04:34:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1729683249; x=1730288049; darn=vger.kernel.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=ZFUfe3R/gzmi/FEpNAJD4C8KljhahEoI2QawPam7H0s=; b=ehbIbJqmQY7kw43VOOMTHds1etgNHJtov6xAfv5RFINSBYsLC/nY/PWUvw9IC8Dt56 cPMZzD48KJsK3kityS1QzoZQadyj6VN5kU1BGVfmTZ0SrsOSuih5aqt8Uwhz+VjnKdHE rQfLiIYvud4gO0r8XIQpIMmwpzpAqM/9bva0uI7g2SmWCWP8M0lvw5kmkN10BzcFf+di 9fNfeLTdKYs88bfCQxXu7PH+DPFOpBhU77NTSm8y6C/opsp1/XtN/FKqmtIHIRLd+vpd tUqdPp74D/Qo0tUBtDqWVqLawd+KhEAkMulf5q+tPyKAk8DqTtpjLmO8EWr5loOJBsh6 H/XA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729683249; x=1730288049; 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=ZFUfe3R/gzmi/FEpNAJD4C8KljhahEoI2QawPam7H0s=; b=uB7zcj1fQUU6BEyTTEfuY0A57uK6CdfF+gQCxVHNXAbmcxBoRXvuPvuvyRmpdtSHpA XabEZgr0g2q5pKbeuVRNJPBV1xeAIaBZPgxKYhetQAorYDUe2Nw2ujeqHGJneN/+oDVC E3i9NgXhIBe3wHJW7Gt0ww7XEssFv7+Pvj2El8abLl2S+fcvXV6nOapjbs4Nno8Fg8eT nQh8M9QYdSuZgzkT92l/kXlG+gLU0yl16axSQ/WikdWK9z0sTnUVXxVSI29jAsSj4Oq8 1r5kNaZ9vE/ydelgaeNxpj3Cb3zyJ5q9MhZ0x7PkFOZzy3KoVF9AZodRKGYWiZ8x5SeY Gj5Q== X-Forwarded-Encrypted: i=1; AJvYcCXGXPlguYfwD9yI6vtBViX4w9aI12OfzFS2elp3ADMvCtB981pVW8yN1tW8IbwduWFXvvE=@vger.kernel.org X-Gm-Message-State: AOJu0YyJVV4DykOVN2JILrqqglaD94R481bZipHwXRgrC9FlzKq+uhEH JmKffmwxS/m7A0bI7VsXWbkb0JhMU1knAgbPQDuh5DsEinkDWwiXFh4tm8BbdDQ= X-Google-Smtp-Source: AGHT+IEqCO9Z86Wc/aD7cMGoDZdsv2MH3Z+EHGDa18MN1P+gR4QtHe2kA90fKoFdnetpV6XOEyKMNg== X-Received: by 2002:a05:6402:2791:b0:5cb:666e:9f8c with SMTP id 4fb4d7f45d1cf-5cb8af97d8bmr1943092a12.32.1729683248995; Wed, 23 Oct 2024 04:34:08 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5cb66a65451sm4275667a12.27.2024.10.23.04.34.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Oct 2024 04:34:07 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 3EC7A5F8CC; Wed, 23 Oct 2024 12:34:07 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Zhao Liu , Eduardo Habkost , Pierrick Bouvier , Peter Maydell , Yanan Wang , John Snow , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , devel@lists.libvirt.org, Marcelo Tosatti , Riku Voipio , Wainer dos Santos Moschetta , Marcel Apfelbaum , Paolo Bonzini , Mahmoud Mandour , Laurent Vivier , Jiaxun Yang , "Edgar E. Iglesias" , Richard Henderson , Alexandre Iooss , qemu-arm@nongnu.org, =?utf-8?q?Daniel_?= =?utf-8?q?P=2E_Berrang=C3=A9?= , =?utf-8?q?Marc-Andr?= =?utf-8?q?=C3=A9_Lureau?= , Cleber Rosa , kvm@vger.kernel.org, Beraldo Leal , Thomas Huth , =?utf-8?q?Alex_Benn=C3=A9e?= Subject: [PATCH v3 03/18] MAINTAINERS: mention my testing/next tree Date: Wed, 23 Oct 2024 12:33:51 +0100 Message-Id: <20241023113406.1284676-4-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241023113406.1284676-1-alex.bennee@linaro.org> References: <20241023113406.1284676-1-alex.bennee@linaro.org> Precedence: bulk X-Mailing-List: kvm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 I put it under my name as there may be other maintainer testing trees as well. Message-Id: <20241022105614.839199-4-alex.bennee@linaro.org> Reviewed-by: Thomas Huth Signed-off-by: Alex Bennée --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index c3bfa132fd..ef1678a1a8 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -4080,6 +4080,7 @@ Build and test automation ------------------------- Build and test automation, general continuous integration M: Alex Bennée +T: git https://gitlab.com/stsquad/qemu testing/next M: Philippe Mathieu-Daudé M: Thomas Huth R: Wainer dos Santos Moschetta From patchwork Wed Oct 23 11:33:52 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: 13846946 Received: from mail-ej1-f43.google.com (mail-ej1-f43.google.com [209.85.218.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9AF011ABEA0 for ; Wed, 23 Oct 2024 11:34:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.43 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729683254; cv=none; b=P4ab+L1vE4IVcoRinzt3/AxZQU7iv78fC9FWufg77pE+VJb00JECrvLaC0oUe5AOcKXH7dnmnkSzHFJIe5RixP8k1Tyb/kuedHMltLY1ffTMbY8HTUYFKz/YrySUc1m++ngFfW6YeP9GrKYbmRifFhAqD8G3JOYyq/POQBaMpdQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729683254; c=relaxed/simple; bh=dycqCm1NPayXEmQsWH/9aZ0ifAR2NBSL9Ke2mXMrvic=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version:Content-Type; b=GzIny1DpoMZ568ntragsrDw+K/AtJD+uwmHwdDIn0/zPjkBLPG3k0CHuuOfGfmrZvcW2+DqaJDROlnsdpB+7KLt6T5k7uJPUVawdj+OU+/clcAkL/zsX36RfA54JKV4ZgfgBinr6o4urAhdxzLFFsqT8+w/PlHJthas9Ep4ypGk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=IYYHbcCF; arc=none smtp.client-ip=209.85.218.43 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="IYYHbcCF" Received: by mail-ej1-f43.google.com with SMTP id a640c23a62f3a-a9a0cee600aso830277466b.1 for ; Wed, 23 Oct 2024 04:34:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1729683251; x=1730288051; darn=vger.kernel.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=IYYHbcCFwhuW49RZAF89pNnyGucFgecMVsXm0JeeMGTg7VRgPArjV98CErJg7DGZT2 6weDmPOwoGj5s1L0pu6b4P0m+EK9lFfbW8/ulSCSqm50ri2VmivDsRYJpsh8DOfOKR1o jeYjT4GQ+aThnHE3V71DbIYq5M9rIN1zX5gcWUdLF72XwhbP4tYoZ7ncnZOYIgExtr6G WglfC5wtPgTdrEphltlPoTRhi3ZojUnIytdKbaYAn7+EGlitr+AkubcGaNlh6B4UwelO EUoZyyc0XLPGyEFR8sBYtjSi7n4WigXV42nmN/0HrakgI+ZLJHXccwbH2dpUS1EQTrAd L9nA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729683251; x=1730288051; 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=ds38LBnNQ7nqZ3kztpMvM1ThTcgLOvx+aTGxi/XfUW33BDHC5b6jxV4lKZp1r6y3wU rZ3dmnBoSGa/QtfMU8OX2QaiZSmA5gn+NadtPjRJOpK3v25Tw8aurhaE78DrlmC2lbUj YNhm8+Dm43yUA2dCTv15MLt5xXq45eJ9pUIewfeV6G/hFsGaxuy9ovzZ6ujOTh62cQQR KuocfWVIdQwR+0mXsfNMMSFXclJQTcvA8FqBXb6M09O+zbj/n64JJZKIV+o2TGBLBQnw jvES6mw/M3LlGhIZC4VMjxiPHPoH2DlBDCHLpWR/wFltVr/pNBd56aKpRe3Buq5hzU1S Cvng== X-Forwarded-Encrypted: i=1; AJvYcCWJHmXYGPgr6HdPKzhfHcXLTBH+DQbV1n25IUH3ZwMdIyhUE3I1P1d1j4oXNDprKHV2rrg=@vger.kernel.org X-Gm-Message-State: AOJu0YwboqJKsVsWYobtXvix45kkC9h7RybJsyUlHMgDzPJN5gVO9w/1 06yAX1tDqMiZXeq+Y0UF7eQLOmIRreu0JLJbNMqpLDJN/1Mfvpy4bCZFbKhsQhY= X-Google-Smtp-Source: AGHT+IHwbt07id+3Aor1n1Uw1SIwY71B+kw6O/tu5t2PwERx5fCQ43YmiWLOmkaJNzRIJ+hnNpC7YQ== X-Received: by 2002:a17:907:9496:b0:a9a:1bb4:800c with SMTP id a640c23a62f3a-a9abf85caf5mr187274866b.4.1729683250848; Wed, 23 Oct 2024 04:34:10 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a9acad2eeabsm12746666b.20.2024.10.23.04.34.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Oct 2024 04:34:08 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 570455F8D7; Wed, 23 Oct 2024 12:34:07 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Zhao Liu , Eduardo Habkost , Pierrick Bouvier , Peter Maydell , Yanan Wang , John Snow , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , devel@lists.libvirt.org, Marcelo Tosatti , Riku Voipio , Wainer dos Santos Moschetta , Marcel Apfelbaum , Paolo Bonzini , Mahmoud Mandour , Laurent Vivier , Jiaxun Yang , "Edgar E. Iglesias" , Richard Henderson , Alexandre Iooss , qemu-arm@nongnu.org, =?utf-8?q?Daniel_?= =?utf-8?q?P=2E_Berrang=C3=A9?= , =?utf-8?q?Marc-Andr?= =?utf-8?q?=C3=A9_Lureau?= , Cleber Rosa , kvm@vger.kernel.org, Beraldo Leal , Thomas Huth , =?utf-8?q?Alex_Benn=C3=A9e?= Subject: [PATCH v3 04/18] meson: hide tsan related warnings Date: Wed, 23 Oct 2024 12:33:52 +0100 Message-Id: <20241023113406.1284676-5-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241023113406.1284676-1-alex.bennee@linaro.org> References: <20241023113406.1284676-1-alex.bennee@linaro.org> Precedence: bulk X-Mailing-List: kvm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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 Wed Oct 23 11:33:53 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: 13846949 Received: from mail-ed1-f45.google.com (mail-ed1-f45.google.com [209.85.208.45]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 169A41AAE33 for ; Wed, 23 Oct 2024 11:34:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.45 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729683256; cv=none; b=YrZuddC2Fl72yAKTQzlsmtw7avttmkivOjssP/wG73B8wuJNJPYd9fagqER/IDB6ua0kQorIgUz7lv7p4gF7NDHOqK4lMcgSaEWtvTOqDNtmlU8MD1lKU4GlHyKR48RQGSDEBhhNsu4Rnef/WDlxBG5SPJDic/HXB+IqBTV6uZc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729683256; c=relaxed/simple; bh=rPqdeMZHjsIWZRK4nVVQap0ga9cDd7eG9O38cGJ5E8o=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version:Content-Type; b=Z+xeukeWW/JJx0fagX3jX/gPqiFctvlFMtPsXapi0FpEd6+ri9/EXII1vH2cNAj8odbHrZqNa5GGPYuOkGEUYow4g4YL+X2c0K7n8uAJZWBqxxlxLrUvj0594aPfSQKuGUQ+rvjfdYYbSApp5KzCG92sThCcKhu7FnwDZvSEkzA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=fRGqM80f; arc=none smtp.client-ip=209.85.208.45 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="fRGqM80f" Received: by mail-ed1-f45.google.com with SMTP id 4fb4d7f45d1cf-5c9709c9b0cso8749033a12.1 for ; Wed, 23 Oct 2024 04:34:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1729683253; x=1730288053; darn=vger.kernel.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=fRGqM80fc6dMIsc1MGECmY6NKgN7vfd+YUICLC//MWg+/KXXRA251W9HlVh9PVuJ4o 6Woh6qpll14alAkQHbeu5YBhJBcU/MXsvsKJ5jXnbaPzz1xbHOhVwwkOJYgLDBUbLXdx GPCxC8vKPyPx80/HldiAnkUb/LduID3ik1RtXLMwb55c2TjXlv/X0ougoFkm1dqIMM2I 3COUmTkA2w3QnL77qR3abgwtqlyElyrTvXDvGUpv9Y6W1BVnNVk2R2S8smewfyYkppuS +msGIgH4dZAKC6fQgSEj2G3QDVPMX3Mgofx8IXHgNCdVAxT+6RRI7uUT5U06dn2SemgT IWPg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729683253; x=1730288053; 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=LkqlPFzeJaSHfHlHxOf+7e8DNpxoWbk9MSqBZpJHjiLWMKtBQ1iUKQztfkjzkaK09C trRd+CXmEf3QGXG9DQS5XZcf3CwSXWwkqyR/cGjEt7P+qwInkgW0l3m4AafY2hmTiQOg 3D8UtBKAODqUKiAzGpE7ljjZLlHnTHqi/ZXybeWnjVdI4kTJrhWCVDmEczBt6PM5iL/z 7Yd7q5U2YR9OOClZtLILqIxsd6ckR5vapDySDdPCYUKVQ6arsPTuFBNi2o+TOYzLtxcR PwR5X88GkayOv2eq9iX3ddvhW4jtxN9klIMXS1TW4aviieq3MI4vG2O4EKr+dl/od9qh +/Xw== X-Forwarded-Encrypted: i=1; AJvYcCWPVrp3EQKWHjKorGJWpiLAb7lZe6S3NizAaV3Nc5uPuaKHnOnR7tTUzDbE9QZPSqQL8is=@vger.kernel.org X-Gm-Message-State: AOJu0YwDBYby/p4Ra3PKKNLZda0Q1/LiV73QHQTzO19qP5Jca6mLe7zR ZS1MgIcPAon4vQTPDhltlDGUES9bZLPtkN0VM2FSMGGmFaK2DGhnkNRXMtMVeno= X-Google-Smtp-Source: AGHT+IFA0UaPGC8xcZ4LXhrZOMA5j/aP5IXRqvhXDz6QfMISSlPCIVK4HHHGWxBkVlt2kvmppngmEw== X-Received: by 2002:a05:6402:1955:b0:5cb:6718:7326 with SMTP id 4fb4d7f45d1cf-5cb8ad0734cmr1936187a12.21.1729683253220; Wed, 23 Oct 2024 04:34:13 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5cb66a654b9sm4351143a12.34.2024.10.23.04.34.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Oct 2024 04:34:10 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 6C4CE5F913; Wed, 23 Oct 2024 12:34:07 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Zhao Liu , Eduardo Habkost , Pierrick Bouvier , Peter Maydell , Yanan Wang , John Snow , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , devel@lists.libvirt.org, Marcelo Tosatti , Riku Voipio , Wainer dos Santos Moschetta , Marcel Apfelbaum , Paolo Bonzini , Mahmoud Mandour , Laurent Vivier , Jiaxun Yang , "Edgar E. Iglesias" , Richard Henderson , Alexandre Iooss , qemu-arm@nongnu.org, =?utf-8?q?Daniel_?= =?utf-8?q?P=2E_Berrang=C3=A9?= , =?utf-8?q?Marc-Andr?= =?utf-8?q?=C3=A9_Lureau?= , Cleber Rosa , kvm@vger.kernel.org, Beraldo Leal , Thomas Huth , =?utf-8?q?Alex_Benn=C3=A9e?= Subject: [PATCH v3 05/18] docs/devel: update tsan build documentation Date: Wed, 23 Oct 2024 12:33:53 +0100 Message-Id: <20241023113406.1284676-6-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241023113406.1284676-1-alex.bennee@linaro.org> References: <20241023113406.1284676-1-alex.bennee@linaro.org> Precedence: bulk X-Mailing-List: kvm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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 Wed Oct 23 11:33:54 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: 13846952 Received: from mail-ej1-f42.google.com (mail-ej1-f42.google.com [209.85.218.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A76191B372C for ; Wed, 23 Oct 2024 11:34:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.42 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729683259; cv=none; b=ahKNKd6LW3Jep9IX/7ioW3fBErcdyuftD1bwev83z3bWCSchJBrRnQGDAtCPHJM2f8APSYcAIWD15+cMsDY62wyYOTKjy+u3pk7e1oo432We/ijKWYnNl/ZRQwgrKYdinTzDShPqJHlydR/1kVRRJ2ArPa0bn5IEUuNVFeOHuNs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729683259; c=relaxed/simple; bh=Q5mzuGLqF37xBsfrxu2F605v7jw6CLbKILyEGO55HYQ=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version:Content-Type; b=KZ5Mvd1UTzdetRzBkqAUjM9NTvTmRh127o1+XRXoTIxmywU1R0kp5zfuQmyTFkw3UvTTaGBIn1Wde5KU3HA7o1KFqM4epa3nG6tAlEfVYUhzByetRLY6G5aufJUdKMZ2ixfNOyXoEEhRDpZ+SnC+ngDHOYjdTtb6STAuH1ROXq8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=d14wI9yK; arc=none smtp.client-ip=209.85.218.42 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="d14wI9yK" Received: by mail-ej1-f42.google.com with SMTP id a640c23a62f3a-a9a1b71d7ffso1044094466b.1 for ; Wed, 23 Oct 2024 04:34:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1729683256; x=1730288056; darn=vger.kernel.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=F14s2fuGgke3fc+cUXWbJXkLt5Skh4xTYd/t6sQdYbY=; b=d14wI9yKloexMaEaV6CPoWpN0pSxuPdkxMNRtXtveuQXSxmBini9D+90jY/AK93Riw GNNX5PKwsaRvxmk0BvPZaNmWPVR6pPXkRfVDpkao4dQkhoHECBBq+VOK+FPy2Dsx6HRS 3NaK7pbTHGgPbJFuTMI2ZH6t2njM/qyCWh2ujgw6m3NJhtXtck7Fa0WH8+JkDoz6gTaD 9Wsn+czPNW4JdmQcAx58ARhbY/CCCBta7SvbBc9jXY+lHZUhU4rlKyhW2IbZTvMMZli3 w4ESvJmoSqjerGy/0w3i+Z5bfjxB+Fk9P7J5GEyRJSeWVMtmsZJb9vWWT7aKjv8rFNcj nHug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729683256; x=1730288056; 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=F14s2fuGgke3fc+cUXWbJXkLt5Skh4xTYd/t6sQdYbY=; b=saUEmLhcul8/k8AFip8YdKALYPTNya+sJZ14DxYaWkyhFflktacLWklTv/1QV2xpvi jI5y8khkXTN5/XhC3qpJEDp567Hd2SEhxyXoHOvUUFJQVewywv+oZx2BODv57Bls01I6 x706nEz3EpvIN8l5Sv08fEvZ+VkgneemAPQ+dLfwY4u1GeGKWV+GKB0wzPYKWKqCd6GK +sTSJRIqJgWZ+rcC9hnVG1cCkYNv4zDLe/34dx8o5henNl9i2IpDeNGui6U+nDCv1Y9q 0vLn22amqPiBffl9XxRqJm2inuk0yCYCjUeQYROOdmIfTG+4MPzNR2tE98ni941g4ktO 8nkQ== X-Forwarded-Encrypted: i=1; AJvYcCXKnBrG10SRx6yeXALkU54MOcfIIb/qutyUYVCpF482fhx60Yf9kH/sCPOW1aLw4UddQ68=@vger.kernel.org X-Gm-Message-State: AOJu0YyUZQTuNBrX9IR8oFL2Oyfl63E9NywGiTEVOjXfWm3vdxTBPv1U Q3gnXi/3zLx6j2Mwop5riJB4Zal995Hp6XoZKJf2dUAae3gvsV5g7L6T0MUhNPE= X-Google-Smtp-Source: AGHT+IGGBc55QM3qFCMBExtGsk6ICJf3Ug5DueFxLCCWUUU5RTVe6iZgYe//4a3K0VY6A0U2IduvZw== X-Received: by 2002:a17:907:97cb:b0:a99:fff3:2eb0 with SMTP id a640c23a62f3a-a9abf92cf40mr200716666b.40.1729683256020; Wed, 23 Oct 2024 04:34:16 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a9a91559f15sm463603866b.133.2024.10.23.04.34.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Oct 2024 04:34:10 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 84B6C5F925; Wed, 23 Oct 2024 12:34:07 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Zhao Liu , Eduardo Habkost , Pierrick Bouvier , Peter Maydell , Yanan Wang , John Snow , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , devel@lists.libvirt.org, Marcelo Tosatti , Riku Voipio , Wainer dos Santos Moschetta , Marcel Apfelbaum , Paolo Bonzini , Mahmoud Mandour , Laurent Vivier , Jiaxun Yang , "Edgar E. Iglesias" , Richard Henderson , Alexandre Iooss , qemu-arm@nongnu.org, =?utf-8?q?Daniel_?= =?utf-8?q?P=2E_Berrang=C3=A9?= , =?utf-8?q?Marc-Andr?= =?utf-8?q?=C3=A9_Lureau?= , Cleber Rosa , kvm@vger.kernel.org, Beraldo Leal , Thomas Huth , =?utf-8?q?Alex_Benn=C3=A9e?= Subject: [PATCH v3 06/18] scripts/ci: remove architecture checks for build-environment updates Date: Wed, 23 Oct 2024 12:33:54 +0100 Message-Id: <20241023113406.1284676-7-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241023113406.1284676-1-alex.bennee@linaro.org> References: <20241023113406.1284676-1-alex.bennee@linaro.org> Precedence: bulk X-Mailing-List: kvm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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. Message-Id: <20241022105614.839199-7-alex.bennee@linaro.org> Reviewed-by: Pierrick Bouvier Signed-off-by: Alex Bennée --- 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 Wed Oct 23 11:33: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: 13846950 Received: from mail-ed1-f48.google.com (mail-ed1-f48.google.com [209.85.208.48]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E39361ADFF1 for ; Wed, 23 Oct 2024 11:34:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.48 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729683257; cv=none; b=LYkQEDsMmLHhqQP3zRDWuox0uZj0CEp62aM8pGe9hsKcTFLj6LpNsa1PxKdLqUZL/WVjRucfK0mQs+aZw3xW2b7B82tMi5bbdpAazuxYy4h7yblvTkZXZW2FvLxVNMq3ITbwBRRjb5JyxmTFSQzEKGo7B6McjAFsjyeH2x9TZ/0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729683257; c=relaxed/simple; bh=QWG9ZhP11lz8vpu7KdovjodYfeghGXgM0FmoYGZiK7c=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version:Content-Type; b=OL4PGNqV9y14pHALO+HgkvDpsblx6Wg7EMROm/8Pe6Jrprp6pjNil+AuRVdcmjk3iV0Tgfuk2/J+SWzZ4tdYjmDThVLCcPFeuQ/UMJEAfnVBwWflLfNxVynArB0b7AMzJijk9IFKmngLSrqhvqV6AguXAVZcrVt6COKzOm8ONSQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=K1cwdy5X; arc=none smtp.client-ip=209.85.208.48 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="K1cwdy5X" Received: by mail-ed1-f48.google.com with SMTP id 4fb4d7f45d1cf-5c962c3e97dso8032481a12.0 for ; Wed, 23 Oct 2024 04:34:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1729683254; x=1730288054; darn=vger.kernel.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=mXxgum5YZeyhem1wJIKkI9XyHJDK2HstmvwMGCvFrKs=; b=K1cwdy5X88RCUZzad8upmcUW5oqrJGzzaoW0exdosF5bFgUKCIHZcn/KJpZ/UCQ+9d 5ygIROaefyEIs8C8d9gwHsNBzgPoAM0FKvsssRmCBPgv7qjyumlGkkLB8r0Vvg5i/I8o b5yfO2Jfbn12+0rqJpfn7S/ml7QwPQG2zWCADTCeW3zuydeOzGGk5fc6L4p5y2pvKUDQ ClEnZ0+hiBjpPBU+QCxtCyc1RQilSH34QlaFMBrYGGOIvoF3mo44fp/O55DWBlkpDrYz kkLi/9i9KSsSR+0/11tQtOziyyafTKlK3JopyLZjBO6Jqjt76IHncm9NncZ+ZLXwsyL2 VWrQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729683254; x=1730288054; 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=mXxgum5YZeyhem1wJIKkI9XyHJDK2HstmvwMGCvFrKs=; b=tEFSZHo4UKNVevxJ+gVxQXB0+IH5TAf3PhiHPvDNRkcLv/UgfBJTY+UwpkGmFxvIYw SAiypDMJmPn8IsxSTd3U3n2UK8cmTMvXB4HjOvacaRBg3DOGFBuCh+z/pc3o4zJBDCvY uwj9pPgRnUetIQ37iwOc8u+wYutgDmo7oHXELtTXw2RTJenEbolRade6fCRbp03uGREd NCfaEEFKxb5K5Hg/SnKNDy2JidVaiNeNblf9YYf+RbPGqFLWiBImJFpnj803Jlzdy7fU pdwAEeouw2GVukaTfeGSv3oilOKY3I87mS9j89VgDttPJ78w0ujyEjdDwDKUPMUYkqNB aHWg== X-Forwarded-Encrypted: i=1; AJvYcCUtY0ZHRquj850JUH1F3lTEMXjUBV0uvIp0N0yZvC+39duK8b+mUbtQLgsH2Pm0fFmB0As=@vger.kernel.org X-Gm-Message-State: AOJu0YxhlBDKf1okQR+AxleIhI3x5ag7UfBBOUCBmzPHC6cyM0NBpoy1 1os2fEBGAFVKR6egfe+Kpf00bqVufN/wJ1NA/OFNnjHWm3hTFb2elUdi+EebVyw= X-Google-Smtp-Source: AGHT+IHRTit0g8/bbhEgsxdoStcLwtJwEj0lmJnkwGZ6qbwUYTq1iGytPFaoHqieRWzS0F839R+7jA== X-Received: by 2002:a05:6402:2186:b0:5ca:d533:1c7b with SMTP id 4fb4d7f45d1cf-5cb8af6c62bmr2323197a12.28.1729683254182; Wed, 23 Oct 2024 04:34:14 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5cb66a654a2sm4338458a12.38.2024.10.23.04.34.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Oct 2024 04:34:10 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 9C8B75F92E; Wed, 23 Oct 2024 12:34:07 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Zhao Liu , Eduardo Habkost , Pierrick Bouvier , Peter Maydell , Yanan Wang , John Snow , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , devel@lists.libvirt.org, Marcelo Tosatti , Riku Voipio , Wainer dos Santos Moschetta , Marcel Apfelbaum , Paolo Bonzini , Mahmoud Mandour , Laurent Vivier , Jiaxun Yang , "Edgar E. Iglesias" , Richard Henderson , Alexandre Iooss , qemu-arm@nongnu.org, =?utf-8?q?Daniel_?= =?utf-8?q?P=2E_Berrang=C3=A9?= , =?utf-8?q?Marc-Andr?= =?utf-8?q?=C3=A9_Lureau?= , Cleber Rosa , kvm@vger.kernel.org, Beraldo Leal , Thomas Huth , =?utf-8?q?Alex_Benn=C3=A9e?= , Ilya Leoshkevich Subject: [PATCH v3 07/18] tests/tcg/x86_64: Add cross-modifying code test Date: Wed, 23 Oct 2024 12:33:55 +0100 Message-Id: <20241023113406.1284676-8-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241023113406.1284676-1-alex.bennee@linaro.org> References: <20241023113406.1284676-1-alex.bennee@linaro.org> Precedence: bulk X-Mailing-List: kvm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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 Reviewed-by: Pierrick Bouvier Message-Id: <20241022105614.839199-8-alex.bennee@linaro.org> Message-Id: <20241001150617.9977-1-iii@linux.ibm.com> Signed-off-by: Alex Bennée --- 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 Wed Oct 23 11:33: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: 13846951 Received: from mail-ej1-f43.google.com (mail-ej1-f43.google.com [209.85.218.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 455651AE01E for ; Wed, 23 Oct 2024 11:34:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.43 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729683259; cv=none; b=J4J4ekf3uR+tT6NMKxg0WzHqsknBnQaUH97tAIB21ULK3/U/VhpHAizT/2fB/gisvYI2YlIrGiULRdQXtmcOFAmQuD314GAug/V+DXFav8EvJldLU8PLmKsbDBIIC43hh/JUnbT0USpAo8FVKxCfYQ5AE/syVaWUN1DN5jGH24g= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729683259; c=relaxed/simple; bh=k4DUf5ld0t+Rj337VJF2t4M25SBJ9Xw6VHcscakA8eI=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version:Content-Type; b=VaOZQjQuusJ3J3NxZsAvhvDAKFXGkujoZgszvYHXwZa64JdiS3frM1ULNtlnaMvx4lauaPspiNLUOvqN6vYbYZy1Eec1+hEnPf+w0g0ofD+jDfBialpnH03VuW2uJz6jI+BJul7exGcQwxjvnH38Kwg/KRbLFbcNWGTQYz7SnJQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=ksSI1D43; arc=none smtp.client-ip=209.85.218.43 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="ksSI1D43" Received: by mail-ej1-f43.google.com with SMTP id a640c23a62f3a-a998a5ca499so830411866b.0 for ; Wed, 23 Oct 2024 04:34:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1729683256; x=1730288056; darn=vger.kernel.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=ksSI1D43w94dfU43YCU6HTO4Bxj7sRg5m0rt+55yFNnDUB78C6cgzHyAM/w9zv7tAj UG+StpTO8ZazuksxxyNVj5fqadSHn4vB+LcswbfufrB8VzOLqLJVKVqa817tUI1k8C1+ NPwJR3WelTCkpzSS039CS1O5DSVdrDr+Fvuu/Gss+bEVXdVPmJCZXF7WK4VrcsmaDqKL A0xv5Z077vjszJcgbioO3SEQc0B1WHpiY2UXYnZWslEV+swxWxBp8L1RUTsHjE0qONLb +K+H4UOh/j35WOgf6AnPY04AVl+mdjDYZbKiR4KUsmQbhhWID2lYJTwnXbRVmMj9gqgG H0ug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729683256; x=1730288056; 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=L9jA4qphfFJFl4TbcHg7oSRosSRR9WbwEIvTyo0D99XYsN3t9FEIxbXEAqPfwpIzdO qAcOh7i+w3GiDrKPSwCNwOgCdGBibtDJ898YSoPd647eFGpGJKv1rFCfcC+PA19ftQHj 1lKpABSkXFz9opIawdCeeKkYXWn/U7yT+1fYvLVOfs++1RU6ZpTIyAv6+BfRex3UVdb0 2jmQI+/WXaOFuAjYg6vwbIfKqy4LLqC2mGvoAWlhRuorrfHnB7nkj9KehQ0ppcc9odFM hRXJcLd4SMd7zh6El3TVWxsPa5Nqi+esHZodxjyZUM152yKjF6JPYsLhj8HNxHANaJ2K 19YA== X-Forwarded-Encrypted: i=1; AJvYcCVOmUmKmidkWVIkEyKS12EinkP6xeQJifjIgTcYOEl18IUddYtKRV5pbVO2rapOmQkg54c=@vger.kernel.org X-Gm-Message-State: AOJu0YztO0BeiDhGAhHXx8EjTmwdVIMNGgXELCgBWhGqEv98rzColRLo A8BK5Q3n8FmYa1FJNDMQc+IFXd4nFLUGSqea9cnDrKDLk9jb86NXaObNqaKiMII= X-Google-Smtp-Source: AGHT+IGQ8eNDG4hvQQMgEDKqe0AnFuHG96cp2iQINzDD7TQGbtAzIgC/b75CNykQdz9lIW4fA7WJ8w== X-Received: by 2002:a17:907:9496:b0:a99:46dd:f397 with SMTP id a640c23a62f3a-a9abf96f1f5mr184448566b.64.1729683255674; Wed, 23 Oct 2024 04:34:15 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a9a912ed80fsm463139066b.46.2024.10.23.04.34.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Oct 2024 04:34:10 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id B61D85F942; Wed, 23 Oct 2024 12:34:07 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Zhao Liu , Eduardo Habkost , Pierrick Bouvier , Peter Maydell , Yanan Wang , John Snow , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , devel@lists.libvirt.org, Marcelo Tosatti , Riku Voipio , Wainer dos Santos Moschetta , Marcel Apfelbaum , Paolo Bonzini , Mahmoud Mandour , Laurent Vivier , Jiaxun Yang , "Edgar E. Iglesias" , Richard Henderson , Alexandre Iooss , qemu-arm@nongnu.org, =?utf-8?q?Daniel_?= =?utf-8?q?P=2E_Berrang=C3=A9?= , =?utf-8?q?Marc-Andr?= =?utf-8?q?=C3=A9_Lureau?= , Cleber Rosa , kvm@vger.kernel.org, Beraldo Leal , Thomas Huth , =?utf-8?q?Alex_Benn=C3=A9e?= Subject: [PATCH v3 08/18] accel/tcg: add tracepoints for cpu_loop_exit_atomic Date: Wed, 23 Oct 2024 12:33:56 +0100 Message-Id: <20241023113406.1284676-9-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241023113406.1284676-1-alex.bennee@linaro.org> References: <20241023113406.1284676-1-alex.bennee@linaro.org> Precedence: bulk X-Mailing-List: kvm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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 Wed Oct 23 11:33:57 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: 13846947 Received: from mail-ej1-f53.google.com (mail-ej1-f53.google.com [209.85.218.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5A8781AC885 for ; Wed, 23 Oct 2024 11:34:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.53 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729683256; cv=none; b=NnaaXc+4jVtO63SZ2bno9eXqEyG4rdfNokfgCr6kbjguBoNjY0WupnHYyIEkSSvCBa8Eqy9zHulwg1/z2lwVOIQdjMBN/MR+yJBSI1CpEbQ/geMaKGvFtBO+AZ2nkDwz+ERfQZFfvbEAJjr2hd6z8btTZ8qSfevD5gTX8KO5I9M= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729683256; c=relaxed/simple; bh=od+F5J8tr7tzJhSZj6WjI5rrEwFyDywA1WQXm44ZMVM=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version:Content-Type; b=fKbpU2uX2Ry5sstalQk4Db+PaHI4e5JT91V8Bd+ld1m8ZoeVzEoWiS1Dl7U6JRYahFDpSsXuswqaHKfFIuKMjSH8m+hhANgTdOLuC1ijZrHdYLu+D7BqA0WxLab5AvQFXPAdpEdvce44r0Sel81jp6ZbSfZ+uA+dsEeYvDEpbXg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=ftPanHCt; arc=none smtp.client-ip=209.85.218.53 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="ftPanHCt" Received: by mail-ej1-f53.google.com with SMTP id a640c23a62f3a-a9a628b68a7so874621666b.2 for ; Wed, 23 Oct 2024 04:34:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1729683252; x=1730288052; darn=vger.kernel.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=ftPanHCt9JFVCDASxv4e5EvPlnjSB72CFEkn61P/aNb6/orJicOOCr3+4K0m5b7poF YiHv8pch8yc6Ur0yG1CnpFX6AtASSDwq1M4ULycKqlJJJM3t4UfGJxSLPJCndV5sylVb eTB7etFvlMllXdNDoho3FVwPPE+aCk13UidMgBpGfBn/EGocP5fcbUX2LGVHaX1IkDBp rxu7SSaSuH5WZQhar/yV2ef9jP3XWflOJSwj3IWMm8jX/cWI/+4RYeWiLB/cS0lbuNap mnPvO0935rXU8vVQLT7kD1Flni4Ys2kLDxHEffdbO+KN7+IIegBd3Un6xsCMCu3gYOro KRKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729683252; x=1730288052; 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=txtmMsYfGjJjO7/cULapgHWzMzwY9SEZT6xxtqA/Ka7YElgGxi+S2NV8lIH1aCMcsj PPeaFmJ+/8UJyi/xS7l/yCyN5iq3b/Z9j272MxZzXdq8dtJCqlRr+fSU0d8cE2RU4EGm wZ7Hr667yErLfhMtTGLHfQeK8F5nx88zTpKlkOca5qzpLmPnIU8hO79NxV/SWNQ2mu8P 1jSj1W8koX6hEEj6SlyHjQMWuvXWFDmuqVNAfcsj+SL1k0eHvJcxOo3z4Cum15AZPT4k oRCAm2YlSC/ZB12vTVXfdgImiBFdcIwWT0OUf98Q57hsrFDeVmT0SihGR3vpcuqTE6Yy TRtA== X-Forwarded-Encrypted: i=1; AJvYcCVyF3UyCrn2/hQ2mEjchxHh6btId4hG3np7ezTdLg5ummB/Inff7CyRTfvIbWJ3bfdfcQo=@vger.kernel.org X-Gm-Message-State: AOJu0YzGI8RiOqaAkUh8awhulHAqa4jw08Tvx2sgFviZKdPFPipO6koE yktN0qBxjvTOZsg4hwqds4U8LfxGj0xT/A0su81Oflkcc2Wmfmr5WtCXxsZUvkY= X-Google-Smtp-Source: AGHT+IGX9kLBYLMntAv2Zyd9NwAZDoBf7ZcI7j6Q9Uo1J6BYAqdZAtewejuvnJX4RHJtRVe8E9G1qg== X-Received: by 2002:a17:907:3f98:b0:a99:ebbb:12fd with SMTP id a640c23a62f3a-a9abf96f557mr195597966b.65.1729683252535; Wed, 23 Oct 2024 04:34:12 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a9a912ee125sm463814566b.75.2024.10.23.04.34.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Oct 2024 04:34:10 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id CBBA05F9D0; Wed, 23 Oct 2024 12:34:07 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Zhao Liu , Eduardo Habkost , Pierrick Bouvier , Peter Maydell , Yanan Wang , John Snow , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , devel@lists.libvirt.org, Marcelo Tosatti , Riku Voipio , Wainer dos Santos Moschetta , Marcel Apfelbaum , Paolo Bonzini , Mahmoud Mandour , Laurent Vivier , Jiaxun Yang , "Edgar E. Iglesias" , Richard Henderson , Alexandre Iooss , qemu-arm@nongnu.org, =?utf-8?q?Daniel_?= =?utf-8?q?P=2E_Berrang=C3=A9?= , =?utf-8?q?Marc-Andr?= =?utf-8?q?=C3=A9_Lureau?= , Cleber Rosa , kvm@vger.kernel.org, Beraldo Leal , Thomas Huth , =?utf-8?q?Alex_Benn=C3=A9e?= Subject: [PATCH v3 09/18] dockerfiles: fix default targets for debian-loongarch-cross Date: Wed, 23 Oct 2024 12:33:57 +0100 Message-Id: <20241023113406.1284676-10-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241023113406.1284676-1-alex.bennee@linaro.org> References: <20241023113406.1284676-1-alex.bennee@linaro.org> Precedence: bulk X-Mailing-List: kvm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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 Wed Oct 23 11:33: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: 13846948 Received: from mail-ej1-f43.google.com (mail-ej1-f43.google.com [209.85.218.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9EE7B1AC89A for ; Wed, 23 Oct 2024 11:34:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.43 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729683256; cv=none; b=E9hb25i/zVHXoMfrZFtRMNRCrKWgNJasKht1pm1h1BNAxQ8yeodfJ9qBp2v3zynSJviNnJfj2TqqOIyreRBBey7JNwQzEDZIxZIcmTw9G61W4p/t3tLMW/iXEuLyHs4WfHHCtPkr/dT9loeJVUJYVZv0omuC8Ek+AKsRIk9evuk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729683256; c=relaxed/simple; bh=qgtwopJJcC6olDOCrmTZyC+pkSUAHmnAVccyfpTSh4E=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version:Content-Type; b=BSXdQgtIgbyk5A9pNoEC63ZIduDm1GP7Z9otrAK8Dc2Zg4AJIm4Qy+L9jsYIvnrtkizjpPNWj6h3ipdL8SKIqK3p2HeXpS49qUXtazhFKJjYKT+s+UrRSV+HIQzG+oYczwl3aW6A9PBFKvKolCiH9akfRiAzzcIPBXvc30v+264= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=GSl8wOXN; arc=none smtp.client-ip=209.85.218.43 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="GSl8wOXN" Received: by mail-ej1-f43.google.com with SMTP id a640c23a62f3a-a9a850270e2so693626266b.0 for ; Wed, 23 Oct 2024 04:34:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1729683253; x=1730288053; darn=vger.kernel.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=ofWiMJKewV0PnnRBMLTuVVpoKKxPWtTmA16jFFUgpg0=; b=GSl8wOXN98kejlnV1Bta5OrZGJt4Tg/4cVJD5Tln58LQlI5skv0wpnkM5cxM63zu7M XuQFsJ8O0GlmUOq1Ios2Y5e16dvAmhxh0fFiIHbWT9+Zu0ut1Q0OcmZDAG3hVJz4eSje VWbVPcmtIJXY+Cw78V7bqt9tSIC0lzPsrO0dnMc8AwPuE72ZGNn1AkWLVJtw6zs7EYdj P/lc9XHpGNUbR+Hlwdqnlheg5eP5kNQtdmznbdO1ho4lsjN7FnOPq512ZE14SNHUEj89 9G4/pkMA/De/xL94VsjIgdYQsGKwQV/Taz9CoQgHndQbNuJDrDRILAB6C8F+exxPwPz6 FV3Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729683253; x=1730288053; 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=ofWiMJKewV0PnnRBMLTuVVpoKKxPWtTmA16jFFUgpg0=; b=A8aHjmj9/kLVOK/OAom91nvms6hjQ7ZemlpOub/8irzzQpPbT/ajKa6nRkYE0SbYPC EfAdhP6EMcRFo6X1IP2sAb3W8iHzJpqPwxgc9AE64nSCjkB2AQgQFyyW9U7Ov6RporsX eyFi0ARj7Mcm3DaiWF/2HN+G2lJo28WPPhtjj2e63GoE9kAGJEEourSbLkiXBzhW7zHc h+QzebSe0k7gHkdjN09R+fTv4Mv99w7ErBb9iknRlVIyM7Rom8m3oCOY4+SBozxKM7lt C/BjeH7GEGhYsK23W6LoY34mR8XOL1+Re/dQLe/GNUxacNvbeO/jzMNQuSVjZ7Z9sZaD mjGw== X-Forwarded-Encrypted: i=1; AJvYcCWEm5DEO9PjIUowsjNSkj5j2ZkKOHrl2Hd5A2Pcjjg99iCSBCqpCR6apqXSv3QMpYYie9E=@vger.kernel.org X-Gm-Message-State: AOJu0YyId74K5fQA9+tSRoaqLYoWeIyLkITmdzgwLZCjieoc6nkQavwO fCq8pTmb8RRzUVdJzI6pfnWGjg4c8ZDq9r6jkm7hn+k2ykoyUgqvFd6/01HKllo= X-Google-Smtp-Source: AGHT+IH6LD8izGG0fQyfdgk338W7DLPNBs5ZUdS1p76Oj9fZr0LteRIITT1zzZ5ZY2DdWfnetXrtlA== X-Received: by 2002:a17:907:7e97:b0:a99:e619:260e with SMTP id a640c23a62f3a-a9abf8acd51mr195736866b.28.1729683252885; Wed, 23 Oct 2024 04:34:12 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a9a91370744sm465054866b.131.2024.10.23.04.34.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Oct 2024 04:34:10 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id E3FA95F9DD; Wed, 23 Oct 2024 12:34:07 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Zhao Liu , Eduardo Habkost , Pierrick Bouvier , Peter Maydell , Yanan Wang , John Snow , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , devel@lists.libvirt.org, Marcelo Tosatti , Riku Voipio , Wainer dos Santos Moschetta , Marcel Apfelbaum , Paolo Bonzini , Mahmoud Mandour , Laurent Vivier , Jiaxun Yang , "Edgar E. Iglesias" , Richard Henderson , Alexandre Iooss , qemu-arm@nongnu.org, =?utf-8?q?Daniel_?= =?utf-8?q?P=2E_Berrang=C3=A9?= , =?utf-8?q?Marc-Andr?= =?utf-8?q?=C3=A9_Lureau?= , Cleber Rosa , kvm@vger.kernel.org, Beraldo Leal , Thomas Huth , =?utf-8?q?Alex_Benn=C3=A9e?= Subject: [PATCH v3 10/18] gitlab: make check-[dco|patch] a little more verbose Date: Wed, 23 Oct 2024 12:33:58 +0100 Message-Id: <20241023113406.1284676-11-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241023113406.1284676-1-alex.bennee@linaro.org> References: <20241023113406.1284676-1-alex.bennee@linaro.org> Precedence: bulk X-Mailing-List: kvm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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: Daniel P. Berrangé --- v2 - keep check_call, just don't redirect stdout/err --- .gitlab-ci.d/check-dco.py | 5 ++--- .gitlab-ci.d/check-patch.py | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/.gitlab-ci.d/check-dco.py b/.gitlab-ci.d/check-dco.py index 632c8bcce8..d221b16bd5 100755 --- a/.gitlab-ci.d/check-dco.py +++ b/.gitlab-ci.d/check-dco.py @@ -19,10 +19,9 @@ reponame = os.path.basename(cwd) repourl = "https://gitlab.com/%s/%s.git" % (namespace, reponame) +print(f"adding upstream git repo @ {repourl}") subprocess.check_call(["git", "remote", "add", "check-dco", repourl]) -subprocess.check_call(["git", "fetch", "check-dco", "master"], - stdout=subprocess.DEVNULL, - stderr=subprocess.DEVNULL) +subprocess.check_call(["git", "fetch", "check-dco", "master"]) 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..68c549a146 100755 --- a/.gitlab-ci.d/check-patch.py +++ b/.gitlab-ci.d/check-patch.py @@ -19,13 +19,12 @@ 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.check_call(["git", "fetch", "check-patch", "master"]) ancestor = subprocess.check_output(["git", "merge-base", "check-patch/master", "HEAD"], From patchwork Wed Oct 23 11:33: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: 13846955 Received: from mail-lf1-f41.google.com (mail-lf1-f41.google.com [209.85.167.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 810141B6556 for ; Wed, 23 Oct 2024 11:34:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.41 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729683262; cv=none; b=Qz2JrU53JL+bOMB5qo9L03g98rVbxoNh1DOTzU1RtCr9m1EWlAA+TA7cL9FDbAjUKmYq3rBpvojxuWEfNtZ86sCz6RMJJUWB+0q0iUeFnDSW66/X/8n/j/d9TptXUCpWPOGvWRjGIzUlqvXx1pUMDI3pXJZQWyBMo50K1XpuGLM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729683262; c=relaxed/simple; bh=mnWwKbzWIkxs1PxarxnievH5Ee6EkI4EXpt7QoDMfW0=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version:Content-Type; b=VE9O+ZjGz07fbenkq7dG1iRIVaFslEwtNbklBNHZTbf3+8Bc5XsAuR0wR7t3hYCKJWbreomnGJRT3AUwfVe7dY/kVePn82xu6CNqwB2W6bMcTrVXC6GNmmTBSDPxxUMaA8E4lhAbDYNv45Hp7a9BNlo8jkPcvo3vlvVHtroretI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=GWiRAY+E; arc=none smtp.client-ip=209.85.167.41 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="GWiRAY+E" Received: by mail-lf1-f41.google.com with SMTP id 2adb3069b0e04-539e6c754bdso6443296e87.2 for ; Wed, 23 Oct 2024 04:34:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1729683258; x=1730288058; darn=vger.kernel.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=1qX1H0ILZzPVxOYwNvN6Q27i9glRVOd//mtyRaXauYw=; b=GWiRAY+EOPnc1slFxG5u540GvmbLApzb64OXBmuST9nBz67LEOl8azKGvlhvEJZxVr I5j1F2QTxAS2gVHpU/FBlkasb5mzcaOU+4eYB1KbOAN27s2If6O8U1VOJxwmxpxMlcHl G2eAz3b01mpZd01ScPvoxqStSGm11K4UrPaD5Pgg5J3rdSP3mq6CditLQ+Pzol/GbxJ9 zWrz171sTDm8jtlirqKcoZdwD9sYtIfvugNENkGHf8Rc+g6FPzwcVW/5VQCWlQcIuOtO yi+3lBv3Xdq7FASbR5DxRCYzRsBfsb0UBo+QbXA/t5HYNpJQJH0oK1n/V6ZdpNgkOAcv 9uOQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729683258; x=1730288058; 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=1qX1H0ILZzPVxOYwNvN6Q27i9glRVOd//mtyRaXauYw=; b=dtSsDaEGbdVlu6ZJZ9zolM7KkLs+Q8D2FaZU2bghlmA4WIjk/EhnHimOTo3BihbtMI +Pp+da66kB/usDteFPGt/duyx8bDGfBltFH8RJewfRaa2rpexmrrjpO683OwgtUImMmM ew826be7cYvYRUrQx1hzRufb2utfgOoXwvI1dI2Ga3EwDTbRofVwI2Qam4dvjyl4/SHJ NyoLxtZ/iIc5U/4zLt/40D1m7NvHvJCsQrcJPnbqI2avj8sDKHBigX8sBDyE03Pwc2kg LjFePEk1Ct9REPMR5ZPUmAgPMjWfmpgi6RHYb5T1KT0jQYPkGIBhXp65g52d7aPio3vL bbkw== X-Forwarded-Encrypted: i=1; AJvYcCVQgFkIMP/DYLo4tsUOvVooq/9g1yPUTplsNYkHB+SAYGQ1TEZM7Qvd7N+sVZ5LhcFG+Hk=@vger.kernel.org X-Gm-Message-State: AOJu0Yz+yycj0FErcXMl2LQy61zxCueZ4F0qsyTFU56leEhD2Y8193+U 5yOuTZBjbjUxXrcWIAhEKvovbXJfJO2VOR2uNAw8qzs0Ue7L2VAOeEpjiCZqSa4= X-Google-Smtp-Source: AGHT+IGCC2NM7/OapfZX3EJCxpHGXNk03pm+wXvxRti6xI5ur+3RRTrTJkYiV0qwoYbB5Klb+BmBsg== X-Received: by 2002:a05:6512:2243:b0:539:530e:9de5 with SMTP id 2adb3069b0e04-53b1a3a7ae9mr1018902e87.56.1729683257601; Wed, 23 Oct 2024 04:34:17 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a9a912ee061sm464471066b.63.2024.10.23.04.34.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Oct 2024 04:34:16 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 061BA5F9EC; Wed, 23 Oct 2024 12:34:08 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Zhao Liu , Eduardo Habkost , Pierrick Bouvier , Peter Maydell , Yanan Wang , John Snow , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , devel@lists.libvirt.org, Marcelo Tosatti , Riku Voipio , Wainer dos Santos Moschetta , Marcel Apfelbaum , Paolo Bonzini , Mahmoud Mandour , Laurent Vivier , Jiaxun Yang , "Edgar E. Iglesias" , Richard Henderson , Alexandre Iooss , qemu-arm@nongnu.org, =?utf-8?q?Daniel_?= =?utf-8?q?P=2E_Berrang=C3=A9?= , =?utf-8?q?Marc-Andr?= =?utf-8?q?=C3=A9_Lureau?= , Cleber Rosa , kvm@vger.kernel.org, Beraldo Leal , Thomas Huth , =?utf-8?q?Alex_Benn=C3=A9e?= Subject: [PATCH v3 11/18] MAINTAINERS: mention my gdbstub/next tree Date: Wed, 23 Oct 2024 12:33:59 +0100 Message-Id: <20241023113406.1284676-12-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241023113406.1284676-1-alex.bennee@linaro.org> References: <20241023113406.1284676-1-alex.bennee@linaro.org> Precedence: bulk X-Mailing-List: kvm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Make it easy for people to see what is already queued. Message-Id: <20241022105614.839199-12-alex.bennee@linaro.org> Reviewed-by: Thomas Huth Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Alex Bennée --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index ef1678a1a8..7eea7b7954 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -2984,6 +2984,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 Wed Oct 23 11:34: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: 13846953 Received: from mail-ej1-f41.google.com (mail-ej1-f41.google.com [209.85.218.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B79591B4F2E for ; Wed, 23 Oct 2024 11:34:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.41 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729683261; cv=none; b=rZ1kwpux5nWONCSdNjzTDr6MMTmjUuNRzSPlXcMSrHZ5YBcZsIatQog3U3dit89P0uxQXK+s/G2pb7hpoG5WNrL/a7eUNwmUzjMW59Lq9guUZPL10mqTFkMfVJ8dR7HGw3X7HfmX6f8edTFUrFtw/79WA2m3cVI8DfKqCTAkMjQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729683261; c=relaxed/simple; bh=XjeuRo7TzAGu1R/uBx/TgkWRcWrKW8ll6PR9wdm/+Pc=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version:Content-Type; b=E1vK67l0AFnlgiTCOVdEuHWtNhYIc0zyGdLzzZ03MhCQ30VMPs5Tk8/kVnFBFshB31zDr7r+9KRGO4RjvNlSEXVS0N96LEGY2TCmRCXboPDIp1aczVpgM+yTkvVb5peRqndLPIf1Heq+VSMZx+dyKCSci3ICzPI1bCOsElAXp48= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=i97Pd1zU; arc=none smtp.client-ip=209.85.218.41 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="i97Pd1zU" Received: by mail-ej1-f41.google.com with SMTP id a640c23a62f3a-a86e9db75b9so881410766b.1 for ; Wed, 23 Oct 2024 04:34:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1729683258; x=1730288058; darn=vger.kernel.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=VE6CRJWS0PrV56e8l4nrxhdjzzIjf9914lqwk9uoLck=; b=i97Pd1zUJYOCIYmzC+xt8f7/o1T5/rN522ZW3hBuMwUSopz2zbQW53IWix34FvcixL 5+yF57CM7CoK6BOS01n9O1nkG9QHeWfDxdyXv7yQ2yO9Eedz5gCddwqQzQPkTENlZ5p4 xjAfhMJ1DHxiUovm35myGt62HVbxBtD3pmiScx0pBtpo9MO27cZzlEDmxoMzh8UZ5BPl Mq2+0GeVorQU2XT9OI/Kf+36tWmKVWAQXwApcyzvACa4jX/1Mz3e+ww498r2w7SdjtBI I+SCYHNeze3bBTyA9GaajNif5848W5bxB7yNOSxy3gYfIUJI22ndzTNL2a+08XsgGNOq +7nw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729683258; x=1730288058; 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=VE6CRJWS0PrV56e8l4nrxhdjzzIjf9914lqwk9uoLck=; b=B0pMrRH3h+1E8gwYhr7AUxWsCT8w/1o7Gd+qkEasFje2AIjXRF+dakoQxhkLQJL+Uz jUCjCLvwdJmcn3JIeGPWezUclH0x/b4F2WP/PfwZJNx3WLuVeO7+fK5jTZusWvDb2MaN hKwJ1KoW1rJaDgEli6YvGWaTvuf73KPNeGaeuaRumL8GR9MkJInI/rsTos4r9IU3nk9S KIXy2defdkqq9pXP+6U102vr2vmkP7vd6wH9LziI7UBgo+wHvB4yF3FbNs3T03rIsvcG xTXOqq4Zchzg/ult2eTpjN6yCoRuDRGKMLQcxR8cxME1S5/5PWcCFPMcmswgCsre9JpI C7zw== X-Forwarded-Encrypted: i=1; AJvYcCV/jMdOI7ZzwhMt+V/ry/87PduI3rjmskSpJwrbd0+NrsYklJsd64Nj6k0Seiut5JsSiDk=@vger.kernel.org X-Gm-Message-State: AOJu0Ywxfm/sjPgRgdDSFTKuBAfWULIXehDO/2un1aZWGdnMkz6AOFjc jc+iokm7NPSOZOwxaGIHVca5C8t8TfVfalr3ngKtN2qNGNAMVkbbg9eGyEBs3Zg= X-Google-Smtp-Source: AGHT+IHrhhTz3PwOAFp8f6BmbbVAGO5Fci9mgs+aD3Tdtawg2G5g++Jm9xg3Lf7GfxT1VEbPz5On3w== X-Received: by 2002:a17:907:3e27:b0:a99:e82a:87ee with SMTP id a640c23a62f3a-a9abf9660a9mr167046366b.57.1729683257920; Wed, 23 Oct 2024 04:34:17 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a9a91306fc0sm464586866b.91.2024.10.23.04.34.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Oct 2024 04:34:16 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 1BD045FA0B; Wed, 23 Oct 2024 12:34:08 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Zhao Liu , Eduardo Habkost , Pierrick Bouvier , Peter Maydell , Yanan Wang , John Snow , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , devel@lists.libvirt.org, Marcelo Tosatti , Riku Voipio , Wainer dos Santos Moschetta , Marcel Apfelbaum , Paolo Bonzini , Mahmoud Mandour , Laurent Vivier , Jiaxun Yang , "Edgar E. Iglesias" , Richard Henderson , Alexandre Iooss , qemu-arm@nongnu.org, =?utf-8?q?Daniel_?= =?utf-8?q?P=2E_Berrang=C3=A9?= , =?utf-8?q?Marc-Andr?= =?utf-8?q?=C3=A9_Lureau?= , Cleber Rosa , kvm@vger.kernel.org, Beraldo Leal , Thomas Huth , =?utf-8?q?Alex_Benn=C3=A9e?= Subject: [PATCH v3 12/18] config/targets: update aarch64_be-linux-user gdb XML list Date: Wed, 23 Oct 2024 12:34:00 +0100 Message-Id: <20241023113406.1284676-13-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241023113406.1284676-1-alex.bennee@linaro.org> References: <20241023113406.1284676-1-alex.bennee@linaro.org> Precedence: bulk X-Mailing-List: kvm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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 Message-Id: <20241022105614.839199-13-alex.bennee@linaro.org> Reviewed-by: Pierrick Bouvier Signed-off-by: Alex Bennée --- 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 Wed Oct 23 11:34: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: 13846956 Received: from mail-ed1-f50.google.com (mail-ed1-f50.google.com [209.85.208.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A1B2F1B85C2 for ; Wed, 23 Oct 2024 11:34:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.50 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729683263; cv=none; b=ed5YBBUdNr0nnp3szt4r7gg7/qw3JTbom2N9+J1PLXooaBy/BwrL3/3+sn+5bf9TmIAmTr12jfKy0D8P/nM3gRg3jSreiXFXnO/nwEP2VrudJs2zHwSkfURY9K0Seo+eqR5xh1RlMmDNoSN/55G7Xg8elE7+1xp/1/1fg5ZJzoc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729683263; c=relaxed/simple; bh=AeUHNfvNpzJXFdGx7S9rrFlmswpeyN87DwibnAkZUfs=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version:Content-Type; b=V7iur++mMfIGRoXtzvbJtl7vzSUeK2t/ER8JO/Az5LJq4ua2Si9TDlCt9bTNCNTZrOC8OygGASgIDnjuHk8ocsvD0SwdcJan9hqaTfSnCyxr1jYQ62LEt4o9gIHKdl/WNnKx8rTGyMj4GVCm65tnZafCz8TF968XuYlUsYlhms8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=afi9JAQT; arc=none smtp.client-ip=209.85.208.50 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="afi9JAQT" Received: by mail-ed1-f50.google.com with SMTP id 4fb4d7f45d1cf-5c40aea5c40so612783a12.0 for ; Wed, 23 Oct 2024 04:34:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1729683260; x=1730288060; darn=vger.kernel.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=7pLXAr/OU0jkbK3hvA7jKCluJF6NjbiqDXh6Q2a0Cto=; b=afi9JAQT6CkYTEJRqbjvFi7fcljeLkggUdtmlg40teBY7vTEi3+m6uyfbOjsk6dyc5 xqRyeAm+qDMSdMVNJctVuNTGKya++EOak2WaduQvEGblouTKXcMy8hl4u56aDJJwWEJa OH11On3K1/bcsKVISjML4xshV2M9GuMGyiTLjJCLMc+btEJQOe3Ei3+eOEqAfftmGRj6 kMUp+isQjxoWDgc1kj0i5w03/m/VJw03/ep4qPusSYa6xwzQe0GybO4iCt2ix+ZeoX8l 1gWHQ/9yCBWz2jDs90HAc2RS2jlYifyMC+j5iOh5js7hBOdqavpqtGhRdyvT102+IgiJ 4fhg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729683260; x=1730288060; 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=7pLXAr/OU0jkbK3hvA7jKCluJF6NjbiqDXh6Q2a0Cto=; b=v7r93bBOLnJny58hepQSxVolhCp1/svFhOXAsSJgOgmfnQDciKX8Ob5NleVzryPOtz ulgx78cTHlAIpHGfl+QF3f8lj75SE/yfKYA+ePzDfXtbeFSFYVrpfnoCRuqiCjXOm63P q/VsE+d8rm6ZybTdW/5k/EGnJ1kAnM2D6vXAiP2GIaEz3VooRmwuNYjyaUETs0KiBnPG dfIPw2NDwc3FU0a8ylBZCLNXoX+IuoLQN3iBIDD4W0m+msg0Uc+i/OjlB6Aji2JUhxCR i1O8i5Z6MNkzfxzQ5+JA/HJOJEb8c0+pq608Yf6IUdq2aErVrKwQ0Qw8tHYL97Ed3wFC tWtg== X-Forwarded-Encrypted: i=1; AJvYcCX1ZO2G8NBi7Pg9yFLyv+zGKH3p/FEiCQkfuiXpQPElR7RRqOGdmG++MDEy2t//od/QYgQ=@vger.kernel.org X-Gm-Message-State: AOJu0YyhrO1i987dOq0PR07N4XFE13ZjCox0LmxNs5dDW228FgM9Gukx MYUIuyEyYqX0gIi24miIbBFoN7EFdjB569DhsnltP6efkH/quui74VGLBbeW6S0= X-Google-Smtp-Source: AGHT+IHYuCpsrlKmDqqGYIBBNa+vFGcIlA5SXBodkYMC+HhiJM5pz5ipdH/LGWzv9nLWvjwuCPYAbQ== X-Received: by 2002:a05:6402:42d2:b0:5c9:60a:5025 with SMTP id 4fb4d7f45d1cf-5cb8b53d00dmr2462019a12.9.1729683259827; Wed, 23 Oct 2024 04:34:19 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5cb66c6b18csm4250181a12.62.2024.10.23.04.34.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Oct 2024 04:34:16 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 397B25FABE; Wed, 23 Oct 2024 12:34:08 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Zhao Liu , Eduardo Habkost , Pierrick Bouvier , Peter Maydell , Yanan Wang , John Snow , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , devel@lists.libvirt.org, Marcelo Tosatti , Riku Voipio , Wainer dos Santos Moschetta , Marcel Apfelbaum , Paolo Bonzini , Mahmoud Mandour , Laurent Vivier , Jiaxun Yang , "Edgar E. Iglesias" , Richard Henderson , Alexandre Iooss , qemu-arm@nongnu.org, =?utf-8?q?Daniel_?= =?utf-8?q?P=2E_Berrang=C3=A9?= , =?utf-8?q?Marc-Andr?= =?utf-8?q?=C3=A9_Lureau?= , Cleber Rosa , kvm@vger.kernel.org, Beraldo Leal , Thomas Huth , =?utf-8?q?Alex_Benn=C3=A9e?= Subject: [PATCH v3 13/18] tests/tcg: enable basic testing for aarch64_be-linux-user Date: Wed, 23 Oct 2024 12:34:01 +0100 Message-Id: <20241023113406.1284676-14-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241023113406.1284676-1-alex.bennee@linaro.org> References: <20241023113406.1284676-1-alex.bennee@linaro.org> Precedence: bulk X-Mailing-List: kvm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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. Message-Id: <20241022105614.839199-14-alex.bennee@linaro.org> Reviewed-by: Pierrick Bouvier Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Signed-off-by: Alex Bennée --- v2 - fix checkpatch complaints v3 - fix libc typo --- 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..cbe5fa0b2d --- /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 +# libc 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 Wed Oct 23 11:34: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: 13846954 Received: from mail-ej1-f42.google.com (mail-ej1-f42.google.com [209.85.218.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D67C61B4F3A for ; Wed, 23 Oct 2024 11:34:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.42 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729683261; cv=none; b=LvZY0GE7SPuiAsYnkcvCmMHMFp99QUNp0vAX0AWFYSoYgXBIaEknKLMLo0DqDgtsoreOSp1zazdIST11jTwm+5/sWCJuViqWREglMghqrRLQ7RHp4CZP9OPbQ3uxtdcg61Bxc1ytofd7g3O87K5PFvDwhH2qjQYAYW24TsC04YU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729683261; c=relaxed/simple; bh=UXQdLtabbiMtGUHNw3CuGAH7Y7y/tqHPMvrpotkPjug=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version:Content-Type; b=ujkztaw8pJ1aAxo4XOq5tv73nbukdsFQy/Ogv22almoPVaKhdwj/f9a3VAdU14N+l2+C0na8JR3nAuuOHNokTh8oeETHwIG2dTaCqhYgED8b5VP3oJJK0GKkJ5bsbOaQTYx7LOT87BBqdE9YK4IH5lIFIpXbHi3kQIjX92iRm7M= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=wzhkjsxk; arc=none smtp.client-ip=209.85.218.42 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="wzhkjsxk" Received: by mail-ej1-f42.google.com with SMTP id a640c23a62f3a-a9a0472306cso897215866b.3 for ; Wed, 23 Oct 2024 04:34:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1729683258; x=1730288058; darn=vger.kernel.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=wzhkjsxkjQjtzd3+le+rCHbgi8DyM4AoPWJDRP76B74CttVI2lwON7aCJB7jbFfoxY A8IKfFLE1iiidts3vGemqT6FWYK0Ue52jl3mx+XbtqrOhfOPE4z2OgaiGg9TVxlIe+84 n2Xiv2bSfyZK5XQj95Ltb84MJvG1+YP3xSuyjELEAgHAaU0oS+VJAmVz3Vcc/WZLb9vt 86BhMqObvMKv1IIE6NXi6ZI1GSv9OunZA0Vv+3Fo2JeX6AskE+8dx3+68msGclO1mGmh WQ1rMPoimzSIgu8hDJwbh+Towm4kygzhHMKjoTCHrJgtVG445aSZxhKsRk9RRbVLthut Q7rQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729683258; x=1730288058; 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=gjpTkS/HgWc6YR58blCfsmoCUnUYHCgWpuC1vQCWJcGrWIFE0gKXSr6KV+0qSa93/Q n+Ec6RMwsNHyjfwGSQVxJDnOax7Q5sX3Sl8TrBObIbK2dC8QPzImsC6wg6heRoIF0SWs Fr066WHPOIR/7vYLIXr/jRpPE9EgHuxA0Q1+PY728qgyKwdH7kUsjMQ+u937Jamjfw1r BPD1u1l7P+6Bufy7STOHSQl+fy1vONPKeY8uRquzI70wXH006DVMgOWySn4MthKBG98p 70pVsPVNfjh8sYs480Kbet4Vrf6zXrmabnMZ+w8mW56QkBCPqbk77Jus0J5PRb4MQSQB 9aWw== X-Forwarded-Encrypted: i=1; AJvYcCUs2FW8tFI+1ul10rjNr7QSGovcbrHWoxIyNRoLrofInfkjsyNLdNcHzQHSwl6hfPd8/FE=@vger.kernel.org X-Gm-Message-State: AOJu0YwgV5+MjBKSTP7MOQpjmYZ3LnVgOOUnGKMU5Dmddny/bXwENeAo eU5WUM1Iy0PV9LPhRqmQzrmsb3i/wDwARyOCtc/u6vcvwtnEtYOonyeRymscibw= X-Google-Smtp-Source: AGHT+IGV1BmmYJYiHVOsfdD8NKiwKMyXPcWgCdf3lsOYC2w3ygGnh/9fI/TEjp6+W0G/coRG8ccRNQ== X-Received: by 2002:a17:907:724b:b0:a9a:49a8:f1fa with SMTP id a640c23a62f3a-a9abf8933f0mr220298266b.23.1729683258240; Wed, 23 Oct 2024 04:34:18 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a9a912ee0f5sm463385166b.66.2024.10.23.04.34.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Oct 2024 04:34:16 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 5288E5FBDC; Wed, 23 Oct 2024 12:34:08 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Zhao Liu , Eduardo Habkost , Pierrick Bouvier , Peter Maydell , Yanan Wang , John Snow , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , devel@lists.libvirt.org, Marcelo Tosatti , Riku Voipio , Wainer dos Santos Moschetta , Marcel Apfelbaum , Paolo Bonzini , Mahmoud Mandour , Laurent Vivier , Jiaxun Yang , "Edgar E. Iglesias" , Richard Henderson , Alexandre Iooss , qemu-arm@nongnu.org, =?utf-8?q?Daniel_?= =?utf-8?q?P=2E_Berrang=C3=A9?= , =?utf-8?q?Marc-Andr?= =?utf-8?q?=C3=A9_Lureau?= , Cleber Rosa , kvm@vger.kernel.org, Beraldo Leal , Thomas Huth , =?utf-8?q?Alex_Benn=C3=A9e?= , Gustavo Romero Subject: [PATCH v3 14/18] tests/tcg/aarch64: Use raw strings for regexes in test-mte.py Date: Wed, 23 Oct 2024 12:34:02 +0100 Message-Id: <20241023113406.1284676-15-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241023113406.1284676-1-alex.bennee@linaro.org> References: <20241023113406.1284676-1-alex.bennee@linaro.org> Precedence: bulk X-Mailing-List: kvm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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 Wed Oct 23 11:34: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: 13846980 Received: from mail-lf1-f52.google.com (mail-lf1-f52.google.com [209.85.167.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AFCD71AAE37 for ; Wed, 23 Oct 2024 11:44:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.52 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729683848; cv=none; b=txsPy8lUizU5GfUw7FIUSkzyZXjHnH6FMi6+7/ylVuXjtIGsnqBViOlL9+mrtmv553ZvG+5iwyJVxDlqoSvIdIJlVrfCM6q6ZJaheAY5VxkcPTtzpW8S3mhXPWACWWmqwiiptEEPahcCzbUJOCxUcnS9qHgs0gw4Y8Z61dMUTVM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729683848; c=relaxed/simple; bh=rb3f1U6P64o9JDmRzVN/42YTd7peCfGvE1Ae01sbveQ=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version:Content-Type; b=qqUxOqio+hk0ysyCGCoS8KrFVFFrnsYK+L1sA5MSCWsIemmxPRVWK/WZetQYtG5Ru5QYL1gJRhXAcGijGXTpO1kkcnqbEIjBxfoxp+JV1FDHJJ3wkD+427L5JWv+MR/Dp//hziehCp/P2BeLdrLgGquVJ9JO8w0adptG08kD8kA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=mJwJGB+t; arc=none smtp.client-ip=209.85.167.52 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="mJwJGB+t" Received: by mail-lf1-f52.google.com with SMTP id 2adb3069b0e04-539e7e73740so5990280e87.3 for ; Wed, 23 Oct 2024 04:44:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1729683845; x=1730288645; darn=vger.kernel.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=goM9TWkvUJk023ZZ8+wq0WOvMkki4+LOppFI2tLZ0P4=; b=mJwJGB+tTCUA1l0SMupmB8Qlk3+o4JgmE6PXnOvjV0uXCA0z2KOBDmBuKSKiuNGXCD q2ME6svMTZcFBRzBx8SOaET0Q1sC3fZzIv5GOj9o9khoyPBHxa4E567r/I8RjVzgs7vp L8PBz4hdORRCG9elYIsNhvFJnNBzvQa84D+nt8bJ8ZWbX59ziADFFbbEEDhylsjOKZAt I+ze9aTh6J1a6nGJeMguR0lpUsOk/1HkbfoPb40C1KzYr8inxjA771jkWoRH+6ug4am1 wrRpKP0yl0B8z1NT5vD5UdDfB4iDbyWvSMbSOEu+ZzMbroTl/IzV8n2xEkSdqYLXyYS2 vX4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729683845; x=1730288645; 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=goM9TWkvUJk023ZZ8+wq0WOvMkki4+LOppFI2tLZ0P4=; b=ZUrvfkKm9xokU91gA1Wystw6WMGdIKyMsfdnpkpwWD/+/H2mRYAP1d4gSu26icNkvV bZyNhr2LxuvZoXmkiNByqMVo5Icn9b0VNsmWWW+eIN7361P3HOLmkAP4PCOOfOuzW+xJ hYC0AJj3Oqs/pkdITp5wA0xWqC16VwFvW1yFLmOsordlWxNAVNFPLk+MmKJr96OlZxNm Hpu60PfYTeTBYMLEvnhE+wCpPwjiqwhEfVGrmEnQafOVPL94NPhWT5S+zu+vSSbqXVqx 9tQnEmZT0h8Gu6o+gJxik1tRf5N3AFDoC4pCqkQWGHC9mwsAaudn4Vz7hLpA3VP2JC8r 3UfQ== X-Forwarded-Encrypted: i=1; AJvYcCUfB/QCcfyV/yVu6nY6pTBwQCt8XTzeGlsWPW41qBXBTQojL2chgcP7sw1ObcnmFsEvYcs=@vger.kernel.org X-Gm-Message-State: AOJu0YwNpZ3dbSTQdnriDBEMJWifnNBteVEhHzhfV020kSeiji1TWCUR 0rm6pfHQtqnDAz09MbIiOP48lKSzPkv87+WQf+NuToTJmOcwGK4tLJA4hvb/ahU= X-Google-Smtp-Source: AGHT+IHDtHU0ccJr5rc5xz8My9arnYk+SlnudjoCir3kQRdzjKiDoRSU1ko8s5OGs4YQqLHIEVXPxQ== X-Received: by 2002:a05:6512:398a:b0:539:f2f6:c70f with SMTP id 2adb3069b0e04-53b1a2fed80mr1092099e87.8.1729683844676; Wed, 23 Oct 2024 04:44:04 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a9a91370e54sm462834566b.102.2024.10.23.04.44.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Oct 2024 04:44:03 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 6AE8B5FC0F; Wed, 23 Oct 2024 12:34:08 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Zhao Liu , Eduardo Habkost , Pierrick Bouvier , Peter Maydell , Yanan Wang , John Snow , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , devel@lists.libvirt.org, Marcelo Tosatti , Riku Voipio , Wainer dos Santos Moschetta , Marcel Apfelbaum , Paolo Bonzini , Mahmoud Mandour , Laurent Vivier , Jiaxun Yang , "Edgar E. Iglesias" , Richard Henderson , Alexandre Iooss , qemu-arm@nongnu.org, =?utf-8?q?Daniel_?= =?utf-8?q?P=2E_Berrang=C3=A9?= , =?utf-8?q?Marc-Andr?= =?utf-8?q?=C3=A9_Lureau?= , Cleber Rosa , kvm@vger.kernel.org, Beraldo Leal , Thomas Huth , =?utf-8?q?Alex_Benn=C3=A9e?= , Gustavo Romero Subject: [PATCH v3 15/18] testing: Enhance gdb probe script Date: Wed, 23 Oct 2024 12:34:03 +0100 Message-Id: <20241023113406.1284676-16-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241023113406.1284676-1-alex.bennee@linaro.org> References: <20241023113406.1284676-1-alex.bennee@linaro.org> Precedence: bulk X-Mailing-List: kvm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Gustavo Romero Use list and set comprehension to simplify code. Also, gently handle invalid gdb filenames. Signed-off-by: Gustavo Romero Reviewed-by: Pierrick Bouvier Message-Id: <20241022105614.839199-16-alex.bennee@linaro.org> Message-Id: <20241015145848.387281-1-gustavo.romero@linaro.org> Signed-off-by: Alex Bennée --- 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 Wed Oct 23 11:34: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: 13846978 Received: from mail-ed1-f44.google.com (mail-ed1-f44.google.com [209.85.208.44]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E870F134BD for ; Wed, 23 Oct 2024 11:44:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.44 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729683847; cv=none; b=ZTFYgnSKfKSrww6kk2jGNlzC2sqWUylqK4/H+0wQU+CUsO/w5p4xwkNi0aHRqMvdEBIu6ymoWUlPxcSS53vdilHP0P9kgrvLvKCXvJnuEM/lLH3/1UgLlhHTueWztl1exwKFectjrZofBT0vAAxVbh13cH1H6BxgNhGURYuYvzs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729683847; c=relaxed/simple; bh=BXarhcb40GWzuIYmnr+ci9E7FXXyvsSMVj+QBu1fn8E=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version:Content-Type; b=HT7FDhC6QAkDhSke/x3O95L9goyh7x3Pf9p0JtqlRkaz0qIfdOJSSD0l/iEaC/eWBKWD7qKrXiUbctMcbYlNrWs9s37iXJdLWD1YjKxpEA/F2N+NzVSrYJvpZ6EsWHxJnWApq7GZlA55qH2tRaAt9e1XHYhhLWyyD4g4NYeV1rI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=ITxa9Mtg; arc=none smtp.client-ip=209.85.208.44 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="ITxa9Mtg" Received: by mail-ed1-f44.google.com with SMTP id 4fb4d7f45d1cf-5cb6704ff6bso4671433a12.3 for ; Wed, 23 Oct 2024 04:44:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1729683844; x=1730288644; darn=vger.kernel.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=7/D/QQxPvGmndZaJy0kEIveJUD+81sSd1CLz3T6BVVI=; b=ITxa9Mtg3RfEwxRzVJwAOfA1Va9griMjqMCo5NoMMUr7FO7agiV8rzEKNd48H/s3yx OgYOLl57DT9M6HFQ7KE7xyl6EDmtqssyfqG84MZ74FLjHwtPiHPoRJWYVfbCZ2RQWa2P ihxZxGO3fxVHm9cUY6l5zwXAeUwh4M2fBObiSx6m5kSV3mvymjdfTR1wUVX30WRl9fZO 8lUgzjKgdxoE4+igN9ktmBfBBMFbiOa0P7n7+blYnsHD7AO3895oF+ZyYRDSeCs4ncpU M8DPzizVq6i/Uk+6c9/HhZuTb5bbe+6I5Cno86P0D9JFDGu9y6flv3OvaJekQw6nmc1s O92A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729683844; x=1730288644; 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=7/D/QQxPvGmndZaJy0kEIveJUD+81sSd1CLz3T6BVVI=; b=hPafjW5sba8T/SIjlDRNPX4GDgEbfMXBUPsPi942ALvf5xqWScrqptB3XrvHm7S8oy nU4WBewGWXClc+4hBexke7BmA5Cy0dU3GkgAi2yfxb10mPj8bXHDbJB6waCXc33hkCug FT67gHyLs/vFallWHWqHuQwpcuYHdcIZLePcCj4BxnBbRkuX8pfEsxfBqU4JbOfsXX8r A96LC9fIwLWKqW9DDbdPR1zsToo7Drq0Z2lmXGmWR9FYJj4nm63kSGpjySG2uHHWw9aV fhYt1hbmOn6Tf4hiXg/g2Sc7U5aCpUyrKnNcKldkLWmqRX2NvtZTKyCZecriP4wSS9lW B18A== X-Forwarded-Encrypted: i=1; AJvYcCUhByXNht7pAYS8bXF87z0O6G82JDuhcCJft0SqiVwYCryusopyEif/MDXXzJXjsVDVN2w=@vger.kernel.org X-Gm-Message-State: AOJu0YxFpz2jte0YTgc3FGlyLKMLSLQtORF/HjFb+ZeP9JzpWDz5cnex gBHfopyyk9LPajU+NJplqu5czcLmUM0yEZkaR7y0YqDoSDVMxbO14Eb1FRw2Wew= X-Google-Smtp-Source: AGHT+IH3zSM2BlEpP3N6KkqeMBnwOhxkf5fGgndxyFj6xPVN+t2t4+UZ5S+M/nxkFu4HGabpb7TqCA== X-Received: by 2002:a17:907:9405:b0:a99:ee42:1f38 with SMTP id a640c23a62f3a-a9abf8aefbdmr202024366b.31.1729683844062; Wed, 23 Oct 2024 04:44:04 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a9a912edc33sm463333266b.58.2024.10.23.04.44.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Oct 2024 04:44:03 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 7FB525FC11; Wed, 23 Oct 2024 12:34:08 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Zhao Liu , Eduardo Habkost , Pierrick Bouvier , Peter Maydell , Yanan Wang , John Snow , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , devel@lists.libvirt.org, Marcelo Tosatti , Riku Voipio , Wainer dos Santos Moschetta , Marcel Apfelbaum , Paolo Bonzini , Mahmoud Mandour , Laurent Vivier , Jiaxun Yang , "Edgar E. Iglesias" , Richard Henderson , Alexandre Iooss , qemu-arm@nongnu.org, =?utf-8?q?Daniel_?= =?utf-8?q?P=2E_Berrang=C3=A9?= , =?utf-8?q?Marc-Andr?= =?utf-8?q?=C3=A9_Lureau?= , Cleber Rosa , kvm@vger.kernel.org, Beraldo Leal , Thomas Huth , =?utf-8?q?Alex_Benn=C3=A9e?= Subject: [PATCH v3 16/18] MAINTAINERS: mention my plugins/next tree Date: Wed, 23 Oct 2024 12:34:04 +0100 Message-Id: <20241023113406.1284676-17-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241023113406.1284676-1-alex.bennee@linaro.org> References: <20241023113406.1284676-1-alex.bennee@linaro.org> Precedence: bulk X-Mailing-List: kvm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Make it easier to find where plugin patches are being staged. Message-Id: <20241022105614.839199-17-alex.bennee@linaro.org> Reviewed-by: Pierrick Bouvier Signed-off-by: Alex Bennée --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index 7eea7b7954..5b6c722a20 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -3708,6 +3708,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 Wed Oct 23 11:34: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: 13846981 Received: from mail-lf1-f45.google.com (mail-lf1-f45.google.com [209.85.167.45]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9450D1AB6C4 for ; Wed, 23 Oct 2024 11:44:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.45 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729683851; cv=none; b=AqAVn9IY7BlZ26zyHhONGm5BW6OG4AQQLYz3ea8IuWzjgMPfxXZ8+flsknDdAh6SxqWnQI+ecaoTFNmXzGseS8ZHsBGOAB5rf8re1l6lPng//DqWi3V+5eqNZSJh4eNXn00KQfmQeLuzVxLLmiept3wDlyJ4BPt17bUwe3R2iqc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729683851; c=relaxed/simple; bh=gx7elASkKACRM34GNEWipezg+FLNYL4fWbpRkWi7xsk=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version:Content-Type; b=tKZfMOxyccGbFVJrWCITCUu7Q3GiSW0nVJIUg9/Ki5sZTr/Kk9Sdp0mRmaTJoNdnd0jQn8YN0xjoTfIBqffxroZBVsI27CqtkexVZijVeHs+E8uuBlVgQewbDvXABK14NrbqyYz72/NKolR6OEGWpdnuWaiDcdg5+sE4J6OaBbk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=oFFktXOQ; arc=none smtp.client-ip=209.85.167.45 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="oFFktXOQ" Received: by mail-lf1-f45.google.com with SMTP id 2adb3069b0e04-539d9fffea1so6324297e87.2 for ; Wed, 23 Oct 2024 04:44:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1729683848; x=1730288648; darn=vger.kernel.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=oFFktXOQ/ojcyuo9pofFp6fwnh4Yb1692/BAYaxoWPcWh9d703EoJSDofRKZS4Yz84 XOPaLZGHBgjqxvL9rqejhX2FvMfRDMutDy5IA7tZCvfQsXT39tWzI6xHaxW48gliYJnD ZHvx2n774GJXC4L51RWkUx25Y678c9VhaJo446oxlmt5lhhxaYU0j2KCKFj/2vKqoQGK isEu9uqif9wGeVpjAVlSRwSB+BnoINEzu1j66i9QOC5Q4eQ0ujvcsLywIbtphg543XWb PjdlQbYov2awGGDcyzhBIK5wW5Ap1QVPAWYsf7TMY/OWcevM8DXrhmfDZE0N9rF34X3e A/+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729683848; x=1730288648; 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=n6CRxYwjCA7PYuynIJpnFuR5Asbg/mkdEYI+EqENG5GZ0ugLBXO8W6IpE1ku1NOqvd gHEwKUrVXDs3AZ1M33toz966OiRuMm4UrYuQjxRt0YMy8B8h2MXwmAQXc8VbyUH3YXrK rvcjx/qwzUsInhBaWPvvFRVas1G6pp44Csc/wtWqY68XefLMNtwk8T0W4V1biY22iU7E YLXmRUdunEjwyJTCwOJg6aqJfxq1ktrV0y2n9nCyB61Nip+facPIMaGFhiBnAWxifsv/ Cx+7vrbQZyJBbpC87YXf21WGvt0hkWphjWNlef1XmxSJzr8fXXIcQIlWj57Tx8/O2TVv sRaQ== X-Forwarded-Encrypted: i=1; AJvYcCVx+dooQcoc9P8yxjzOulIe2iVoO1GzZdzxHhVs3F2FkX43ELy6q5bF308OcI/LZTbO8TA=@vger.kernel.org X-Gm-Message-State: AOJu0YwUXKmf1ViLkQhOY4D83JZOo1SNugpUp9gHvlZDFLLTts232NQc KJYw9GqCsrz8VR/JR2AjUFW4YoyFfDO8zle9aUq0EUQnF8qKrscc/yOLOthhbkI= X-Google-Smtp-Source: AGHT+IETgBNh0DknbhC9Ao3EX1ccEbaAu/WRXZEm4OtaqSUPGIbyjDwlX/z+4aePDDFewBzHV61pag== X-Received: by 2002:a05:6512:3b87:b0:539:e873:6e2 with SMTP id 2adb3069b0e04-53b1a31d89dmr1220513e87.8.1729683846016; Wed, 23 Oct 2024 04:44:06 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5cb66a6d798sm4478915a12.50.2024.10.23.04.44.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Oct 2024 04:44:04 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 9B1C55FC19; Wed, 23 Oct 2024 12:34:08 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Zhao Liu , Eduardo Habkost , Pierrick Bouvier , Peter Maydell , Yanan Wang , John Snow , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , devel@lists.libvirt.org, Marcelo Tosatti , Riku Voipio , Wainer dos Santos Moschetta , Marcel Apfelbaum , Paolo Bonzini , Mahmoud Mandour , Laurent Vivier , Jiaxun Yang , "Edgar E. Iglesias" , Richard Henderson , Alexandre Iooss , qemu-arm@nongnu.org, =?utf-8?q?Daniel_?= =?utf-8?q?P=2E_Berrang=C3=A9?= , =?utf-8?q?Marc-Andr?= =?utf-8?q?=C3=A9_Lureau?= , Cleber Rosa , kvm@vger.kernel.org, Beraldo Leal , Thomas Huth , =?utf-8?q?Alex_Benn=C3=A9e?= Subject: [PATCH v3 17/18] contrib/plugins: remove Makefile for contrib/plugins Date: Wed, 23 Oct 2024 12:34:05 +0100 Message-Id: <20241023113406.1284676-18-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241023113406.1284676-1-alex.bennee@linaro.org> References: <20241023113406.1284676-1-alex.bennee@linaro.org> Precedence: bulk X-Mailing-List: kvm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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 Wed Oct 23 11:34: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: 13846979 Received: from mail-ej1-f44.google.com (mail-ej1-f44.google.com [209.85.218.44]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 542001A265D for ; Wed, 23 Oct 2024 11:44:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.44 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729683848; cv=none; b=mPPhQd9v/KU8NX4lel/1oUcYshlwO+jBKRLQ7Ih2l5BPUczcPw9Yw522HOzM82zPFOUZIbNr6y9PJG/0FrbAd81OQp5kwMRRu0AdSS4H/u+A5WiunxS07in+5TvBwWQi3cMIxMSKLaX6Q/CO0AZyI8fjyi4AyZ/BRv+LZTxgN5c= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729683848; c=relaxed/simple; bh=5yTCZimV0gEI7gmCOKCJLILXfJ8kpMTOraKSBNxiVlk=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version:Content-Type; b=NPO8f/hdK1L4nZ1Guq2xFnuTKCbGNp6yOak4CEK7h29faODo3dZZkVVa41pVDF5eTBLkyhROX7Puc9HQrT/ZEotnu+LXvvWZM/T/3F6KEj2hsqdtZUBnswryvUvs11LIJf3XkNzZo7geFkfEPdLR+oBFND9JLSUSk4LddDHRPZo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=EXErP1tg; arc=none smtp.client-ip=209.85.218.44 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="EXErP1tg" Received: by mail-ej1-f44.google.com with SMTP id a640c23a62f3a-a9aa8895facso338674966b.2 for ; Wed, 23 Oct 2024 04:44:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1729683844; x=1730288644; darn=vger.kernel.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=EXErP1tgIT7ow2MLebopcMO9QsJVfHVMYuvLMpiC0tzDx+HPF8Os2sG+iPVcqs3Qlt J7/Zr7q+1g/Ip21bAJ3VrT4hg5w4ooFrm/22B6qvc2Un11pxLmDzh+yzN2WjnrPh8Ksl 001EQLE4La4xCs1wdnSS+T0moGBDzM/CQb6/I5C0J1nj+vISGbP8cVW9dlQZ5MwLm6LG gmEgPV2axgLHGGpD0xF5Y4W9evIHyb9iiizrd6DamU5Z9uXhdyuEZMhZGtA9fAWj66RL woQjnIkSlg+P27EuKqF9z8Hk5WhIYGSzI5q7sdIjTRnPXqgVYbWaVZrheqUowEv+Cygw LoLQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729683844; x=1730288644; 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=PLWjDFIUsob6U26lILff2bfgxuYi3ineoxxrB9MBlOOAn01GtqgBMQa3uTgNskRWFa 6W7YpsImfzdtzMZ8twrk+fkt8lNqco557srqt1g+5MW6Bq+1ZhoGYIpVXMyWDgxnP5o0 M9KU5g728x/VfbkImPud6FGZ6ZYR4rjmLsE22u43nP4NIOhzCp9drT/xlVWpUrQZYSs+ OD/dFEUIfYvkdpqA0quI5wLMVyNpW2/DsAj8pu3/ZQlRW0b9Fqcp5yeGcnUPeVQ61ebs nyLuOzuXx49J1QL1PP7FQYA8ywcOAbGX97Mf68oCu5P88dtcyIrHTv2A80wly71mW383 R/WA== X-Forwarded-Encrypted: i=1; AJvYcCU9p4ruCe4TWvjkvHI0yiWW3ADuKYb57VOX9SaAJygaYkhvP8FrZ+YjAxSoj1ToFiErqdI=@vger.kernel.org X-Gm-Message-State: AOJu0Yy615SfbK/YWVSKp27yK5Tk7EYrR/bUhvFZnm3dPNu+6m4qrf6Q 6qFHzWvBP0sd+VQcdCB14iWdTXKraoJP8nMKOrwb4mcNFWXMaz5qKw4twAkqdYI= X-Google-Smtp-Source: AGHT+IHMnbwSpFbIxFr8E05r4uLkxn6q0bmtEG4CkFZ2WZbJ45lEqJq6MM15OG/HAzJxk8Ota85Nkw== X-Received: by 2002:a17:907:a4c:b0:a9a:e9c:1d8d with SMTP id a640c23a62f3a-a9abf8664aamr189274166b.17.1729683844365; Wed, 23 Oct 2024 04:44:04 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a9a91571ed3sm463602366b.164.2024.10.23.04.44.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Oct 2024 04:44:03 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id B34075FC34; Wed, 23 Oct 2024 12:34:08 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Zhao Liu , Eduardo Habkost , Pierrick Bouvier , Peter Maydell , Yanan Wang , John Snow , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , devel@lists.libvirt.org, Marcelo Tosatti , Riku Voipio , Wainer dos Santos Moschetta , Marcel Apfelbaum , Paolo Bonzini , Mahmoud Mandour , Laurent Vivier , Jiaxun Yang , "Edgar E. Iglesias" , Richard Henderson , Alexandre Iooss , qemu-arm@nongnu.org, =?utf-8?q?Daniel_?= =?utf-8?q?P=2E_Berrang=C3=A9?= , =?utf-8?q?Marc-Andr?= =?utf-8?q?=C3=A9_Lureau?= , Cleber Rosa , kvm@vger.kernel.org, Beraldo Leal , Thomas Huth , =?utf-8?q?Alex_Benn=C3=A9e?= , Robbin Ehn Subject: [PATCH v3 18/18] plugins: fix qemu_plugin_reset Date: Wed, 23 Oct 2024 12:34:06 +0100 Message-Id: <20241023113406.1284676-19-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241023113406.1284676-1-alex.bennee@linaro.org> References: <20241023113406.1284676-1-alex.bennee@linaro.org> Precedence: bulk X-Mailing-List: kvm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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; }