From patchwork Fri Jul 29 09:19:31 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 594349 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:b345:0:0:0:0 with SMTP id w5csp1179143maz; Fri, 29 Jul 2022 02:25:11 -0700 (PDT) X-Google-Smtp-Source: AA6agR723HfiYarn65LexFkatP361wWfIwEczPMj/UxWVVXb+1UDpnUMRuCabt1uLvcE7NAEzW7P X-Received: by 2002:a0c:c68a:0:b0:46b:8e6b:306 with SMTP id d10-20020a0cc68a000000b0046b8e6b0306mr2229358qvj.7.1659086711087; Fri, 29 Jul 2022 02:25:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659086711; cv=none; d=google.com; s=arc-20160816; b=DkH7I0PF2whm0+1rGbPAFWHRLm7oxMydYkL0pBWMmmbgRQweF1gO1Tip0ORtY1CLc/ lUbubi4f/A1b+yTWL9btII0eHSvHclpPJ/gg5j+EXWauONkoNYmQl6YM1w5JLvBA0l1f zZPS04fuFEIYvecOnyWwFaF/ByfRl9ZWgNNZt5DX8dfTNzuPd6QoqgTzltx5GBZXW+Q5 j68GcYIHSX3Ejcoml7awSuCmv+dP7Zpp59RZq0C8bCusAh8q6cLtBRPc4WFIBqCKoSoW mnl0QRFjm5wFMSBgFUX7o8HS4tvXS2jgkqkku/1x2iaCEnmkrWSUIC2Sf+JPQzNEpD/A WEFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=UWs22E+OLc1dgV2D716Uqj1nygUp2lEcOLcEu7aNjhA=; b=y1qgnW7Whk7YTcll+sXQwlAXPPNUTdkFAKMJ/uvBhJgfWSPE73adg2YUeG01CUMDfL fSkPLREgyo/yeKli2iFq6bZJeTTypBUdLBUB9sxD+6unOFoq/51hi/s3D00Qy4p8WXIs lHIFdQwR67wWdhk54YLG06gC/4s1tykE7bbfCNx91vVBdfAqlpEKQ44Yh24fMIoZrqUT KXFmQx0bG8VcNx95bXn+pP0y7tcNlTvM5uxXokNl8vsa12HIuNhDVGexBrpcSVc1mEHZ jwZnLn7OXE1my3kX3+pVHdz6ThdyHs7esxs8ZRlhaOtUjka93TmyNhBvNfKwVxoFbNRH 1XKg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=E8XkGejQ; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id hf4-20020a0562140e8400b00474835244d7si1959727qvb.125.2022.07.29.02.25.10 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 29 Jul 2022 02:25:11 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=E8XkGejQ; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:59114 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oHMF4-0002Yk-HE for patch@linaro.org; Fri, 29 Jul 2022 05:25:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44204) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oHM9z-0002Vh-7D for qemu-devel@nongnu.org; Fri, 29 Jul 2022 05:20:00 -0400 Received: from mail-wm1-x32f.google.com ([2a00:1450:4864:20::32f]:43853) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oHM9w-0005s9-4E for qemu-devel@nongnu.org; Fri, 29 Jul 2022 05:19:54 -0400 Received: by mail-wm1-x32f.google.com with SMTP id j29-20020a05600c1c1d00b003a2fdafdefbso2209639wms.2 for ; Fri, 29 Jul 2022 02:19:50 -0700 (PDT) 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=UWs22E+OLc1dgV2D716Uqj1nygUp2lEcOLcEu7aNjhA=; b=E8XkGejQI3FwcZWFkFvyoFMb6mwAj2luf4IYOxK9os6HEnOJEPbzdGm7yJ0d2wUUnH B+k0HR7LU7fFoTPCDWywQRMFAfeGSTdkuKzRKlypHz+jTbaj0/o0kcdV0gyLBw+1qV+p 54ktAdg3G7jjimRxEVCld047ov0xIAQ3CmK3fnaIECB/zelMZVHZJMjn5+V5vNuOXerM YQW+FhLhSFRz9pVmzPV0qz+lyeWsMtviXKsQL/0Nav9kTLBgq1Dc1nDeT6NiBXF57NMt WiRxBZgxv3LNb3RjtZYDoWMHJ4thDSzOzj/VK/MG9eoT9lQ4BL0mZT3cSNuPsbHXvSnq nz3A== 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=UWs22E+OLc1dgV2D716Uqj1nygUp2lEcOLcEu7aNjhA=; b=AHMCoGFK1489QzZ+JLosGJtraYgvCDFq5opbJq8jkvgS6hfz1Fcib+t1eFVaiTItL8 Xrp++3tYHia4LA/cwSB4xsBRLPNdh8Yc/Ff7tKYaegJ522YHf5OPv/yZ1a9gqVumxpy5 I237W1iKgnoIpMnyEPgWaZ+/54fre6U3ERmmHwR9WVzmE6wU+dyJZll7BtPCq9hiNr0r 95WYh+Tsf9mQKsJhgeDLdTsVuN/kb0TffKLNG8ajRA2TnxB0ILjFaGKJVRtUjs2/d4w1 E4CvyDVycl5o3yLAtO9kgHsrfV3TbxO6gXYwOMcsuO2H1wdB5IY8mldIYd8cz0ORjNRf 6NJg== X-Gm-Message-State: AJIora/FtKU/e4xsTw1aWb2fatfECTtHORq6BgoaEDr52n+3qCr8RjgL qd1YwyFXg4I+mAvZQ9GTrtErRg== X-Received: by 2002:a05:600c:1e8a:b0:3a3:20fc:a651 with SMTP id be10-20020a05600c1e8a00b003a320fca651mr1819758wmb.39.1659086389479; Fri, 29 Jul 2022 02:19:49 -0700 (PDT) Received: from zen.linaroharston ([185.81.254.11]) by smtp.gmail.com with ESMTPSA id u13-20020a05600c19cd00b003a2e1883a27sm10034734wmq.18.2022.07.29.02.19.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Jul 2022 02:19:45 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id DF72F1FFB8; Fri, 29 Jul 2022 10:19:43 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org, richard.henderson@linaro.org Cc: qemu-devel@nongnu.org, =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Thomas Huth , =?utf-8?q?Alex_Benn=C3=A9e?= , =?utf-8?q?Philippe_M?= =?utf-8?q?athieu-Daud=C3=A9?= , Ed Maste , Li-Wen Hsu , Wainer dos Santos Moschetta , Beraldo Leal Subject: [PULL 01/13] tests: refresh to latest libvirt-ci module Date: Fri, 29 Jul 2022 10:19:31 +0100 Message-Id: <20220729091943.2152410-2-alex.bennee@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220729091943.2152410-1-alex.bennee@linaro.org> References: <20220729091943.2152410-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32f; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x32f.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Daniel P. Berrangé 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=1201551 - 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é Message-Id: <20220722130431.2319019-2-berrange@redhat.com> Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Acked-by: Richard Henderson Message-Id: <20220725140520.515340-2-alex.bennee@linaro.org> diff --git a/.gitlab-ci.d/cirrus/freebsd-12.vars b/.gitlab-ci.d/cirrus/freebsd-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='/usr/local/bin/gmake' NINJA='/usr/local/bin/ninja' PACKAGING_COMMAND='pkg' PIP3='/usr/local/bin/pip-3.8' -PKGS='alsa-lib bash bzip2 ca_root_nss capstone4 ccache cdrkit-genisoimage ctags curl cyrus-sasl dbus diffutils dtc fusefs-libs3 gettext git glib gmake gnutls gsed gtk3 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-sphinx py39-sphinx_rtd_theme py39-virtualenv py39-yaml python3 rpm2cpio sdl2 sdl2_image snappy spice-protocol tesseract texinfo usbredir virglrenderer vte3 zstd' +PKGS='alsa-lib bash bzip2 ca_root_nss capstone4 ccache cdrkit-genisoimage 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-sphinx py39-sphinx_rtd_theme py39-yaml python3 rpm2cpio sdl2 sdl2_image snappy spice-protocol tesseract texinfo usbredir virglrenderer vte3 zstd' PYPI_PKGS='' PYTHON='/usr/local/bin/python3' diff --git a/.gitlab-ci.d/cirrus/freebsd-13.vars b/.gitlab-ci.d/cirrus/freebsd-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='/usr/local/bin/gmake' NINJA='/usr/local/bin/ninja' PACKAGING_COMMAND='pkg' PIP3='/usr/local/bin/pip-3.8' -PKGS='alsa-lib bash bzip2 ca_root_nss capstone4 ccache cdrkit-genisoimage ctags curl cyrus-sasl dbus diffutils dtc fusefs-libs3 gettext git glib gmake gnutls gsed gtk3 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-sphinx py39-sphinx_rtd_theme py39-virtualenv py39-yaml python3 rpm2cpio sdl2 sdl2_image snappy spice-protocol tesseract texinfo usbredir virglrenderer vte3 zstd' +PKGS='alsa-lib bash bzip2 ca_root_nss capstone4 ccache cdrkit-genisoimage 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-sphinx py39-sphinx_rtd_theme py39-yaml python3 rpm2cpio sdl2 sdl2_image snappy spice-protocol tesseract texinfo usbredir virglrenderer vte3 zstd' PYPI_PKGS='' PYTHON='/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='/usr/local/bin/gmake' NINJA='/usr/local/bin/ninja' PACKAGING_COMMAND='brew' PIP3='/usr/local/bin/pip3' -PKGS='bash bc bzip2 capstone ccache ctags curl dbus diffutils dtc gcovr gettext git glib gnu-sed gnutls gtk+3 jemalloc jpeg-turbo libepoxy libffi libgcrypt libiscsi libnfs libpng libslirp libssh libtasn1 libusb llvm lzo make 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='PyYAML numpy pillow sphinx sphinx-rtd-theme virtualenv' +PKGS='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 libepoxy libffi libgcrypt libiscsi libnfs libpng libslirp libssh libtasn1 libusb llvm lzo make 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='PyYAML numpy pillow sphinx sphinx-rtd-theme' PYTHON='/usr/local/bin/python3' diff --git a/tests/docker/dockerfiles/alpine.docker b/tests/docker/dockerfiles/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/dockerfiles/centos8.docker index 10618bfa83..3c29883332 100644 --- a/tests/docker/dockerfiles/centos8.docker +++ b/tests/docker/dockerfiles/centos8.docker @@ -6,11 +6,12 @@ FROM quay.io/centos/centos:stream8 -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/dockerfiles/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=noninteractive && \ libcacard-dev \ libcap-ng-dev \ libcapstone-dev \ + libcmocka-dev \ libcurl4-gnutls-dev \ libdaxctl-dev \ libdrm-dev \ @@ -59,6 +60,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ 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/docker/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=noninteractive && \ 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=noninteractive && \ 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/docker/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=noninteractive && \ 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=noninteractive && \ 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/docker/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=noninteractive && \ 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=noninteractive && \ 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=noninteractive && \ 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=noninteractive && \ 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/docker/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=noninteractive && \ 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=noninteractive && \ 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/docker/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=noninteractive && \ 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=noninteractive && \ 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/docker/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=noninteractive && \ 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=noninteractive && \ 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/dockerfiles/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/dockerfiles/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 -FROM registry.opensuse.org/opensuse/leap:15.2 +FROM registry.opensuse.org/opensuse/leap:15.3 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/dockerfiles/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=noninteractive && \ libcacard-dev \ libcap-ng-dev \ libcapstone-dev \ + libcmocka-dev \ libcurl4-gnutls-dev \ libdaxctl-dev \ libdrm-dev \ @@ -58,6 +59,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ 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 = Path(__file__).parent src_dir = self_dir.parent.parent dockerfiles_dir = Path(src_dir, "tests", "docker", "dockerfiles") -lcitool_path = Path(self_dir, "libvirt-ci", "lcitool") +lcitool_path = Path(self_dir, "libvirt-ci", "bin", "lcitool") lcitool_cmd = [lcitool_path, "--data-dir", self_dir] @@ -112,7 +112,7 @@ try: generate_dockerfile("debian-amd64", "debian-11", trailer="".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="".join(ubuntu2004_tsanhack)) From patchwork Fri Jul 29 09:19:32 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 594351 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:b345:0:0:0:0 with SMTP id w5csp1180266maz; Fri, 29 Jul 2022 02:27:17 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tGe5xvffyCK9GSBy/oeh8EbtwFUpdylPNr+ynWCVDR0GvbwlsduiAmTbCCoBa0vJHC3uL6 X-Received: by 2002:a05:620a:2981:b0:6b6:2b91:c3cb with SMTP id r1-20020a05620a298100b006b62b91c3cbmr1944491qkp.470.1659086837379; Fri, 29 Jul 2022 02:27:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659086837; cv=none; d=google.com; s=arc-20160816; b=v1g5o8ybJQmPBD4wyh+TNlYyUy60A68mC43sdzah2MnncRUkJJX3t4loA8gfJdecO3 ovatxqhWbCd9XZvebRx9VCmgdHBn3VG5I6C74WVwIkXhpZiidfxuXyW4jraKcsepWeCS B++FOcrsS1a2aymDxZ/ToKkRxUb6f7cHacclyUM4orpS4ePM5q8a79zRBoUcaaD1Wqgf tqdqCtASghvgDdRU4JUJt3yjMTwr3zWI6WTWv/VozefMwtAKh6n9x0Urf6orq90ys+xy 3ELewGyIF7fnMPaIDA+1uWOmSnEm8qOVzmjMHTMd+X5/HYPU9tOl3isDNd0z/HZ8gKf/ ORZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=9TB20DlqBprHHxxOekwwN1RvvKSvZYxOn7yLSPiI1qg=; b=G3tfdLketzVs7yfE6Kz8szn5RJ1rYhobH8aQN62DYGcPRdWKX7XFkTnvquCFz3beSE AH8x9FzoIWFZO2h8uFxu/MPTOFS90gFGgBGKKv3K5zINbO4Q0qCdyQbV8+y3mqGHlkLJ +asf/9T15yG6hgInGIeRsxihx/Jmz9QlMTI2uoK9OaUBKybvdz659UTLvS89otb5SGgK 1KKLwq926KFv7aBhk+Lcq3aVLYffUCbACxGAkOCrNudKP+2NaBzRPGPWzNPEJDJByN+F GIaCw41otXFEp6tmWBF3ZK2kQ8UZjvoxe3EVmTTFFTuyna6VtE4fGtd12jJDXucuA6j0 hFnA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Od7oE8RQ; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 62-20020a370341000000b006b18042da9esi1582048qkd.519.2022.07.29.02.27.17 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 29 Jul 2022 02:27:17 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Od7oE8RQ; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:60264 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oHMH6-0003SX-Tb for patch@linaro.org; Fri, 29 Jul 2022 05:27:16 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44166) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oHM9w-0002Ui-Mz for qemu-devel@nongnu.org; Fri, 29 Jul 2022 05:19:53 -0400 Received: from mail-wr1-x42d.google.com ([2a00:1450:4864:20::42d]:38753) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oHM9t-0005s1-Fo for qemu-devel@nongnu.org; Fri, 29 Jul 2022 05:19:52 -0400 Received: by mail-wr1-x42d.google.com with SMTP id k8so3091346wrd.5 for ; Fri, 29 Jul 2022 02:19:48 -0700 (PDT) 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=9TB20DlqBprHHxxOekwwN1RvvKSvZYxOn7yLSPiI1qg=; b=Od7oE8RQCzDn3L0XR6GX6D/MyLuZ4nEQIq0ikjYPOvqdEDQiUY2NjqQIax+3WyzY14 tkldi5kRx31j/n+rpuXSYCddOa8MziNQllLwRwvlt3hDiSc9mn/OHQ9CR49tE49eB+xE 24/SN87M0hP2yqtlzBh24MTVt4zbPkDNNWnPgGYfBMSCSgD0efs9USEd092rUh/4tKD6 7qQzoSv58OMp0XO6VFSOpQZyIjhuG8TWPHdQBvUpNfUoudIen026QuGrgJPRcaIhFckR meFQEJLUYmn4PsQj0ZMlGDt0k0sq84IyGU7MPV0XOIOkXIc+EubyhP3v4KkFzKfb2u8q hR2g== 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=9TB20DlqBprHHxxOekwwN1RvvKSvZYxOn7yLSPiI1qg=; b=5sXX3cBXBHQKDA1hun2aADLNFN9oir/c7wm4LgrKpBTE3VwQzSO2O2kIQiemQPcuwj u7RRXyx5DKfTDKKtM6XRXdQdZYmI4XJoZb/NlSFGljpQAQ9GOG6XDZZErzfPiJ4yXrEl 53ks9dpSSR9oskdZOfRqUNouEs5Z28inruJL2aHfzjISxbNvPRnVOWRB5bq2wadj9LWC SOAq65IoNiuqKkgMIkrcGmky+RtDE1O366fKrO8ElHXAj+2O2y6cR2xiXj96ojWFxXJU qZaZjNUKagqkPMjKqaPdUcDX6+r8rbHfOCkraHiqgLu0GdIyZ6jzrYCG1ovIcYuUFlfq 9egQ== X-Gm-Message-State: ACgBeo0dLsBVuzgMrK22Af0Kpg1TqqNKi8khsyjVt0NhhQO8lyP9cBKu y9OO7gI2oUUYnpU8vM2Zj9wutw== X-Received: by 2002:a05:6000:1542:b0:21e:9018:f648 with SMTP id 2-20020a056000154200b0021e9018f648mr1773201wry.160.1659086387251; Fri, 29 Jul 2022 02:19:47 -0700 (PDT) Received: from zen.linaroharston ([185.81.254.11]) by smtp.gmail.com with ESMTPSA id l13-20020a5d668d000000b0021d63fe0f03sm3127823wru.12.2022.07.29.02.19.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Jul 2022 02:19:45 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 0E13C1FFBA; Fri, 29 Jul 2022 10:19:44 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org, richard.henderson@linaro.org Cc: qemu-devel@nongnu.org, =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Thomas Huth , =?utf-8?q?Alex_Benn=C3=A9e?= , =?utf-8?q?Philippe_M?= =?utf-8?q?athieu-Daud=C3=A9?= , Wainer dos Santos Moschetta , Beraldo Leal Subject: [PULL 02/13] gitlab: show testlog.txt contents when cirrus/custom-runner jobs fail Date: Fri, 29 Jul 2022 10:19:32 +0100 Message-Id: <20220729091943.2152410-3-alex.bennee@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220729091943.2152410-1-alex.bennee@linaro.org> References: <20220729091943.2152410-1-alex.bennee@linaro.org> MIME-Version: 1.0 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+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Daniel P. Berrangé 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é Message-Id: <20220722130431.2319019-3-berrange@redhat.com> Signed-off-by: Alex Bennée Message-Id: <20220725140520.515340-3-alex.bennee@linaro.org> 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=1 ; + $MAKE -j$(sysctl -n hw.ncpu) $TARGET V=1 + || { cat meson-logs/testlog.txt; exit 1; } ; done diff --git a/.gitlab-ci.d/custom-runners/centos-stream-8-x86_64.yml b/.gitlab-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=":" 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=arm-linux-gnueabihf- + || { cat config.log meson-logs/meson-log.txt; exit 1; } - make --output-sync -j`nproc --ignore=40` - make --output-sync -j`nproc --ignore=40` check V=1 + || { 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-glusterfs --disable-libssh + || { cat config.log meson-logs/meson-log.txt; exit 1; } - make --output-sync -j`nproc --ignore=40` - make --output-sync -j`nproc --ignore=40` check V=1 + || { cat meson-logs/testlog.txt; exit 1; } ; - make --output-sync -j`nproc --ignore=40` check-tcg V=1 + || { cat meson-logs/testlog.txt; exit 1; } ; 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=40` - make --output-sync -j`nproc --ignore=40` check V=1 + || { cat meson-logs/testlog.txt; exit 1; } ; 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=40` - make --output-sync -j`nproc --ignore=40` check V=1 + || { cat meson-logs/testlog.txt; exit 1; } ; ubuntu-20.04-aarch64-clang: needs: [] @@ -75,8 +82,10 @@ ubuntu-20.04-aarch64-clang: - mkdir build - cd build - ../configure --disable-libssh --cc=clang-10 --cxx=clang++-10 --enable-sanitizers + || { cat config.log meson-logs/meson-log.txt; exit 1; } - make --output-sync -j`nproc --ignore=40` - make --output-sync -j`nproc --ignore=40` check V=1 + || { cat meson-logs/testlog.txt; exit 1; } ; 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=40` 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=40` - make --output-sync -j`nproc --ignore=40` check V=1 + || { cat meson-logs/testlog.txt; exit 1; } ; diff --git a/.gitlab-ci.d/custom-runners/ubuntu-20.04-s390x.yml b/.gitlab-ci.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-glusterfs --disable-libssh + || { cat config.log meson-logs/meson-log.txt; exit 1; } - make --output-sync -j`nproc` - make --output-sync -j`nproc` check V=1 + || { cat meson-logs/testlog.txt; exit 1; } ; - make --output-sync -j`nproc` check-tcg V=1 + || { cat meson-logs/testlog.txt; exit 1; } ; 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=1 + || { cat meson-logs/testlog.txt; exit 1; } ; 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=1 + || { cat meson-logs/testlog.txt; exit 1; } ; ubuntu-20.04-s390x-clang: needs: [] @@ -76,8 +83,10 @@ ubuntu-20.04-s390x-clang: - mkdir build - cd build - ../configure --disable-libssh --cc=clang --cxx=clang++ --enable-sanitizers + || { cat config.log meson-logs/meson-log.txt; exit 1; } - make --output-sync -j`nproc` - make --output-sync -j`nproc` check V=1 + || { cat meson-logs/testlog.txt; exit 1; } ; 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` 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=1 + || { cat meson-logs/testlog.txt; exit 1; } ; From patchwork Fri Jul 29 09:19:33 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 594356 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:b345:0:0:0:0 with SMTP id w5csp1187165maz; Fri, 29 Jul 2022 02:39:58 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sCP/awAMCHHj0/7hFXBIB369ZuUvt2upP5TbS8xWvvpaztxP8Q7/v79wPTo1UsmrCAKSsU X-Received: by 2002:a05:622a:15cc:b0:31f:6ea:9d44 with SMTP id d12-20020a05622a15cc00b0031f06ea9d44mr2552282qty.676.1659087598759; Fri, 29 Jul 2022 02:39:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659087598; cv=none; d=google.com; s=arc-20160816; b=0ZRY8pAWHPeYHyuZ+HZw/Tj1ie3ujC7B9zv78tKXMk5R+rXngx/JmyIYZum8rY5Sj1 TiusQZOF24PMOqlHxaJOduPQ3nSYwLKHFJu6qRSnDKjLARc58xrVaX5XOt4Akl0YNl5B TaiLhRCv+7BsrgHtx7X7327EqX1LEGDeQGpTwdi2Mkf5HYACjzDIIJf/M3aDQnp9+xMi G79wPJ5wMGxh7wSJrBe3KV9MRTnr7UiUXZo3qRdNUR61Q2bduiTGnzJxCNYRQzqKAuTv ZQS52v1T/mgowvO/BanyHYrlCi5QUVWjlmW/8rRslB1C9A9hsaiL1R6ehKVKZtopFtpJ k4sA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Did8YFLxDWVlc9GWzEzTmKN+csU0Qz/8Q4CxgKIKjyY=; b=AdwTnqnsMU72wqNiAfKp3x6a/cQ7/02BkOyOe55oM0fv5s/Q1ADGAXxqO5BYm2C5ac n3kQDDulpZ/05N/FYmKVIE/CBI/oL+Cw767+XaeSDWCFkbe21F6cAVJt/oY+mc6qF6CU mG8B7GFfGLHL+JKHHQmG70qdCipx6UXBCpb43GO8vy/8DJxn6pr5rXg2pk6in9/fbSS9 3/ZFnOT8QGvZULPNO9tJVTxdYoVI38/O7EGOenFAuk2AveBxbSDo+GwHYiHCeO1ycekg bmEbDI35CshAaoRQkbTdX9dHbwzIZ9x1UG0zWqsEOdsN6a2JhlMRbsGitRc5omOpdEUi f76A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=gnQHMUCx; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id t14-20020a0562140c6e00b0047326e28930si1649549qvj.221.2022.07.29.02.39.58 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 29 Jul 2022 02:39:58 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=gnQHMUCx; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:47760 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oHMTN-0006TD-59 for patch@linaro.org; Fri, 29 Jul 2022 05:39:58 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44178) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oHM9x-0002VP-Oo for qemu-devel@nongnu.org; Fri, 29 Jul 2022 05:19:54 -0400 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]:37492) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oHM9v-0005sB-Ux for qemu-devel@nongnu.org; Fri, 29 Jul 2022 05:19:53 -0400 Received: by mail-wm1-x32c.google.com with SMTP id c187-20020a1c35c4000000b003a30d88fe8eso3819306wma.2 for ; Fri, 29 Jul 2022 02:19:51 -0700 (PDT) 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=Did8YFLxDWVlc9GWzEzTmKN+csU0Qz/8Q4CxgKIKjyY=; b=gnQHMUCxSSL1DWQXEa44/S61aWJs9DDqjWREMnEgHtrdES7oSV5vqCxfea+RrHWSL6 2BlzXf6dB88CHuUpsogY5wdLUhMhyrvOrLlo2yijH/pHWMgZerD9V9c6Bi9sqBYFkx+p Fcgdp/D+ufqLnuZ2pa6011cHeY2QFEftEZnYXB4yKDPwzjd95SaFjTq8VFE4147tyxot 1r+cGksScT/pFhjNH+UrrKzc5CscZZdVi/L4AiKMn+cxDTdfIhm6RotDewrkEK9WKEg6 g6hYh/NGwL8KM9xPalmN18XrF7lg7tH4l9jr2m93sD9Ep7QOUaZLqUJAsjYc6R0LFWk2 AQvA== 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=Did8YFLxDWVlc9GWzEzTmKN+csU0Qz/8Q4CxgKIKjyY=; b=XH3H6kU1nUy9nRuAAm+RNLAaP/GbIjW9EPWB+NHKSYlBhtyR/quhwDFz8tyzY9sLcr BgQCG+x57gfga2QmxOMYQC2EvTrk+Gsau0suZ9Wfr63lypzGBOgq38TX7+j7EWQW2FH0 sZjOm6DqqJBHErEvSOUdRNGT4yji9iJ9g2HOivYoRTn0hypdVwV9hZOB71/X4uCdd8lE kl72yQoBONP/XzyZCAcKwZ4bDoH/mhfA44dZEfZyNWGkNoNXMhwSyjpDtnO7hUxdOi1Y sPBj56kbwLXNH5y87JB0AnmdR7A5/r6tx0DGTJu7zZ+xjoNmqOUuRFqC5a4nDFc+bY+c Le2w== X-Gm-Message-State: AJIora+upCzf/4iOsxs+vuC3DnB69xuIuTBE2qTjNsR9kOYYfn4vc2Ke JUvoobFHUX/+jB6cf0qme6Xpbg== X-Received: by 2002:a05:600c:893:b0:3a3:1d8:c7b9 with SMTP id l19-20020a05600c089300b003a301d8c7b9mr1775263wmp.156.1659086390345; Fri, 29 Jul 2022 02:19:50 -0700 (PDT) Received: from zen.linaroharston ([185.81.254.11]) by smtp.gmail.com with ESMTPSA id y8-20020adfdf08000000b0021e084d9133sm3750627wrl.27.2022.07.29.02.19.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Jul 2022 02:19:45 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 1FCBA1FFBB; Fri, 29 Jul 2022 10:19:44 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org, richard.henderson@linaro.org Cc: qemu-devel@nongnu.org, =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Thomas Huth , =?utf-8?q?Alex_Benn=C3=A9e?= , =?utf-8?q?Philippe_M?= =?utf-8?q?athieu-Daud=C3=A9?= , Wainer dos Santos Moschetta , Beraldo Leal Subject: [PULL 03/13] gitlab: drop 'containers-layer2' stage Date: Fri, 29 Jul 2022 10:19:33 +0100 Message-Id: <20220729091943.2152410-4-alex.bennee@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220729091943.2152410-1-alex.bennee@linaro.org> References: <20220729091943.2152410-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32c; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x32c.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Daniel P. Berrangé Since we express dependencies 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é Message-Id: <20220722130431.2319019-4-berrange@redhat.com> [AJB: fix typo] Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20220725140520.515340-4-alex.bennee@linaro.org> diff --git a/.gitlab-ci.d/container-cross.yml b/.gitlab-ci.d/container-cross.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 amd64-debian-cross-container: extends: .container_job_template - stage: containers-layer2 + stage: containers needs: ['amd64-debian10-container'] variables: NAME: debian-amd64-cross 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: hppa-debian-cross-container: extends: .container_job_template - stage: containers-layer2 + stage: containers needs: ['amd64-debian10-container'] variables: NAME: debian-hppa-cross m68k-debian-cross-container: extends: .container_job_template - stage: containers-layer2 + stage: containers needs: ['amd64-debian10-container'] variables: NAME: debian-m68k-cross 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: 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: 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: sh4-debian-cross-container: extends: .container_job_template - stage: containers-layer2 + stage: containers needs: ['amd64-debian10-container'] variables: NAME: debian-sh4-cross sparc64-debian-cross-container: extends: .container_job_template - stage: containers-layer2 + stage: containers needs: ['amd64-debian10-container'] variables: NAME: debian-sparc64-cross 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 From patchwork Fri Jul 29 09:19:34 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 594353 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:b345:0:0:0:0 with SMTP id w5csp1183155maz; Fri, 29 Jul 2022 02:32:30 -0700 (PDT) X-Google-Smtp-Source: AGRyM1t2e9ubJ/88X3z0L78bfbs+RG7bKzPvmHwjFcRyh7RwGYtjvTz8ilbOxbLBLQ1l4i8d8Zib X-Received: by 2002:a05:620a:4591:b0:6b5:ff44:39c1 with SMTP id bp17-20020a05620a459100b006b5ff4439c1mr1868577qkb.204.1659087150368; Fri, 29 Jul 2022 02:32:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659087150; cv=none; d=google.com; s=arc-20160816; b=urSfZ2EQQE3SAAb8kCpxsioWaypW8XqaKXt14uI2Xk3STek+8b8CtS9baHpHsxlGJP kPHDSmKWglHKhAFHJilnaMfAsDuAPllXPBFkcJjeIYekEI7BLQpTqNOkunps6uxP0ACa HTSCkPxXNwRmXzBpN9hUe6USLtoHXR//plQGEsy3xewCX2CKnfxmCIX2pm/XGH7x3O+y QzBT5htLueoee94BeZQbrQ5YZkin3v1bxuYPZ+iqgKjoM3WWCRrqPLiZttxUJsI/Qdk8 9prOuEw6whzx9+6MGH0bMghJuRVX+83cInTnO0btXRkyys7OibrJ56DaSY5TI0WCIV5p vT4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=b4rzYyOyefgD+FFgRWQ2ANlZ3iuspDOKuCWBXcKDEb8=; b=eWVEXnNUsN02KgirECUZH/EB+KbhsMAffJUI8Hs5l8KwaL5J25HPjn7RMigpRqyP1g uYVxs1H2w7JkAFBo6BXLjUzz/4G4rukUKq+e7cLwjN2fS5ayRUyI7YspLt4bzeCLxXLi xm9D6qI19gjsWwlDvnZhmXUuhx8K+w1aBj4JOjv9ryjzl9xL1rvjVOBxkDSHmibqsHmD jO1aA3/wu1KClc+MUr7Dw3wqLEjRpYxjxY2ludXdcCgHzkDrfMBN1OJsUQ7x+3l8npEM lHPFSC3esjKT2ByD6l3RmxZk92H/VEz8DKgYFS2WQygn6eacwN23ga0tsxN45q3NwTF2 s4Ug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=rEzMREBi; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id k10-20020ac85fca000000b0031f34551415si2356596qta.475.2022.07.29.02.32.30 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 29 Jul 2022 02:32:30 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=rEzMREBi; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:39556 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oHMM9-0000S1-QI for patch@linaro.org; Fri, 29 Jul 2022 05:32:29 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44226) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oHMA3-0002Vo-6B for qemu-devel@nongnu.org; Fri, 29 Jul 2022 05:20:01 -0400 Received: from mail-wm1-x336.google.com ([2a00:1450:4864:20::336]:40661) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oHM9x-0005sZ-Qo for qemu-devel@nongnu.org; Fri, 29 Jul 2022 05:19:55 -0400 Received: by mail-wm1-x336.google.com with SMTP id ay11-20020a05600c1e0b00b003a3013da120so3808201wmb.5 for ; Fri, 29 Jul 2022 02:19:53 -0700 (PDT) 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=b4rzYyOyefgD+FFgRWQ2ANlZ3iuspDOKuCWBXcKDEb8=; b=rEzMREBiGFmJmh9mOGgHt+hyaauQH2/xi1890csC02z0C4ry13xZ1ch64qXJ0CTOQ0 zBpCCf5jQp4juRCF+WhtCmiFtWfr2XhAn+N/VTM1QuETMd8PHEFCXQIv3VQPwMgL1BmY TViVxMN5JF9fVa6w7w9rcQ+3Dijs+cwmHJTE/VSGcvyR2gjohRGsNpkRjIsH68xM8SQp Cb05AuxxuG6BigyNWSEy4lD227tBnj4LWUn84CmILAgaRMWyyra82MH8SY6oLDBGM++U vAb193N3lTCfmhIbFMR40akcAYpEzgdcMiU1+d+iXvRbrkEubtCbe+mUULKMwiSKqaB/ +EOg== 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=b4rzYyOyefgD+FFgRWQ2ANlZ3iuspDOKuCWBXcKDEb8=; b=hKMdzZfrhUaOuoobuKGBHIW7pg+2JaiecWqsGuFcCuFqNMqGvoZ/26ITkLarUfgkKB JPQnNEbTG5SgOOhKnQBINejTTNUaJp0gt1ZmiRxkP63u8uSYeUAKM+l6TJPW/JKLjINy av2dgxg3Ss3FzXtxkJI8Lp4f/HTgxzqNq849xkLcNH57hRDgpvkTrfVwCptAI2zK2khF YYQ5Vi8SEJLcJvn/7C7rJrbbEez4U9hVmN5ucwoHBcFxhLX5YmqW7eg8SB6lSOvOpcq6 XTpeHJkUCzZR3BOI37j8KnPoIE+MWzetfzI1mLKIWdJtkN4Z4eEqe/M91i7hK9gVLI5p px6Q== X-Gm-Message-State: AJIora94Ixz1hvNFWGfyJBlm8taNJdLlFhh71/Z1L07QpaKcYHTgCkrZ ZU3vXFLIcNogD6GG6hbw3mhl4Q== X-Received: by 2002:a1c:2981:0:b0:3a2:ffe9:945c with SMTP id p123-20020a1c2981000000b003a2ffe9945cmr2173934wmp.38.1659086392490; Fri, 29 Jul 2022 02:19:52 -0700 (PDT) Received: from zen.linaroharston ([185.81.254.11]) by smtp.gmail.com with ESMTPSA id q5-20020a1ce905000000b003a320e6f011sm3822090wmc.1.2022.07.29.02.19.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Jul 2022 02:19:45 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 38FCA1FFBC; Fri, 29 Jul 2022 10:19:44 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org, richard.henderson@linaro.org Cc: qemu-devel@nongnu.org, Bin Meng , Thomas Huth , Yonggang Luo , =?utf-8?q?Alex_Benn=C3=A9e?= Subject: [PULL 04/13] .cirrus.yml: Change winsymlinks to 'native' Date: Fri, 29 Jul 2022 10:19:34 +0100 Message-Id: <20220729091943.2152410-5-alex.bennee@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220729091943.2152410-1-alex.bennee@linaro.org> References: <20220729091943.2152410-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::336; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x336.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" 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ée Message-Id: <20220725140520.515340-5-alex.bennee@linaro.org> 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 From patchwork Fri Jul 29 09:19:35 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 594348 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:b345:0:0:0:0 with SMTP id w5csp1179145maz; Fri, 29 Jul 2022 02:25:11 -0700 (PDT) X-Google-Smtp-Source: AA6agR4f3kxKdTPeuN8mgsLZC7JqvSpq5/dP+SBwyE3fxY8nERcfqrYPntdhlRNatoAbcEP4D7Qr X-Received: by 2002:a05:6214:19cc:b0:472:f402:5ba4 with SMTP id j12-20020a05621419cc00b00472f4025ba4mr2628128qvc.46.1659086711220; Fri, 29 Jul 2022 02:25:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659086711; cv=none; d=google.com; s=arc-20160816; b=Xy4lmE87F3SfxZOSEfloSpnNaeV9eVCLJPnkRcd3ZKv+wjsH8PDSe9gTHPhjr2kTCV xNZrcVgjJTCW5O/UvzS6c7b2Jq/j5ZZ1lK+57sitK9alWOSmrWHlnqAeBwwZy10/xPB7 ntLAZXwpXrpjEaRJjT3rNguoH1EmEjm0XUqrISINSz3wPW0POoJ5e5Ac5NiSigX7tUhH 8bTBMpNdDCZdCTTLxIChbYv4uTjBZRc95tn9BzQqy7F0cknEZvjfYWJHcVnRpcbTKOJU vLDv6e2fwRMFbrvGCLvWsmBdSn9E9rb+m6j3oVW5QjTF1amGTYLHUN5aeQ4noVDrjsos wdOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=vDDDAtTRJ4elteu1Ws3KBzxZl/nQbgq+eqnl2bGuaM8=; b=D+UlsQWBj9XKpk2XSPQQ0y+rbXdrL33GDawQ+nd94u1yqy4pFpRdoxZougvGicepWX hxgrObkXHTcVRiuSfjf51r0Xfmd7D2sz76MkxfMUUji/o6Gg8HH21J9lGJWK3O2rsoOy ybUAVL0tZs8KSVPKaywGhYsT+LQoh0fTMrp2z1CGJLiRaQmipM48QgzxJ+pgvZqSmHzx vGrKXTn1NlF2TLmeJuE8N+tHzguQxrQ6Q2sJ7mchNJUAtumalwEW8b8zjTeMGSmsIUK2 W3uK8hEb1g9oDJ7TTmwrZMKbxvCAxOq+XA5YdMxYS+QoM/SxlCqwbG5zKrd3gOvsPUv/ WIhQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=qZlyx0j8; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id fz11-20020a05622a5a8b00b00317ca5f6225si1850344qtb.280.2022.07.29.02.25.11 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 29 Jul 2022 02:25:11 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=qZlyx0j8; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:59150 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oHMF4-0002aH-O9 for patch@linaro.org; Fri, 29 Jul 2022 05:25:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44292) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oHMA6-0002WX-Lm for qemu-devel@nongnu.org; Fri, 29 Jul 2022 05:20:02 -0400 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]:53039) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oHMA5-0005tC-09 for qemu-devel@nongnu.org; Fri, 29 Jul 2022 05:20:02 -0400 Received: by mail-wm1-x32c.google.com with SMTP id c22so2242023wmr.2 for ; Fri, 29 Jul 2022 02:20:00 -0700 (PDT) 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=vDDDAtTRJ4elteu1Ws3KBzxZl/nQbgq+eqnl2bGuaM8=; b=qZlyx0j87fPHUf5XTPkXD/AZgcM8XUJMUgJQavwv8p1CVLU94MDq5d4opqxav0JBFJ MFvy2kMnxLz3tzmmbDUgfXf0fQiXTrGYVEWJVhexBPrCoG4xu8oFH8bz4gC3j3+x1glL sRgUsCvnetqAotrOwJEVOCc8f1UdY/n6mYX2DwaXw7eNQzI67KeRqZXlVfzwQyKGleRO ll65ux6Bk/Ez9l4IZR1ayvqas0xs2eNOh7KXnMxRg9ZvFzXTPAgqcDQo9f40MZZTIG1O ghwzRDyf0hxy+q4o0uiLOjDVaFmNi0cLsaVNOsQeET9S5Rp3hN5GmNamOpmotItOdchS EjQA== 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=vDDDAtTRJ4elteu1Ws3KBzxZl/nQbgq+eqnl2bGuaM8=; b=XcYfTePwZBerL6Q7u+PqdTeca0+FYrHs3aiEYutpbXxxCpYQ92TI0tCl26yTfHNAYH eClLVZjTGpkkmNDO/9lD8ggMBVuGI3NW9LGFcZdBg9o8Tf/ROXK4Fk7jWLDlzeCWT6fW DjtjqI6GKf0hO0eZFV12M+DXEGbNCNgUa9USc6aLrEdBY5Mv/L3SsmH0Z/2C0yjuxCGZ BON2ziFaghQeZO+oKymo/emaxxTiULmQ7BmIpTuk6wsrvapUH1P3gLtebmI4NT25cLwD 6YvGM7eb/ZT3qczlAV/rL2whMehUXoqDPcidxJQdTKFMiHpWyYJFT7eNbzzETr1DaXMw 5CiA== X-Gm-Message-State: AJIora8ldBRaChccef9U6WnntieP/+i9oKUopuiv+jxHzBD5Z3iUrhhc zq3lcOTH+/HZP1RFLx+Ip/ftNO6pOjuO4Q== X-Received: by 2002:a05:600c:4296:b0:3a3:58f6:9520 with SMTP id v22-20020a05600c429600b003a358f69520mr1827859wmc.52.1659086399730; Fri, 29 Jul 2022 02:19:59 -0700 (PDT) Received: from zen.linaroharston ([185.81.254.11]) by smtp.gmail.com with ESMTPSA id t13-20020adfe44d000000b0021e2fccea97sm3146860wrm.64.2022.07.29.02.19.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Jul 2022 02:19:52 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 5056A1FFBD; Fri, 29 Jul 2022 10:19:44 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org, richard.henderson@linaro.org Cc: qemu-devel@nongnu.org, Bin Meng , =?utf-8?q?Alex?= =?utf-8?q?_Benn=C3=A9e?= , =?utf-8?q?Philippe_Mathi?= =?utf-8?q?eu-Daud=C3=A9?= , Thomas Huth , Wainer dos Santos Moschetta , Beraldo Leal Subject: [PULL 05/13] .gitlab-ci.d/windows.yml: Enable native Windows symlink Date: Fri, 29 Jul 2022 10:19:35 +0100 Message-Id: <20220729091943.2152410-6-alex.bennee@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220729091943.2152410-1-alex.bennee@linaro.org> References: <20220729091943.2152410-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32c; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x32c.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" 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 Signed-off-by: Alex Bennée Message-Id: <20220725123000.807608-1-bmeng.cn@gmail.com> Message-Id: <20220725140520.515340-6-alex.bennee@linaro.org> 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 = 'yes' # Preserve the current working directory - $env:MSYSTEM = 'MINGW64' # Start a 64 bit Mingw environment + - $env:MSYS = 'winsymlinks:native' # Enable native Windows symlink - .\msys64\usr\bin\bash -lc './configure --target-list=x86_64-softmmu --enable-capstone --without-default-devices' - .\msys64\usr\bin\bash -lc "sed -i '/^ROMS=/d' build/config-host.mak" @@ -89,6 +90,7 @@ msys2-32bit: mingw-w64-i686-usbredir " - $env:CHERE_INVOKING = 'yes' # Preserve the current working directory - $env:MSYSTEM = 'MINGW32' # Start a 32-bit MinG environment + - $env:MSYS = 'winsymlinks:native' # Enable native Windows symlink - mkdir output - cd output - ..\msys64\usr\bin\bash -lc "../configure --target-list=ppc64-softmmu" From patchwork Fri Jul 29 09:19:36 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 594355 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:b345:0:0:0:0 with SMTP id w5csp1186906maz; Fri, 29 Jul 2022 02:39:23 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sjX/rOUCIgcRBDXbkiG6njDq8Uj8k+LmTCX9mn+T4ahxySYGQka2EaBI4GjVbMqz/0cz08 X-Received: by 2002:a05:620a:2984:b0:6b5:fe1c:375e with SMTP id r4-20020a05620a298400b006b5fe1c375emr2018867qkp.494.1659087563100; Fri, 29 Jul 2022 02:39:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659087563; cv=none; d=google.com; s=arc-20160816; b=jMvqj6FxLcxCRBuRu7Q+Mb4qoz7JeyrEXOr/49/HfpZOAHAr5cFQZxhzk8JdOtUlAW CnyTZ0Rq1ErSUIGEkFy8AZ0q8dN4KvwgDm6+QI0LgKDZZN/67ikKE5wla8njS4iQLMY+ 1+wJTf9n28E9O/i0uVHb8hR7Slx6Neazx5zB/6s60GD8MjSEhtxO5P17Ge4D8Tm9q+fB Bi8Xnlji7wtw/tXlF+xkaeFVy+GuypT27Fgd9jn6xmF/e00BkCmqJjqKDxzIV15sODiS 1y30Y9bKaNSFLz4SoNyR5W79cUVcJx/oOAjqYizxRBHFXwPJo6Yx2fCAdMcDv4Eqz/Q2 s3/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=CI2B5ZVJoTazFK681pZ94MwKHGJqZMA5i4E0K05POYU=; b=0Ss1UVq+c/JoHECm23EtqVtBPmy4j3SeEBRNmVTDW48vXqzWYTMhoHTVlfc3Uw1mEG 6rWWHEuuX2/7IgX0Mk4kH2jfPHHtt6G0n8N+8SuW7VhU78EHX4Ha92zkBtLPjpiTagYX HU8M35q7L3GTN5c3iXiUhQtkxSGpqCMX8KvQG1i1BQnbQWYGpkzF3cd2Tenzz4FfwO+T X5GEcKpEqDGu+/aOY6svmiTB2o/zI6tjue8LkKcxCsZUPrVnvYwPBx/cA0PYR7G2MAd2 hkepz1LtH6ga3d1pHflszmH420yx+4T7un0uk8dPAqNcAITRLjkUcP7HzuCIpn4qU5sI mlNA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="ZQL0/8xi"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id kk14-20020a056214508e00b004726aac5926si1667941qvb.310.2022.07.29.02.39.23 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 29 Jul 2022 02:39:23 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="ZQL0/8xi"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:46944 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oHMSo-0005rz-MD for patch@linaro.org; Fri, 29 Jul 2022 05:39:22 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44252) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oHMA4-0002Vr-I6 for qemu-devel@nongnu.org; Fri, 29 Jul 2022 05:20:02 -0400 Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]:39701) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oHMA2-0005sy-Tn for qemu-devel@nongnu.org; Fri, 29 Jul 2022 05:20:00 -0400 Received: by mail-wm1-x334.google.com with SMTP id i10-20020a1c3b0a000000b003a2fa488efdso1600164wma.4 for ; Fri, 29 Jul 2022 02:19:56 -0700 (PDT) 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=CI2B5ZVJoTazFK681pZ94MwKHGJqZMA5i4E0K05POYU=; b=ZQL0/8xif3s7kPiKkVlNFFqMfrdbHCXSAoTEkrztckLNH7aLSr5xqcQbpmsTp/URDJ j3BSES1pKnt7gu9RbbaHA+W+HEYRJAyI5O5sXaO/xCkcMnzlpm82EQrCc6Qou/JKuJDX 5VHUty0AYW0hlFq7tKxxF/+Z0W1L8INwOLDXly5jxKR5akv6YNKjjyEU3JuAdmEOUDe1 PtsncnqXRvIujqSsTruLwjqmHyd0ztzchA4LPfFQRNjklkCtfojhUmIvPyl/9lVO1m7n d1LWgQT6DmPHdvF5jDzcwg9SQIy4d2LZXnGaFcG/dvrbvz61XyFlL3L21jOz7uQ61IFd WAjA== 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=CI2B5ZVJoTazFK681pZ94MwKHGJqZMA5i4E0K05POYU=; b=zlkX1Jm3eADp3jbno1eYglDhgACIc0md/CrM1N1AFy0czEHlK2QS217SirUo82MVP1 /7ON1ECZ/Sh6bGaP0psEZESxJg3jz3W+kybs6IozWjgt6N4Pg6PZpt1iW7FIqsDqxIjm odthmTdY6muSly13YIj2tjOe5k/VC2WD1B5qgMkipvn95P5gyNPwNeD9HUCJtX5HHcsY nw2j7F+iPmbXNC++GuPdLCZRLZHjJgeYF6Hx+j1uIrxzfyBiEio5JwkOUZRnPLXU2q6f G2p29l6oWoG2HRt96EdhVID8qBB/WeW5UQGW0HwQikzHccOq8huC/HpQCmYcVz+l+z5F 32Hw== X-Gm-Message-State: AJIora/n0+kGGSzfSy40iE3dJ1DcWZP1Zyq4S2k02SC78bzAKjBJw8MS Dmlpwd9W2044hk8t0MJx4nJQNw== X-Received: by 2002:a05:600c:4e88:b0:3a3:1bdc:cb72 with SMTP id f8-20020a05600c4e8800b003a31bdccb72mr2188940wmq.59.1659086395914; Fri, 29 Jul 2022 02:19:55 -0700 (PDT) Received: from zen.linaroharston ([185.81.254.11]) by smtp.gmail.com with ESMTPSA id o5-20020a05600c510500b003a2d6f26babsm4043065wms.3.2022.07.29.02.19.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Jul 2022 02:19:52 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 5CB321FFBE; Fri, 29 Jul 2022 10:19:44 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org, richard.henderson@linaro.org Cc: qemu-devel@nongnu.org, =?utf-8?q?Alex_Benn=C3=A9e?= , =?utf-8?q?Philippe_M?= =?utf-8?q?athieu-Daud=C3=A9?= Subject: [PULL 06/13] semihosting: Don't return negative values on qemu_semihosting_console_write() failure Date: Fri, 29 Jul 2022 10:19:36 +0100 Message-Id: <20220729091943.2152410-7-alex.bennee@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220729091943.2152410-1-alex.bennee@linaro.org> References: <20220729091943.2152410-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::334; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x334.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" 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ée Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20220725140520.515340-7-alex.bennee@linaro.org> 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 *buf, 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 = qemu_chr_write_all(console.chr, (uint8_t *)buf, len); + return r < 0 ? 0 : r; } else { return fwrite(buf, 1, len, stderr); } From patchwork Fri Jul 29 09:19:37 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 594357 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:b345:0:0:0:0 with SMTP id w5csp1189482maz; Fri, 29 Jul 2022 02:44:41 -0700 (PDT) X-Google-Smtp-Source: AA6agR7HJt1+HQwErx3xDm6+myzZAUknBrFRR220blmWisKvcmxrv9mHLEDCCUy7SykJTWZy4G4h X-Received: by 2002:a0c:f448:0:b0:474:25d:cda3 with SMTP id h8-20020a0cf448000000b00474025dcda3mr2626380qvm.35.1659087881261; Fri, 29 Jul 2022 02:44:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659087881; cv=none; d=google.com; s=arc-20160816; b=sN/voXffvwLDixkuPJFkH6PryJ0wXv8otKnUTsryRAFK2gfypc/70XBs91UkaJOmUE fQfQpmCpSkhB9ezd9IV24Nzq5vyVEjsy/rBM7Otfrz9Hh71RaZuTX4RZHunNyBmM+tUI qBmhESv/qswt5DFAza7nmt/nMhSHfuSNP4qZhPe0xMi6CRyjCRoPllo+TYghWPvgik2p pgSdtOrKzKaMQuZrM6efqi4zi2pEivEZ56J7NBHi/fxcxcg38bHte7k+ZKD1n+gnk4+d PHOi1BZIULNg9gKkFJlvOVNpvBpnNgUi1V5anwwRLGoBDrDW1iO4Gp2rEHQzJnI376vX 6RPw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=AlNB6s7eS5tHMbJtmXxfFR2VmBSojG056RBlQYn6roU=; b=iacKNkDO0ltHjX7qYHStRmiGfQighkNSyMXSepv1kp1YYVU5NRCCGc1OIcIyGjrRo+ 4k2TDd3aeNuwOB0BxPlNZ3FDoGrAYvqHQFe1nxHGev+aWhy69BpPfMQuxEDxV07FTKnD CaAW/kJi8hbDQ/mS4lyl8uz27e95FAs+tpH+ZdHp1abDPE3wTK59Jw3323aN33pGC/r0 Bq6gOVXdIktOHTRyBxxBeor8mi2VnKd2GqyaaqVVZhlD170nC16Bt+Ffl2HvCw+7Wb8D 7NYAdvGTuYg+7RnY1Un6/HNJhS+R9oUawQ4CM5bOiUppY2OhK2svIC3pilCVjaG5NBhK U75g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=gGDp4erU; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id i12-20020a05620a404c00b006b5d0d6f1a3si1986098qko.718.2022.07.29.02.44.41 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 29 Jul 2022 02:44:41 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=gGDp4erU; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:53066 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oHMXw-0001uW-Sh for patch@linaro.org; Fri, 29 Jul 2022 05:44:40 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44250) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oHMA4-0002Vq-Eb for qemu-devel@nongnu.org; Fri, 29 Jul 2022 05:20:02 -0400 Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]:51793) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oHMA2-0005st-T4 for qemu-devel@nongnu.org; Fri, 29 Jul 2022 05:20:00 -0400 Received: by mail-wm1-x334.google.com with SMTP id id17so2242743wmb.1 for ; Fri, 29 Jul 2022 02:19:55 -0700 (PDT) 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=AlNB6s7eS5tHMbJtmXxfFR2VmBSojG056RBlQYn6roU=; b=gGDp4erUISlQ+OXdDXgVLDUPpq3JPj0W3in8+aGe8o+vDacIwEc8feGxVcrUZNXQ3+ NfB7Ag3eSMn0BKxAB41OyhIgUiCf83DaCqNJvAGmCfynYrlAHtBxn72v67Uboikc23R/ QH6ylvtNT04Eoq/8j/HK0WMDjN8V/fO2KUCazHBchT++qrkr2tm2GPqehI19pvw7hDYT 1KkglaRBhGMqi9Nr07WTlcs31PQCF/qrQ/pK+xF88aIV5QvmETHabKbIdlWcI7D+swIr GE81se8dp1QxWPi+SSv6JtWOBqiIRRzXrtvM63mm4cvqALBpZ8u2KVNPZN6Gcln0JeA8 XlYg== 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=AlNB6s7eS5tHMbJtmXxfFR2VmBSojG056RBlQYn6roU=; b=PAzlMFidS+H0lisZoYgAIyWfzcKHJDJQchpNzfV2I4LAkC+Wp3zPo6tQggqu6ZL5dV A2uDo6VTnL/vxdvWh1Su7Hdk2AFrfbNvGxl+rBQ8Z42mE9HnlUvhGf5RnOmKVE8NyWVT LrfVazjIWwGwE5RUSAcv0AHnvCXrFV+FyqnMGd01X3L7xOmlvTq1woIww5vMQL0QRJ0+ wgIGnw0Pb7sgf+d/y5H7cePtF+sCnhgyPCZMEiQdtlOyKBOxKYzfGDRpufv6ZtVTMMEp FVSOxD6HCEp+pV+bcEtGTjOSWGSqJj7p7qlqkoChjV26InVkqUVYpSMpuUW3/+rlzoEM TrfQ== X-Gm-Message-State: AJIora9O2zCH9kgWxOYsrRQEYji4/hPLGZ7rcvICgvAAvnZG/Mdt1h48 hIq2hEyCtnPFyd80kSLHbdUNQw== X-Received: by 2002:a1c:740d:0:b0:3a3:e1:179f with SMTP id p13-20020a1c740d000000b003a300e1179fmr2128647wmc.17.1659086394930; Fri, 29 Jul 2022 02:19:54 -0700 (PDT) Received: from zen.linaroharston ([185.81.254.11]) by smtp.gmail.com with ESMTPSA id o17-20020a056000011100b0021e6baea4ffsm3182090wrx.29.2022.07.29.02.19.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Jul 2022 02:19:52 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 738F11FFBF; Fri, 29 Jul 2022 10:19:44 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org, richard.henderson@linaro.org Cc: qemu-devel@nongnu.org, =?utf-8?q?Alex_Benn=C3=A9e?= Subject: [PULL 07/13] semihosting: Don't copy buffer after console_write() Date: Fri, 29 Jul 2022 10:19:37 +0100 Message-Id: <20220729091943.2152410-8-alex.bennee@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220729091943.2152410-1-alex.bennee@linaro.org> References: <20220729091943.2152410-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::334; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x334.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" 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ée Message-Id: <20220725140520.515340-8-alex.bennee@linaro.org> 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_complete_cb complete, } ret = qemu_semihosting_console_write(ptr, len); complete(cs, ret ? ret : -1, ret ? 0 : EIO); - unlock_user(ptr, buf, ret); + unlock_user(ptr, buf, 0); } static void console_fstat(CPUState *cs, gdb_syscall_complete_cb complete, From patchwork Fri Jul 29 09:19:38 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 594350 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:b345:0:0:0:0 with SMTP id w5csp1179697maz; Fri, 29 Jul 2022 02:26:13 -0700 (PDT) X-Google-Smtp-Source: AGRyM1u1X1G3tAt8zUkUohL9DaYzBUeN6re2iXryFM70suGznm/SjstQYjVN65JhHWwwCeCwAQsy X-Received: by 2002:ac8:7d91:0:b0:31f:37ea:98e9 with SMTP id c17-20020ac87d91000000b0031f37ea98e9mr2488486qtd.511.1659086772862; Fri, 29 Jul 2022 02:26:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659086772; cv=none; d=google.com; s=arc-20160816; b=cV7P3iy2P52tNzIbB7PE/ah6i78fTg99O3A8aMYZR1LQABkUIz3BYXVDZ4qLCbucN0 BXz/lEvcYamx6YdoYiwD2NMlXE22kakOnBesha7imnGaY9IPmru/N0HLcNHw9Q+BkaTB CPR8zTAnnRFu65KsmrhK9e6um8IDtvUDF8zhoZphYpdtKy6dK0V3F7SFV/mGJeTBWvC2 LvcxMaRscPeTRcPDVmVIqs6JPdTroZBiUX0M5wNETgmWMUtcpduWLhCfRC+6pwZY9rtH ZY5s6C95LpBRFzWS9aiErQQH8HGoz/cvobF+GgnJ8qJg0ezOnJJ/7Gl4nKSVf10zT4W3 mDnw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=7CojBDnzsSadEUfkkQHrKsxO1PC9/FIoZzsN5dLDDhc=; b=utjbcOLFbGB6ce7Tia1ZUvUTgzEoX9H1K/qZaZxTQSnW8V/tCKbEB+3HYU07hl1vZy dV1CadA8juR4F4NXm7cHlBSbBcIX6v3A28wCzpEwdiQzMdNJeEOKZq9YOMvbNuh7DH6E yN25z50lofNvx5EU0pR19kOwy6x7T85mzFYxVVCFdx30iKW0QLtgW3t0BNYWqm8TLw2k 24iY2HAQvSBENSd0d1jq0vkbkBnYNccdq8B6hDXDyBvHTWfAc5jq+YLCcO7I910zLS6y oSoBXiN3W+SdB/Mmn1ceiP7S0mYco4RFdwo7AMHeBzVcZRiLtzqQTT8x8E83ZWKiE8Hl IIfw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Gyo0oAw3; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id x16-20020ac87310000000b0031ef51fbccfsi1649397qto.673.2022.07.29.02.26.12 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 29 Jul 2022 02:26:12 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Gyo0oAw3; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:59782 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oHMG4-00038t-8E for patch@linaro.org; Fri, 29 Jul 2022 05:26:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44274) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oHMA5-0002Vw-PK for qemu-devel@nongnu.org; Fri, 29 Jul 2022 05:20:02 -0400 Received: from mail-wr1-x42f.google.com ([2a00:1450:4864:20::42f]:34315) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oHMA3-0005t2-C2 for qemu-devel@nongnu.org; Fri, 29 Jul 2022 05:20:01 -0400 Received: by mail-wr1-x42f.google.com with SMTP id h8so5277468wrw.1 for ; Fri, 29 Jul 2022 02:19:58 -0700 (PDT) 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=7CojBDnzsSadEUfkkQHrKsxO1PC9/FIoZzsN5dLDDhc=; b=Gyo0oAw39D9Q2vO8UwjCUhbuDDYMkqRXifp5gYOEQMkqI/JSYZ/TgtHXRkkGoH/t2e R50wWFLBMd1Uc5p4eLpV7JVhFX4E3QTQbEPfo0QDT4JGJE7QaHOZFptgDYdSAPXCaaw2 gQRj2QTOuC8IrFaDvKocPorg9f6Q1vRTnGtRgThZily5+I5tJaZ1MF91jehmPw/B/IRJ fuXfb+hXUo+Re46sQyHTblstmZiMGio5IrfOONynd/2b8/uuOI/5kBkcTnUwZSi3aTCE kpZeBul2j2m8OGc+id9JaOib8FfVOBXsCuC0qrMndr/3UH/b+nDY4MApNX0FRMyFU/Km rCNg== 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=7CojBDnzsSadEUfkkQHrKsxO1PC9/FIoZzsN5dLDDhc=; b=wxfpsjV/NKLKpJavKHSnpZzVVaVsRjeV87Exem5nM+zI/yu3NV69jlVXfzerrDU1Zr h+77YkEEXI9kkSQS0Z8dOLcQrMKp5gNv4VRidr1cpW8QSrtGozAhGQ8yO0nkZHlJUh1y H5Wwk0xq4kg/fvnaY90GdkdIF9Zv1FWeH6Gt+pOdt/KnWVd2IRc0gqOnbWBdPBDQqZHk XsVyF1Lc/ASZpc8iGRdmVdbNKa35EcbP/QVRXzPsekVLSA1nuAqIweZjzF+zyiVvlWH5 Z5AVXSk6omIYSOLGe4tNbDbNbLPLwgLnV4MCFUH0V+5cxLlMIeCfEY7pi1hhoFaJvniU D3ww== X-Gm-Message-State: ACgBeo2u/0q8BJU7sp5rpq+svR8VHOx5CMKC18LQ43xHo6nfz3gehL63 SQrE90kBvOxQUAOH5yXVB6q1HA== X-Received: by 2002:a05:6000:608:b0:21e:b5f4:4bc9 with SMTP id bn8-20020a056000060800b0021eb5f44bc9mr1890182wrb.196.1659086397986; Fri, 29 Jul 2022 02:19:57 -0700 (PDT) Received: from zen.linaroharston ([185.81.254.11]) by smtp.gmail.com with ESMTPSA id o12-20020a05600c4fcc00b003a31d200a7dsm4122665wmq.9.2022.07.29.02.19.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Jul 2022 02:19:52 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 7FD4B1FFC0; Fri, 29 Jul 2022 10:19:44 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org, richard.henderson@linaro.org Cc: qemu-devel@nongnu.org, =?utf-8?q?Alex_Benn=C3=A9e?= Subject: [PULL 08/13] semihosting: Check for errors on SET_ARG() Date: Fri, 29 Jul 2022 10:19:38 +0100 Message-Id: <20220729091943.2152410-9-alex.bennee@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220729091943.2152410-1-alex.bennee@linaro.org> References: <20220729091943.2152410-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42f; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42f.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" 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ée Message-Id: <20220725140520.515340-9-alex.bennee@linaro.org> 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. */ #define GET_ARG(n) do { \ @@ -739,10 +745,14 @@ void do_common_semihosting(CPUState *cs) case TARGET_SYS_ELAPSED: elapsed = get_clock() - clock_start; if (sizeof(target_ulong) == 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; From patchwork Fri Jul 29 09:19:39 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 594361 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:b345:0:0:0:0 with SMTP id w5csp1194714maz; Fri, 29 Jul 2022 02:55:50 -0700 (PDT) X-Google-Smtp-Source: AA6agR4ZnA9k7OHdF1tQSk2npjEppMAgeevOZx9tRL1VMw9dNoVIXiJ7k5rFA55w5eZjvYIoWMO0 X-Received: by 2002:a05:6214:20a2:b0:474:4adc:256d with SMTP id 2-20020a05621420a200b004744adc256dmr2528042qvd.31.1659088550020; Fri, 29 Jul 2022 02:55:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659088550; cv=none; d=google.com; s=arc-20160816; b=VBR5jLdsYseEZHN4QWOL0AHBXXi38GAPslZTcyALs6uReOFSkf1gB0CcCWsQjq3ksa 3S4hWDvWc2jrkXng1SWB6W9TD0kdkm/zmkvcQZrKlnYL7KWf1ZgJV5mLiPq4EDYJ2ZxM 0m1ACA3t356skkVC9NDNpSM8c4nUveyJiBeE3oBe4oimfFC7xacG//4Z0TTzKVQv7EFf 9s+BPAHofQNjdszEEhAC9FvihNa1DXESZdMVAGe5Rt1XVh34lw7pLV6XrJ7htyDpNR1O a5d5emGn0DSa67BIlh4Q0phkA00Iam6ytilKk4qj8gpzQK52dcgN+BYsxEZWxU7sn1FY TESA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=mbn6XiDKnJmRGG2YuNoOAPV2cZfoBYZK1OHleilmO84=; b=cuLT9qh0k6fKzd9PZYx4iZBgJ7ibDSUNJi7vjjn1rUZnvpX5GPJZpgNVybRE0/OU10 KBnHWycZG8NNzHCsDPqvPIxZqxdAt0EZVzg8bcR1E8raRIMJzA/94CTEZ8JS2Nrp/wB3 lk7D5dYfJ5+aUoIWKyeZsMaUIxCBbQMK9H4zxd4b+5RwfDnRD2Lt6gK6o69dQWcwGmhJ asiQpk0lzU+Wqxz5nae5y8QIXINkEa3vOdV/mLHdVCL8oSVAvlWtNnR21dUwk5FGCRIC metOjs0riR2ndtJsMeBEr6H3NS1cJ0FKN8O7189eV5529nWnBX1jvPPyQDXeiiDZTYNU yrIg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=c9aoVxBv; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id e26-20020ac8011a000000b0031ee3d828f7si1821226qtg.456.2022.07.29.02.55.49 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 29 Jul 2022 02:55:50 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=c9aoVxBv; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:36126 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oHMij-0001QS-LX for patch@linaro.org; Fri, 29 Jul 2022 05:55:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45292) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oHMFE-0005Wx-Lp for qemu-devel@nongnu.org; Fri, 29 Jul 2022 05:25:20 -0400 Received: from mail-wr1-x42f.google.com ([2a00:1450:4864:20::42f]:37508) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oHMFC-0006hk-V3 for qemu-devel@nongnu.org; Fri, 29 Jul 2022 05:25:20 -0400 Received: by mail-wr1-x42f.google.com with SMTP id z17so559871wrq.4 for ; Fri, 29 Jul 2022 02:25:18 -0700 (PDT) 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=mbn6XiDKnJmRGG2YuNoOAPV2cZfoBYZK1OHleilmO84=; b=c9aoVxBvcweaE2Jfnzkf3ITZcceZf6BpIwZ4izg+CMiwn3MTAFb5KqpAMOedz3mooR bfaNS9am+X6GlHYsTr897A1SC52VTyxaAPCBBX2kL91nGcWY2Ilcm7pNetlCQOfFwIGr 1qW3lZ3hnkDMPP/S0wteABOGKPATRI5g4D3UdTzCrihj5qEd5qenuh0sxrJJuw1ptLu+ M11OxPUufSZMmH5lJ2cZNZh2uGJ9YEh5tBclEeHX6sYT1fHHGHzLbHswOTO93ScJfjGO XGMexpVuiJOtLbsx1CezNDUBdJ8m6/9rgx0EJqhdVPjqO0HOHtoVpnQr8VKC9o1m05EA pevA== 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=mbn6XiDKnJmRGG2YuNoOAPV2cZfoBYZK1OHleilmO84=; b=ICNE6kc2sV82Fky3pPdtGHlnfMily11X8hYLpi27FKTRtMhU1q9ABPzYbbXWFOedKr zZDtGfHIvAGW+sKgYimZN9bCzyyk6AkbUO7sbScSFXDAglw9DsQw/JkEVyCD+/BvqkJJ XU90imkQZJe+5bllS8tK78321LwLili8iZPe3F7gPekB5LyvGqeTht73bSZMHqzoFA73 V0+aYvGa/QZIeOZHlPd1TjQCV1GOw6LFdqQhARt5k6pIBsmqA/YCSpc4bQNfCjVQl6bd Vq4kHgtVGGEsxwGOVap2oC5H+Ior1VZSe2DhTSPGVeo+gXl8LP3Dy4aj8nKW1xHiaWBA Q3Jg== X-Gm-Message-State: ACgBeo3uFF5DHxN5OHbziSu33vjP9i0buoHbXnBf2El9cdOU9iBWF2wi A2FE55ZrNditjuFtaVnYYIgheA== X-Received: by 2002:a05:6000:807:b0:21e:daca:7df2 with SMTP id bt7-20020a056000080700b0021edaca7df2mr1846828wrb.214.1659086717603; Fri, 29 Jul 2022 02:25:17 -0700 (PDT) Received: from zen.linaroharston ([185.81.254.11]) by smtp.gmail.com with ESMTPSA id q5-20020a1ce905000000b003a320e6f011sm3835992wmc.1.2022.07.29.02.25.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Jul 2022 02:25:14 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 965041FFC1; Fri, 29 Jul 2022 10:19:44 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org, richard.henderson@linaro.org Cc: qemu-devel@nongnu.org, =?utf-8?q?Alex_Benn=C3=A9e?= Subject: [PULL 09/13] semihosting: Fix handling of buffer in TARGET_SYS_TMPNAM Date: Fri, 29 Jul 2022 10:19:39 +0100 Message-Id: <20220729091943.2152410-10-alex.bennee@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220729091943.2152410-1-alex.bennee@linaro.org> References: <20220729091943.2152410-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42f; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42f.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" 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ée Message-Id: <20220725140520.515340-10-alex.bennee@linaro.org> 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 = asprintf(&s, "/tmp/qemu-%x%02x", getpid(), (int)arg1 & 0xff); + 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 >= arg2) { + if (len > arg2) { + free(s); common_semi_set_ret(cs, -1); break; } p = 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); From patchwork Fri Jul 29 09:19:40 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 594358 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:b345:0:0:0:0 with SMTP id w5csp1189707maz; Fri, 29 Jul 2022 02:45:07 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uw2aPN9KPdAuqQrn5VniefvNyBX6ZnTaXrJMnd4LKXdMb9ZklFnMpB0HqpGSjgOl2DRCYh X-Received: by 2002:ae9:e8c9:0:b0:6b5:e58b:7f5a with SMTP id a192-20020ae9e8c9000000b006b5e58b7f5amr1943738qkg.741.1659087907250; Fri, 29 Jul 2022 02:45:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659087907; cv=none; d=google.com; s=arc-20160816; b=DstBoksEeLADNBL+lUv8zZvCoDpzRUy41e+Q2X3ZTyZ6L1DvCgi2tAKZvjk/xoNh/t Lj04nNQ9OVQgMkF81IuQNkKOaDGAIZyK3t0LaYFi8bfGIpiQtbSXKQB7aBynASXb8a9I 2s3jPugI1c5etTVOTnArURc1kCrV5AMkkTggmoffH4PQttLFVNaCCqXYYOhPQ29Gs6Z7 pvX77mHNgN8+hFzYAnOweAoRM7jjHFF1El0l8M8vThLOe13BuFgYJP+hqDXlocRSEcTM YAA1NGDzBuQRZGnEEmsdWt28QkKGWtDB9gGH03c4hguBfZqUp/g7vF3BkcdTrro62SVN lk1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=xOlc+wxUC6YsZtcE4bDc4ixFDql/BQBCzStcRkhv26g=; b=vq8StdBrrrcNeF0YHoRgVdwHY02WFY2pTetIyJsuEsNTn/aWtCBFUO4I1E1CGtGrbY n7b1KLvB4zrvGzAyd+qTvH0W7MlBkfg1p7qr2aH4K4kWCF07CMSBo0z1HCzfSfH1kfaG ccLJnT5pbIdZuIWBLit255Qnf7L75vT9YufIefiWk933qVmYDrIyjv/hPluA1HZAH7+7 QWTtm/iwYGTYrdpm27m5RTj+agilIlwtUKpZwplz2LR+FhIAh9wE69BSy3G9W2jxP79u T47eX4FRjbwchZsLZFFN2RRLIu5UzhUJUwHakV7DSDwTSz+0RyhTtwMkKnWZ6PbM0mc0 2xHQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=uif8XDG2; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id bl5-20020a05620a1a8500b006b65f611fd3si2075407qkb.705.2022.07.29.02.45.07 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 29 Jul 2022 02:45:07 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=uif8XDG2; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:53398 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oHMYM-00026t-Oz for patch@linaro.org; Fri, 29 Jul 2022 05:45:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44308) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oHMA8-0002Yf-O1 for qemu-devel@nongnu.org; Fri, 29 Jul 2022 05:20:04 -0400 Received: from mail-wm1-x336.google.com ([2a00:1450:4864:20::336]:40661) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oHMA6-0005sZ-9g for qemu-devel@nongnu.org; Fri, 29 Jul 2022 05:20:03 -0400 Received: by mail-wm1-x336.google.com with SMTP id ay11-20020a05600c1e0b00b003a3013da120so3808386wmb.5 for ; Fri, 29 Jul 2022 02:20:01 -0700 (PDT) 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=xOlc+wxUC6YsZtcE4bDc4ixFDql/BQBCzStcRkhv26g=; b=uif8XDG29+A31dEeU4MCabM4YLFTyW5SgD9PqVO8tHr/74pw8okeXqbHXmpj0gC+Xy 6XNWTg2ssAbxKfNXv72dj1LkfPPRGiCoNEcQrKspPQ4PpF237eutePvgNjgzXaNALsXf G+RFyljjBfC7dszyiduTguPvkL8cABL/J5vg4x+fFtLuSaXEuoarNo8ZV1phJ9ISAzKp jJ3hSTUoXnYBzQ7gHpziJgJqQium27ZgTysXww4YU70AjOFgZn7ZJmAG46kmsxQQFlkN LFG/t5i1bXYysX7H4uPoT/bs21ox2CTTyjS6EzPC72ckxqZopCTsH4tUJtRbf+EAcod0 fg3Q== 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=xOlc+wxUC6YsZtcE4bDc4ixFDql/BQBCzStcRkhv26g=; b=5s/ojqTtXJ8vLWOF+JuJN+bQyhFMMFOyGr+lk8FqRe6q4YAfWbzT2ysk+C9gtJrggw 2bqBCMBNBz3cF2XsRvJcZOlgMMvmaxf9vgcoUt5Ot0aBI6eGq7avbmBjJgTLPzw9I0J0 SxJ1ilGUKiwOdtLJyeGfnFvwFurJSWHJ7n7CsKyWagsKjhxxcjPHUC9wYmuo003SvNGU TBKkQj20rtq9Vo9cfKHSJEvQC0NfIelqFjkRfOXHM0+fsVNqhq02VQXgghq7+SXyKgYx T9frwOgsmbXGuJV+4sP3BvREwULXXWq+yx179gmke0VXpEvmPZ2nkJ4JS8yYoXVjXUvS pfag== X-Gm-Message-State: AJIora9Bnh9YJj+oZKj0hUUjohKTHlL/4vyy4bHL7Hryxk1BRZ+lL31X 9tg6TXB9R2r/ccOgsAbpF7Y51nCO/Q7uCQ== X-Received: by 2002:a05:600c:154f:b0:3a3:4383:e1eb with SMTP id f15-20020a05600c154f00b003a34383e1ebmr1808023wmg.111.1659086401488; Fri, 29 Jul 2022 02:20:01 -0700 (PDT) Received: from zen.linaroharston ([185.81.254.11]) by smtp.gmail.com with ESMTPSA id f11-20020a05600c4e8b00b003a31673515bsm9475712wmq.7.2022.07.29.02.19.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Jul 2022 02:19:53 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id AEC5A1FFC2; Fri, 29 Jul 2022 10:19:44 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org, richard.henderson@linaro.org Cc: qemu-devel@nongnu.org, Ilya Leoshkevich , David Hildenbrand , =?utf-8?q?Alex_Benn=C3=A9e?= , Eric Blake , Markus Armbruster , Paolo Bonzini Subject: [PULL 10/13] qapi: Add exit-failure PanicAction Date: Fri, 29 Jul 2022 10:19:40 +0100 Message-Id: <20220729091943.2152410-11-alex.bennee@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220729091943.2152410-1-alex.bennee@linaro.org> References: <20220729091943.2152410-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::336; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x336.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" 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=exit-failure option to activate this behavior. Signed-off-by: Ilya Leoshkevich Reviewed-by: Richard Henderson Reviewed-by: David Hildenbrand Message-Id: <20220725223746.227063-2-iii@linux.ibm.com> Signed-off-by: Alex Bennée diff --git a/qapi/run-state.json b/qapi/run-state.json index 6e2162d7b3..9273ea6516 100644 --- a/qapi/run-state.json +++ b/qapi/run-state.json @@ -364,10 +364,13 @@ # # @shutdown: Shutdown the VM and exit, according to the shutdown action # +# @exit-failure: Shutdown the VM and exit with nonzero status +# (since 7.1) +# # Since: 6.0 ## { 'enum': 'PanicAction', - 'data': [ 'pause', 'shutdown', 'none' ] } + 'data': [ 'pause', 'shutdown', 'exit-failure', 'none' ] } ## # @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); void qemu_init(int argc, char **argv, char **envp); -void qemu_main_loop(void); +int qemu_main_loop(void); void qemu_cleanup(void); 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 @@ int qemu_main(int argc, char **argv, char **envp) { + int status; + qemu_init(argc, argv, envp); - qemu_main_loop(); + status = qemu_main_loop(); qemu_cleanup(); - return 0; + return status; } #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 == PANIC_ACTION_SHUTDOWN) { + } else if (panic_action == PANIC_ACTION_SHUTDOWN || + panic_action == 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(); } -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 == SHUTDOWN_ACTION_PAUSE) { vm_stop(RUN_STATE_SHUTDOWN); } else { + if (request == SHUTDOWN_CAUSE_GUEST_PANIC && + panic_action == PANIC_ACTION_EXIT_FAILURE) { + *status = EXIT_FAILURE; + } return true; } } @@ -715,12 +720,14 @@ static bool main_loop_should_exit(void) return false; } -void qemu_main_loop(void) +int qemu_main_loop(void) { + int status = EXIT_SUCCESS; #ifdef CONFIG_PROFILER int64_t ti; #endif - while (!main_loop_should_exit()) { + + while (!main_loop_should_exit(&status)) { #ifdef CONFIG_PROFILER ti = profile_getclock(); #endif @@ -729,6 +736,8 @@ void qemu_main_loop(void) dev_time += profile_getclock() - ti; #endif } + + return status; } 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=reset]\n" "-action shutdown=poweroff|pause\n" " action when guest shuts down [default=poweroff]\n" - "-action panic=pause|shutdown|none\n" + "-action panic=pause|shutdown|exit-failure|none\n" " action when guest panics [default=shutdown]\n" "-action watchdog=reset|shutdown|poweroff|inject-nmi|pause|debug|none\n" " action when watchdog fires [default=reset]\n", From patchwork Fri Jul 29 09:19:41 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 594359 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:b345:0:0:0:0 with SMTP id w5csp1192426maz; Fri, 29 Jul 2022 02:50:43 -0700 (PDT) X-Google-Smtp-Source: AA6agR6sf32t54HbDzIfAfy7ebW2fTE4ysZJBjn3SdmTj36d9+Sz+ECKlOaPw3nsODgMiLsTzJgQ X-Received: by 2002:a05:6214:2307:b0:46e:5fbc:3c30 with SMTP id gc7-20020a056214230700b0046e5fbc3c30mr2283244qvb.21.1659088243222; Fri, 29 Jul 2022 02:50:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659088243; cv=none; d=google.com; s=arc-20160816; b=dFce6bY2TGgwiiRcAzv6T5MsjSGSNo72xECrITc0dbAdbggoJrswYftHLK4+B4DqAm x8dUDYxMDzAUixN+MbRUCeMusoPUTyAH8d/f55qC6ZX4eItL/c8mFDmbkJnxxCxeGqwH iOQNHysLTnJNONAX706uZJdecQNHzcf9JrcN2y3I02dTPGzXI9BamdAdf1MdXoZnI+bx OLll2qQ+cGp9C9bE52IpWecXZhjt3MqXXLMfi6Nv9AxLWx+TP9ZPI7jE/XzDVTup3TuS Lf26rswQMppV6r+3PipRnSSDkmfbOsjlCPAdhAL93yz28mfZRwDCweOjja6YqftRN9o+ Rakg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=gy+5PY+WqRlaBvLBWvCWjtIPhrWvg0Op57/GOX9XBTc=; b=epWaYCeJGpsVZnPSb1dAU+S3NMEvrZvxS1cG+0Xz2aSaFLb5lWfKfkp/h3d4g8z2bS OxoKZUXE176jauvkr/Yw5TphTVHXTGMhuRUv2YbunFm1EM2OJdw+f6GxLygzbEm8mSRp WGtzI+fKnlLokuH3ecqrgtR3mUoonKGXDtN8UsDF8g49+6pyCFSq0WyWOsQVP7H46JHa 2r5pLVXQCCKSkdwTFMjbCGXV/NE0kK+RjzrUTkRSqYgHw69YsjZyYtaPDU0sJEF5752F qC33bIhYgZ7Mjlx4VCml63Gf0TkQVQ2ItMSHzQURQbdZ+ikxYVZGbnkSrVZ8llUXYiqO mMDA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=B8WD5jcw; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id m8-20020ad45dc8000000b0047455a0e835si1943007qvh.64.2022.07.29.02.50.43 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 29 Jul 2022 02:50:43 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=B8WD5jcw; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:57620 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oHMdm-00058A-Pg for patch@linaro.org; Fri, 29 Jul 2022 05:50:42 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45256) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oHMFC-0005Vd-C8 for qemu-devel@nongnu.org; Fri, 29 Jul 2022 05:25:20 -0400 Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]:45771) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oHMFA-0006h8-N4 for qemu-devel@nongnu.org; Fri, 29 Jul 2022 05:25:18 -0400 Received: by mail-wm1-x32d.google.com with SMTP id u14-20020a05600c00ce00b003a323062569so2211916wmm.4 for ; Fri, 29 Jul 2022 02:25:16 -0700 (PDT) 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=gy+5PY+WqRlaBvLBWvCWjtIPhrWvg0Op57/GOX9XBTc=; b=B8WD5jcwmYY/eu507A0UUFniFZ2KTaBxMKjt/Ag9mtcryY9oWp9LMGjfdHEbG2//N+ 57wcH71bR2lKnhXsHaZpJdgmEgcMgggPzLu/E4pVolVMNPLrf404tXUky2zomi9FykTY 2bitlYNTILYalS44c8USFPymwG9nQQQSW/qY1gjaTR9Hog+KZJ3INiS7tPIPksBk07wV rT7o7qDbhmdaZEEhofBGTrsknPOMLJMkT+PC6a3SZtvwU6nmlqZDrbJRCnhuVmshMY3I N77e0R9rtvKQmqnmk9PiuW/D0O9P2WdjPr/Ddhw1tPWofmpEMIhtpSTtfWDodIU1S0Pk XBfQ== 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=gy+5PY+WqRlaBvLBWvCWjtIPhrWvg0Op57/GOX9XBTc=; b=VTuLswGHtBhgLR0wwXlUPaOWTwPLRLEHiRUWOGUPvq1mJIKsZSz64+kbZ31bC8RVpp 9bw75k1ByPb37iZh37FN/CDcrGBbWkJejZsCf8gaOZisKSMAe2CovkmuqBiEgZqp7SwZ Mi6GfpL7kIDTXv+oNX/FRDCEq3H0U6qnatEQHMQOdmrKzRDNJe8lAvk+aiXBr6/Zgwnq nWZQ934zhZ2dtJ+CebKqEfp4Dp3pIAQqgDjEqtm3deihiCXAUu/RUu9dHFQbilYBrCpV frPWgh9E8sXpXYgReES14tEAETUeE3auOnLpfwOtG1QfJPRo/biA2JhaSC0zefzzemPr 63GA== X-Gm-Message-State: AJIora/d069X73z1wPcn7FnM0bNhN9yCl6xBBQPxSorumdW73xSpz1Uq 0BRiU/t/9EAUJqQNTV6PNVgk/Q== X-Received: by 2002:a05:600c:22c2:b0:3a3:19e3:a55 with SMTP id 2-20020a05600c22c200b003a319e30a55mr2170372wmg.53.1659086714974; Fri, 29 Jul 2022 02:25:14 -0700 (PDT) Received: from zen.linaroharston ([185.81.254.11]) by smtp.gmail.com with ESMTPSA id bg3-20020a05600c3c8300b003a327b98c0asm4361866wmb.22.2022.07.29.02.25.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Jul 2022 02:25:14 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id C8C851FFC3; Fri, 29 Jul 2022 10:19:44 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org, richard.henderson@linaro.org Cc: qemu-devel@nongnu.org, Ilya Leoshkevich , Thomas Huth , =?utf-8?q?Alex_Benn=C3=A9e?= , David Hildenbrand , Cornelia Huck , qemu-s390x@nongnu.org (open list:S390 TCG CPUs) Subject: [PULL 11/13] tests/tcg/s390x: Test unaligned accesses to lowcore Date: Fri, 29 Jul 2022 10:19:41 +0100 Message-Id: <20220729091943.2152410-12-alex.bennee@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220729091943.2152410-1-alex.bennee@linaro.org> References: <20220729091943.2152410-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32d; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x32d.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Ilya Leoshkevich Add a small test to avoid regressions. Signed-off-by: Ilya Leoshkevich Acked-by: Richard Henderson Acked-by: Thomas Huth Message-Id: <20220725223746.227063-3-iii@linux.ibm.com> Signed-off-by: Alex Bennée diff --git a/tests/tcg/s390x/Makefile.softmmu-target b/tests/tcg/s390x/Makefile.softmmu-target new file mode 100644 index 0000000000..a34fa68473 --- /dev/null +++ b/tests/tcg/s390x/Makefile.softmmu-target @@ -0,0 +1,9 @@ +S390X_SRC=$(SRC_PATH)/tests/tcg/s390x +VPATH+=$(S390X_SRC) +QEMU_OPTS=-action panic=exit-failure -kernel + +%: %.S + $(CC) -march=z13 -m64 -nostartfiles -static -Wl,-Ttext=0 \ + -Wl,--build-id=none $< -o $@ + +TESTS += unaligned-lowcore diff --git a/tests/tcg/s390x/unaligned-lowcore.S b/tests/tcg/s390x/unaligned-lowcore.S new file mode 100644 index 0000000000..f5da2ae64c --- /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 From patchwork Fri Jul 29 09:19:42 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 594360 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:b345:0:0:0:0 with SMTP id w5csp1193109maz; Fri, 29 Jul 2022 02:52:07 -0700 (PDT) X-Google-Smtp-Source: AGRyM1spQJY6ua8M1RFfpWB9a6TEk4BqSqHeBZQgbJWcKo0eC2/9esuP0KYAaY8IpWRZpG7BxqM3 X-Received: by 2002:a05:622a:11cb:b0:31f:e7e:3fb8 with SMTP id n11-20020a05622a11cb00b0031f0e7e3fb8mr2599245qtk.625.1659088327813; Fri, 29 Jul 2022 02:52:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659088327; cv=none; d=google.com; s=arc-20160816; b=xGx9y6naLWu0g5aeT9THnjS2ScMKf3nmDRbJQixXVXBw/2nZozs2JRdpAHbuMNePtJ 6SwPnFmI1KF+9ZPDfwMSptj9tT/bVvSfude7HZxCv7wAXYzWSg84X9SGA1abImi40uiC mx3m3TeMzBL5XuozYvkY8NiXEHU6XX6VBSz4u5FK8mlhhZOC+TmePaiZe6WVSGdbAE9B CwSyo5/+3gDW3QQ9YpMfvlBdKU2sEZ6/4throoURAHrBzZCPgQcTvnayiKLuV3Fg/NwQ AIYPgjxaMnAD1o99iOG2M1Lqs1KU1t5quHf5vX8gL2VoT/g0zSSYHgRj0Zum1R/WL92T whWg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=3+NpxIpzMd8EaSUovyVTudU9VX9fAuDK9cF15HnV4cM=; b=jwTebL7p0o5wT7VKeZ3CIBKoIEu5iSx8BhmfkP4sHmmf5VQyiBNxnoQWWBcdJInlmj wl68tSLcmzg2pi7VR7YDCBx2H4a2kx/QcEz0BsUSktkHUQ+2OTyNnZBqpiLRJY/IwJst 7im+y0Da5Q2kCWkWyGI6FPIHFPFirscZPoYxltmEETGofTpyJ2gSVj6zeJe1DsLgXspO 7q9CRvgVymHeUFsYqPPWFeTpDsRWxP89iJ9lw4utX850Bp/xnAcgEV7xJN5wWStRR1cn X2v2akoR5KzOxNSAJ4kDMHEiBpXk5jzupUWEjM85OYpaFswQcSFXJyvdi2CF6Z1BXS1i R+Eg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=M4HoVgdj; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id br43-20020a05620a462b00b006af090bac19si1921888qkb.722.2022.07.29.02.52.07 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 29 Jul 2022 02:52:07 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=M4HoVgdj; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:58608 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oHMf9-0005qs-Ai for patch@linaro.org; Fri, 29 Jul 2022 05:52:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44318) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oHMAA-0002aP-8N for qemu-devel@nongnu.org; Fri, 29 Jul 2022 05:20:06 -0400 Received: from mail-wr1-x436.google.com ([2a00:1450:4864:20::436]:44634) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oHMA8-0005u5-ES for qemu-devel@nongnu.org; Fri, 29 Jul 2022 05:20:05 -0400 Received: by mail-wr1-x436.google.com with SMTP id q30so854310wra.11 for ; Fri, 29 Jul 2022 02:20:03 -0700 (PDT) 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=3+NpxIpzMd8EaSUovyVTudU9VX9fAuDK9cF15HnV4cM=; b=M4HoVgdjZjAN8oxiUVLLAXR2iWxq5I0yWDAZVH7Vtsq4FLkS9zy8o0JVtE9CWr2hiE EiL+vf3cq+6PdkHTsBD8yul5m3GvlB/dq/D9H95NMqyTdehAj8fHKvXc1pAZhq6izSfP PgCcMKA/NVVvlUgGps2t8kugeJsulaZYJXnLS8oldT3+K5UpdTKq/MuM7JAM5uz2yZY7 5o+xnUBYpNXT1xBd8BqfvNeRgowKhyZqoruG3DqSt1B2HwRr7rnRcpFvS90LOeTLQjWC nm0yhiixayNuGh9XyXsBcPO8Aca90BEX1wjbm7QbjmXj+TH+l+iSb9xQjdSG9PCqY5D3 HcSw== 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=3+NpxIpzMd8EaSUovyVTudU9VX9fAuDK9cF15HnV4cM=; b=P8lsWBrB7as1NfBr/7Hm2zPA4QDTusehYCiCewjwS1TXXCsQHpj419bFiLU1DYI5ek Ka4D0VJqB5RbbapENQK0LDTdpSVotyt48UvpyVF/bJzChbk4df9zYNfsWGvQ5PkAOwoq jYrNOdjY+vfgMikxFnuMERVPoBpe0xVy6XDZN4PGbdo99eUfGLmRj7mptRkiDOh/Yzbq fu5BY2mhX5PNDLZq6kvDC5xaW7vmZ1yfyRIw6vRyMo5+5NXye6O7vXN0iVCVnlTY/Iqm DEBrxGxbsmU4tsQEbSwbUnpGkpi1kzhcLLFbZOfoUwBOva7XOVcPxEeRxmAycWyLMK3s kPTw== X-Gm-Message-State: ACgBeo2c/bR5XB/JFecj6x14tEzbgKSGSA5HFob3lTDJYf9QjicdRXUS hUgE/hPOh0ZYfTxK56jXYlGYqQ== X-Received: by 2002:adf:f94b:0:b0:21e:46fe:bcdb with SMTP id q11-20020adff94b000000b0021e46febcdbmr1711588wrr.143.1659086402362; Fri, 29 Jul 2022 02:20:02 -0700 (PDT) Received: from zen.linaroharston ([185.81.254.11]) by smtp.gmail.com with ESMTPSA id m23-20020a05600c3b1700b003a30fbde91dsm8834245wms.20.2022.07.29.02.19.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Jul 2022 02:19:53 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id D538B1FFC4; Fri, 29 Jul 2022 10:19:44 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org, richard.henderson@linaro.org Cc: qemu-devel@nongnu.org, =?utf-8?q?Alex_Benn=C3=A9e?= , =?utf-8?q?Philippe_M?= =?utf-8?q?athieu-Daud=C3=A9?= Subject: [PULL 12/13] docs/devel: fix description of OBJECT_DECLARE_SIMPLE_TYPE Date: Fri, 29 Jul 2022 10:19:42 +0100 Message-Id: <20220729091943.2152410-13-alex.bennee@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220729091943.2152410-1-alex.bennee@linaro.org> References: <20220729091943.2152410-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::436; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x436.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" 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ée Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20220725140520.515340-13-alex.bennee@linaro.org> 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 - OBJECT_DECLARE_SIMPLE_TYPE(MyDevice, my_device, - MY_DEVICE, DEVICE) + OBJECT_DECLARE_SIMPLE_TYPE(MyDevice, MY_DEVICE) This is equivalent to the following: From patchwork Fri Jul 29 09:19:43 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 594352 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:b345:0:0:0:0 with SMTP id w5csp1183153maz; Fri, 29 Jul 2022 02:32:30 -0700 (PDT) X-Google-Smtp-Source: AGRyM1spexJsbRw8EfuLUdmhTQCiDPBPHuHzH/r+Hw43yKUQ76uWpxMaCi/jO4LMo2IoboXgU2ly X-Received: by 2002:a05:622a:1a14:b0:31e:e89f:4dda with SMTP id f20-20020a05622a1a1400b0031ee89f4ddamr2593620qtb.622.1659087150191; Fri, 29 Jul 2022 02:32:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659087150; cv=none; d=google.com; s=arc-20160816; b=R4xQilDEFd0Ejx6pdQA4FgUYuKg4fMXKaWL7GkezZv2w46X0psUBJE0JBlmlDzVdsv UV8KW1lQAKANjZ82OhQIwr4PlCJxCrtENluMrgC+FG9GV/yRwkzPTANLtMcMMV9UpIE5 u+Adbjsa5oCYeuEFWjOn3DYH/uB7zbwa+b3bLM8gNfNQqP2Bfjkl9W3xajliAYLS8DA2 coem8Yw6PvS5z/D50cUnwknDwZWAWfZO+RjujglzLEfhW/D3eVnNFtrc3B9Ak17rTaaZ uOEAtqAgQ+0tUcDKtocVre1G5irT1l/BinvlE0zejniLrCur0ch7nlgqP4uJIQVZ+Kal NQLw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=hwvFbZR4/H0xiyraePhgzCmgfa2kY4WJ3yx1/sETcUM=; b=fNkw9tqSffAw97K83XX5/kasDfOcd6sexgInxr0E++HpJCeu3t+xUE7wdiJzT0Scqb fEtsZGIRzVCzzc7ZcFYW4uqZ6kNnVcJYYnZzZezL1MxkTmRwsDc2nc/hRCzmk44h/pIQ 5Kfvdq8pZvFInY+VcaR5cX7ISyOkE1szbK7sU/NIBsh3oEOSQmAqkK84c7aYkkXGnEck EWvmSHTo7eXM6r29a1B8XiDI8gLN95V1AERA3RiIIEW7sTS0JEQYakPEe17ypfZqe4tH hlqO3Klx9iCX2MnGSaAKx6lr0R2/63XEA+2xcYn7H0TXe9itjzlYmJNiAnV+Fa+WAJWS g2LQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=uAiWvsLW; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id z20-20020ac84314000000b0031f0b633bd9si1919040qtm.40.2022.07.29.02.32.30 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 29 Jul 2022 02:32:30 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=uAiWvsLW; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:39632 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oHMM9-0000V4-N6 for patch@linaro.org; Fri, 29 Jul 2022 05:32:29 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45288) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oHMFE-0005Vz-1T for qemu-devel@nongnu.org; Fri, 29 Jul 2022 05:25:20 -0400 Received: from mail-wr1-x432.google.com ([2a00:1450:4864:20::432]:40592) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oHMFB-0006hP-BZ for qemu-devel@nongnu.org; Fri, 29 Jul 2022 05:25:19 -0400 Received: by mail-wr1-x432.google.com with SMTP id l22so5278318wrz.7 for ; Fri, 29 Jul 2022 02:25:16 -0700 (PDT) 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=hwvFbZR4/H0xiyraePhgzCmgfa2kY4WJ3yx1/sETcUM=; b=uAiWvsLW9GsXLYfPlzsVX3X09rgfo2JFXxbgzJcLUSZkXHyh1y9sEC1WYd/l0YGxqf 1rtmKgohtz34jEYRLHKicUcmy4FHp09GLDcEoZMxNI0hjT2aPbtoTKgkZ2bTAlh11ir2 eomJKbsEzjmUsKQ9cElZz4uWrnDFCqWM/sfrPA7PiVvaFr2cPfoHOueDLiLYSwr0keZ2 Tdbm6QFvCHQaHUmXbgDhb6PzdDFy7mcLpB1xajfYw6Z+R9Nt+lxwrw3U+A/w3iRtuMRW FGbQffMUtJZyWNj1NpydcueWM+NY51rZeLloGpBP9KTnXaaFmy0VXe1KQUHf2DnPuf6K iLYQ== 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=hwvFbZR4/H0xiyraePhgzCmgfa2kY4WJ3yx1/sETcUM=; b=wq39VAiqpLLUMVyN5px5gXVBFaoqXdY7s/06T1dDod/B1Rlzs2zIvbQ+Y7ZTP5gsVL aCOnkm5kfSkyERQi74dcDPwjjQFTabhz7aKB9sdI9fMfYs8MYwY+0vHJ4KMRNixkMOK+ MBgRZj3HMyyuZfOXnSGmLXar2tHRYQW9BiosfK1GgADbmcqns80Y5i1V7B0ko2agmLYE xVEM7bA5Wz0bLz/Qbbi7/XfhB9Wh4hKRp6VLN7ktb+JRBrR+y0tnmnA9wUbtIQis7Qu8 uWGysBTXTsJ1/j2CtNqUH97hzIThLItUrB/wTt6RjsM6BVM+AeyOEE1qdUfmtCYo+RnR cVEQ== X-Gm-Message-State: ACgBeo1vDzyYcBk+74DKAlcb5lrmm3UL0N2mQYfm51uoKIDgCYDRGbgW 2mIKPVGuUeUdLMnGhJcCbK8VQQ== X-Received: by 2002:a5d:6d46:0:b0:21f:8b7:4c1d with SMTP id k6-20020a5d6d46000000b0021f08b74c1dmr1758009wri.455.1659086715650; Fri, 29 Jul 2022 02:25:15 -0700 (PDT) Received: from zen.linaroharston ([185.81.254.11]) by smtp.gmail.com with ESMTPSA id bk9-20020a0560001d8900b0021d76a1b0e3sm3137983wrb.6.2022.07.29.02.25.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Jul 2022 02:25:14 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id ED72D1FFC5; Fri, 29 Jul 2022 10:19:44 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org, richard.henderson@linaro.org Cc: qemu-devel@nongnu.org, =?utf-8?q?Alex_Benn=C3=A9e?= , =?utf-8?q?C=C3=A9dri?= =?utf-8?q?c_Le_Goater?= Subject: [PULL 13/13] qemu-options: bring the kernel and image options together Date: Fri, 29 Jul 2022 10:19:43 +0100 Message-Id: <20220729091943.2152410-14-alex.bennee@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220729091943.2152410-1-alex.bennee@linaro.org> References: <20220729091943.2152410-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::432; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x432.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" 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-device-loader-file/58434837#58434837 Signed-off-by: Alex Bennée Reviewed-by: Peter Maydell Reviewed-by: Cédric Le Goater Message-Id: <20220725140520.515340-14-alex.bennee@linaro.org> 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 -DEF("pflash", HAS_ARG, QEMU_OPTION_pflash, - "-pflash file use 'file' as a parallel flash image\n", QEMU_ARCH_ALL) -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() #endif -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. +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_ALL) +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. ERST @@ -3729,6 +3777,25 @@ SRST kernel on boot. ERST +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=,data=,data-len=[,data-be=][,cpu-num=]`` + +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=[,kernel=,[bootargs=]][,initrd=]`` + +ERST + DEFHEADING() DEFHEADING(Debug/Expert options:) @@ -4179,13 +4246,6 @@ SRST To list all the data directories, use ``-L help``. 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("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 |