From nobody Thu May 16 09:20:53 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1658758241; cv=none; d=zohomail.com; s=zohoarc; b=lt/yR+CRAQovjkCNP0Ry1Wd/boMM6VQQd7Xte/bGQIR592zoJs4rxWX/Vl81llJan+xfW9NKC6ptInDsfagfIYeXJZQSFqbpGkUFaqV6pgLWAf4LAySXE1PYck+PtKJccempPbiw4spGqfKEcJecbyosgHVywyezwa2PK6Vq7E0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1658758241; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=mJGYXebDFqVvPg297f4Cmt4PgS14GK+fT+8gV4JsznE=; b=kum/T9s8E6axSXmJffFES9EmCZlbwZmFxFvj8HpZ+Qjzw8Ibj1CJ+io6pcMQto7Cda90+ftnpLiMNJosEwCNwS5keY8pfqiagaGD+5ahrIwwuNEyXqWwAKdYWePpu+/yYFSkc62WYVUKW7PSBKw0R2CDX/E88ALJWIH73oAfQiY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1658758241465905.2145801444285; Mon, 25 Jul 2022 07:10:41 -0700 (PDT) Received: from localhost ([::1]:43160 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oFynA-0004vG-H6 for importer@patchew.org; Mon, 25 Jul 2022 10:10:40 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47720) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oFyi9-0000rc-Rx for qemu-devel@nongnu.org; Mon, 25 Jul 2022 10:05:31 -0400 Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]:36723) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oFyi5-0000Da-3t for qemu-devel@nongnu.org; Mon, 25 Jul 2022 10:05:28 -0400 Received: by mail-wr1-x42e.google.com with SMTP id g2so8064804wru.3 for ; Mon, 25 Jul 2022 07:05:24 -0700 (PDT) Received: from zen.linaroharston ([185.81.254.11]) by smtp.gmail.com with ESMTPSA id f7-20020a1c3807000000b003a3080eacb9sm14742584wma.24.2022.07.25.07.05.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Jul 2022 07:05:21 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id AAF311FFB8; Mon, 25 Jul 2022 15:05:20 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=mJGYXebDFqVvPg297f4Cmt4PgS14GK+fT+8gV4JsznE=; b=d4eOiBex87nNlOa/cP3KcK6P0qQBML1UWguh2twF3FhSrmUV/zXBKf86ooY+p854/9 up98r5OQ37Ku/ghZPH3xiI5TrsDY671Sey5iSDLjzKIdKh463lfUSR2NQq8m32c3xC3F tMGE+m6ubxfyNUbEx8RrlN9B+EbJyaRGeXFjvLZ//lMcnuUelt4EtjRQPTBuJnymjlgz QjuDGgjDEq9iutQlEQNU8WpnAzGXb4IujwLYy43wg29+XJtzsd8bHaaZqT7UwcM++kuR fadWea6bDjWvx8wKAiDnEYsXgGbFXCsj8uypZbocgc//AJWaOQJEs33GtZrurdm0JLx9 WXRA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=mJGYXebDFqVvPg297f4Cmt4PgS14GK+fT+8gV4JsznE=; b=6yUCgeNMnkHL8e8d9/7R5GY7t08RdpAP6Z6WADvEiCwY+408yhCTQS1HU/ooyPcW4O Z0RZzqzDsUO3dOvQvZHMoqA/o1opUZVeXfve528MMkkGjRKPRVkPqcMHACz/WItJocP6 JnDtEIto+5MqKKVg5ayeZqnxU5q66JDeZrQBYOH7ozqVGAp+zqeaxUJap7rxj1p7l+eC JMAdlVOdUkNVu5bfdX/5gndVPMn1meQoMlo65VjhdpYfYM3zInT/ZJEmXRWdH5jF/5WH jlxkr/3u9OIZiHHLddxj1gT6S5X8ZsMaUOocANSJDI6DIP2TeaAPZASTWUDWFoSWZClC 3e4Q== X-Gm-Message-State: AJIora+bLDVHJurDovXZhPqbhVgQSLtxf8OGnNPHfr9TpRwLJnv3BHeJ Lq07Q/Fa2FeFu3OpA6tf44rSVg== X-Google-Smtp-Source: AGRyM1trrJ7p9mf2n2xulGMlWXvPcSvJaqKYDhDqHoTwN6UmBvQAWyVzQC0m9Pcq6R5ekod17te6lw== X-Received: by 2002:a5d:5847:0:b0:21d:b75e:12d0 with SMTP id i7-20020a5d5847000000b0021db75e12d0mr7604049wrf.208.1658757922987; Mon, 25 Jul 2022 07:05:22 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: fam@euphon.net, berrange@redhat.com, f4bug@amsat.org, aurelien@aurel32.net, pbonzini@redhat.com, stefanha@redhat.com, crosa@redhat.com, peter.maydell@linaro.org, Thomas Huth , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Ed Maste , Li-Wen Hsu , Wainer dos Santos Moschetta , Beraldo Leal Subject: [PATCH v1 01/13] tests: refresh to latest libvirt-ci module Date: Mon, 25 Jul 2022 15:05:08 +0100 Message-Id: <20220725140520.515340-2-alex.bennee@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220725140520.515340-1-alex.bennee@linaro.org> References: <20220725140520.515340-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::42e; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42e.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1658758243321100001 From: Daniel P. Berrang=C3=A9 Notable changes: - libvirt-ci source tree was re-arranged, so the script we run now lives in a bin/ sub-dir - opensuse 15.2 is replaced by opensuse 15.3 - libslirp is temporarily dropped on opensuse as the libslirp-version.h is broken https://bugzilla.opensuse.org/show_bug.cgi?id=3D1201551 - The incorrectly named python3-virtualenv module was changed to python3-venv, but most distros don't need any package as 'venv' is a standard part of python - glibc-static was renamed to libc-static, to reflect fact that it isn't going to be glibc on all distros - The cmocka/json-c deps that were manually added to the centos dockerfile and are now consistently added to all targets Acked-by: Thomas Huth Signed-off-by: Daniel P. Berrang=C3=A9 Message-Id: <20220722130431.2319019-2-berrange@redhat.com> Signed-off-by: Alex Benn=C3=A9e Acked-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- .gitlab-ci.d/cirrus/freebsd-12.vars | 3 +-- .gitlab-ci.d/cirrus/freebsd-13.vars | 3 +-- .gitlab-ci.d/cirrus/macos-11.vars | 4 ++-- tests/docker/dockerfiles/alpine.docker | 4 +++- tests/docker/dockerfiles/centos8.docker | 6 +++--- tests/docker/dockerfiles/debian-amd64.docker | 2 ++ tests/docker/dockerfiles/debian-arm64-cross.docker | 2 ++ tests/docker/dockerfiles/debian-armel-cross.docker | 2 ++ tests/docker/dockerfiles/debian-armhf-cross.docker | 2 ++ tests/docker/dockerfiles/debian-mips64el-cross.docker | 2 ++ tests/docker/dockerfiles/debian-mipsel-cross.docker | 2 ++ tests/docker/dockerfiles/debian-ppc64el-cross.docker | 2 ++ tests/docker/dockerfiles/debian-s390x-cross.docker | 2 ++ tests/docker/dockerfiles/fedora.docker | 3 ++- tests/docker/dockerfiles/opensuse-leap.docker | 7 ++++--- tests/docker/dockerfiles/ubuntu2004.docker | 2 ++ tests/lcitool/libvirt-ci | 2 +- tests/lcitool/projects/qemu.yml | 6 ++++-- tests/lcitool/refresh | 4 ++-- 19 files changed, 41 insertions(+), 19 deletions(-) diff --git a/.gitlab-ci.d/cirrus/freebsd-12.vars b/.gitlab-ci.d/cirrus/free= bsd-12.vars index f59263731f..8fa5a320e9 100644 --- a/.gitlab-ci.d/cirrus/freebsd-12.vars +++ b/.gitlab-ci.d/cirrus/freebsd-12.vars @@ -1,5 +1,4 @@ # THIS FILE WAS AUTO-GENERATED -# ... and then edited to fix py39, pending proper lcitool update. # # $ lcitool variables freebsd-12 qemu # @@ -12,6 +11,6 @@ MAKE=3D'/usr/local/bin/gmake' NINJA=3D'/usr/local/bin/ninja' PACKAGING_COMMAND=3D'pkg' PIP3=3D'/usr/local/bin/pip-3.8' -PKGS=3D'alsa-lib bash bzip2 ca_root_nss capstone4 ccache cdrkit-genisoimag= e ctags curl cyrus-sasl dbus diffutils dtc fusefs-libs3 gettext git glib gm= ake gnutls gsed gtk3 libepoxy libffi libgcrypt libjpeg-turbo libnfs libspic= e-server libssh libtasn1 llvm lzo2 meson ncurses nettle ninja opencv perl5 = pixman pkgconf png py39-numpy py39-pillow py39-pip py39-sphinx py39-sphinx_= rtd_theme py39-virtualenv py39-yaml python3 rpm2cpio sdl2 sdl2_image snappy= spice-protocol tesseract texinfo usbredir virglrenderer vte3 zstd' +PKGS=3D'alsa-lib bash bzip2 ca_root_nss capstone4 ccache cdrkit-genisoimag= e cmocka ctags curl cyrus-sasl dbus diffutils dtc fusefs-libs3 gettext git = glib gmake gnutls gsed gtk3 json-c libepoxy libffi libgcrypt libjpeg-turbo = libnfs libspice-server libssh libtasn1 llvm lzo2 meson ncurses nettle ninja= opencv perl5 pixman pkgconf png py39-numpy py39-pillow py39-pip py39-sphin= x py39-sphinx_rtd_theme py39-yaml python3 rpm2cpio sdl2 sdl2_image snappy s= pice-protocol tesseract texinfo usbredir virglrenderer vte3 zstd' PYPI_PKGS=3D'' PYTHON=3D'/usr/local/bin/python3' diff --git a/.gitlab-ci.d/cirrus/freebsd-13.vars b/.gitlab-ci.d/cirrus/free= bsd-13.vars index 40fc961398..8ed7e33a77 100644 --- a/.gitlab-ci.d/cirrus/freebsd-13.vars +++ b/.gitlab-ci.d/cirrus/freebsd-13.vars @@ -1,5 +1,4 @@ # THIS FILE WAS AUTO-GENERATED -# ... and then edited to fix py39, pending proper lcitool update. # # $ lcitool variables freebsd-13 qemu # @@ -12,6 +11,6 @@ MAKE=3D'/usr/local/bin/gmake' NINJA=3D'/usr/local/bin/ninja' PACKAGING_COMMAND=3D'pkg' PIP3=3D'/usr/local/bin/pip-3.8' -PKGS=3D'alsa-lib bash bzip2 ca_root_nss capstone4 ccache cdrkit-genisoimag= e ctags curl cyrus-sasl dbus diffutils dtc fusefs-libs3 gettext git glib gm= ake gnutls gsed gtk3 libepoxy libffi libgcrypt libjpeg-turbo libnfs libspic= e-server libssh libtasn1 llvm lzo2 meson ncurses nettle ninja opencv perl5 = pixman pkgconf png py39-numpy py39-pillow py39-pip py39-sphinx py39-sphinx_= rtd_theme py39-virtualenv py39-yaml python3 rpm2cpio sdl2 sdl2_image snappy= spice-protocol tesseract texinfo usbredir virglrenderer vte3 zstd' +PKGS=3D'alsa-lib bash bzip2 ca_root_nss capstone4 ccache cdrkit-genisoimag= e cmocka ctags curl cyrus-sasl dbus diffutils dtc fusefs-libs3 gettext git = glib gmake gnutls gsed gtk3 json-c libepoxy libffi libgcrypt libjpeg-turbo = libnfs libspice-server libssh libtasn1 llvm lzo2 meson ncurses nettle ninja= opencv perl5 pixman pkgconf png py39-numpy py39-pillow py39-pip py39-sphin= x py39-sphinx_rtd_theme py39-yaml python3 rpm2cpio sdl2 sdl2_image snappy s= pice-protocol tesseract texinfo usbredir virglrenderer vte3 zstd' PYPI_PKGS=3D'' PYTHON=3D'/usr/local/bin/python3' diff --git a/.gitlab-ci.d/cirrus/macos-11.vars b/.gitlab-ci.d/cirrus/macos-= 11.vars index cfe9181fd4..bec6e862d4 100644 --- a/.gitlab-ci.d/cirrus/macos-11.vars +++ b/.gitlab-ci.d/cirrus/macos-11.vars @@ -11,6 +11,6 @@ MAKE=3D'/usr/local/bin/gmake' NINJA=3D'/usr/local/bin/ninja' PACKAGING_COMMAND=3D'brew' PIP3=3D'/usr/local/bin/pip3' -PKGS=3D'bash bc bzip2 capstone ccache ctags curl dbus diffutils dtc gcovr = gettext git glib gnu-sed gnutls gtk+3 jemalloc jpeg-turbo libepoxy libffi l= ibgcrypt libiscsi libnfs libpng libslirp libssh libtasn1 libusb llvm lzo ma= ke meson ncurses nettle ninja perl pixman pkg-config python3 rpm2cpio sdl2 = sdl2_image snappy sparse spice-protocol tesseract texinfo usbredir vde vte3= zlib zstd' -PYPI_PKGS=3D'PyYAML numpy pillow sphinx sphinx-rtd-theme virtualenv' +PKGS=3D'bash bc bzip2 capstone ccache cmocka ctags curl dbus diffutils dtc= gcovr gettext git glib gnu-sed gnutls gtk+3 jemalloc jpeg-turbo json-c lib= epoxy libffi libgcrypt libiscsi libnfs libpng libslirp libssh libtasn1 libu= sb llvm lzo make meson ncurses nettle ninja perl pixman pkg-config python3 = rpm2cpio sdl2 sdl2_image snappy sparse spice-protocol tesseract texinfo usb= redir vde vte3 zlib zstd' +PYPI_PKGS=3D'PyYAML numpy pillow sphinx sphinx-rtd-theme' PYTHON=3D'/usr/local/bin/python3' diff --git a/tests/docker/dockerfiles/alpine.docker b/tests/docker/dockerfi= les/alpine.docker index 3f4c0f95cb..806cb19f17 100644 --- a/tests/docker/dockerfiles/alpine.docker +++ b/tests/docker/dockerfiles/alpine.docker @@ -21,6 +21,7 @@ RUN apk update && \ cdrkit \ ceph-dev \ clang \ + cmocka-dev \ ctags \ curl-dev \ cyrus-sasl-dev \ @@ -39,6 +40,7 @@ RUN apk update && \ glib-static \ gnutls-dev \ gtk+3.0-dev \ + json-c-dev \ libaio-dev \ libbpf-dev \ libcap-ng-dev \ @@ -64,6 +66,7 @@ RUN apk update && \ mesa-dev \ meson \ multipath-tools \ + musl-dev \ ncurses-dev \ ndctl-dev \ net-tools \ @@ -81,7 +84,6 @@ RUN apk update && \ py3-pip \ py3-sphinx \ py3-sphinx_rtd_theme \ - py3-virtualenv \ py3-yaml \ python3 \ rpm2cpio \ diff --git a/tests/docker/dockerfiles/centos8.docker b/tests/docker/dockerf= iles/centos8.docker index 10618bfa83..3c29883332 100644 --- a/tests/docker/dockerfiles/centos8.docker +++ b/tests/docker/dockerfiles/centos8.docker @@ -6,11 +6,12 @@ =20 FROM quay.io/centos/centos:stream8 =20 -RUN dnf update -y && \ +RUN dnf distro-sync -y && \ dnf install 'dnf-command(config-manager)' -y && \ dnf config-manager --set-enabled -y powertools && \ dnf install -y centos-release-advanced-virtualization && \ dnf install -y epel-release && \ + dnf install -y epel-next-release && \ dnf install -y \ SDL2-devel \ alsa-lib-devel \ @@ -45,6 +46,7 @@ RUN dnf update -y && \ gtk3-devel \ hostname \ jemalloc-devel \ + json-c-devel \ libaio-devel \ libasan \ libattr-devel \ @@ -60,7 +62,6 @@ RUN dnf update -y && \ libgcrypt-devel \ libiscsi-devel \ libjpeg-devel \ - json-c-devel \ libnfs-devel \ libpmem-devel \ libpng-devel \ @@ -99,7 +100,6 @@ RUN dnf update -y && \ python3-pip \ python3-sphinx \ python3-sphinx_rtd_theme \ - python3-virtualenv \ rdma-core-devel \ rpm \ sed \ diff --git a/tests/docker/dockerfiles/debian-amd64.docker b/tests/docker/do= ckerfiles/debian-amd64.docker index 503e282802..8d78ba2484 100644 --- a/tests/docker/dockerfiles/debian-amd64.docker +++ b/tests/docker/dockerfiles/debian-amd64.docker @@ -41,6 +41,7 @@ RUN export DEBIAN_FRONTEND=3Dnoninteractive && \ libcacard-dev \ libcap-ng-dev \ libcapstone-dev \ + libcmocka-dev \ libcurl4-gnutls-dev \ libdaxctl-dev \ libdrm-dev \ @@ -59,6 +60,7 @@ RUN export DEBIAN_FRONTEND=3Dnoninteractive && \ libiscsi-dev \ libjemalloc-dev \ libjpeg62-turbo-dev \ + libjson-c-dev \ liblttng-ust-dev \ liblzo2-dev \ libncursesw5-dev \ diff --git a/tests/docker/dockerfiles/debian-arm64-cross.docker b/tests/doc= ker/dockerfiles/debian-arm64-cross.docker index b60426834c..b7ba2c527f 100644 --- a/tests/docker/dockerfiles/debian-arm64-cross.docker +++ b/tests/docker/dockerfiles/debian-arm64-cross.docker @@ -84,6 +84,7 @@ RUN export DEBIAN_FRONTEND=3Dnoninteractive && \ libcacard-dev:arm64 \ libcap-ng-dev:arm64 \ libcapstone-dev:arm64 \ + libcmocka-dev:arm64 \ libcurl4-gnutls-dev:arm64 \ libdaxctl-dev:arm64 \ libdrm-dev:arm64 \ @@ -102,6 +103,7 @@ RUN export DEBIAN_FRONTEND=3Dnoninteractive && \ libiscsi-dev:arm64 \ libjemalloc-dev:arm64 \ libjpeg62-turbo-dev:arm64 \ + libjson-c-dev:arm64 \ liblttng-ust-dev:arm64 \ liblzo2-dev:arm64 \ libncursesw5-dev:arm64 \ diff --git a/tests/docker/dockerfiles/debian-armel-cross.docker b/tests/doc= ker/dockerfiles/debian-armel-cross.docker index a6153e5a83..9b1778261e 100644 --- a/tests/docker/dockerfiles/debian-armel-cross.docker +++ b/tests/docker/dockerfiles/debian-armel-cross.docker @@ -84,6 +84,7 @@ RUN export DEBIAN_FRONTEND=3Dnoninteractive && \ libcacard-dev:armel \ libcap-ng-dev:armel \ libcapstone-dev:armel \ + libcmocka-dev:armel \ libcurl4-gnutls-dev:armel \ libdaxctl-dev:armel \ libdrm-dev:armel \ @@ -102,6 +103,7 @@ RUN export DEBIAN_FRONTEND=3Dnoninteractive && \ libiscsi-dev:armel \ libjemalloc-dev:armel \ libjpeg62-turbo-dev:armel \ + libjson-c-dev:armel \ liblttng-ust-dev:armel \ liblzo2-dev:armel \ libncursesw5-dev:armel \ diff --git a/tests/docker/dockerfiles/debian-armhf-cross.docker b/tests/doc= ker/dockerfiles/debian-armhf-cross.docker index a2ebce96f8..addbc9a793 100644 --- a/tests/docker/dockerfiles/debian-armhf-cross.docker +++ b/tests/docker/dockerfiles/debian-armhf-cross.docker @@ -84,6 +84,7 @@ RUN export DEBIAN_FRONTEND=3Dnoninteractive && \ libcacard-dev:armhf \ libcap-ng-dev:armhf \ libcapstone-dev:armhf \ + libcmocka-dev:armhf \ libcurl4-gnutls-dev:armhf \ libdaxctl-dev:armhf \ libdrm-dev:armhf \ @@ -102,6 +103,7 @@ RUN export DEBIAN_FRONTEND=3Dnoninteractive && \ libiscsi-dev:armhf \ libjemalloc-dev:armhf \ libjpeg62-turbo-dev:armhf \ + libjson-c-dev:armhf \ liblttng-ust-dev:armhf \ liblzo2-dev:armhf \ libncursesw5-dev:armhf \ diff --git a/tests/docker/dockerfiles/debian-mips64el-cross.docker b/tests/= docker/dockerfiles/debian-mips64el-cross.docker index b02dcb7fd9..1bb7d8e184 100644 --- a/tests/docker/dockerfiles/debian-mips64el-cross.docker +++ b/tests/docker/dockerfiles/debian-mips64el-cross.docker @@ -83,6 +83,7 @@ RUN export DEBIAN_FRONTEND=3Dnoninteractive && \ libcacard-dev:mips64el \ libcap-ng-dev:mips64el \ libcapstone-dev:mips64el \ + libcmocka-dev:mips64el \ libcurl4-gnutls-dev:mips64el \ libdaxctl-dev:mips64el \ libdrm-dev:mips64el \ @@ -101,6 +102,7 @@ RUN export DEBIAN_FRONTEND=3Dnoninteractive && \ libiscsi-dev:mips64el \ libjemalloc-dev:mips64el \ libjpeg62-turbo-dev:mips64el \ + libjson-c-dev:mips64el \ liblttng-ust-dev:mips64el \ liblzo2-dev:mips64el \ libncursesw5-dev:mips64el \ diff --git a/tests/docker/dockerfiles/debian-mipsel-cross.docker b/tests/do= cker/dockerfiles/debian-mipsel-cross.docker index b6d99ae324..a94b459b23 100644 --- a/tests/docker/dockerfiles/debian-mipsel-cross.docker +++ b/tests/docker/dockerfiles/debian-mipsel-cross.docker @@ -83,6 +83,7 @@ RUN export DEBIAN_FRONTEND=3Dnoninteractive && \ libcacard-dev:mipsel \ libcap-ng-dev:mipsel \ libcapstone-dev:mipsel \ + libcmocka-dev:mipsel \ libcurl4-gnutls-dev:mipsel \ libdaxctl-dev:mipsel \ libdrm-dev:mipsel \ @@ -101,6 +102,7 @@ RUN export DEBIAN_FRONTEND=3Dnoninteractive && \ libiscsi-dev:mipsel \ libjemalloc-dev:mipsel \ libjpeg62-turbo-dev:mipsel \ + libjson-c-dev:mipsel \ liblttng-ust-dev:mipsel \ liblzo2-dev:mipsel \ libncursesw5-dev:mipsel \ diff --git a/tests/docker/dockerfiles/debian-ppc64el-cross.docker b/tests/d= ocker/dockerfiles/debian-ppc64el-cross.docker index bcf04bc90b..c641fd5d0e 100644 --- a/tests/docker/dockerfiles/debian-ppc64el-cross.docker +++ b/tests/docker/dockerfiles/debian-ppc64el-cross.docker @@ -84,6 +84,7 @@ RUN export DEBIAN_FRONTEND=3Dnoninteractive && \ libcacard-dev:ppc64el \ libcap-ng-dev:ppc64el \ libcapstone-dev:ppc64el \ + libcmocka-dev:ppc64el \ libcurl4-gnutls-dev:ppc64el \ libdaxctl-dev:ppc64el \ libdrm-dev:ppc64el \ @@ -102,6 +103,7 @@ RUN export DEBIAN_FRONTEND=3Dnoninteractive && \ libiscsi-dev:ppc64el \ libjemalloc-dev:ppc64el \ libjpeg62-turbo-dev:ppc64el \ + libjson-c-dev:ppc64el \ liblttng-ust-dev:ppc64el \ liblzo2-dev:ppc64el \ libncursesw5-dev:ppc64el \ diff --git a/tests/docker/dockerfiles/debian-s390x-cross.docker b/tests/doc= ker/dockerfiles/debian-s390x-cross.docker index ff79a2cc4f..c0cbe09e66 100644 --- a/tests/docker/dockerfiles/debian-s390x-cross.docker +++ b/tests/docker/dockerfiles/debian-s390x-cross.docker @@ -84,6 +84,7 @@ RUN export DEBIAN_FRONTEND=3Dnoninteractive && \ libcacard-dev:s390x \ libcap-ng-dev:s390x \ libcapstone-dev:s390x \ + libcmocka-dev:s390x \ libcurl4-gnutls-dev:s390x \ libdaxctl-dev:s390x \ libdrm-dev:s390x \ @@ -102,6 +103,7 @@ RUN export DEBIAN_FRONTEND=3Dnoninteractive && \ libiscsi-dev:s390x \ libjemalloc-dev:s390x \ libjpeg62-turbo-dev:s390x \ + libjson-c-dev:s390x \ liblttng-ust-dev:s390x \ liblzo2-dev:s390x \ libncursesw5-dev:s390x \ diff --git a/tests/docker/dockerfiles/fedora.docker b/tests/docker/dockerfi= les/fedora.docker index 2e6a84abfd..b39d311bbc 100644 --- a/tests/docker/dockerfiles/fedora.docker +++ b/tests/docker/dockerfiles/fedora.docker @@ -53,12 +53,14 @@ exec "$@"' > /usr/bin/nosync && \ gtk3-devel \ hostname \ jemalloc-devel \ + json-c-devel \ libaio-devel \ libasan \ libattr-devel \ libbpf-devel \ libcacard-devel \ libcap-ng-devel \ + libcmocka-devel \ libcurl-devel \ libdrm-devel \ libepoxy-devel \ @@ -106,7 +108,6 @@ exec "$@"' > /usr/bin/nosync && \ python3-pip \ python3-sphinx \ python3-sphinx_rtd_theme \ - python3-virtualenv \ rdma-core-devel \ rpm \ sed \ diff --git a/tests/docker/dockerfiles/opensuse-leap.docker b/tests/docker/d= ockerfiles/opensuse-leap.docker index 6f5993d602..047a435ab5 100644 --- a/tests/docker/dockerfiles/opensuse-leap.docker +++ b/tests/docker/dockerfiles/opensuse-leap.docker @@ -1,10 +1,10 @@ # THIS FILE WAS AUTO-GENERATED # -# $ lcitool dockerfile --layers all opensuse-leap-152 qemu +# $ lcitool dockerfile --layers all opensuse-leap-153 qemu # # https://gitlab.com/libvirt/libvirt-ci =20 -FROM registry.opensuse.org/opensuse/leap:15.2 +FROM registry.opensuse.org/opensuse/leap:15.3 =20 RUN zypper update -y && \ zypper install -y \ @@ -44,6 +44,7 @@ RUN zypper update -y && \ libbz2-devel \ libcacard-devel \ libcap-ng-devel \ + libcmocka-devel \ libcurl-devel \ libdrm-devel \ libepoxy-devel \ @@ -53,6 +54,7 @@ RUN zypper update -y && \ libgnutls-devel \ libiscsi-devel \ libjpeg8-devel \ + libjson-c-devel \ libndctl-devel \ libnettle-devel \ libnfs-devel \ @@ -94,7 +96,6 @@ RUN zypper update -y && \ python3-pip \ python3-setuptools \ python3-sphinx_rtd_theme \ - python3-virtualenv \ python3-wheel \ rdma-core-devel \ rpm \ diff --git a/tests/docker/dockerfiles/ubuntu2004.docker b/tests/docker/dock= erfiles/ubuntu2004.docker index a3b38884e3..99803b343b 100644 --- a/tests/docker/dockerfiles/ubuntu2004.docker +++ b/tests/docker/dockerfiles/ubuntu2004.docker @@ -40,6 +40,7 @@ RUN export DEBIAN_FRONTEND=3Dnoninteractive && \ libcacard-dev \ libcap-ng-dev \ libcapstone-dev \ + libcmocka-dev \ libcurl4-gnutls-dev \ libdaxctl-dev \ libdrm-dev \ @@ -58,6 +59,7 @@ RUN export DEBIAN_FRONTEND=3Dnoninteractive && \ libiscsi-dev \ libjemalloc-dev \ libjpeg-turbo8-dev \ + libjson-c-dev \ liblttng-ust-dev \ liblzo2-dev \ libncursesw5-dev \ diff --git a/tests/lcitool/libvirt-ci b/tests/lcitool/libvirt-ci index f83b916d5e..324355cf62 160000 --- a/tests/lcitool/libvirt-ci +++ b/tests/lcitool/libvirt-ci @@ -1 +1 @@ -Subproject commit f83b916d5efa4bd33fbf4b7ea41bf6d535cc63fb +Subproject commit 324355cf62e86fb551408575afb123bac989ac37 diff --git a/tests/lcitool/projects/qemu.yml b/tests/lcitool/projects/qemu.= yml index d068a7a8de..d9f826f8eb 100644 --- a/tests/lcitool/projects/qemu.yml +++ b/tests/lcitool/projects/qemu.yml @@ -9,6 +9,7 @@ packages: - capstone - ccache - clang + - cmocka - column - ctags - cyrus-sasl @@ -26,15 +27,16 @@ packages: - genisoimage - glib2 - glib2-static - - glibc-static - glusterfs - gnutls - gtk3 - hostname + - json-c - libaio - libattr - libasan - libbpf + - libc-static - libcacard - libcap-ng - libcurl @@ -90,7 +92,7 @@ packages: - python3-pip - python3-sphinx - python3-sphinx-rtd-theme - - python3-virtualenv + - python3-venv - rpm2cpio - sdl2 - sdl2-image diff --git a/tests/lcitool/refresh b/tests/lcitool/refresh index 5e260f8cd6..2a59150322 100755 --- a/tests/lcitool/refresh +++ b/tests/lcitool/refresh @@ -25,7 +25,7 @@ self_dir =3D Path(__file__).parent src_dir =3D self_dir.parent.parent dockerfiles_dir =3D Path(src_dir, "tests", "docker", "dockerfiles") =20 -lcitool_path =3D Path(self_dir, "libvirt-ci", "lcitool") +lcitool_path =3D Path(self_dir, "libvirt-ci", "bin", "lcitool") =20 lcitool_cmd =3D [lcitool_path, "--data-dir", self_dir] =20 @@ -112,7 +112,7 @@ try: generate_dockerfile("debian-amd64", "debian-11", trailer=3D"".join(debian11_extras)) generate_dockerfile("fedora", "fedora-35") - generate_dockerfile("opensuse-leap", "opensuse-leap-152") + generate_dockerfile("opensuse-leap", "opensuse-leap-153") generate_dockerfile("ubuntu2004", "ubuntu-2004", trailer=3D"".join(ubuntu2004_tsanhack)) =20 --=20 2.30.2 From nobody Thu May 16 09:20:53 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1658758429; cv=none; d=zohomail.com; s=zohoarc; b=i5dBU5QAJhvrQj5uolVpFzrSlHOA5xEU2JFhCnIN2o6FWTkY3jVPxhctF66XhqzPcKxXFNBuC8oeuTpoB93XAPs7jCETWJ32rNHN6ZjqpLAmxyZ75BjnBQqNHWI9idxHIt8ZLRumlhqTZOz/RbvoybMNAdXE5WH4ad28KiL7Cmg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1658758429; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=bM/w8+B7ncjv5XtvNRo9ixZZ47c0W7NUiHr8jF0XJI4=; b=FuvU4KahPKpy6mccEm3h4p4dcf54kRYhZvk+hdrwy3wfrONzhddUcec/jCsBfgv4SDwWh95g6tJf/wLsHOXPZrIOvJ/XCivnkymhkSo4U6gG8j4auqyAHSKiLQMVjhN3WrqP5WPu0OMNFyW6iXjeZiUP5xfIyy6xSWIOnd5Twgc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1658758429801783.9412994552058; Mon, 25 Jul 2022 07:13:49 -0700 (PDT) Received: from localhost ([::1]:51682 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oFyqD-0002Ik-3K for importer@patchew.org; Mon, 25 Jul 2022 10:13:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47724) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oFyi9-0000re-SA for qemu-devel@nongnu.org; Mon, 25 Jul 2022 10:05:31 -0400 Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]:43602) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oFyi6-0000Ei-K8 for qemu-devel@nongnu.org; Mon, 25 Jul 2022 10:05:29 -0400 Received: by mail-wm1-x335.google.com with SMTP id j29-20020a05600c1c1d00b003a2fdafdefbso6431079wms.2 for ; Mon, 25 Jul 2022 07:05:26 -0700 (PDT) Received: from zen.linaroharston ([185.81.254.11]) by smtp.gmail.com with ESMTPSA id l37-20020a05600c1d2500b003a33227e49bsm14606414wms.4.2022.07.25.07.05.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Jul 2022 07:05:21 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id CCEDE1FFBA; Mon, 25 Jul 2022 15:05:20 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=bM/w8+B7ncjv5XtvNRo9ixZZ47c0W7NUiHr8jF0XJI4=; b=ZkkkWPrS4rtAqbK9HDEmqIBZXIyIK59VPM/PiMhW0b5EHcpb6e/OqtghYYjNt1MWTo ClppAtYh3Ix7PMFaIF6U1hz/ae/rwqDOT2N/tf2YDG/BBbesLkjmDt6GPxQGwC+MTUqY YIX+oRo/s/huvdAv2ayFL59OXmer3rSaWKqxzzly0SwP7sj/oa6/qA6YRm0mb6KIEZ/l l0YQj/8DvWyE6uGoUto+QlauWQu915Vii5MyBfkHqgz3t34lHCHotXURjfWYZUt897h7 9J+j+XhCj0C4cqwAFPI1NUZI7fgJtasSMdX0RWXDNYYZ24/wwwwxBM+L/JRx5uxCECIE ssFg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=bM/w8+B7ncjv5XtvNRo9ixZZ47c0W7NUiHr8jF0XJI4=; b=LV8AbgZ3HpuSNB/AMI0KVMKTb4LOCaRwdwYmUgLv3ClsJkyEIb9xZGTDv1aB3InR5P MXvjg942TFgdrbA/NCFaCdn+6AYS301wmaZgrTYPSlXwDYXKwJ2hiHyRrd0sFNZbaAQc bNT5Vxd5qTnAvJ8/Muupp9LH1NAIJipjXZq6TVz0ABdYSypaxIx+JhDmQSgfl/XNs52i Puu5AQm6/g+W64jCFjhPKv00Fro4VeHMXNpsrmBkP6prDifL3R6kzrmZCYb9qa66nteo vRTiwl5Whz+INUo7MrcaDjsQ88h+9mtV2idIwUf9d7ryLbrD+hGwxQNUoE5TXG+a6MNe ocuA== X-Gm-Message-State: AJIora/OaSrhZKL2D1kfkMDmPxkHj10j9fAR39L+DHHY1oz1Qas9kVAC tMrB1pSEoPCbD5z+QjcE7BUGtQ== X-Google-Smtp-Source: AGRyM1urbkIwaFA121M/94cxATqRVKbVxBe5Exb/BIgnk1L02CjiAF88y7PPr6PbXzmFM1njF/Cfwg== X-Received: by 2002:a05:600c:148:b0:3a3:2753:e551 with SMTP id w8-20020a05600c014800b003a32753e551mr21396132wmm.131.1658757925036; Mon, 25 Jul 2022 07:05:25 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: fam@euphon.net, berrange@redhat.com, f4bug@amsat.org, aurelien@aurel32.net, pbonzini@redhat.com, stefanha@redhat.com, crosa@redhat.com, peter.maydell@linaro.org, Thomas Huth , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Wainer dos Santos Moschetta , Beraldo Leal Subject: [PATCH v1 02/13] gitlab: show testlog.txt contents when cirrus/custom-runner jobs fail Date: Mon, 25 Jul 2022 15:05:09 +0100 Message-Id: <20220725140520.515340-3-alex.bennee@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220725140520.515340-1-alex.bennee@linaro.org> References: <20220725140520.515340-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::335; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x335.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1658758443872100001 From: Daniel P. Berrang=C3=A9 When tests fail meson just displays a summary and tells you to look at the testlog.txt file for details. The native jobs on shared runners publish testlog.txt as an artifact. For the Cirrus jobs and custom runner jobs this is not currently possible. The best we can do is cat the log contents on failure, to give maintainers a fighting chance of diagnosing the problem. Reviewed-by: Thomas Huth Signed-off-by: Daniel P. Berrang=C3=A9 Message-Id: <20220722130431.2319019-3-berrange@redhat.com> Signed-off-by: Alex Benn=C3=A9e --- .gitlab-ci.d/cirrus/build.yml | 3 ++- .../custom-runners/centos-stream-8-x86_64.yml | 2 ++ .gitlab-ci.d/custom-runners/ubuntu-20.04-aarch32.yml | 2 ++ .gitlab-ci.d/custom-runners/ubuntu-20.04-aarch64.yml | 12 ++++++++++++ .gitlab-ci.d/custom-runners/ubuntu-20.04-s390x.yml | 12 ++++++++++++ 5 files changed, 30 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.d/cirrus/build.yml b/.gitlab-ci.d/cirrus/build.yml index c555f5d36e..7ef6af8d33 100644 --- a/.gitlab-ci.d/cirrus/build.yml +++ b/.gitlab-ci.d/cirrus/build.yml @@ -32,5 +32,6 @@ build_task: - $MAKE -j$(sysctl -n hw.ncpu) - for TARGET in $TEST_TARGETS ; do - $MAKE -j$(sysctl -n hw.ncpu) $TARGET V=3D1 ; + $MAKE -j$(sysctl -n hw.ncpu) $TARGET V=3D1 + || { cat meson-logs/testlog.txt; exit 1; } ; done diff --git a/.gitlab-ci.d/custom-runners/centos-stream-8-x86_64.yml b/.gitl= ab-ci.d/custom-runners/centos-stream-8-x86_64.yml index 49aa703f55..068b0c4335 100644 --- a/.gitlab-ci.d/custom-runners/centos-stream-8-x86_64.yml +++ b/.gitlab-ci.d/custom-runners/centos-stream-8-x86_64.yml @@ -23,6 +23,8 @@ centos-stream-8-x86_64: - mkdir build - cd build - ../scripts/ci/org.centos/stream/8/x86_64/configure + || { cat config.log meson-logs/meson-log.txt; exit 1; } - make -j"$JOBS" - make NINJA=3D":" check + || { cat meson-logs/testlog.txt; exit 1; } ; - ../scripts/ci/org.centos/stream/8/x86_64/test-avocado diff --git a/.gitlab-ci.d/custom-runners/ubuntu-20.04-aarch32.yml b/.gitlab= -ci.d/custom-runners/ubuntu-20.04-aarch32.yml index 1998460d06..cbfa9cc164 100644 --- a/.gitlab-ci.d/custom-runners/ubuntu-20.04-aarch32.yml +++ b/.gitlab-ci.d/custom-runners/ubuntu-20.04-aarch32.yml @@ -19,5 +19,7 @@ ubuntu-20.04-aarch32-all: - mkdir build - cd build - ../configure --cross-prefix=3Darm-linux-gnueabihf- + || { cat config.log meson-logs/meson-log.txt; exit 1; } - make --output-sync -j`nproc --ignore=3D40` - make --output-sync -j`nproc --ignore=3D40` check V=3D1 + || { cat meson-logs/testlog.txt; exit 1; } ; diff --git a/.gitlab-ci.d/custom-runners/ubuntu-20.04-aarch64.yml b/.gitlab= -ci.d/custom-runners/ubuntu-20.04-aarch64.yml index 65718a188a..3d878914e7 100644 --- a/.gitlab-ci.d/custom-runners/ubuntu-20.04-aarch64.yml +++ b/.gitlab-ci.d/custom-runners/ubuntu-20.04-aarch64.yml @@ -17,9 +17,12 @@ ubuntu-20.04-aarch64-all-linux-static: - mkdir build - cd build - ../configure --enable-debug --static --disable-system --disable-gluster= fs --disable-libssh + || { cat config.log meson-logs/meson-log.txt; exit 1; } - make --output-sync -j`nproc --ignore=3D40` - make --output-sync -j`nproc --ignore=3D40` check V=3D1 + || { cat meson-logs/testlog.txt; exit 1; } ; - make --output-sync -j`nproc --ignore=3D40` check-tcg V=3D1 + || { cat meson-logs/testlog.txt; exit 1; } ; =20 ubuntu-20.04-aarch64-all: needs: [] @@ -38,8 +41,10 @@ ubuntu-20.04-aarch64-all: - mkdir build - cd build - ../configure --disable-libssh + || { cat config.log meson-logs/meson-log.txt; exit 1; } - make --output-sync -j`nproc --ignore=3D40` - make --output-sync -j`nproc --ignore=3D40` check V=3D1 + || { cat meson-logs/testlog.txt; exit 1; } ; =20 ubuntu-20.04-aarch64-alldbg: needs: [] @@ -54,9 +59,11 @@ ubuntu-20.04-aarch64-alldbg: - mkdir build - cd build - ../configure --enable-debug --disable-libssh + || { cat config.log meson-logs/meson-log.txt; exit 1; } - make clean - make --output-sync -j`nproc --ignore=3D40` - make --output-sync -j`nproc --ignore=3D40` check V=3D1 + || { cat meson-logs/testlog.txt; exit 1; } ; =20 ubuntu-20.04-aarch64-clang: needs: [] @@ -75,8 +82,10 @@ ubuntu-20.04-aarch64-clang: - mkdir build - cd build - ../configure --disable-libssh --cc=3Dclang-10 --cxx=3Dclang++-10 --enab= le-sanitizers + || { cat config.log meson-logs/meson-log.txt; exit 1; } - make --output-sync -j`nproc --ignore=3D40` - make --output-sync -j`nproc --ignore=3D40` check V=3D1 + || { cat meson-logs/testlog.txt; exit 1; } ; =20 ubuntu-20.04-aarch64-tci: needs: [] @@ -95,6 +104,7 @@ ubuntu-20.04-aarch64-tci: - mkdir build - cd build - ../configure --disable-libssh --enable-tcg-interpreter + || { cat config.log meson-logs/meson-log.txt; exit 1; } - make --output-sync -j`nproc --ignore=3D40` =20 ubuntu-20.04-aarch64-notcg: @@ -114,5 +124,7 @@ ubuntu-20.04-aarch64-notcg: - mkdir build - cd build - ../configure --disable-libssh --disable-tcg + || { cat config.log meson-logs/meson-log.txt; exit 1; } - make --output-sync -j`nproc --ignore=3D40` - make --output-sync -j`nproc --ignore=3D40` check V=3D1 + || { cat meson-logs/testlog.txt; exit 1; } ; diff --git a/.gitlab-ci.d/custom-runners/ubuntu-20.04-s390x.yml b/.gitlab-c= i.d/custom-runners/ubuntu-20.04-s390x.yml index 03e74c97db..0c835939db 100644 --- a/.gitlab-ci.d/custom-runners/ubuntu-20.04-s390x.yml +++ b/.gitlab-ci.d/custom-runners/ubuntu-20.04-s390x.yml @@ -17,9 +17,12 @@ ubuntu-20.04-s390x-all-linux-static: - mkdir build - cd build - ../configure --enable-debug --static --disable-system --disable-gluster= fs --disable-libssh + || { cat config.log meson-logs/meson-log.txt; exit 1; } - make --output-sync -j`nproc` - make --output-sync -j`nproc` check V=3D1 + || { cat meson-logs/testlog.txt; exit 1; } ; - make --output-sync -j`nproc` check-tcg V=3D1 + || { cat meson-logs/testlog.txt; exit 1; } ; =20 ubuntu-20.04-s390x-all: needs: [] @@ -35,8 +38,10 @@ ubuntu-20.04-s390x-all: - mkdir build - cd build - ../configure --disable-libssh + || { cat config.log meson-logs/meson-log.txt; exit 1; } - make --output-sync -j`nproc` - make --output-sync -j`nproc` check V=3D1 + || { cat meson-logs/testlog.txt; exit 1; } ; =20 ubuntu-20.04-s390x-alldbg: needs: [] @@ -55,9 +60,11 @@ ubuntu-20.04-s390x-alldbg: - mkdir build - cd build - ../configure --enable-debug --disable-libssh + || { cat config.log meson-logs/meson-log.txt; exit 1; } - make clean - make --output-sync -j`nproc` - make --output-sync -j`nproc` check V=3D1 + || { cat meson-logs/testlog.txt; exit 1; } ; =20 ubuntu-20.04-s390x-clang: needs: [] @@ -76,8 +83,10 @@ ubuntu-20.04-s390x-clang: - mkdir build - cd build - ../configure --disable-libssh --cc=3Dclang --cxx=3Dclang++ --enable-san= itizers + || { cat config.log meson-logs/meson-log.txt; exit 1; } - make --output-sync -j`nproc` - make --output-sync -j`nproc` check V=3D1 + || { cat meson-logs/testlog.txt; exit 1; } ; =20 ubuntu-20.04-s390x-tci: needs: [] @@ -96,6 +105,7 @@ ubuntu-20.04-s390x-tci: - mkdir build - cd build - ../configure --disable-libssh --enable-tcg-interpreter + || { cat config.log meson-logs/meson-log.txt; exit 1; } - make --output-sync -j`nproc` =20 ubuntu-20.04-s390x-notcg: @@ -115,5 +125,7 @@ ubuntu-20.04-s390x-notcg: - mkdir build - cd build - ../configure --disable-libssh --disable-tcg + || { cat config.log meson-logs/meson-log.txt; exit 1; } - make --output-sync -j`nproc` - make --output-sync -j`nproc` check V=3D1 + || { cat meson-logs/testlog.txt; exit 1; } ; --=20 2.30.2 From nobody Thu May 16 09:20:53 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1658758284; cv=none; d=zohomail.com; s=zohoarc; b=inYYjV8906KqxFdJjoBVJdtHH35iQCwqSkvkf7xcngdlAEn1m6WuwJvBCAWP2Ho4HZa6F3EmvdvHENW+neHbKUdbMpPcdprtOI0qNrnLDtJgkJDh5cF6jrQTYslh9JisTfgTkRjEuXsC9TC2COJ+laCn8EKyh2kqvkAZyHfw2FA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1658758284; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=cuuXQH2wboaX5IPGA3m9AhAnhitniNjGQ5r1hTwm0bY=; b=MS0REP3KAEdUAXWq7tl7XtAp3ixoBFzO0S2vIKspcRNtQeKAfFg17qOZ2lytylew1UeBoaynyeUjY6iXbjsyuw6tgL1HfHvqUk7hXAzBxRdoaIrh+Uwt8WpaQSCy6M9wM+JQ9Zyd5mkUYtvZXH+c/JZShGeUlxcm495sv79j+eM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 165875828404586.14035159171192; Mon, 25 Jul 2022 07:11:24 -0700 (PDT) Received: from localhost ([::1]:44830 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oFynr-00063K-7S for importer@patchew.org; Mon, 25 Jul 2022 10:11:23 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47748) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oFyiB-0000st-SS for qemu-devel@nongnu.org; Mon, 25 Jul 2022 10:05:34 -0400 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]:38576) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oFyi9-0000FF-IV for qemu-devel@nongnu.org; Mon, 25 Jul 2022 10:05:30 -0400 Received: by mail-wr1-x430.google.com with SMTP id k11so15663607wrx.5 for ; Mon, 25 Jul 2022 07:05:28 -0700 (PDT) Received: from zen.linaroharston ([185.81.254.11]) by smtp.gmail.com with ESMTPSA id q26-20020a056000137a00b0021e0147da47sm11935452wrz.96.2022.07.25.07.05.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Jul 2022 07:05:24 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id DCBB51FFBB; Mon, 25 Jul 2022 15:05:20 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=cuuXQH2wboaX5IPGA3m9AhAnhitniNjGQ5r1hTwm0bY=; b=NKZuv0qNEGzTKaUIUTmBpxVY44OUXGUntwZsgd7wz/7aQxYVFnSfZO3hrkuiUyK2TB lEItGRSpa4+WbUhClr4ZFZMW5MjGouq3EydCRsm+1YKkam2aCddFwfPmq9cfOGfjEMTv W6i2+Vz/NLWX4711waSi41Cx6iAwWNntx05HaYI4HahZ365XkUICbMQnKjzhiJbNspRz cpoR3tywPRIZquZxMGok718TAnFieNXj3qUQHUH1ZTkKAV5K1klc5s3LCiIwrY8iLRWF g4zBbeL6kjWXkbX2+gr/GH8PHYao/RZhFVhGozbdSIMnkKZtthqaORSR4k4JFHmHs4hC r8MA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=cuuXQH2wboaX5IPGA3m9AhAnhitniNjGQ5r1hTwm0bY=; b=giC7QMoV+1PYej1BEce++VilB3ny+rLGOm6MLWz6fhqJPCVbKgEXcJgq853i4RssqC tygfeCswuwaKEa4ulgzLaliKixLoUAEQV3U08AuY5/7cCaeVrRK2V3RWfFc6zxt0ru8I OYW5LqKd68rIjIGMORUwBRAJXio3QWhJvETa57WgfgOfAjmi9O8w5wdRcRJhP7pnp76a +OCElo5TrlDZJw9fapvR9WWSmy7L7YzPkflBVqDdWsKmvmSyzWedA2svyaUKzAdm+uRZ y+MVD3tmkFG+Pdly72U7gG9Zb3XCZdVDnZ+NesnAjeBChkBDc8Fu6kHSgVT/D5DtR2iw ZziQ== X-Gm-Message-State: AJIora8PlwaV2B4akFnIILsetFbaVvaGOVgw365srOmrZF5jTaz4Djcd EXaxDrVH/dziD5O94/X8DjxIlA== X-Google-Smtp-Source: AGRyM1urw2DBqBmWaVL+d+C7TFw0OoYLb1ospBLWszAYL18Us8oScYowis3dM2O8lMprpch0zlM6mA== X-Received: by 2002:a5d:6484:0:b0:21e:8ab7:fbc9 with SMTP id o4-20020a5d6484000000b0021e8ab7fbc9mr3295507wri.316.1658757927898; Mon, 25 Jul 2022 07:05:27 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: fam@euphon.net, berrange@redhat.com, f4bug@amsat.org, aurelien@aurel32.net, pbonzini@redhat.com, stefanha@redhat.com, crosa@redhat.com, peter.maydell@linaro.org, Thomas Huth , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Wainer dos Santos Moschetta , Beraldo Leal Subject: [PATCH v1 03/13] gitlab: drop 'containers-layer2' stage Date: Mon, 25 Jul 2022 15:05:10 +0100 Message-Id: <20220725140520.515340-4-alex.bennee@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220725140520.515340-1-alex.bennee@linaro.org> References: <20220725140520.515340-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::430; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x430.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1658758292845100001 From: Daniel P. Berrang=C3=A9 Since we express dependancies via a 'needs' clause, we don't need to split container builds into separate stages. GitLab happily lets jobs depend on other jobs in the same stage and will run them when possible. Acked-by: Thomas Huth Signed-off-by: Daniel P. Berrang=C3=A9 Message-Id: <20220722130431.2319019-4-berrange@redhat.com> Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- .gitlab-ci.d/container-cross.yml | 24 ++++++++++++------------ .gitlab-ci.d/stages.yml | 1 - 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/.gitlab-ci.d/container-cross.yml b/.gitlab-ci.d/container-cros= s.yml index b7963498a3..505b267542 100644 --- a/.gitlab-ci.d/container-cross.yml +++ b/.gitlab-ci.d/container-cross.yml @@ -1,20 +1,20 @@ alpha-debian-cross-container: extends: .container_job_template - stage: containers-layer2 + stage: containers needs: ['amd64-debian10-container'] variables: NAME: debian-alpha-cross =20 amd64-debian-cross-container: extends: .container_job_template - stage: containers-layer2 + stage: containers needs: ['amd64-debian10-container'] variables: NAME: debian-amd64-cross =20 amd64-debian-user-cross-container: extends: .container_job_template - stage: containers-layer2 + stage: containers needs: ['amd64-debian10-container'] variables: NAME: debian-all-test-cross @@ -65,21 +65,21 @@ hexagon-cross-container: =20 hppa-debian-cross-container: extends: .container_job_template - stage: containers-layer2 + stage: containers needs: ['amd64-debian10-container'] variables: NAME: debian-hppa-cross =20 m68k-debian-cross-container: extends: .container_job_template - stage: containers-layer2 + stage: containers needs: ['amd64-debian10-container'] variables: NAME: debian-m68k-cross =20 mips64-debian-cross-container: extends: .container_job_template - stage: containers-layer2 + stage: containers needs: ['amd64-debian10-container'] variables: NAME: debian-mips64-cross @@ -92,7 +92,7 @@ mips64el-debian-cross-container: =20 mips-debian-cross-container: extends: .container_job_template - stage: containers-layer2 + stage: containers needs: ['amd64-debian10-container'] variables: NAME: debian-mips-cross @@ -105,7 +105,7 @@ mipsel-debian-cross-container: =20 powerpc-test-cross-container: extends: .container_job_template - stage: containers-layer2 + stage: containers needs: ['amd64-debian11-container'] variables: NAME: debian-powerpc-test-cross @@ -127,7 +127,7 @@ riscv64-debian-cross-container: # we can however build TCG tests using a non-sid base riscv64-debian-test-cross-container: extends: .container_job_template - stage: containers-layer2 + stage: containers needs: ['amd64-debian11-container'] variables: NAME: debian-riscv64-test-cross @@ -140,21 +140,21 @@ s390x-debian-cross-container: =20 sh4-debian-cross-container: extends: .container_job_template - stage: containers-layer2 + stage: containers needs: ['amd64-debian10-container'] variables: NAME: debian-sh4-cross =20 sparc64-debian-cross-container: extends: .container_job_template - stage: containers-layer2 + stage: containers needs: ['amd64-debian10-container'] variables: NAME: debian-sparc64-cross =20 tricore-debian-cross-container: extends: .container_job_template - stage: containers-layer2 + stage: containers needs: ['amd64-debian10-container'] variables: NAME: debian-tricore-cross diff --git a/.gitlab-ci.d/stages.yml b/.gitlab-ci.d/stages.yml index f50826018d..f92f57a27d 100644 --- a/.gitlab-ci.d/stages.yml +++ b/.gitlab-ci.d/stages.yml @@ -3,6 +3,5 @@ # - test (for test stages, using build artefacts from a build stage) stages: - containers - - containers-layer2 - build - test --=20 2.30.2 From nobody Thu May 16 09:20:53 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1658758369; cv=none; d=zohomail.com; s=zohoarc; b=lOMvoPfGeSsyMCin1GGkE92hFaFBmzAp+XRmall6HRVjxcBiMw851sM39PlEflIlPEwJJRuvZlbe+R171HgjRZGnTL2T/Rk6NmAb7pNYvV1uZbP7tCCWsVArYpBohXPseahoJylHSQ+cvRsRlVYyYWBueDWLD/qMvf8kKaimcqk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1658758369; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=mTwSnZFRTEa2KBmATJIqMqf3rBKFb32A5FdFD315qZw=; b=U9Mv8oRH8oe9GoKJaln9iMZhukxtLTvgjNWj3clt2cF4DpN45hNoTpzeK8c6HhG6Oqm7Z4I8uXc/nfyBjxhOgFReIklaz9DiYc59j3Z1C1bMuDUJ23i1Jnektd2x0vZg5NMiHKJZgsScj3Hqr4GaaJd5oyJCEKs9Q+argS1K3J4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1658758369056446.20183788249506; Mon, 25 Jul 2022 07:12:49 -0700 (PDT) Received: from localhost ([::1]:49872 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oFypE-00015x-BR for importer@patchew.org; Mon, 25 Jul 2022 10:12:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47752) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oFyiB-0000sy-Su for qemu-devel@nongnu.org; Mon, 25 Jul 2022 10:05:34 -0400 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]:46715) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oFyi8-0000Ey-Uj for qemu-devel@nongnu.org; Mon, 25 Jul 2022 10:05:31 -0400 Received: by mail-wr1-x430.google.com with SMTP id z13so16112310wro.13 for ; Mon, 25 Jul 2022 07:05:28 -0700 (PDT) Received: from zen.linaroharston ([185.81.254.11]) by smtp.gmail.com with ESMTPSA id m6-20020a05600c4f4600b003a3442f1229sm10926905wmq.29.2022.07.25.07.05.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Jul 2022 07:05:24 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id F3AFB1FFBC; Mon, 25 Jul 2022 15:05:20 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=mTwSnZFRTEa2KBmATJIqMqf3rBKFb32A5FdFD315qZw=; b=a9pEPQ0BccKEbo3o4aw5pE66feGjwsfTdqNxNzwwLJPSeC9cZo2+Du6wCibdlZbkKi SVq/+Yl/ursEQy9wH/n6jccD7olbn05VZAPMj5ILtirMhj11EDb7b1zyWWRbI0U7W4hZ d/PqJt5kTl/899/ACH8ZLOByez327iTf6emrqsYg1JkLy4MwKdPnmpbS2effrEkKGIhN ttMjr9frp5Bw6IUV9H6RTETDWHXRS3rF8W7NzvLOtPcQeKXthyqp1a39OsanU6RNRq74 //6DLkhFEjC79/N2n+C2jpO40pwhqXNCbqhn3jA98Nbz/WvFOyF6C5B/APtt5slAd9J0 Oy4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=mTwSnZFRTEa2KBmATJIqMqf3rBKFb32A5FdFD315qZw=; b=nteWqKTm/kNQlYgnAFU3M8nOu9rG76RFy/k//IZEVIwpBHnlKbfQmeR8wFxcES10vF a8/Pjv9xM1+jr+VZHpQK9+utnYiXQr32Duq78ZYHTPPKFI5sOf/dHAu04laCLVALoK6H xTjANjYpjXkF5GTFCaAl8K+2ewg4azcBJm6UNcrAohgAt74CVY3uy6PvdoNoNTUUX454 i5ZlEdJ0HisXsalaGiF/6lLrL9GBII67i+Q2+unEpsyNJIDBDqDnxfxkm24FfEOUG9sb l5gbpyy4XvnSy2uencbtAZyX9LwdM1GZHj28tIMEWgs09Vn0mPEMlRSdj6Scfn6YETDZ 9BJw== X-Gm-Message-State: AJIora+7Bo4CJBNN+FAbtA+1myKOPWQOWTxG85KsuH6a0GhbOdGGaoAq 0pXR80SNKJXxqWUEoivuuf9eHg== X-Google-Smtp-Source: AGRyM1sYKjcfu63fLhkeDHNPyPUNSQ29LnFR29xwNaGba/VAB50aykrIY3DxqLM6W8OUyIQ7MiRkjg== X-Received: by 2002:adf:f747:0:b0:21e:8e2a:7cbc with SMTP id z7-20020adff747000000b0021e8e2a7cbcmr2278065wrp.342.1658757927086; Mon, 25 Jul 2022 07:05:27 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: fam@euphon.net, berrange@redhat.com, f4bug@amsat.org, aurelien@aurel32.net, pbonzini@redhat.com, stefanha@redhat.com, crosa@redhat.com, peter.maydell@linaro.org, Bin Meng , Thomas Huth , Yonggang Luo , =?UTF-8?q?Alex=20Benn=C3=A9e?= Subject: [PATCH v1 04/13] .cirrus.yml: Change winsymlinks to 'native' Date: Mon, 25 Jul 2022 15:05:11 +0100 Message-Id: <20220725140520.515340-5-alex.bennee@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220725140520.515340-1-alex.bennee@linaro.org> References: <20220725140520.515340-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::430; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x430.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1658758370917100001 From: Bin Meng At present winsymlinks is set to 'nativestrict', and its behavior is: a) if native symlinks are enabled and exists, creates as a native Windows symlink; b) else if native symlinks are not enabled or if does not exist, 'ln -s' fails. This causes the following error message was seen during the configure: "ln: failed to create symbolic link 'x86_64-softmmu/qemu-system-x86_64.exe': No such file or directory" Change winsymlinks to 'native' whose behavior is most similar to the behavior of 'ln -s' on *nix, that is: a) if native symlinks are enabled, and whether exists or not, creates as a native Windows symlink; b) else if native symlinks are not enabled, and whether exists or not, 'ln -s' creates as a Windows shortcut file. Signed-off-by: Bin Meng Acked-by: Thomas Huth Reviewed-by: Yonggang Luo Message-Id: <20220719161230.766063-1-bmeng.cn@gmail.com> Signed-off-by: Alex Benn=C3=A9e --- .cirrus.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.cirrus.yml b/.cirrus.yml index 20843a420c..eac39024f2 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -10,7 +10,7 @@ windows_msys2_task: memory: 8G env: CIRRUS_SHELL: powershell - MSYS: winsymlinks:nativestrict + MSYS: winsymlinks:native MSYSTEM: MINGW64 MSYS2_URL: https://github.com/msys2/msys2-installer/releases/download/= 2022-05-03/msys2-base-x86_64-20220503.sfx.exe MSYS2_FINGERPRINT: 0 --=20 2.30.2 From nobody Thu May 16 09:20:53 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1658758695; cv=none; d=zohomail.com; s=zohoarc; b=A3f3w9Q0tLwSfgQ4tYroOk3Ski4N/eg37PCJJfkYNVcI0Kyg7l7M+34gctMAyMzeBJGIl3qwm76aCGVol/1nj1ArvffIdrXI/G1O7YsS43ftTSaDFm0hY2zg/Ur8VkWtuaLRPSZSZKh41WSTE8/s2PBAZsORkRbgbkTs8iwgbtQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1658758695; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=zdxW6z5bLU/Pb6aFUspnYaHiHoxpeGOigvgPyctL6UM=; b=H3NSJBFXEjz2pSAuVQEbuSQDFQnWk25+HpLzxoJPD0LvEbar3qHNwjjyW+O4UwHnbGI/6OtsoGRlDIXVXG5kpaA/ejl8eWcsVNzFIpTdiN0p+SsDUfKANV3FSw5Ky2iGx9VL/p1k4GIvOuDoXRwCWdEc9mzFVJSo9qLIZge8eWs= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1658758695163179.84680052514443; Mon, 25 Jul 2022 07:18:15 -0700 (PDT) Received: from localhost ([::1]:59594 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oFyuT-00081o-O0 for importer@patchew.org; Mon, 25 Jul 2022 10:18:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47778) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oFyiD-0000t5-42 for qemu-devel@nongnu.org; Mon, 25 Jul 2022 10:05:34 -0400 Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]:36723) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oFyiB-0000Da-Ev for qemu-devel@nongnu.org; Mon, 25 Jul 2022 10:05:32 -0400 Received: by mail-wr1-x42e.google.com with SMTP id g2so8065300wru.3 for ; Mon, 25 Jul 2022 07:05:30 -0700 (PDT) Received: from zen.linaroharston ([185.81.254.11]) by smtp.gmail.com with ESMTPSA id a8-20020adfe5c8000000b0021e5d77a489sm9919263wrn.31.2022.07.25.07.05.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Jul 2022 07:05:25 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 1605F1FFBD; Mon, 25 Jul 2022 15:05:21 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=zdxW6z5bLU/Pb6aFUspnYaHiHoxpeGOigvgPyctL6UM=; b=DScNfJlMu6LtUIV1XaaONy5cibk46J2G67Fs+3r7nI+uorqtWi0/BrQAMjASrE4v0R NkinlXr8dVc2N31MIZ2tTPaLV4XN0R2GBjt+4apYE/JYKr1fSL9EhAHT2hJloceuG0fi TH0mdvMZaxCdcZTqa2+6xaRwTuD+MiaK2nJaOGE5Jj6bawO0oP6KywACryLtmJqWOQXE G1ItQTFQwEBxRYMo9HUn5l/ZMuqEHfZ95BqHit+oGnLo6CDy3A6j9S/X14Px3WeLKAFx UPvmjiTl+gciavMxtsnutG1pHMNX13zJdOdeYc4wKqw+K8yQGwY4mrH56+YVKUgm1ReA hfPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=zdxW6z5bLU/Pb6aFUspnYaHiHoxpeGOigvgPyctL6UM=; b=mURsWESUhvNCUvgxLWCHEZJ+iK6s+gPzlJ7IjxsbYN8AlL4HUHtKnGNDFTF3ubByEY ULVAYS+SmzDXouXnRllORkG7qYES6gvmln/0fTBAOIhMXCoeOSl79Ez+ey2Y57uYHFCq gjsvqlq8HkFJ6qnC2ZLlZDLvEj3pvD0LmYrydjRNg9gLIt9ro+wuwHEzYSGaoCxpks1f f2C5SqM32N9B/vIE+qUdjAJkzUv1OwaJvfAH19KwbJDVrdCEnbn74MmdUHhrFwspStUZ 7K9wp11yD0mOQebCfRT9z6bya5bY/JpTe47L2F3YHXiBbelFm3eD1hmDi6OaFc5OwrkQ FHNg== X-Gm-Message-State: AJIora8h+lEQcoLO04y4k01Exh/1hj0msOZkBQoloU7CKDKf8XhBbaIT gVKffKfrXu5JAUDogmaFKUOb8kjk3KN2PQ== X-Google-Smtp-Source: AGRyM1sYicD2IDj7ooFNjS6KXYUZSdN99z3XMckdOWY+zlKY7Yh9JC+8KNGT0FZKleuYMWkSjWv80Q== X-Received: by 2002:a5d:6c6b:0:b0:1ea:77ea:dde8 with SMTP id r11-20020a5d6c6b000000b001ea77eadde8mr7825288wrz.690.1658757929885; Mon, 25 Jul 2022 07:05:29 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: fam@euphon.net, berrange@redhat.com, f4bug@amsat.org, aurelien@aurel32.net, pbonzini@redhat.com, stefanha@redhat.com, crosa@redhat.com, peter.maydell@linaro.org, Bin Meng , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Thomas Huth , Wainer dos Santos Moschetta , Beraldo Leal Subject: [PATCH v1 05/13] .gitlab-ci.d/windows.yml: Enable native Windows symlink Date: Mon, 25 Jul 2022 15:05:12 +0100 Message-Id: <20220725140520.515340-6-alex.bennee@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220725140520.515340-1-alex.bennee@linaro.org> References: <20220725140520.515340-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::42e; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42e.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1658758695834100001 Content-Type: text/plain; charset="utf-8" From: Bin Meng The following error message was seen during the configure: "ln: failed to create symbolic link 'x86_64-softmmu/qemu-system-x86_64.exe': No such file or directory" By default the MSYS environment variable is not defined, so the runtime behavior of winsymlinks is: if does not exist, 'ln -s' fails. At the configure phase, the qemu-system-x86_64.exe has not been built so creation of the symbolic link fails hence the error message. Set winsymlinks to 'native' whose behavior is most similar to the behavior of 'ln -s' on *nix, that is: a) if native symlinks are enabled, and whether exists or not, creates as a native Windows symlink; b) else if native symlinks are not enabled, and whether exists or not, 'ln -s' creates as a Windows shortcut file. Signed-off-by: Bin Meng Message-Id: <20220725123000.807608-1-bmeng.cn@gmail.com> --- .gitlab-ci.d/windows.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitlab-ci.d/windows.yml b/.gitlab-ci.d/windows.yml index 1b2ede49e1..0b9572a8a3 100644 --- a/.gitlab-ci.d/windows.yml +++ b/.gitlab-ci.d/windows.yml @@ -57,6 +57,7 @@ msys2-64bit: mingw-w64-x86_64-zstd " - $env:CHERE_INVOKING =3D 'yes' # Preserve the current working directory - $env:MSYSTEM =3D 'MINGW64' # Start a 64 bit Mingw environment + - $env:MSYS =3D 'winsymlinks:native' # Enable native Windows symlink - .\msys64\usr\bin\bash -lc './configure --target-list=3Dx86_64-softmmu --enable-capstone --without-default-devices' - .\msys64\usr\bin\bash -lc "sed -i '/^ROMS=3D/d' build/config-host.mak" @@ -89,6 +90,7 @@ msys2-32bit: mingw-w64-i686-usbredir " - $env:CHERE_INVOKING =3D 'yes' # Preserve the current working directory - $env:MSYSTEM =3D 'MINGW32' # Start a 32-bit MinG environment + - $env:MSYS =3D 'winsymlinks:native' # Enable native Windows symlink - mkdir output - cd output - ..\msys64\usr\bin\bash -lc "../configure --target-list=3Dppc64-softmmu" --=20 2.30.2 From nobody Thu May 16 09:20:53 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1658758470; cv=none; d=zohomail.com; s=zohoarc; b=kbbtJoUNWgC/+vYqZ9ZS7yAr4k74tKN0tzHxJnuZpnkdhJL7auWNv5IneODF8pJQ8bVMOZbMUDnecmyDO+yQDO3R3yHMZNan6c2jsaNK/fhEwe92N/GNtqqJwyvi4r2MrukCyXkeh+kIxaBHm+qW/IwsQDYNVJDMeTfOU3sFdRo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1658758470; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=jNWPEy+XnytumBC/Srj6YaFH4JrGJodkvAAc76627RY=; b=GSpMqqqbYxe02XQoxuLBo/MXYM9jw0wJxP3dyOWnr+yTujN+QchObt5ad5b7f8j+hfsvqaY3jo9MLxW496/+hJ1zPwSrCLlRzmlIR51lq80HsgWldcLD5GZ1uCbGoBRoXgkEwRLNbrBxCJc3WoEdjXqQMPBMQHtWbul0m3IAJhs= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1658758470394454.0985218657462; Mon, 25 Jul 2022 07:14:30 -0700 (PDT) Received: from localhost ([::1]:53444 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oFyqr-0003W6-OW for importer@patchew.org; Mon, 25 Jul 2022 10:14:29 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47808) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oFyiF-0000vI-Km for qemu-devel@nongnu.org; Mon, 25 Jul 2022 10:05:35 -0400 Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]:45801) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oFyiE-0000GS-2N for qemu-devel@nongnu.org; Mon, 25 Jul 2022 10:05:35 -0400 Received: by mail-wr1-x42b.google.com with SMTP id v13so8342039wru.12 for ; Mon, 25 Jul 2022 07:05:33 -0700 (PDT) Received: from zen.linaroharston ([185.81.254.11]) by smtp.gmail.com with ESMTPSA id n11-20020a05600c304b00b003a320b6d5eesm17154014wmh.15.2022.07.25.07.05.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Jul 2022 07:05:25 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 21E5C1FFBE; Mon, 25 Jul 2022 15:05:21 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=jNWPEy+XnytumBC/Srj6YaFH4JrGJodkvAAc76627RY=; b=bYoLgcOR+OP02jBknYaZAZZ1i0VMBlHS8jukDi1gsVfT+awdnBtEz92G1g5qJdnCCH K3orX0a4TIiO7XARBp76FB1foIWmS5/Sg024kgSfEr9CEX5ZkfK7bxg/Tjy44m5bm6Bw OzJuzVDysFaYIYL4cHTV5qGfGrOXURKzT6jcaWf9TY30DQFb4houFY3OlIjKWxU2VrRj L1PyGuSGRDeWhYGetycYjleD1kIj+UVMU442e59Q76y8ZOHzBEQ88xLuZSpJfYLaZeIf H4U0S5iebgN2/rp/KwQfqvYtaepY3mytsrxv77WYTe/GQBwQo0RnkT/GJ2IIejbfB18J 64/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=jNWPEy+XnytumBC/Srj6YaFH4JrGJodkvAAc76627RY=; b=MD8sjSXugn+iGFKohHSZkubJhF3tipW2K0kDnILUqqL3XRmTZe67i3IsEquYEajlLf XOIOnmq72pDOfXMNPhAE0ccUI/cjFTTptwHIW2S9BnqxKLvQqGTbKf3NnlHXzPrG5MOe UnUmBIiUGofu1lPoJ20acf/UOzRBOvME3sfEaQodUWLdoQfT0193+4hdt2olUzOc4Z8x N8s2ZHAHu/kjZtBphx9i8P+Pwhr0Gaozw5DgSJovTxlE98y/rv2egY5HiF/ppLOcv0cj Z1fuUWDm4YxUClhITg1oGiSNi1kiWY+0hikq/+AvA/dRYcxxcAdMJJAjExnii6kSJF8E bCjg== X-Gm-Message-State: AJIora8oBb98jP4iXp4v/LPQhV2rb6egjXTkvqsayi9Qp1RmL+eKxuhG ky0E/X3dRxKzbLQOMsTrBJDHWQ== X-Google-Smtp-Source: AGRyM1u+qJcBuHV75Yzlfmuy427h6zd2jqc+aP87F0y2CIQWbUE1q8ohi7ysLalOHbJaWj4ZyW6MSQ== X-Received: by 2002:adf:f4d1:0:b0:21e:484e:ac59 with SMTP id h17-20020adff4d1000000b0021e484eac59mr7406811wrp.125.1658757932721; Mon, 25 Jul 2022 07:05:32 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: fam@euphon.net, berrange@redhat.com, f4bug@amsat.org, aurelien@aurel32.net, pbonzini@redhat.com, stefanha@redhat.com, crosa@redhat.com, peter.maydell@linaro.org, Richard Henderson , =?UTF-8?q?Alex=20Benn=C3=A9e?= Subject: [PATCH v1 06/13] semihosting: Don't return negative values on qemu_semihosting_console_write() failure Date: Mon, 25 Jul 2022 15:05:13 +0100 Message-Id: <20220725140520.515340-7-alex.bennee@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220725140520.515340-1-alex.bennee@linaro.org> References: <20220725140520.515340-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::42b; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42b.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1658758471987100001 From: Peter Maydell The documentation comment for qemu_semihosting_console_write() says * Returns: number of bytes written -- this should only ever be short * on some sort of i/o error. and the callsites rely on this. However, the implementation code path which sends console output to a chardev doesn't honour this, and will return negative values on error. Bring it into line with the other implementation codepaths and the documentation, so that it returns 0 on error. Spotted by Coverity, because console_write() passes the return value to unlock_user(), which doesn't accept a negative length. Resolves: Coverity CID 1490288 Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson Message-Id: <20220719121110.225657-2-peter.maydell@linaro.org> Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- semihosting/console.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/semihosting/console.c b/semihosting/console.c index 5b1ec0a1c3..0f976fe8cb 100644 --- a/semihosting/console.c +++ b/semihosting/console.c @@ -111,7 +111,8 @@ int qemu_semihosting_console_read(CPUState *cs, void *b= uf, int len) int qemu_semihosting_console_write(void *buf, int len) { if (console.chr) { - return qemu_chr_write_all(console.chr, (uint8_t *)buf, len); + int r =3D qemu_chr_write_all(console.chr, (uint8_t *)buf, len); + return r < 0 ? 0 : r; } else { return fwrite(buf, 1, len, stderr); } --=20 2.30.2 From nobody Thu May 16 09:20:53 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1658758465; cv=none; d=zohomail.com; s=zohoarc; b=huM7ttj+cz1MOimnne/1zE3rCrFllRTMGH2D9/VeXe+/VffRPxur55nbd8sK8vF4uZ580PERxtXB2dNX83Rw+MQrWgIctDDeh6wIZ9K8qr6uctc8TT5r75q3SmbtL4xEkAxS9qa8lYxM6zWudNTPYIbe0bl9NFUY3jaootyLMes= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1658758465; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=cE/FR17mvWvfbQ79ls9QY67VkyGl05hhpT8w+cwb150=; b=R1nlMLsJSJRIE2pA9vRzZuZJUWlZUhfF4Qp2pT7AxNiBXa8V1eZ01kSpEAo7Hs89YcH1OTMrGQ1AdduR43N/oPiFN0Pj+OuNBnVTmXITTTdg6erlezp9+7lfNnkNhLP6jgWhq/FwmZN2c1MLG19gbiiOGiKD+RFzIQ7Qzk50v9g= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1658758465991488.80206495948414; Mon, 25 Jul 2022 07:14:25 -0700 (PDT) Received: from localhost ([::1]:52966 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oFyqn-0003Cx-1H for importer@patchew.org; Mon, 25 Jul 2022 10:14:25 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47832) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oFyiH-0000w2-59 for qemu-devel@nongnu.org; Mon, 25 Jul 2022 10:05:37 -0400 Received: from mail-wr1-x429.google.com ([2a00:1450:4864:20::429]:34425) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oFyiF-0000Gg-2m for qemu-devel@nongnu.org; Mon, 25 Jul 2022 10:05:36 -0400 Received: by mail-wr1-x429.google.com with SMTP id h8so16115847wrw.1 for ; Mon, 25 Jul 2022 07:05:34 -0700 (PDT) Received: from zen.linaroharston ([185.81.254.11]) by smtp.gmail.com with ESMTPSA id j3-20020adfa543000000b0021e150553acsm9422351wrb.14.2022.07.25.07.05.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Jul 2022 07:05:25 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 3950E1FFBF; Mon, 25 Jul 2022 15:05:21 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=cE/FR17mvWvfbQ79ls9QY67VkyGl05hhpT8w+cwb150=; b=hTWMAGJQwFLMiT59GBdReM6rgU4k+6uHMiCRCi7v2eXCOXcjWFHip/nAEVDu4krBqb FWT/ujJ5lClEq8o+3BBo7wNscqDEJmClDTpKOq6YuMCRIbjnPFHZ4UUfYuQ4W0pYh9wQ VDa3Jkq2eYmMyhizsq0CfNbcmOe/EXHoOvheuGhDc4u9lBhnYc7hZJECUrOzLwC0SzAF Oa9Byo2yi+YoZHnnHvwZKUvzPqGCQYBVmW2joFU+I/5BemcYRwQlBcxnQq8zqGazP96F tvHRx/Mh4IoomSOnb87AHHJY7mkZhaA4ZqnzM/AbHXtnMq4hrOSmo0ORMqQ9Os4VFa6w d5wA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=cE/FR17mvWvfbQ79ls9QY67VkyGl05hhpT8w+cwb150=; b=kBtDKJuMyOmCTKTsko3UuUsJmCiqMxtwjMitptmW2BbacrQ0DFSviSu81UnC7MUAXQ 02BKraEw2RGQH6FIsvHUQlVbLX5LNd0fodIjVn8JaX3u4v9A5JFBmAkwbcRFVVyy6dms yj3ScmHP1vB9c9U0cAktKjpQ64ftc3AWb4Mg9AvcP8GfI/nUk4gWDnDUh3bpBPT1RDWZ ohI5bCwcyEWpRIC0P5xsLwy9umaTte6yQJFzFBCoMzNsrd9ftdXH113Pt/a3qixIxyth A5XKct+sZKBzImkiFOqC0A5Z378DaEvhMOpG+JkujzAUi0SsyKxH/9mkNSM8o8JW5HP1 7N9w== X-Gm-Message-State: AJIora+OVE4uquYDIN2be02dMM72z5/JpXgU2bk4kcxZZMpQNiFuBe7Z xROGURRdUsadUpkGwoTC9d2uGQiX53dGUA== X-Google-Smtp-Source: AGRyM1vwDe+3GHsUXngqMVygioqBQnH9IWpzwYhjVhP3pBy7qMYDL6g2Wfcrev2Z0PdtvXX2oZAXag== X-Received: by 2002:a5d:6c65:0:b0:21d:b7c0:9930 with SMTP id r5-20020a5d6c65000000b0021db7c09930mr7627169wrz.500.1658757933719; Mon, 25 Jul 2022 07:05:33 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: fam@euphon.net, berrange@redhat.com, f4bug@amsat.org, aurelien@aurel32.net, pbonzini@redhat.com, stefanha@redhat.com, crosa@redhat.com, peter.maydell@linaro.org, Richard Henderson , =?UTF-8?q?Alex=20Benn=C3=A9e?= Subject: [PATCH v1 07/13] semihosting: Don't copy buffer after console_write() Date: Mon, 25 Jul 2022 15:05:14 +0100 Message-Id: <20220725140520.515340-8-alex.bennee@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220725140520.515340-1-alex.bennee@linaro.org> References: <20220725140520.515340-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::429; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x429.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1658758467808100001 From: Peter Maydell The console_write() semihosting function outputs guest data from a buffer; it doesn't update that buffer. It therefore doesn't need to pass a length value to unlock_user(), but can pass 0, meaning "do not copy any data back to the guest memory". Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson Message-Id: <20220719121110.225657-3-peter.maydell@linaro.org> Signed-off-by: Alex Benn=C3=A9e --- semihosting/syscalls.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/semihosting/syscalls.c b/semihosting/syscalls.c index 4847f66c02..508a0ad88c 100644 --- a/semihosting/syscalls.c +++ b/semihosting/syscalls.c @@ -627,7 +627,7 @@ static void console_write(CPUState *cs, gdb_syscall_com= plete_cb complete, } ret =3D qemu_semihosting_console_write(ptr, len); complete(cs, ret ? ret : -1, ret ? 0 : EIO); - unlock_user(ptr, buf, ret); + unlock_user(ptr, buf, 0); } =20 static void console_fstat(CPUState *cs, gdb_syscall_complete_cb complete, --=20 2.30.2 From nobody Thu May 16 09:20:53 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1658758185; cv=none; d=zohomail.com; s=zohoarc; b=ge6FvenMDy5rpAO3yLfqTfs6y18cjGNqWNTg5MhOeZk8IjW/V6FLXigMp/lTzrvrphFqTJyedvaAwGgP1hmO1YGK+3SiU+k8x/X3DnFK/feWGuiKUgUiGnbAI9eklz+GzaSOMsbv9D1TWOx0nQoY/ZL00p65tiu8Yb8atP2yj20= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1658758185; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=QS8/Mz4m9SIuDGhgYB4lvPLK9Hni5wZ7MVsQ4sSUUEo=; b=M6Nnioz+E2inVd3LLe3+JDvnxjdVeeUKS1o5XONc0AjdqxHRrCLd9YFHqWPx4+MZVSJUV6ztQaVHmJGJ8mh+kEP3faeSba4REJC81i/OM2F/oh0KSDvZ2ApFASOV4IKx+nthoX6PZsB+gQKJolY4rRrRqwku9u2yPrmsNqKVhtQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1658758185213580.5608199885444; Mon, 25 Jul 2022 07:09:45 -0700 (PDT) Received: from localhost ([::1]:41664 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oFym9-0003oL-HE for importer@patchew.org; Mon, 25 Jul 2022 10:09:38 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47782) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oFyiD-0000t7-PJ for qemu-devel@nongnu.org; Mon, 25 Jul 2022 10:05:34 -0400 Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]:38575) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oFyiC-0000Fk-3Q for qemu-devel@nongnu.org; Mon, 25 Jul 2022 10:05:33 -0400 Received: by mail-wr1-x42e.google.com with SMTP id k11so15663810wrx.5 for ; Mon, 25 Jul 2022 07:05:31 -0700 (PDT) Received: from zen.linaroharston ([185.81.254.11]) by smtp.gmail.com with ESMTPSA id f8-20020a05600c4e8800b003a31673515bsm20185235wmq.7.2022.07.25.07.05.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Jul 2022 07:05:25 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 45A071FFC0; Mon, 25 Jul 2022 15:05:21 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=QS8/Mz4m9SIuDGhgYB4lvPLK9Hni5wZ7MVsQ4sSUUEo=; b=hF6YZy1VAcTK6qC1lTDtiUryQZ2Z8uxqJk6BbwyoJJu+/4lSm98/cdut9K+znTnWqh fZZiJsYlwujll5l3T/iesUTUrLTo6hiezc8grwPcrBLdxA0EnJKknzcgVmgmhDN3kEL9 wpGMR7IVTsmzBtq/6Cq/p8Pa7HvHuC2go5//XpCGk7vYlfxKmoTe9n2DBy05RLmBMKkG DtqJ4g1iVgt8HZGrfKepWt+SzEoH3ztlY6/0zqD2XMnCpD9HCGnY+gAsneqoNb3C9MYz D6J069kb9TsfEXkKpGWAk1ZauAwL3Ie8Nj+D4YZwvJluM10cg7kvAhBuOWqtoUnM3nl3 VxeA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=QS8/Mz4m9SIuDGhgYB4lvPLK9Hni5wZ7MVsQ4sSUUEo=; b=7KPRrrIqL4D5G0T0FMpzk5k2VKeOhh/Ilfip13DWU7KWsVqTC2/yN2tVp5kfOmoDhJ lFS9YB7phuGizre2+hLx7+7L5n2NHYvzoReYxYlHtEaIeWq/hnsPIROFK449AC/lPxNa 5NKkAo78XAYk60qMULvAG0Bg+Z+R6DWx9RAGS+OrAJu54xT6H+lhKuVWBcWHes9PYD8+ cxKnfqfAJnT0gVMl5un9v/NhLTRs4VrS/4CKVI2aoWLE6CQ3XoygN3MQJYur2jc4Rqo9 tswMCyUXY+KTtg4sw9Te+HGq2NQiW4wIv/B/YoVva07/RWkO2xZjqFOXC2hs1Sw+o9/m mi2g== X-Gm-Message-State: AJIora8qiG34iBBWQKY7AxoNjJsIrZYsPFECANtfvhqqSCw9pyag0dwV tygorfFnI8LoKgvgFpnHQvnWDARzr1/Ejw== X-Google-Smtp-Source: AGRyM1ug4ZGilnwe4U2/U1lxPPTx/Pc4TAt6nbEySY+9O7YlH0tkemRiU0VR984F+iz4XFxsmvFlug== X-Received: by 2002:a5d:434a:0:b0:21d:aa7e:b1bb with SMTP id u10-20020a5d434a000000b0021daa7eb1bbmr8292689wrr.619.1658757930685; Mon, 25 Jul 2022 07:05:30 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: fam@euphon.net, berrange@redhat.com, f4bug@amsat.org, aurelien@aurel32.net, pbonzini@redhat.com, stefanha@redhat.com, crosa@redhat.com, peter.maydell@linaro.org, Richard Henderson , =?UTF-8?q?Alex=20Benn=C3=A9e?= Subject: [PATCH v1 08/13] semihosting: Check for errors on SET_ARG() Date: Mon, 25 Jul 2022 15:05:15 +0100 Message-Id: <20220725140520.515340-9-alex.bennee@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220725140520.515340-1-alex.bennee@linaro.org> References: <20220725140520.515340-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::42e; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42e.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1658758187310100001 From: Peter Maydell The SET_ARG() macro returns an error indication; we check this in the TARGET_SYS_GET_CMDLINE case but not when we use it in implementing TARGET_SYS_ELAPSED. Check for and handle the errors via the do_fault codepath, and update the comment documenting the SET_ARG() and GET_ARG() macros to note how they handle memory access errors. Resolves: Coverity CID 1490287 Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson Message-Id: <20220719121110.225657-4-peter.maydell@linaro.org> Signed-off-by: Alex Benn=C3=A9e --- semihosting/arm-compat-semi.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/semihosting/arm-compat-semi.c b/semihosting/arm-compat-semi.c index 1a1e2a6960..d12288fc80 100644 --- a/semihosting/arm-compat-semi.c +++ b/semihosting/arm-compat-semi.c @@ -171,6 +171,12 @@ static LayoutInfo common_semi_find_bases(CPUState *cs) * Read the input value from the argument block; fail the semihosting * call if the memory read fails. Eventually we could use a generic * CPUState helper function here. + * Note that GET_ARG() handles memory access errors by jumping to + * do_fault, so must be used as the first thing done in handling a + * semihosting call, to avoid accidentally leaking allocated resources. + * SET_ARG(), since it unavoidably happens late, instead returns an + * error indication (0 on success, non-0 for error) which the caller + * should check. */ =20 #define GET_ARG(n) do { \ @@ -739,10 +745,14 @@ void do_common_semihosting(CPUState *cs) case TARGET_SYS_ELAPSED: elapsed =3D get_clock() - clock_start; if (sizeof(target_ulong) =3D=3D 8) { - SET_ARG(0, elapsed); + if (SET_ARG(0, elapsed)) { + goto do_fault; + } } else { - SET_ARG(0, (uint32_t) elapsed); - SET_ARG(1, (uint32_t) (elapsed >> 32)); + if (SET_ARG(0, (uint32_t) elapsed) || + SET_ARG(1, (uint32_t) (elapsed >> 32))) { + goto do_fault; + } } common_semi_set_ret(cs, 0); break; --=20 2.30.2 From nobody Thu May 16 09:20:53 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1658759095; cv=none; d=zohomail.com; s=zohoarc; b=fQsYpdTGK/iYs3x5ZXA3hmsqOmTSFyRMepgH+tENuxcpnbsYUfz+IqKKDpV7Rwv2pHnlDq4PQisfVbH4SGJOIkHB67V6GrXC7AeyBkOlFqMAfyLyZf3v9eH8hnvWqScfzuTBZy5tSD2uo4EGSCdec6vNzswPHPi5Z4vLPmiuoAU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1658759095; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=yHj/q18KkSPTGRmybHT7bSovMuqm3TPdWZ5l7N31L9s=; b=ITudlKxeN1N6T8SLC+owFFB2lnVILO2igWDSo0+D8INvE1UydrXkmExldnTpZ+/H200LWLrQumTGFYQEb/AynvInxRAu1cmc0VqsMaItR7SJ2oPEyuSwyHnVddS17mu3EfbdlUp2cpC3A1djavksxdGoLl336oOGdcSNX1f8kzg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1658759095642819.9599025615101; Mon, 25 Jul 2022 07:24:55 -0700 (PDT) Received: from localhost ([::1]:40404 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oFz0w-00065Z-JV for importer@patchew.org; Mon, 25 Jul 2022 10:24:54 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47956) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oFyiP-00017m-Dq for qemu-devel@nongnu.org; Mon, 25 Jul 2022 10:05:45 -0400 Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]:43945) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oFyiN-0000JJ-Ni for qemu-devel@nongnu.org; Mon, 25 Jul 2022 10:05:45 -0400 Received: by mail-wr1-x42e.google.com with SMTP id d13so8460888wrn.10 for ; Mon, 25 Jul 2022 07:05:43 -0700 (PDT) Received: from zen.linaroharston ([185.81.254.11]) by smtp.gmail.com with ESMTPSA id k22-20020a5d5256000000b0021d6a520ce9sm12377002wrc.47.2022.07.25.07.05.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Jul 2022 07:05:34 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 5C0031FFC1; Mon, 25 Jul 2022 15:05:21 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=yHj/q18KkSPTGRmybHT7bSovMuqm3TPdWZ5l7N31L9s=; b=gG8Kcz88Zic0aKKiiAknyouQzz1cTge1VjkglG/cQD4wZWHd/JMZF5uv+wqjSDgMlg 0EXu+JzncUS8iPBQbXPdekTCEXCkZ633iyecjxv9ro3/IeBvgfJwG17zt5SO6jMs8+eS PEwNAMiBz9FJkO7j+t2VC12nH+VQl643GZbyehtIBK7D7lo9LS9isVcyWJycd59U1UtQ CyG2rQhzkayi1Ipqyg5x13cBGFauis3bp/KWpFz1rR64bEW3etQrhHcozEGNR5x8w1ey nosIEi7AaAhMUpj7yDh7oSOkSoHxGzDjr3Ac0xXtl2ENjnwfFxxFUXTVlbUHxpvM2jUz IBOw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=yHj/q18KkSPTGRmybHT7bSovMuqm3TPdWZ5l7N31L9s=; b=czBeUGRAk2M1C1gt6ThFiVR3RF5GhZbn47wKHoWfluDwhyNIoQbTAGF5T1SkhCtLQq QJjzty2kd0jItRHmR69Cb8Fqb9VUQ2VNG4AMKTfJvO8WYoya/OmAv3Non5rEp5FfwN5t FB4TTtpLJoUQrz7QszHLdqG274lvYMESJBe3tI3/B1xeuR9W0gRcd/7OEeaEc04USah6 OI2LlPvzsBbyXKE3BJoOekLSrSwAAp4H4OFhCfUFRYclg5zXytnRKLrN/FiMfTEiX+V+ thJyQeaWbH1TGxI3rwqtr1gsqa3f+Hkd4ZMdx41TS1W+5YA1vGn4HnEXboc2hQr7z8G+ VP8g== X-Gm-Message-State: AJIora9n3gfgku6S3A44xAeV2oL44Z6EtSHM0Zo00xK3+5rd0m7fqgFQ N/Bhu9W1GSlsw32RksGQdi01jw== X-Google-Smtp-Source: AGRyM1s6CaOcSsWRqiNi715p28XIHIuSnPk3R6vlt+e1QyF+QYJgN+1lqxCGNuZMAv31O69FtBbwKA== X-Received: by 2002:a5d:5250:0:b0:21e:526c:d4ad with SMTP id k16-20020a5d5250000000b0021e526cd4admr7297062wrc.103.1658757942481; Mon, 25 Jul 2022 07:05:42 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: fam@euphon.net, berrange@redhat.com, f4bug@amsat.org, aurelien@aurel32.net, pbonzini@redhat.com, stefanha@redhat.com, crosa@redhat.com, peter.maydell@linaro.org, Richard Henderson , =?UTF-8?q?Alex=20Benn=C3=A9e?= Subject: [PATCH v1 09/13] semihosting: Fix handling of buffer in TARGET_SYS_TMPNAM Date: Mon, 25 Jul 2022 15:05:16 +0100 Message-Id: <20220725140520.515340-10-alex.bennee@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220725140520.515340-1-alex.bennee@linaro.org> References: <20220725140520.515340-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::42e; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42e.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1658759097089100001 From: Peter Maydell The TARGET_SYS_TMPNAM implementation has two bugs spotted by Coverity: * confusion about whether 'len' has the length of the string including or excluding the terminating NUL means we lock_user() len bytes of memory but memcpy() len + 1 bytes * In the error-exit cases we forget to free() the buffer that asprintf() returned to us Resolves: Coverity CID 1490285, 1490289 Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson Message-Id: <20220719121110.225657-5-peter.maydell@linaro.org> Signed-off-by: Alex Benn=C3=A9e --- semihosting/arm-compat-semi.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/semihosting/arm-compat-semi.c b/semihosting/arm-compat-semi.c index d12288fc80..e741674238 100644 --- a/semihosting/arm-compat-semi.c +++ b/semihosting/arm-compat-semi.c @@ -504,16 +504,25 @@ void do_common_semihosting(CPUState *cs) GET_ARG(1); GET_ARG(2); len =3D asprintf(&s, "/tmp/qemu-%x%02x", getpid(), (int)arg1 & 0xf= f); + if (len < 0) { + common_semi_set_ret(cs, -1); + break; + } + + /* Allow for trailing NUL */ + len++; /* Make sure there's enough space in the buffer */ - if (len < 0 || len >=3D arg2) { + if (len > arg2) { + free(s); common_semi_set_ret(cs, -1); break; } p =3D lock_user(VERIFY_WRITE, arg0, len, 0); if (!p) { + free(s); goto do_fault; } - memcpy(p, s, len + 1); + memcpy(p, s, len); unlock_user(p, arg0, len); free(s); common_semi_set_ret(cs, 0); --=20 2.30.2 From nobody Thu May 16 09:20:53 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1658758741; cv=none; d=zohomail.com; s=zohoarc; b=YuOsTzqMW7ak5fmcMvRPgAVcbXIcY3pXkHxZfCnNEleRAdY47rvKZocqPsMpGrOBlV5IA5MMKLd46FjEbqOsPpGe8EbJRbDngPbpeDmfk1x4iZbVqC1u0HtjtfJhkSn0hoPQ91Bd3CRCmT3k5Z/rcuhWL4ozRN4MgXwz7ulTz90= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1658758741; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=ihqfEvf8e/Rp4WltOhylJI2GJRKNwsRtW1sLAed2GPk=; b=T+p1n9mkgL3uUddDPTDnvYEL6ecg7yj76nzc2ZD4frAxGPpWcO8zDmo5huzNTdpX8c0D+6UfX7UTG7MlpU8egYl34fhipgUG77ScUYMmpWBFkGafRcbbcp0qxOLT46xTpet+wPV50iq3IJHpev6vI7MdyXgQcGKEIGDb6yhXpls= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1658758741743952.83217451476; Mon, 25 Jul 2022 07:19:01 -0700 (PDT) Received: from localhost ([::1]:60804 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oFyvE-0000Sb-OE for importer@patchew.org; Mon, 25 Jul 2022 10:19:00 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47920) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oFyiM-000126-RV for qemu-devel@nongnu.org; Mon, 25 Jul 2022 10:05:43 -0400 Received: from mail-wr1-x429.google.com ([2a00:1450:4864:20::429]:34425) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oFyiK-0000Gg-8P for qemu-devel@nongnu.org; Mon, 25 Jul 2022 10:05:42 -0400 Received: by mail-wr1-x429.google.com with SMTP id h8so16116332wrw.1 for ; Mon, 25 Jul 2022 07:05:39 -0700 (PDT) Received: from zen.linaroharston ([185.81.254.11]) by smtp.gmail.com with ESMTPSA id c5-20020a056000104500b0021e82cf35efsm4715729wrx.107.2022.07.25.07.05.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Jul 2022 07:05:34 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 717141FFC2; Mon, 25 Jul 2022 15:05:21 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ihqfEvf8e/Rp4WltOhylJI2GJRKNwsRtW1sLAed2GPk=; b=KhO+eDQRv/tNj6WCHJcUbvR2+qTjPD9vigWGI1LGmWjjhWcc101ygfnHK+zdYt0vuu 2NEU9J1JtH/PcapKuQSwnUHqUonxOADRdLAA1z4+EWwrv5yLd6JR7GI4gJJ/7D7AtnVC ZmiRUAM3u8RTjxIs2O51qn19tDBiQiW3H/IShqMr90N85ayuyYPhzvfD7cm4t2VWBRIo 5j/De+xAmI0/qU5EAmD1UpNZ1wqKjhcJTLEUu4Nn9NVYnc8MAz74iFmSJMv3pP5N3IP6 4JKxkrNudLCZmKQE2kYuNHapFrOlmpGkl4/n2USWsUsHIBWc3fbconX3ekIOAzgvTrDp 4rtg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ihqfEvf8e/Rp4WltOhylJI2GJRKNwsRtW1sLAed2GPk=; b=KXwngdAe8gZb19R0GLo1EJ5KN8PiDbacIZMNRxeyf5vraVTagdptNszI4ayfA6BvbO E8MydH6vBnjGc8Ar9xbas2mK9brR4iVj41m9D3CdC7sWR/mkLPLp4S3qBYQNA4yZgsKM lx8hvGrAH3DHUmguRG9NuKwwu8iXmx2ABtLma1Y7pxxE/4NSJrb/S+/9Y2C5nwb+abF/ tBDAyucqKYv3mkgyRQFQlpVcjifJXn77n8+SFZv8gzRKXdZ3CBo7oOS8NWTvulMm0PxH rNpredwi6WvDfk7P3RWZYyZrDKM6y4GZy7x2c4CG9Dx0nvM9wMuX4jn8UpTwCdpq8zrg FVIw== X-Gm-Message-State: AJIora+6JMSA4ZEyq/E/573th1W/DHDr25Pb7p6pzhIt7a49gPacc6Mv CFK84tpBwz1oSUZ44Is8VIt3Tw== X-Google-Smtp-Source: AGRyM1shHO40JCF7qq6oeV2WGMaSzt8Fvk8eOmNQGQS91CKYsrKstGrXWHWH5AVfCny0ZYM8F80qLA== X-Received: by 2002:a05:6000:1863:b0:21e:8588:b0c1 with SMTP id d3-20020a056000186300b0021e8588b0c1mr3933962wri.363.1658757939498; Mon, 25 Jul 2022 07:05:39 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: fam@euphon.net, berrange@redhat.com, f4bug@amsat.org, aurelien@aurel32.net, pbonzini@redhat.com, stefanha@redhat.com, crosa@redhat.com, peter.maydell@linaro.org, Ilya Leoshkevich , David Hildenbrand , Richard Henderson , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Eric Blake , Markus Armbruster Subject: [PATCH v1 10/13] qapi: Add exit-failure PanicAction Date: Mon, 25 Jul 2022 15:05:17 +0100 Message-Id: <20220725140520.515340-11-alex.bennee@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220725140520.515340-1-alex.bennee@linaro.org> References: <20220725140520.515340-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::429; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x429.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1658758743969100001 From: Ilya Leoshkevich Currently QEMU exits with code 0 on both panic an shutdown. For tests it is useful to return 1 on panic, so that it counts as a test failure. Introduce a new exit-failure PanicAction that makes main() return EXIT_FAILURE. Tests can use -action panic=3Dexit-failure option to activate this behavior. Signed-off-by: Ilya Leoshkevich Reviewed-by: David Hildenbrand Reviewed-by: Richard Henderson Message-Id: <20220722233614.7254-2-iii@linux.ibm.com> Signed-off-by: Alex Benn=C3=A9e --- qapi/run-state.json | 4 +++- include/sysemu/sysemu.h | 2 +- softmmu/main.c | 6 ++++-- softmmu/runstate.c | 17 +++++++++++++---- qemu-options.hx | 2 +- 5 files changed, 22 insertions(+), 9 deletions(-) diff --git a/qapi/run-state.json b/qapi/run-state.json index 6e2162d7b3..d42c370c4f 100644 --- a/qapi/run-state.json +++ b/qapi/run-state.json @@ -364,10 +364,12 @@ # # @shutdown: Shutdown the VM and exit, according to the shutdown action # +# @exit-failure: Shutdown the VM and exit with nonzero status +# # Since: 6.0 ## { 'enum': 'PanicAction', - 'data': [ 'pause', 'shutdown', 'none' ] } + 'data': [ 'pause', 'shutdown', 'exit-failure', 'none' ] } =20 ## # @watchdog-set-action: diff --git a/include/sysemu/sysemu.h b/include/sysemu/sysemu.h index 812f66a31a..31aa45160b 100644 --- a/include/sysemu/sysemu.h +++ b/include/sysemu/sysemu.h @@ -103,7 +103,7 @@ void qemu_boot_set(const char *boot_order, Error **errp= ); bool defaults_enabled(void); =20 void qemu_init(int argc, char **argv, char **envp); -void qemu_main_loop(void); +int qemu_main_loop(void); void qemu_cleanup(void); =20 extern QemuOptsList qemu_legacy_drive_opts; diff --git a/softmmu/main.c b/softmmu/main.c index c00432ff09..1b675a8c03 100644 --- a/softmmu/main.c +++ b/softmmu/main.c @@ -32,11 +32,13 @@ =20 int qemu_main(int argc, char **argv, char **envp) { + int status; + qemu_init(argc, argv, envp); - qemu_main_loop(); + status =3D qemu_main_loop(); qemu_cleanup(); =20 - return 0; + return status; } =20 #ifndef CONFIG_COCOA diff --git a/softmmu/runstate.c b/softmmu/runstate.c index 168e1b78a0..1e68680b9d 100644 --- a/softmmu/runstate.c +++ b/softmmu/runstate.c @@ -482,7 +482,8 @@ void qemu_system_guest_panicked(GuestPanicInformation *= info) qapi_event_send_guest_panicked(GUEST_PANIC_ACTION_PAUSE, !!info, info); vm_stop(RUN_STATE_GUEST_PANICKED); - } else if (panic_action =3D=3D PANIC_ACTION_SHUTDOWN) { + } else if (panic_action =3D=3D PANIC_ACTION_SHUTDOWN || + panic_action =3D=3D PANIC_ACTION_EXIT_FAILURE) { qapi_event_send_guest_panicked(GUEST_PANIC_ACTION_POWEROFF, !!info, info); vm_stop(RUN_STATE_GUEST_PANICKED); @@ -662,7 +663,7 @@ void qemu_system_debug_request(void) qemu_notify_event(); } =20 -static bool main_loop_should_exit(void) +static bool main_loop_should_exit(int *status) { RunState r; ShutdownCause request; @@ -680,6 +681,10 @@ static bool main_loop_should_exit(void) if (shutdown_action =3D=3D SHUTDOWN_ACTION_PAUSE) { vm_stop(RUN_STATE_SHUTDOWN); } else { + if (request =3D=3D SHUTDOWN_CAUSE_GUEST_PANIC && + panic_action =3D=3D PANIC_ACTION_EXIT_FAILURE) { + *status =3D EXIT_FAILURE; + } return true; } } @@ -715,12 +720,14 @@ static bool main_loop_should_exit(void) return false; } =20 -void qemu_main_loop(void) +int qemu_main_loop(void) { + int status =3D EXIT_SUCCESS; #ifdef CONFIG_PROFILER int64_t ti; #endif - while (!main_loop_should_exit()) { + + while (!main_loop_should_exit(&status)) { #ifdef CONFIG_PROFILER ti =3D profile_getclock(); #endif @@ -729,6 +736,8 @@ void qemu_main_loop(void) dev_time +=3D profile_getclock() - ti; #endif } + + return status; } =20 void qemu_add_exit_notifier(Notifier *notify) diff --git a/qemu-options.hx b/qemu-options.hx index 79e00916a1..8e17c5064a 100644 --- a/qemu-options.hx +++ b/qemu-options.hx @@ -4239,7 +4239,7 @@ DEF("action", HAS_ARG, QEMU_OPTION_action, " action when guest reboots [default=3Dreset]\n" "-action shutdown=3Dpoweroff|pause\n" " action when guest shuts down [default=3Dpoweroff]\= n" - "-action panic=3Dpause|shutdown|none\n" + "-action panic=3Dpause|shutdown|exit-failure|none\n" " action when guest panics [default=3Dshutdown]\n" "-action watchdog=3Dreset|shutdown|poweroff|inject-nmi|pause|debug|non= e\n" " action when watchdog fires [default=3Dreset]\n", --=20 2.30.2 From nobody Thu May 16 09:20:53 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1658758657; cv=none; d=zohomail.com; s=zohoarc; b=Kwr5yF8o2bFEfxq7XYeJo7DM28e56EPrO+Bcvq1PcXvsS7FacYm+M67bk9AUlUTmfS5K/1pw7NsDl0aEx0eODzQeO4y64Lx38TueccxOiwLEYmn7q/1CUk8Tu2jFrgzmLz+pnsxk7Memw8+zbZyThf5UhsipJYfMOS/iYongrr8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1658758657; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=QVFXqQSL3k1U0tR1HBqjNVeAN73t7swh868mXq6OAM8=; b=egKXX9WRrcwrFC24fb/oqiXHs+crE7F0+/iPfnZm3065L80RQbmxNmGiQkqaYwc5JsjHCChXm3/ig6ybHRdZ0Nx7fthgvV77mztObFX5pG9qiGfZ/VGM6Gj3UCeCXyeapR/quM5u0m6jK84zF0D2fMm86Dv2yreSWKNODQO7cdw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1658758657776908.6099359603008; Mon, 25 Jul 2022 07:17:37 -0700 (PDT) Received: from localhost ([::1]:58336 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oFyts-00078G-Ej for importer@patchew.org; Mon, 25 Jul 2022 10:17:36 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47872) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oFyiJ-00010W-Ol for qemu-devel@nongnu.org; Mon, 25 Jul 2022 10:05:41 -0400 Received: from mail-wr1-x42a.google.com ([2a00:1450:4864:20::42a]:44997) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oFyiI-0000HC-4n for qemu-devel@nongnu.org; Mon, 25 Jul 2022 10:05:39 -0400 Received: by mail-wr1-x42a.google.com with SMTP id l15so12068188wro.11 for ; Mon, 25 Jul 2022 07:05:37 -0700 (PDT) Received: from zen.linaroharston ([185.81.254.11]) by smtp.gmail.com with ESMTPSA id bg42-20020a05600c3caa00b003a31b79dc0esm40292263wmb.1.2022.07.25.07.05.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Jul 2022 07:05:34 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 8B9761FFC3; Mon, 25 Jul 2022 15:05:21 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=QVFXqQSL3k1U0tR1HBqjNVeAN73t7swh868mXq6OAM8=; b=C1yuYhU5QO5UZVFdO3t6O30s8OBCLP1/aEPMBFOMsn6Y1qzoP+ytnBlPetAs+cTVFk OHti8eKnVkTUdqcpt151Q0d9pDpUw8TosckUFAKnBZ4Z3qCE5XzbF+Yrzo6w0MS+niDo eQdnjlppCuCPbRBxK6CV3PmTU2ks5dlkCLyfya88SOxC62mK1/Am3efPpOWVEtqVA9qC GFKF2eRvfVm0KsLD5Ch+v6AyzdXFEc+6xNuwdZF8QpR03/rCpUxcQcXETy9ox7jAUmsn f1Iv/Hjc/93Uu5WxNw+gpC89VgjotZHDlEdoqZ52cJgzUkDmZJt0dpJwd53p04yaoZEU +e2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=QVFXqQSL3k1U0tR1HBqjNVeAN73t7swh868mXq6OAM8=; b=2kI9v/e9ZFul8fURxa7CdwcKFhV+1MyGATw2HfR8OpPR13J6RjRAthZtkFIxiWlbyQ z1hI7yUgpJynFylRYHmJUDAaTnEt4u5mTsDioj2bv9zlBRyMKrXv/vYkeHmzYWMS9nqv J6vpK7yelMMz/7WhDknJ2qxEWDMsM0jbK3B9K9i6tyaW8TIb43DO+a1/du4Uxok6U6EH UuC6UIh7V0lifmrjRyWqagq9mvl/+NB03PMoHkA+A0sV0g0ECKV8egBKHr/tlJQSbstF tfb9hjvTvpbrpEsp50bUdDlXkmhhjYwj3vAh+9xdoCOFrSsgly+QdqsdbVpwsoEmniWH jIkg== X-Gm-Message-State: AJIora+Q/vrg5eCL7gVsyPB5HuQjRYBZNq4lboaHhxc05xMchhJ1gOke Q4LRtt5ajNtVzMQVfFKKff7+KA== X-Google-Smtp-Source: AGRyM1s/NR691OUWsc+ofJX2ZMswuK+SurENAIYupx7f2PmnmB6KvdyW6HA4DmICnlV4oLawDWlylQ== X-Received: by 2002:a05:6000:178f:b0:21e:98ee:f1e6 with SMTP id e15-20020a056000178f00b0021e98eef1e6mr324527wrg.405.1658757936685; Mon, 25 Jul 2022 07:05:36 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: fam@euphon.net, berrange@redhat.com, f4bug@amsat.org, aurelien@aurel32.net, pbonzini@redhat.com, stefanha@redhat.com, crosa@redhat.com, peter.maydell@linaro.org, Ilya Leoshkevich , Richard Henderson , =?UTF-8?q?Alex=20Benn=C3=A9e?= , David Hildenbrand , Cornelia Huck , Thomas Huth , qemu-s390x@nongnu.org (open list:S390 TCG CPUs) Subject: [PATCH v1 11/13] tests/tcg/s390x: Test unaligned accesses to lowcore Date: Mon, 25 Jul 2022 15:05:18 +0100 Message-Id: <20220725140520.515340-12-alex.bennee@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220725140520.515340-1-alex.bennee@linaro.org> References: <20220725140520.515340-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::42a; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42a.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1658758659570100001 From: Ilya Leoshkevich Add a small test to avoid regressions. Signed-off-by: Ilya Leoshkevich Acked-by: Richard Henderson Message-Id: <20220722233614.7254-3-iii@linux.ibm.com> Signed-off-by: Alex Benn=C3=A9e Acked-by: Thomas Huth --- tests/tcg/s390x/Makefile.softmmu-target | 9 +++++++++ tests/tcg/s390x/unaligned-lowcore.S | 19 +++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 tests/tcg/s390x/Makefile.softmmu-target create mode 100644 tests/tcg/s390x/unaligned-lowcore.S diff --git a/tests/tcg/s390x/Makefile.softmmu-target b/tests/tcg/s390x/Make= file.softmmu-target new file mode 100644 index 0000000000..a34fa68473 --- /dev/null +++ b/tests/tcg/s390x/Makefile.softmmu-target @@ -0,0 +1,9 @@ +S390X_SRC=3D$(SRC_PATH)/tests/tcg/s390x +VPATH+=3D$(S390X_SRC) +QEMU_OPTS=3D-action panic=3Dexit-failure -kernel + +%: %.S + $(CC) -march=3Dz13 -m64 -nostartfiles -static -Wl,-Ttext=3D0 \ + -Wl,--build-id=3Dnone $< -o $@ + +TESTS +=3D unaligned-lowcore diff --git a/tests/tcg/s390x/unaligned-lowcore.S b/tests/tcg/s390x/unaligne= d-lowcore.S new file mode 100644 index 0000000000..246b517f11 --- /dev/null +++ b/tests/tcg/s390x/unaligned-lowcore.S @@ -0,0 +1,19 @@ + .org 0x1D0 /* program new PSW */ + .quad 0x2000000000000, 0 /* disabled wait */ + .org 0x200 /* lowcore padding */ + + .globl _start +_start: + lctlg %c0,%c0,_c0 + vst %v0,_unaligned + lpswe quiesce_psw + + .align 8 +quiesce_psw: + .quad 0x2000000000000,0xfff /* see is_special_wait_psw() */ +_c0: + .quad 0x10060000 /* lowcore protection, AFP, VX */ + + .byte 0 +_unaligned: + .octa 0 --=20 2.30.2 From nobody Thu May 16 09:20:53 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1658758961; cv=none; d=zohomail.com; s=zohoarc; b=TUhI6zOuD71E9B2xMm9KgHtd50hV/bBqtuQmSBV6pwyqcAIVdga1fNbINamg2TH+i4qkKp3leb3UPt/+K1cvRBB5Z6vk4uOQyWmZyjn2JJBiC+kBUIhiLEP/n0D0pBLY4KpGGR/8YqhQ/6xIMAC13EA99U2EvhiDuh4Qe8ax8vA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1658758961; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=B3jT/+HPPsIEXc/KjYHBbDuZ3dYXOI8VpfNKzZc6+cU=; b=lSvv2+Ilbv8SISiuC/EBP8Rw0xUBhkqNwCjJNBbsmony6gPgLnSV/4JYpmtPIqbg27AUBrR2U9i/W8uCa1S5o6+InCl3W1LmVmQdiUrrZCzdjltS73PkegwlnMxUuUvnDQ85SVSEqg2cOxRrrws4ELCQ1DbzByKwT0jfOTuEx08= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 165875896115891.26466331176039; Mon, 25 Jul 2022 07:22:41 -0700 (PDT) Received: from localhost ([::1]:37794 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oFyyl-0004CT-SP for importer@patchew.org; Mon, 25 Jul 2022 10:22:39 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47950) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oFyiO-00016W-Hh for qemu-devel@nongnu.org; Mon, 25 Jul 2022 10:05:44 -0400 Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]:40499) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oFyiM-0000J8-VJ for qemu-devel@nongnu.org; Mon, 25 Jul 2022 10:05:44 -0400 Received: by mail-wm1-x335.google.com with SMTP id ay11-20020a05600c1e0b00b003a3013da120so9461088wmb.5 for ; Mon, 25 Jul 2022 07:05:42 -0700 (PDT) Received: from zen.linaroharston ([185.81.254.11]) by smtp.gmail.com with ESMTPSA id d6-20020a5d6446000000b0021db2dcd0aasm14340627wrw.108.2022.07.25.07.05.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Jul 2022 07:05:34 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 971BB1FFC4; Mon, 25 Jul 2022 15:05:21 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=B3jT/+HPPsIEXc/KjYHBbDuZ3dYXOI8VpfNKzZc6+cU=; b=F5R7JsTWCfgXv3Lf78HYG3mpIyMweWmppnXyvoueB0cPAWs/8+BzgIfRkTAZfBcfLM 7zQPiUeyONVPCVvzB4O5sOnjXO7lsSdz4ttfQWPO2THBNS4VjlVHxjWG5BDLAz/Er968 Lamz46heag7ey/fTQHXrVS78CMws6LmzYMgCSqHjLPfeJZt46rLCMtzoTUkU9FNwca/2 u+i5GTaUGAe8Ef1/jaytJczu3x17si0v1ZcmIebL8DMyLXkAf3i58qlXfxkmSLvKuRZ9 85EmHOTETfdEYNz7EtsZnu1Ok3yFpDSrqgLLR6ISB0kn6iwrWY7YPcZugpCI5drwrXvu ZdvA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=B3jT/+HPPsIEXc/KjYHBbDuZ3dYXOI8VpfNKzZc6+cU=; b=Tw2SlVSitetWPf1crWXBNxGu/8W5rh0Qsyldaf8Y0SpDD7yppdPdbUd4HCFmFsNR19 hORxisHzNUKQWtWPjfWe+IYqR0vIXPPNBwmAdxe/VpFf65wgqUvgC8WkV2gFt4rtPPpJ hV0EJiJzluxPH60XRfgLwoGD6WG0zhjO10jtP8l1Xe3y4smvrg8ROgeY9k5TeVfDeUy1 8ohCsyagaC2hWwtGDWNl0/Ua+72T8GZTHVB5UQTX8TkBdpp4yKOrod93PBb3z3g325kT 9TeZSIVeWaX5sYS9w8pUtd4d2Qn0DKzQqPGEyQktmFmKgHf5D1jeUfzGpqxGrwv5rYzf nbIA== X-Gm-Message-State: AJIora/V7Y7elcDs209soCuC/pAw8OYbCmDe4KVIXvLbYgyCb5idNTEi HpD7+6+Gw3nu0wjKkEZNGJjgdg== X-Google-Smtp-Source: AGRyM1t9dFZoWS9f2hFUuyMz/yY8Llkw0X1zvysQbya4Rhe/jbyDy1/pL54UZ0TnZyLTYn2Ew+7dDw== X-Received: by 2002:a1c:2981:0:b0:3a2:ffe9:945c with SMTP id p123-20020a1c2981000000b003a2ffe9945cmr21066933wmp.38.1658757941610; Mon, 25 Jul 2022 07:05:41 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: fam@euphon.net, berrange@redhat.com, f4bug@amsat.org, aurelien@aurel32.net, pbonzini@redhat.com, stefanha@redhat.com, crosa@redhat.com, peter.maydell@linaro.org, =?UTF-8?q?Alex=20Benn=C3=A9e?= , Richard Henderson Subject: [PATCH v1 12/13] docs/devel: fix description of OBJECT_DECLARE_SIMPLE_TYPE Date: Mon, 25 Jul 2022 15:05:19 +0100 Message-Id: <20220725140520.515340-13-alex.bennee@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220725140520.515340-1-alex.bennee@linaro.org> References: <20220725140520.515340-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::335; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x335.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1658758961648100001 Since 30b5707c26 (qom: Remove module_obj_name parameter from OBJECT_DECLARE* macros) we don't need the additional two parameters. Fix the documentation. Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daud=C3=A9 Message-Id: <20220712103131.2006653-1-alex.bennee@linaro.org> --- docs/devel/qom.rst | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docs/devel/qom.rst b/docs/devel/qom.rst index e5fe3597cd..0cf9a714f0 100644 --- a/docs/devel/qom.rst +++ b/docs/devel/qom.rst @@ -292,8 +292,7 @@ in the header file: .. code-block:: c :caption: Declaring a simple type =20 - OBJECT_DECLARE_SIMPLE_TYPE(MyDevice, my_device, - MY_DEVICE, DEVICE) + OBJECT_DECLARE_SIMPLE_TYPE(MyDevice, MY_DEVICE) =20 This is equivalent to the following: =20 --=20 2.30.2 From nobody Thu May 16 09:20:53 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1658758843; cv=none; d=zohomail.com; s=zohoarc; b=lcPaXXC9cCKeGjCVYvQ/ze4l0JyKRIspfVreXGjPEkCNlenqgOVTXNThcA2ezbv4kQcQTUAwjmckdNC+mO7nsvugxtejoDVJ6SSJ0af9rFOk8CbhBWR8uh9Xpgh+Fht4W6X+PNbD7aTV+Ifwsz9qFKSgtFEaXs5c3EpvBnn9nhc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1658758843; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=yQHi3qi6aG35eG8P049O7wbJjnFPGC8qjPo4fmEPSBw=; b=BiBVEa4wH8t0Sy5iwqrDecPxA1fTVBfktxTeDzsN2yfEOiVKGa68xkjIgqR/BR+cC3535XShOCMp1EMt1l/ZDZaW5tI4qiKk4/ONmKjx4NvzrAxCeJSOdedfepCKNlIdezd+Qxp22IL6veLW+E58G/5/nSjR/iIIszVA5cyi33U= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1658758843269248.43397903839298; Mon, 25 Jul 2022 07:20:43 -0700 (PDT) Received: from localhost ([::1]:35720 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oFywr-0002hh-Q5 for importer@patchew.org; Mon, 25 Jul 2022 10:20:41 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47912) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oFyiL-000124-PA for qemu-devel@nongnu.org; Mon, 25 Jul 2022 10:05:43 -0400 Received: from mail-wr1-x42d.google.com ([2a00:1450:4864:20::42d]:39433) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oFyiJ-0000HS-TZ for qemu-devel@nongnu.org; Mon, 25 Jul 2022 10:05:41 -0400 Received: by mail-wr1-x42d.google.com with SMTP id d8so16056038wrp.6 for ; Mon, 25 Jul 2022 07:05:39 -0700 (PDT) Received: from zen.linaroharston ([185.81.254.11]) by smtp.gmail.com with ESMTPSA id c25-20020a7bc859000000b003a0375c4f73sm14366662wml.44.2022.07.25.07.05.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Jul 2022 07:05:34 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id AD87E1FFC5; Mon, 25 Jul 2022 15:05:21 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=yQHi3qi6aG35eG8P049O7wbJjnFPGC8qjPo4fmEPSBw=; b=lh7VA0t080BZXYIl28Jh85hl/sV7R1qNkaSKrhx9l0X6ZFal2zlS0xPQJTMLIPGOKW tkNYwzd8IyEjnTBaQt2JQdDgZgo0uZR/oqWd3AJxTveGUlPnyIoXZdRj6ZFy+EHqd6xI rouyCNvQYP6OVxP5WYlrtKkobGqq/UOaOfDqWmSrZ8DHFbXqBW3k7erzcvr5sGA2mk+A K3iDgqVu4mRHRqQswzbBZQOVmWQp21HfXSwn3hYYaJKWMXmX0/5Nj1WYp1n9RFkdyPqz sSda42lgswN8HQZd4qXQB2xWaAeyKvqkBB9XdMqeLjgIJt49Wlvj8u6c7M3zGFgp07cR kQMQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=yQHi3qi6aG35eG8P049O7wbJjnFPGC8qjPo4fmEPSBw=; b=6CLdeqryYaWaIMxvip09SvgAjy6Xb7OKZyspiCPfvVvl2PFmFdNOHnB80O7aMUhI37 2oWeyORR9SW9ISQ5h5zSBWg62ENn/8Gm5bAcWpLdbyzZkOWRcaYW8EH8Uv0VKyXaozpj F6kXcuRIflX+coan3lTDezw78100E394JhYYLJ/LseymwVY2PfSbcaQN80WD99h2X/VH suhGW89fLEOXt8LeBikjIVicX8CGYFgRWZVpcqEApDnmSVsBHDTvqirP2XEGxcw5lO+h ovSgXB4j/3ewidAZ8bPW/J3IVNQ6HYDUZ/arPQMYRcLlVmXTIR9QSZjwJapdr/YjEbT1 jpCg== X-Gm-Message-State: AJIora+0Gl8tK8C+zbUYCUIypWI4X5O1Y6mVqRNm7/iNKetx/vDJtkD5 kYe4ieBY5GhbW16ovHpFBqN4Hg== X-Google-Smtp-Source: AGRyM1sbWNSe+hNa7OrGmGsWlJaY/7Tgv6DMLghK/3qJ7uidHIXAWOHdzzjw6XVhU0DGFPJpsbQz9Q== X-Received: by 2002:a5d:5451:0:b0:21d:2295:6a05 with SMTP id w17-20020a5d5451000000b0021d22956a05mr7731918wrv.302.1658757938444; Mon, 25 Jul 2022 07:05:38 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: fam@euphon.net, berrange@redhat.com, f4bug@amsat.org, aurelien@aurel32.net, pbonzini@redhat.com, stefanha@redhat.com, crosa@redhat.com, peter.maydell@linaro.org, =?UTF-8?q?Alex=20Benn=C3=A9e?= , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Subject: [PATCH v1 13/13] qemu-options: bring the kernel and image options together Date: Mon, 25 Jul 2022 15:05:20 +0100 Message-Id: <20220725140520.515340-14-alex.bennee@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220725140520.515340-1-alex.bennee@linaro.org> References: <20220725140520.515340-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::42d; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42d.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1658758845228100001 How to control the booting of QEMU is often a source of confusion for users. Bring the options that control this together in the manual pages and add some verbiage to describe when each option is appropriate. This attempts to codify some of the knowledge expressed in: https://stackoverflow.com/questions/58420670/qemu-bios-vs-kernel-vs-devic= e-loader-file/58434837#58434837 Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Peter Maydell Reviewed-by: C=C3=A9dric Le Goater Message-Id: <20220707151037.397324-1-alex.bennee@linaro.org> --- qemu-options.hx | 96 +++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 78 insertions(+), 18 deletions(-) diff --git a/qemu-options.hx b/qemu-options.hx index 8e17c5064a..3f23a42fa8 100644 --- a/qemu-options.hx +++ b/qemu-options.hx @@ -1585,13 +1585,6 @@ SRST Use file as SecureDigital card image. ERST =20 -DEF("pflash", HAS_ARG, QEMU_OPTION_pflash, - "-pflash file use 'file' as a parallel flash image\n", QEMU_ARCH_AL= L) -SRST -``-pflash file`` - Use file as a parallel flash image. -ERST - DEF("snapshot", 0, QEMU_OPTION_snapshot, "-snapshot write to temporary files instead of disk image files\= n", QEMU_ARCH_ALL) @@ -3684,12 +3677,67 @@ DEFHEADING() =20 #endif =20 -DEFHEADING(Linux/Multiboot boot specific:) +DEFHEADING(Boot Image or Kernel specific:) +SRST +There are broadly 4 ways you can boot a system with QEMU. + + - specify a firmware and let it control finding a kernel + - specify a firmware and pass a hint to the kernel to boot + - direct kernel image boot + - manually load files into the guest's address space + +The third method is useful for quickly testing kernels but as there is +no firmware to pass configuration information to the kernel the +hardware must either be probeable, the kernel built for the exact +configuration or passed some configuration data (e.g. a DTB blob) +which tells the kernel what drivers it needs. This exact details are +often hardware specific. + +The final method is the most generic way of loading images into the +guest address space and used mostly for ``bare metal`` type +development where the reset vectors of the processor are taken into +account. + +ERST + SRST -When using these options, you can use a given Linux or Multiboot kernel -without installing it in the disk image. It can be useful for easier -testing of various kernels. =20 +For x86 machines and some other architectures ``-bios`` will generally +do the right thing with whatever it is given. For other machines the +more strict ``-pflash`` option needs an image that is sized for the +flash device for the given machine type. + +Please see the :ref:`system-targets-ref` section of the manual for +more detailed documentation. + +ERST + +DEF("bios", HAS_ARG, QEMU_OPTION_bios, \ + "-bios file set the filename for the BIOS\n", QEMU_ARCH_ALL) +SRST +``-bios file`` + Set the filename for the BIOS. +ERST + +DEF("pflash", HAS_ARG, QEMU_OPTION_pflash, + "-pflash file use 'file' as a parallel flash image\n", QEMU_ARCH_AL= L) +SRST +``-pflash file`` + Use file as a parallel flash image. +ERST + +SRST + +The kernel options were designed to work with Linux kernels although +other things (like hypervisors) can be packaged up as a kernel +executable image. The exact format of a executable image is usually +architecture specific. + +The way in which the kernel is started (what address it is loaded at, +what if any information is passed to it via CPU registers, the state +of the hardware when it is started, and so on) is also architecture +specific. Typically it follows the specification laid down by the +Linux kernel for how kernels for that architecture must be started. =20 ERST =20 @@ -3729,6 +3777,25 @@ SRST kernel on boot. ERST =20 +SRST + +Finally you can also manually load images directly into the address +space of the guest. This is most useful for developers who already +know the layout of their guest and take care to ensure something sane +will happen when the reset vector executes. + +The generic loader can be invoked by using the loader device: + +``-device loader,addr=3D,data=3D,data-len=3D[,data-b= e=3D][,cpu-num=3D]`` + +there is also the guest loader which operates in a similar way but +tweaks the DTB so a hypervisor loaded via ``-kernel`` can find where +the guest image is: + +``-device guest-loader,addr=3D[,kernel=3D,[bootargs=3D]][,initrd=3D]`` + +ERST + DEFHEADING() =20 DEFHEADING(Debug/Expert options:) @@ -4179,13 +4246,6 @@ SRST To list all the data directories, use ``-L help``. ERST =20 -DEF("bios", HAS_ARG, QEMU_OPTION_bios, \ - "-bios file set the filename for the BIOS\n", QEMU_ARCH_ALL) -SRST -``-bios file`` - Set the filename for the BIOS. -ERST - DEF("enable-kvm", 0, QEMU_OPTION_enable_kvm, \ "-enable-kvm enable KVM full virtualization support\n", QEMU_ARCH_ARM | QEMU_ARCH_I386 | QEMU_ARCH_MIPS | QEMU_ARCH_PPC | --=20 2.30.2