From patchwork Mon Nov 20 15:08:20 2023 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: 745367 Delivered-To: patch@linaro.org Received: by 2002:a5d:5052:0:b0:32d:baff:b0ca with SMTP id h18csp1344997wrt; Mon, 20 Nov 2023 07:11:10 -0800 (PST) X-Google-Smtp-Source: AGHT+IEFPnyPZcYeydd3Ck06Yp7vmzbpcy/+bIdkJHue5qvyzVkzSj4oRU+yRooVyspy5h2ADq1W X-Received: by 2002:a2e:7c0d:0:b0:2c7:8fee:c295 with SMTP id x13-20020a2e7c0d000000b002c78feec295mr4955296ljc.42.1700493070457; Mon, 20 Nov 2023 07:11:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700493070; cv=none; d=google.com; s=arc-20160816; b=v7wsHFglf1Yi665Q4Vvbk/iHypns0gVF3GvVZje4w2CZO2kDqZtz4JvFEvO7aAkyZr NxXB5amStU6z3uwqe7CbW6vdEJxBB6LHNWREdjupJpqaZvX3YlSTvP22bGiubN61/OsM NrajKX2SRwzK52fXVHq+rnBi9wwxwaqQPNp5grfYTRPYN5spRRiyN5vkXLjRzSz3JlMj fozxIyn8oeby1Y4I2wYiuhSpewPQKU+tQSLXMyPYisxP1OWe7x7ZP7ioEPRl0w7syLgi WkhDTSnHUDW/EVo6v7gwPqWCIbtyd0Hug0bbtaQYsqWAVfoeOyj3cnR+LLrAehazADDm 5HlQ== 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=oRRKGm1XmPAhrBUDZ4d8uM66KnS7l3S7TsBcy2mkL7c=; fh=9n4HOG5p+FrANrT/UgcjIOEIcmWjD2HvIJWqW6Is8sA=; b=C9ar8m7Izc/rP/+AJFzZRNU9Ky1kzlnb+wrdRY1wB5+iJQP8Jq/eXiF8Ksct5iuzzK 1VtC5UtkReHmVIUFPkwHbrm9EMK8pui742pdgivVsmSU378yoSFMaULhl3vGJIUj3XOS H9XWdFSPsRSmZJZAqp75qyklx+8TW2+hXs9CaajU4Nw0Ce/mLoeorv/F/irF7loaFNhf eOgkwPk9U0ql94TjoDXLDHOYPFZmhmlRV1zkwhlhFv698CI98bbRiad/fCV1VpOkDfQJ sHoHsjhckvSaWZTYKxiCnHqbNsGsP3/dPOvWSSFPSTodnHO6PrgVuo2qA1Zw5N4Uplg/ /tJA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="k/FoPZcp"; 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 j7-20020a05600c190700b0040594b5a647si6597090wmq.127.2023.11.20.07.11.10 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 20 Nov 2023 07:11:10 -0800 (PST) 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="k/FoPZcp"; 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] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r55ta-00069O-FE; Mon, 20 Nov 2023 10:09:06 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r55tI-0005pk-MU for qemu-devel@nongnu.org; Mon, 20 Nov 2023 10:08:55 -0500 Received: from mail-wr1-x42c.google.com ([2a00:1450:4864:20::42c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r55tA-0001CU-14 for qemu-devel@nongnu.org; Mon, 20 Nov 2023 10:08:48 -0500 Received: by mail-wr1-x42c.google.com with SMTP id ffacd0b85a97d-332ca7f95e1so441740f8f.0 for ; Mon, 20 Nov 2023 07:08:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1700492918; x=1701097718; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=oRRKGm1XmPAhrBUDZ4d8uM66KnS7l3S7TsBcy2mkL7c=; b=k/FoPZcptUB8N/RrosJh6acVG2UVdS2z9CfrU25+Guo3jdbCmKAiR2jby0JgOrstES JLIB2mjGLNgFDxiFMkJaYrPD99stQygaal3q4mvEYprTt4QcvwhNoUIa5yWCVtSIhXLz d9r2X6LhUzfbxl+HaUW+zT4H2PPMgGGHv3xA4aYuGpka95/fbPosIzNjGkhm5JomV3zq /JUDL0CKF7QhLeZDDNeK7eP4GUFOpkRIPEW+yS6vMJArs1u23+mU0iswY3Y/FHT3U0A7 JEdMddQLqvbDA899B7BMujvN0Gm/ePXDyTbcHIT6TTX03/YUAp3zjGjkLoNk67wetpTx Q/1w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700492918; x=1701097718; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=oRRKGm1XmPAhrBUDZ4d8uM66KnS7l3S7TsBcy2mkL7c=; b=KVFYtfGDKNCbx7OktSHDNm88n0U93SGQWKmtUeMuhSshq9DDbo/yt46mtejoqObxia 8zSiuZ/1+H5QL8lrcax4pTqki1bFdhuKAKM+L7toeL6CjY2hjvqiKEuvQYLCQ2gH3yaJ MQnV0kSdAkz0gscWwfqKfOmkRIl/wePrTnfOYfRcIL7KOO99E3sJw408rQuKg8Fp/6cO +eeL0ZT8TsatccPjaa0dQUXUQoiMvWUhHya96tpzYav9jqwLQS6IoHamuuRI32rJ06zW DtolJ56fKC6/4ul37SIGr9v0u4YJ4osLCAa3+n5tx7sz0JmbMwvrRPEoZEhp2ROasvoZ kYeg== X-Gm-Message-State: AOJu0YzHgBrxKXHXoYybT/4eNQ7469z7mPoC0RbucNBnpbxKVYU4wCZ8 t0sfTWdfvqE8YF7Bv5MU98dOMA== X-Received: by 2002:a5d:47a1:0:b0:332:c514:640e with SMTP id 1-20020a5d47a1000000b00332c514640emr3230317wrb.69.1700492917789; Mon, 20 Nov 2023 07:08:37 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id t11-20020a05600001cb00b0032de6f95fb3sm11504612wrx.40.2023.11.20.07.08.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Nov 2023 07:08:34 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 171B06572D; Mon, 20 Nov 2023 15:08:34 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Wainer dos Santos Moschetta , =?utf-8?q?C=C3=A9dric?= =?utf-8?q?_Le_Goater?= , Mahmoud Mandour , Peter Maydell , David Hildenbrand , =?utf-8?q?Alex_Benn=C3=A9e?= , qemu-s390x@nongnu.org, Beraldo Leal , qemu-arm@nongnu.org, devel@lists.libvirt.org, qemu-ppc@nongnu.org, Daniel Henrique Barboza , Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Alexandre Iooss , Marek Vasut , Thomas Huth , Chris Wulff , Ilya Leoshkevich , Richard Henderson , Nicholas Piggin , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= Subject: [PATCH v2 01/14] tests/docker: replace fedora-i386 with debian-i686 Date: Mon, 20 Nov 2023 15:08:20 +0000 Message-Id: <20231120150833.2552739-2-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231120150833.2552739-1-alex.bennee@linaro.org> References: <20231120150833.2552739-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42c; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42c.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-bounces+patch=linaro.org@nongnu.org From: Daniel P. Berrangé Fedora is gradually killing off i386 packages in its repos, via a death-by-1000-cuts process. Thus Debian looks like a better long term bet for i686 build testing. It has the added advantage that we can generate it via lcitool too. Signed-off-by: Daniel P. Berrangé Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20231107164109.1449014-1-berrange@redhat.com> [AJB: tweak commit msg, set correct prefix] Signed-off-by: Alex Bennée --- v2 - also set correct prefix --- configure | 4 +- .gitlab-ci.d/container-cross.yml | 11 +- .gitlab-ci.d/crossbuilds.yml | 12 +- .../dockerfiles/debian-i686-cross.docker | 182 ++++++++++++++++++ .../dockerfiles/fedora-i386-cross.docker | 40 ---- tests/lcitool/refresh | 7 + 6 files changed, 203 insertions(+), 53 deletions(-) create mode 100644 tests/docker/dockerfiles/debian-i686-cross.docker delete mode 100644 tests/docker/dockerfiles/fedora-i386-cross.docker diff --git a/configure b/configure index abcb199aa8..9ea0bf5698 100755 --- a/configure +++ b/configure @@ -1307,8 +1307,8 @@ probe_target_compiler() { container_cross_cc=${container_cross_prefix}gcc ;; i386) - container_image=fedora-i386-cross - container_cross_prefix= + container_image=debian-i686-cross + container_cross_prefix=i686-linux-gnu- ;; loongarch64) container_image=debian-loongarch-cross diff --git a/.gitlab-ci.d/container-cross.yml b/.gitlab-ci.d/container-cross.yml index 463ac493ad..8d235cbea0 100644 --- a/.gitlab-ci.d/container-cross.yml +++ b/.gitlab-ci.d/container-cross.yml @@ -46,6 +46,12 @@ loongarch-debian-cross-container: variables: NAME: debian-loongarch-cross +i686-debian-cross-container: + extends: .container_job_template + stage: containers + variables: + NAME: debian-i686-cross + mips64el-debian-cross-container: extends: .container_job_template stage: containers @@ -95,11 +101,6 @@ cris-fedora-cross-container: variables: NAME: fedora-cris-cross -i386-fedora-cross-container: - extends: .container_job_template - variables: - NAME: fedora-i386-cross - win32-fedora-cross-container: extends: .container_job_template variables: diff --git a/.gitlab-ci.d/crossbuilds.yml b/.gitlab-ci.d/crossbuilds.yml index ac71a2abd3..c2af6c7f44 100644 --- a/.gitlab-ci.d/crossbuilds.yml +++ b/.gitlab-ci.d/crossbuilds.yml @@ -37,25 +37,25 @@ cross-arm64-kvm-only: IMAGE: debian-arm64-cross EXTRA_CONFIGURE_OPTS: --disable-tcg --without-default-features -cross-i386-user: +cross-i686-user: extends: - .cross_user_build_job - .cross_test_artifacts needs: - job: i386-fedora-cross-container + job: i686-debian-cross-container variables: - IMAGE: fedora-i386-cross + IMAGE: debian-i686-cross MAKE_CHECK_ARGS: check -cross-i386-tci: +cross-i686-tci: extends: - .cross_accel_build_job - .cross_test_artifacts timeout: 60m needs: - job: i386-fedora-cross-container + job: i686-debian-cross-container variables: - IMAGE: fedora-i386-cross + IMAGE: debian-i686-cross ACCEL: tcg-interpreter EXTRA_CONFIGURE_OPTS: --target-list=i386-softmmu,i386-linux-user,aarch64-softmmu,aarch64-linux-user,ppc-softmmu,ppc-linux-user --disable-plugins MAKE_CHECK_ARGS: check check-tcg diff --git a/tests/docker/dockerfiles/debian-i686-cross.docker b/tests/docker/dockerfiles/debian-i686-cross.docker new file mode 100644 index 0000000000..3fc4e15acd --- /dev/null +++ b/tests/docker/dockerfiles/debian-i686-cross.docker @@ -0,0 +1,182 @@ +# THIS FILE WAS AUTO-GENERATED +# +# $ lcitool dockerfile --layers all --cross-arch i686 debian-11 qemu +# +# https://gitlab.com/libvirt/libvirt-ci + +FROM docker.io/library/debian:11-slim + +RUN export DEBIAN_FRONTEND=noninteractive && \ + apt-get update && \ + apt-get install -y eatmydata && \ + eatmydata apt-get dist-upgrade -y && \ + eatmydata apt-get install --no-install-recommends -y \ + bash \ + bc \ + bison \ + bsdextrautils \ + bzip2 \ + ca-certificates \ + ccache \ + dbus \ + debianutils \ + diffutils \ + exuberant-ctags \ + findutils \ + flex \ + gcc \ + gcovr \ + gettext \ + git \ + hostname \ + libglib2.0-dev \ + libpcre2-dev \ + libsndio-dev \ + libspice-protocol-dev \ + llvm \ + locales \ + make \ + meson \ + mtools \ + ncat \ + ninja-build \ + openssh-client \ + pkgconf \ + python3 \ + python3-numpy \ + python3-opencv \ + python3-pillow \ + python3-pip \ + python3-setuptools \ + python3-sphinx \ + python3-sphinx-rtd-theme \ + python3-venv \ + python3-wheel \ + python3-yaml \ + rpm2cpio \ + sed \ + socat \ + sparse \ + tar \ + tesseract-ocr \ + tesseract-ocr-eng \ + xorriso \ + zstd && \ + eatmydata apt-get autoremove -y && \ + eatmydata apt-get autoclean -y && \ + sed -Ei 's,^# (en_US\.UTF-8 .*)$,\1,' /etc/locale.gen && \ + dpkg-reconfigure locales + +RUN /usr/bin/pip3 install tomli + +ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers" +ENV LANG "en_US.UTF-8" +ENV MAKE "/usr/bin/make" +ENV NINJA "/usr/bin/ninja" +ENV PYTHON "/usr/bin/python3" + +RUN export DEBIAN_FRONTEND=noninteractive && \ + dpkg --add-architecture i386 && \ + eatmydata apt-get update && \ + eatmydata apt-get dist-upgrade -y && \ + eatmydata apt-get install --no-install-recommends -y dpkg-dev && \ + eatmydata apt-get install --no-install-recommends -y \ + g++-i686-linux-gnu \ + gcc-i686-linux-gnu \ + libaio-dev:i386 \ + libasan6:i386 \ + libasound2-dev:i386 \ + libattr1-dev:i386 \ + libbpf-dev:i386 \ + libbrlapi-dev:i386 \ + libbz2-dev:i386 \ + libc6-dev:i386 \ + libcacard-dev:i386 \ + libcap-ng-dev:i386 \ + libcapstone-dev:i386 \ + libcmocka-dev:i386 \ + libcurl4-gnutls-dev:i386 \ + libdaxctl-dev:i386 \ + libdrm-dev:i386 \ + libepoxy-dev:i386 \ + libfdt-dev:i386 \ + libffi-dev:i386 \ + libfuse3-dev:i386 \ + libgbm-dev:i386 \ + libgcrypt20-dev:i386 \ + libglib2.0-dev:i386 \ + libglusterfs-dev:i386 \ + libgnutls28-dev:i386 \ + libgtk-3-dev:i386 \ + libibumad-dev:i386 \ + libibverbs-dev:i386 \ + libiscsi-dev:i386 \ + libjemalloc-dev:i386 \ + libjpeg62-turbo-dev:i386 \ + libjson-c-dev:i386 \ + liblttng-ust-dev:i386 \ + liblzo2-dev:i386 \ + libncursesw5-dev:i386 \ + libnfs-dev:i386 \ + libnuma-dev:i386 \ + libpam0g-dev:i386 \ + libpipewire-0.3-dev:i386 \ + libpixman-1-dev:i386 \ + libpng-dev:i386 \ + libpulse-dev:i386 \ + librbd-dev:i386 \ + librdmacm-dev:i386 \ + libsasl2-dev:i386 \ + libsdl2-dev:i386 \ + libsdl2-image-dev:i386 \ + libseccomp-dev:i386 \ + libselinux1-dev:i386 \ + libslirp-dev:i386 \ + libsnappy-dev:i386 \ + libspice-server-dev:i386 \ + libssh-gcrypt-dev:i386 \ + libsystemd-dev:i386 \ + libtasn1-6-dev:i386 \ + libubsan1:i386 \ + libudev-dev:i386 \ + liburing-dev:i386 \ + libusb-1.0-0-dev:i386 \ + libusbredirhost-dev:i386 \ + libvdeplug-dev:i386 \ + libvirglrenderer-dev:i386 \ + libvte-2.91-dev:i386 \ + libzstd-dev:i386 \ + nettle-dev:i386 \ + systemtap-sdt-dev:i386 \ + xfslibs-dev:i386 \ + zlib1g-dev:i386 && \ + eatmydata apt-get autoremove -y && \ + eatmydata apt-get autoclean -y && \ + mkdir -p /usr/local/share/meson/cross && \ + printf "[binaries]\n\ +c = '/usr/bin/i686-linux-gnu-gcc'\n\ +ar = '/usr/bin/i686-linux-gnu-gcc-ar'\n\ +strip = '/usr/bin/i686-linux-gnu-strip'\n\ +pkgconfig = '/usr/bin/i686-linux-gnu-pkg-config'\n\ +\n\ +[host_machine]\n\ +system = 'linux'\n\ +cpu_family = 'x86'\n\ +cpu = 'i686'\n\ +endian = 'little'\n" > /usr/local/share/meson/cross/i686-linux-gnu && \ + dpkg-query --showformat '${Package}_${Version}_${Architecture}\n' --show > /packages.txt && \ + mkdir -p /usr/libexec/ccache-wrappers && \ + ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/i686-linux-gnu-c++ && \ + ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/i686-linux-gnu-cc && \ + ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/i686-linux-gnu-g++ && \ + ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/i686-linux-gnu-gcc + +ENV ABI "i686-linux-gnu" +ENV MESON_OPTS "--cross-file=i686-linux-gnu" +ENV QEMU_CONFIGURE_OPTS --cross-prefix=x86_64-linux-gnu- +ENV DEF_TARGET_LIST x86_64-softmmu,x86_64-linux-user,i386-softmmu,i386-linux-user +# As a final step configure the user (if env is defined) +ARG USER +ARG UID +RUN if [ "${USER}" ]; then \ + id ${USER} 2>/dev/null || useradd -u ${UID} -U ${USER}; fi diff --git a/tests/docker/dockerfiles/fedora-i386-cross.docker b/tests/docker/dockerfiles/fedora-i386-cross.docker deleted file mode 100644 index b59a9115c4..0000000000 --- a/tests/docker/dockerfiles/fedora-i386-cross.docker +++ /dev/null @@ -1,40 +0,0 @@ -FROM registry.fedoraproject.org/fedora:34 - -ENV PACKAGES \ - bison \ - bzip2 \ - ccache \ - diffutils \ - flex \ - findutils \ - gcc \ - git \ - libfdt-devel.i686 \ - libffi-devel.i686 \ - libselinux-devel.i686 \ - libtasn1-devel.i686 \ - libzstd-devel.i686 \ - make \ - meson \ - ninja-build \ - glib2-devel.i686 \ - glibc-devel.i686 \ - glibc-static.i686 \ - gnutls-devel.i686 \ - nettle-devel.i686 \ - pcre-devel.i686 \ - pixman-devel.i686 \ - python3-tomli \ - sysprof-capture-devel.i686 \ - zlib-devel.i686 - -ENV QEMU_CONFIGURE_OPTS --cpu=i386 --disable-vhost-user -ENV PKG_CONFIG_LIBDIR /usr/lib/pkgconfig - -RUN dnf update -y && dnf install -y $PACKAGES -RUN rpm -q $PACKAGES | sort > /packages.txt -# As a final step configure the user (if env is defined) -ARG USER -ARG UID -RUN if [ "${USER}" ]; then \ - id ${USER} 2>/dev/null || useradd -u ${UID} -U ${USER}; fi diff --git a/tests/lcitool/refresh b/tests/lcitool/refresh index 92e7d30982..10c54a377c 100755 --- a/tests/lcitool/refresh +++ b/tests/lcitool/refresh @@ -156,6 +156,13 @@ try: trailer=cross_build("arm-linux-gnueabihf-", "arm-softmmu,arm-linux-user")) + generate_dockerfile("debian-i686-cross", "debian-11", + cross="i686", + trailer=cross_build("x86_64-linux-gnu-", + "x86_64-softmmu," + "x86_64-linux-user," + "i386-softmmu,i386-linux-user")) + generate_dockerfile("debian-mips64el-cross", "debian-11", cross="mips64el", trailer=cross_build("mips64el-linux-gnuabi64-", From patchwork Mon Nov 20 15:08:22 2023 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: 745366 Delivered-To: patch@linaro.org Received: by 2002:a5d:5052:0:b0:32d:baff:b0ca with SMTP id h18csp1344965wrt; Mon, 20 Nov 2023 07:11:08 -0800 (PST) X-Google-Smtp-Source: AGHT+IE508WEsLqFV1WtIRaZIwevNUuH/grN7KCM7L+fFNTF3qe7w9t4A4IicgTmAc7rPVm+lFuD X-Received: by 2002:a05:600c:3107:b0:406:3977:eccd with SMTP id g7-20020a05600c310700b004063977eccdmr5980643wmo.33.1700493068440; Mon, 20 Nov 2023 07:11:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700493068; cv=none; d=google.com; s=arc-20160816; b=UBd60fK/4+68a91R1o3HwIl7tqtiM+PF4kHFPN9Zu71mL8h8lg7htfy9xbyoKtL6zn 4fnP9S7Y0iAcAmIQna29356WZdRXwhB55kcEUib0P67tpteibEFFDR2jz2N8vH0zHRQW S1A86biKLI08rUQD0zg0KzmJUwya2P19Ks2kBKcTs8buIUsrnu4bWDde7WbKrR3C41sp +it9CPwQ6dqM78xVK/k2VRt7Ie9ZDrQdxMjCWHfMw1GRsJxQ/wbA13yjQ1GuKB7BDNI/ ukn4yd53yoMJOaScJtEiugEKLiarVhQj+i9ObsTIvY7coQSTCW9aZHgy9kIRXWVboans ZGnw== 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=NCRqk6YT3bsj71ZXwzX8pG0SOXxV0ZtG0Z5l0HsDHlo=; fh=DFzi96B4Ixvv0LyHzSWHFj2zcCP+S5wtNnVLD6/t6S0=; b=n6TLACtkCGLvqkIqY2EixmTR5gpbTP1ekAm+1xRBFN12cIgUI/bajHngMSXvBY+bWd y0ISCHc7ashbSwQYwbyHQcJYE8mhk63Mk9rtiCUrNunTt7l7CIQdqFq8vaaN+KRQLwR4 ZSJCSvmJ/QOGXHoNiCQSIwAtYTY3nXsLfG53rWlU0H2SSQ2poNlU6oG39Mc+d+78rk4S ipmfPPUdlHUYebOFN9qlwmv5rnDq86xTcskyAfEnv5bwqbPKaxQW4kchykGlWr94mTcX oqCmi/1ZUYLPRV9wmwfBFMKJ4fZZACslRNxCBop7+F+hvlKkfkEF/kGAOO7eocIPlOw0 skKg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=F6b+lNVN; 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 u3-20020a7bc043000000b0040a431f376bsi6405165wmc.68.2023.11.20.07.11.08 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 20 Nov 2023 07:11:08 -0800 (PST) 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=F6b+lNVN; 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] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r55tg-0006Nd-Gq; Mon, 20 Nov 2023 10:09:12 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r55tQ-0005rz-Uq for qemu-devel@nongnu.org; Mon, 20 Nov 2023 10:08:59 -0500 Received: from mail-lj1-x22f.google.com ([2a00:1450:4864:20::22f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r55tB-0001Cf-A7 for qemu-devel@nongnu.org; Mon, 20 Nov 2023 10:08:51 -0500 Received: by mail-lj1-x22f.google.com with SMTP id 38308e7fff4ca-2c6b30aca06so55029131fa.3 for ; Mon, 20 Nov 2023 07:08:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1700492918; x=1701097718; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=NCRqk6YT3bsj71ZXwzX8pG0SOXxV0ZtG0Z5l0HsDHlo=; b=F6b+lNVN5EY7oRWbCZlg0ds00XuFgj0g0YvZQjRD34hfjRJHKAIYvgOHbSy+ennXqM afnIizMnUH1i+kh0UU0mlS6nPbNwgymqsEJY6Pt/dVdK+KouG5BFb0AbndqdkvfDFioX 17XQYx1MeTOIt0QlV0+TMYpu/i4DoB28I+OTJQUx/1T25Zwus4kLYdwkM9FjTW16zky1 3/jNBmO2B1YJ+UfmINSGbCmTZLj4GrEar3r7oxfMpMEmVI0tQ0+X25R6TEySblPikFC7 gWQVcGYNStQCjg5pwsQ67tiU0SnHeQ2eBNhmTHGtz+TYPvzNLmpJmqP8EneWyugqQkmb P0aA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700492918; x=1701097718; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=NCRqk6YT3bsj71ZXwzX8pG0SOXxV0ZtG0Z5l0HsDHlo=; b=MLQmQuUnAm1bfhSfe4Y+gVs4KKhYld0mZbkYrCusxXsBKkOpj55tPCXQMtPfsilkRe sI7ZddlESxt5pYoqU7Kgith5GD2A+2Ar7x2NB40wmyb9zG33gtFWla0tMZOUlhLKe1Xp 11/ptyoWjmf62bPXEBHptMXk7jSAg/2fNWdyRxKhNb1qUmwquAw5mrSPrpURwQ8SsTYe UFHo9uTP6NEkWvNB7g9NoAd0lUrY3d3bFCL8nXm/1wSSPcFd7FHjAlKt2RH15BgBnpv8 4bD+Mx1Dg+1qIeahRbqlxTg/djQG+bcbNYn0L9yOCUl0FCdIRhd60tm2Ps5Kxvk2KhK5 E88g== X-Gm-Message-State: AOJu0YwjCo4NWCvNjBl7HEn/TXAzfNZtSftVV1u3uOJzzcKOojaWnXvr 0K1/96/SyHbhpXsxC632ndnYtg== X-Received: by 2002:a2e:150e:0:b0:2c8:3410:2be with SMTP id s14-20020a2e150e000000b002c8341002bemr4070977ljd.22.1700492918023; Mon, 20 Nov 2023 07:08:38 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id r14-20020a05600c35ce00b004094d4292aesm13683058wmq.18.2023.11.20.07.08.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Nov 2023 07:08:34 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 4951065755; Mon, 20 Nov 2023 15:08:34 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Wainer dos Santos Moschetta , =?utf-8?q?C=C3=A9dric?= =?utf-8?q?_Le_Goater?= , Mahmoud Mandour , Peter Maydell , David Hildenbrand , =?utf-8?q?Alex_Benn=C3=A9e?= , qemu-s390x@nongnu.org, Beraldo Leal , qemu-arm@nongnu.org, devel@lists.libvirt.org, qemu-ppc@nongnu.org, Daniel Henrique Barboza , Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Alexandre Iooss , Marek Vasut , Thomas Huth , Chris Wulff , Ilya Leoshkevich , Richard Henderson , Nicholas Piggin , Anders Roxell Subject: [PATCH v2 03/14] tests/docker: merge debian-native with debian-amd64 Date: Mon, 20 Nov 2023 15:08:22 +0000 Message-Id: <20231120150833.2552739-4-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231120150833.2552739-1-alex.bennee@linaro.org> References: <20231120150833.2552739-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::22f; envelope-from=alex.bennee@linaro.org; helo=mail-lj1-x22f.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-bounces+patch=linaro.org@nongnu.org debian-native isn't really needed and suffers from the problem of tracking a distros dependencies rather than the projects. With a little surgery we can make the debian-amd64 container architecture neutral and allow people to use it to build a native QEMU. Rename it so it follows the same non-arch pattern of the other distro containers. Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Tested-by: Anders Roxell --- .gitlab-ci.d/buildtest.yml | 12 ++--- .gitlab-ci.d/containers.yml | 2 +- tests/docker/Makefile.include | 3 -- tests/docker/dockerfiles/debian-native.docker | 54 ------------------- .../{debian-amd64.docker => debian.docker} | 7 ++- tests/lcitool/refresh | 9 ++-- 6 files changed, 18 insertions(+), 69 deletions(-) delete mode 100644 tests/docker/dockerfiles/debian-native.docker rename tests/docker/dockerfiles/{debian-amd64.docker => debian.docker} (96%) diff --git a/.gitlab-ci.d/buildtest.yml b/.gitlab-ci.d/buildtest.yml index da72f7c690..7f9af83b10 100644 --- a/.gitlab-ci.d/buildtest.yml +++ b/.gitlab-ci.d/buildtest.yml @@ -70,7 +70,7 @@ build-system-debian: needs: job: amd64-debian-container variables: - IMAGE: debian-amd64 + IMAGE: debian CONFIGURE_ARGS: --with-coroutine=sigaltstack TARGETS: arm-softmmu i386-softmmu riscv64-softmmu sh4eb-softmmu sparc-softmmu xtensa-softmmu @@ -82,7 +82,7 @@ check-system-debian: - job: build-system-debian artifacts: true variables: - IMAGE: debian-amd64 + IMAGE: debian MAKE_CHECK_ARGS: check avocado-system-debian: @@ -91,7 +91,7 @@ avocado-system-debian: - job: build-system-debian artifacts: true variables: - IMAGE: debian-amd64 + IMAGE: debian MAKE_CHECK_ARGS: check-avocado AVOCADO_TAGS: arch:arm arch:i386 arch:riscv64 arch:sh4 arch:sparc arch:xtensa @@ -101,7 +101,7 @@ crash-test-debian: - job: build-system-debian artifacts: true variables: - IMAGE: debian-amd64 + IMAGE: debian script: - cd build - make NINJA=":" check-venv @@ -589,7 +589,7 @@ build-tools-and-docs-debian: # when running on 'master' we use pre-existing container optional: true variables: - IMAGE: debian-amd64 + IMAGE: debian MAKE_CHECK_ARGS: check-unit ctags TAGS cscope CONFIGURE_ARGS: --disable-system --disable-user --enable-docs --enable-tools QEMU_JOB_PUBLISH: 1 @@ -609,7 +609,7 @@ build-tools-and-docs-debian: # of what topic branch they're currently using pages: extends: .base_job_template - image: $CI_REGISTRY_IMAGE/qemu/debian-amd64:$QEMU_CI_CONTAINER_TAG + image: $CI_REGISTRY_IMAGE/qemu/debian:$QEMU_CI_CONTAINER_TAG stage: test needs: - job: build-tools-and-docs-debian diff --git a/.gitlab-ci.d/containers.yml b/.gitlab-ci.d/containers.yml index 8637a13d86..ae79d4c58b 100644 --- a/.gitlab-ci.d/containers.yml +++ b/.gitlab-ci.d/containers.yml @@ -11,7 +11,7 @@ amd64-debian-container: extends: .container_job_template stage: containers variables: - NAME: debian-amd64 + NAME: debian amd64-ubuntu2204-container: extends: .container_job_template diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include index cd4688bf07..5ba5b50ab9 100644 --- a/tests/docker/Makefile.include +++ b/tests/docker/Makefile.include @@ -88,9 +88,6 @@ DOCKER_PARTIAL_IMAGES += debian-s390x-cross DOCKER_PARTIAL_IMAGES += fedora endif -# The native build should never use the registry -docker-image-debian-native: DOCKER_REGISTRY= - # alpine has no adduser docker-image-alpine: NOUSER=1 diff --git a/tests/docker/dockerfiles/debian-native.docker b/tests/docker/dockerfiles/debian-native.docker deleted file mode 100644 index abac7d7cd7..0000000000 --- a/tests/docker/dockerfiles/debian-native.docker +++ /dev/null @@ -1,54 +0,0 @@ -# -# Docker Debian Native -# -# This is intended to build QEMU on native host systems. Debian is -# chosen due to the broadest range on supported host systems for QEMU. -# -# This docker target is based on the docker.io Debian Bullseye base -# image rather than QEMU's base because we would otherwise confuse the -# build grabbing stuff from the registry built for other -# architectures. -# -FROM docker.io/library/debian:bullseye-slim -MAINTAINER Alex Bennée - -# Duplicate deb line as deb-src -RUN cat /etc/apt/sources.list | sed "s/^deb\ /deb-src /" >> /etc/apt/sources.list - -# Install common build utilities -RUN apt update && \ - DEBIAN_FRONTEND=noninteractive apt install -yy eatmydata - -RUN apt update && \ - DEBIAN_FRONTEND=noninteractive eatmydata \ - apt build-dep -yy --arch-only qemu - -RUN apt update && \ - DEBIAN_FRONTEND=noninteractive eatmydata \ - apt install -y --no-install-recommends \ - cscope \ - genisoimage \ - exuberant-ctags \ - global \ - libbz2-dev \ - liblzo2-dev \ - libgcrypt20-dev \ - libfdt-dev \ - librdmacm-dev \ - libsasl2-dev \ - libsnappy-dev \ - libvte-dev \ - netcat-openbsd \ - ninja-build \ - openssh-client \ - python3-numpy \ - python3-opencv \ - python3-venv - -ENV QEMU_CONFIGURE_OPTS $QEMU_CONFIGURE_OPTS -ENV DEF_TARGET_LIST "none" -# As a final step configure the user (if env is defined) -ARG USER -ARG UID -RUN if [ "${USER}" ]; then \ - id ${USER} 2>/dev/null || useradd -u ${UID} -U ${USER}; fi diff --git a/tests/docker/dockerfiles/debian-amd64.docker b/tests/docker/dockerfiles/debian.docker similarity index 96% rename from tests/docker/dockerfiles/debian-amd64.docker rename to tests/docker/dockerfiles/debian.docker index 9b50fb2f63..b5e642d5b6 100644 --- a/tests/docker/dockerfiles/debian-amd64.docker +++ b/tests/docker/dockerfiles/debian.docker @@ -155,10 +155,13 @@ RUN DEBIAN_FRONTEND=noninteractive eatmydata \ apt install -y --no-install-recommends \ cscope\ global\ - linux-headers-amd64 + linux-headers-generic RUN git clone https://github.com/luigirizzo/netmap.git /usr/src/netmap RUN cd /usr/src/netmap && git checkout v11.3 -RUN cd /usr/src/netmap/LINUX && ./configure --no-drivers --no-apps --kernel-dir=$(ls -d /usr/src/linux-headers-*-amd64) && make install +RUN cd /usr/src/netmap/LINUX && \ + ./configure --no-drivers --no-apps \ + --kernel-dir=$(ls -d /usr/src/linux-headers-*-$(dpkg --print-architecture)) \ + && make install ENV QEMU_CONFIGURE_OPTS --enable-netmap # As a final step configure the user (if env is defined) ARG USER diff --git a/tests/lcitool/refresh b/tests/lcitool/refresh index 7c211eba2e..993683cf48 100755 --- a/tests/lcitool/refresh +++ b/tests/lcitool/refresh @@ -99,10 +99,13 @@ debian12_extras = [ " apt install -y --no-install-recommends \\\n", " cscope\\\n", " global\\\n", - " linux-headers-amd64\n", + " linux-headers-generic\n", "RUN git clone https://github.com/luigirizzo/netmap.git /usr/src/netmap\n", "RUN cd /usr/src/netmap && git checkout v11.3\n", - "RUN cd /usr/src/netmap/LINUX && ./configure --no-drivers --no-apps --kernel-dir=$(ls -d /usr/src/linux-headers-*-amd64) && make install\n", + "RUN cd /usr/src/netmap/LINUX && \\\n", + " ./configure --no-drivers --no-apps \\\n", + " --kernel-dir=$(ls -d /usr/src/linux-headers-*-$(dpkg --print-architecture)) \\\n", + " && make install\n", "ENV QEMU_CONFIGURE_OPTS --enable-netmap\n" ] @@ -123,7 +126,7 @@ try: # generate_dockerfile("alpine", "alpine-318") generate_dockerfile("centos8", "centos-stream-8") - generate_dockerfile("debian-amd64", "debian-12", + generate_dockerfile("debian", "debian-12", trailer="".join(debian12_extras)) generate_dockerfile("fedora", "fedora-38") generate_dockerfile("opensuse-leap", "opensuse-leap-15") From patchwork Mon Nov 20 15:08:23 2023 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: 745362 Delivered-To: patch@linaro.org Received: by 2002:a5d:5052:0:b0:32d:baff:b0ca with SMTP id h18csp1343720wrt; Mon, 20 Nov 2023 07:09:56 -0800 (PST) X-Google-Smtp-Source: AGHT+IGh6gEdBOaYiPeaad6/tu3yfcOiAUgIvrzv4PzP+2uco/mdBI+G8RWxP+IX1l1Wzk5Nxr+I X-Received: by 2002:a81:72c6:0:b0:5ad:d6b5:822a with SMTP id n189-20020a8172c6000000b005add6b5822amr8472162ywc.21.1700492995901; Mon, 20 Nov 2023 07:09:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700492995; cv=none; d=google.com; s=arc-20160816; b=erxC0dZSdlklI4wi6aQ58Fyfrh5NwMqi5IWdbLz5QRJYwPYToizxmeRO1n+/2fiCAd VbwlH1pu/KxyJwXyIrSUWEbRLPwscQxBggFWgwLHQaArpQua5aHuOmPB6qo6ERv7b5j6 F/hIRO20bZjTmbaWsBDdHU6H+cJPmTN/0mw36seFmGjwPMp0W9xIbN2C4aYB4f4GV526 i79nwyeX40AdhD0NNnJmT5PMtAidOf21pd96OCijDjt/VXmBMf0SsJO9mb+zA6RBKAiJ az2JlTdFjwe8ADJmJvOTWeJ4QKV+zvscfmG3lXNqbde68TvmzuTtEki1bSfAj5ph3Vkj w11g== 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=r13y4mFZjL5YxuFf8Jb2e5kHdn8MHdL63WduZWtvH6Q=; fh=/2zIotGbV2Q5iRh1tbASdYDRQwqa6mvvDUhxPVzDdrA=; b=Sx/QuCuT8Oh1VnMjGkY67QA/mDI1Ck4nAdUkH1lyimVLiK+QtDY7SNQOIWoeGDqsBJ lOqRlCaIkxHET7u5r5ZWQ21uBH6iEEHsU5OIzEXQi6K6DoLjZT2d0Hvf+RHqVWQgnMAH f6To2R+vVuqLg1Drwzxtd4rOV8xO9KCwTcUwd0QrKVi4whLJVVWeBmaY+b3FRZvpdZP7 JF6iPv6tWZ9lzJOAUwVJgM4BMv9AUthar0szEjiwDkU4CE1MDfs3tDJguy0q0lUpbXnf 9Jst8m/nZacblUIiNh68evemDsi5zuucMsE2w67W4YmfUzK9ectKt4/PcmpgMUOWT86s Vufw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=OPtCdTTK; 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 s130-20020a819b88000000b005c5bc428e3asi4596453ywg.19.2023.11.20.07.09.55 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 20 Nov 2023 07:09:55 -0800 (PST) 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=OPtCdTTK; 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] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r55ta-0006AD-OS; Mon, 20 Nov 2023 10:09:06 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r55tA-0005jw-Kj for qemu-devel@nongnu.org; Mon, 20 Nov 2023 10:08:41 -0500 Received: from mail-wm1-x32f.google.com ([2a00:1450:4864:20::32f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r55t7-0001Bf-16 for qemu-devel@nongnu.org; Mon, 20 Nov 2023 10:08:40 -0500 Received: by mail-wm1-x32f.google.com with SMTP id 5b1f17b1804b1-4079ed65471so18230205e9.1 for ; Mon, 20 Nov 2023 07:08:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1700492915; x=1701097715; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=r13y4mFZjL5YxuFf8Jb2e5kHdn8MHdL63WduZWtvH6Q=; b=OPtCdTTKWyWfsRvlja6HGNwngJ4ZBUYjHSWwixKZ25VYwPMTp8PA+jINIjg0eISMvj kwdsQikTN2gkV/YLikYmmd5oq88idkg98kSRaM/qWCQMkOnAbrpNQLUAuCWeQHlZ0F09 YtF7pmO6H5Ri1K0+1pNPqAGakEsVCITdBRtyECyRRy9mMzzxaS1HWnGCwNxROK79cOHo 72La/K+o+CzTJ3E4a9bx7qTZv439hDHzrdXKz0wgORLHMvY+dGpPFZeyRTM+5zumNWxz kDaWcOfVxgrj7IqK9sqmmG+iRTz+f2mkNgjFSmb6OnCFeuAOjZaM/GOLtonoTjBjRnc3 V81A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700492915; x=1701097715; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=r13y4mFZjL5YxuFf8Jb2e5kHdn8MHdL63WduZWtvH6Q=; b=sMcpp3bUh+D9plOT6hTYLW8r2cB3ddOUQU9e5O766zqhNUSxvcRzZCjNi7w4HmNjBb nlsKLz4rWqT0PWbDddrAxX5Q87zrJTZaayZu7vkLlkLaRRoxa7yxuc2rOX3aGmgC1W4G JVm3n9T3uEC0HODgtkubdfb5XouoMbpKg9cI/op/zdxCqtf2s7ucg99h+1AegfKeY+7z /vOU3qzRKOaZt+ZZ7OezSAarZ2F935cQdKQ0FLLfzQiCArRrCT63IgOVzHycZLfG9awb vzScqZw/6S8/EClNtBeMf8JYLrPNZFunoaz7gnfKAVlZhd79gA43c2ZWXp6XISyfCK70 ueLg== X-Gm-Message-State: AOJu0YwKCNCuRxTskWygaMiuqZ7hVVL5qVNJFVzOYIAvT4Banrq2bFwc nKHbLcEgne6FTdbBNroZTKov/w== X-Received: by 2002:a05:600c:450a:b0:408:2b:3ae with SMTP id t10-20020a05600c450a00b00408002b03aemr5446408wmo.6.1700492915281; Mon, 20 Nov 2023 07:08:35 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id 1-20020a05600c230100b003fefb94ccc9sm13477072wmo.11.2023.11.20.07.08.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Nov 2023 07:08:34 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 6132B65758; Mon, 20 Nov 2023 15:08:34 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Wainer dos Santos Moschetta , =?utf-8?q?C=C3=A9dric?= =?utf-8?q?_Le_Goater?= , Mahmoud Mandour , Peter Maydell , David Hildenbrand , =?utf-8?q?Alex_Benn=C3=A9e?= , qemu-s390x@nongnu.org, Beraldo Leal , qemu-arm@nongnu.org, devel@lists.libvirt.org, qemu-ppc@nongnu.org, Daniel Henrique Barboza , Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Alexandre Iooss , Marek Vasut , Thomas Huth , Chris Wulff , Ilya Leoshkevich , Richard Henderson , Nicholas Piggin , Greg Manning Subject: [PATCH v2 04/14] plugins: fix win plugin tests on cross compile Date: Mon, 20 Nov 2023 15:08:23 +0000 Message-Id: <20231120150833.2552739-5-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231120150833.2552739-1-alex.bennee@linaro.org> References: <20231120150833.2552739-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=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Greg Manning Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1972 Cross compile gcc is more picky about argument order than msys. Changed the meson command to take the (now renamed) libqemu_plugin_api.a as a lib, rather than an object. This puts it in the right place on both native and cross compile gcc commands Reenable plugins on crossbuilds Signed-off-by: Greg Manning Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20231109124326.21106-2-gmanning@rapitasystems.com> Signed-off-by: Alex Bennée --- .gitlab-ci.d/crossbuilds.yml | 2 +- contrib/plugins/Makefile | 2 +- plugins/meson.build | 2 +- tests/plugin/meson.build | 3 ++- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci.d/crossbuilds.yml b/.gitlab-ci.d/crossbuilds.yml index c2af6c7f44..d19d98cde0 100644 --- a/.gitlab-ci.d/crossbuilds.yml +++ b/.gitlab-ci.d/crossbuilds.yml @@ -165,7 +165,7 @@ cross-win32-system: job: win32-fedora-cross-container variables: IMAGE: fedora-win32-cross - EXTRA_CONFIGURE_OPTS: --enable-fdt=internal --disable-plugins + EXTRA_CONFIGURE_OPTS: --enable-fdt=internal CROSS_SKIP_TARGETS: alpha-softmmu avr-softmmu hppa-softmmu m68k-softmmu microblazeel-softmmu mips64el-softmmu nios2-softmmu artifacts: diff --git a/contrib/plugins/Makefile b/contrib/plugins/Makefile index 1783750cf6..0b64d2c1e3 100644 --- a/contrib/plugins/Makefile +++ b/contrib/plugins/Makefile @@ -49,7 +49,7 @@ all: $(SONAMES) $(CC) $(CFLAGS) $(PLUGIN_CFLAGS) -c -o $@ $< ifeq ($(CONFIG_WIN32),y) -lib%$(SO_SUFFIX): %.o win32_linker.o ../../plugins/qemu_plugin_api.lib +lib%$(SO_SUFFIX): %.o win32_linker.o ../../plugins/libqemu_plugin_api.a $(CC) -shared -o $@ $^ $(LDLIBS) else ifeq ($(CONFIG_DARWIN),y) lib%$(SO_SUFFIX): %.o diff --git a/plugins/meson.build b/plugins/meson.build index 40d24529c0..6b2d7a9292 100644 --- a/plugins/meson.build +++ b/plugins/meson.build @@ -28,7 +28,7 @@ if get_option('plugins') # then use dlltool to assemble a delaylib. win32_qemu_plugin_api_lib = configure_file( input: win32_plugin_def, - output: 'qemu_plugin_api.lib', + output: 'libqemu_plugin_api.a', command: [dlltool, '--input-def', '@INPUT@', '--output-delaylib', '@OUTPUT@', '--dllname', 'qemu.exe'] ) diff --git a/tests/plugin/meson.build b/tests/plugin/meson.build index 528bb9d86c..28a929dbcc 100644 --- a/tests/plugin/meson.build +++ b/tests/plugin/meson.build @@ -4,7 +4,8 @@ if get_option('plugins') if targetos == 'windows' t += shared_module(i, files(i + '.c') + '../../contrib/plugins/win32_linker.c', include_directories: '../../include/qemu', - objects: [win32_qemu_plugin_api_lib], + link_depends: [win32_qemu_plugin_api_lib], + link_args: ['-Lplugins', '-lqemu_plugin_api'], dependencies: glib) else From patchwork Mon Nov 20 15:08:24 2023 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: 745375 Delivered-To: patch@linaro.org Received: by 2002:a5d:5052:0:b0:32d:baff:b0ca with SMTP id h18csp1347640wrt; Mon, 20 Nov 2023 07:14:16 -0800 (PST) X-Google-Smtp-Source: AGHT+IGieTOeqMtU+BUN4y+E1q5jbI3y02nBpnEwrvmmQPFfUS3G4Hk5jgXsxri17KfPAXGFVspc X-Received: by 2002:a05:600c:190e:b0:401:b6f6:d90c with SMTP id j14-20020a05600c190e00b00401b6f6d90cmr5649197wmq.35.1700493256497; Mon, 20 Nov 2023 07:14:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700493256; cv=none; d=google.com; s=arc-20160816; b=crTuVikLs8jGE53Mxp660Wh6ruZt3deo5SJUlDLXSjGRWJkX51lpqvyfHAEw4R9OkX 6QMQFo8o6d7QXguL1WLOYb+LyztpAlaldFt/JEIXq+KaQB1xsN6efADHsLQAUP/i4JtY zEb0b8vIEZfO8qR7zv6RyOoJs35k6zFB/d+syUwK+sHteLTeLFdxySS2CR1Wb0uWG34s AZAAGg4/rOSogyK+YzF7qFEVe7OLO4/41fjRZH8EsKII3KZK+JGcgWH1gvRRMm2GTPe+ oNSamWU6pyH3EtMZmDjc1bKOBDh2lEIz3V13zeL6L9T31j2HPx5dNERPsSnOHQZEBr8b ntJQ== 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=xunI738Fqo6s2FpWviDGopn4HPhskLpvM21aNsZbJoM=; fh=L8gboe2BpnMHPozXPXZ1zwcw4kd4+Ep8z61Ccww9Lhk=; b=x9dL/z4bDAgXiRofdouPpKqUgedMyKNaaBpOBwPYxwvrX6l9B+7ZMWZXmFQp0bR1Qv GdodkVYDbKd9xtthtE3A2sbOseOIWakSS4cqsSR9MIfw+iNYw7rzLkWOyF0cs5n9wAru ae4R3G8F0+JdjY8HJ9z1iXKP2XmrwlbLQyzWUNPqlXI/5/kCVcAEJkwPIZw2o1j+54Y/ 6FqsBVgsd0qQsYgp6FRKJH0/t4+AOLlwnSxQeq7+9upAqVsQxpUrKoh3cHfj88jZiDpF fkShegQLyP64L1c/hxV4DaVX7q5uhGaecx0kGXzuy3BmkGHoeNy7HT2OBSzqwmpcQf40 RZIw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=VwpMFHeA; 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 k17-20020a7bc411000000b00407933d404bsi4859346wmi.63.2023.11.20.07.14.16 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 20 Nov 2023 07:14:16 -0800 (PST) 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=VwpMFHeA; 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] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r55td-0006GL-2k; Mon, 20 Nov 2023 10:09:09 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r55tS-0005tx-Nd for qemu-devel@nongnu.org; Mon, 20 Nov 2023 10:09:00 -0500 Received: from mail-lj1-x22b.google.com ([2a00:1450:4864:20::22b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r55tC-0001F1-Vb for qemu-devel@nongnu.org; Mon, 20 Nov 2023 10:08:57 -0500 Received: by mail-lj1-x22b.google.com with SMTP id 38308e7fff4ca-2c5039d4e88so58777251fa.3 for ; Mon, 20 Nov 2023 07:08:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1700492921; x=1701097721; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=xunI738Fqo6s2FpWviDGopn4HPhskLpvM21aNsZbJoM=; b=VwpMFHeAvkKBE+nuZ57WbabJpa9xnAOHjYOIFHzsMLdO2QVO859pHUoBhE6fmSMcvN a120Cn2VONxmZLyOXNWCg4SrlVhaUh+RlZhDRA1n3havHd488c5lSKW+AZO+XYs0gfkj IsWGFWbdwEKrM1mFh1Lx1p3P046r3PQ1YgWzMiVWJLr642WKGwENkuBjtKegxO3Bu+pW Sl95/IZSEzovrxi6t6kZexPwTrDb43JYv3qxIXv4zYi4nIz58gd9LTCwlucbZHWMikXA IIIFGbXkg7VYgnaewP3iwSVYk+ICtuT1vZJzB3BxnMnjETENQ4QdDfhWsAZ5p10apc9q 2V8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700492921; x=1701097721; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=xunI738Fqo6s2FpWviDGopn4HPhskLpvM21aNsZbJoM=; b=ghOXDDi5M8Sh6FfNaYW3tj7SPK/iTDrnSnHtZfr5LTCI4By2JZT5qORMRYgvVFxniL p5leD4aciXzi3TRNPuReiwO3rosJD1bEvmU7/QgApXysA82N4o26UDvJs9frb5kAAfmY Ml4jLx1Xrb0FOJy9u3CAyX0Sjtk4NU/wRp04V5QkcRCdyM+oKZjENRXoA5gdmSlq5YwJ uL4caYtcd7wTfbxqNX437aYYw7Nq9YLc0IjpR2WjrT8ynmkYjDIxnfmliGP1gQpnLlCe 3qm+bim5zg9OtswUYWXLQ6vYVyLBojEcmfRPCDmcOwiVi6KoGN2+zilk5cL/W8VrOy/M aXGA== X-Gm-Message-State: AOJu0YwVGd96x8CBcbryvGXuJqjuoPib2omw/UoExdK1szzTeXcsPlRg Ixbow9AJdsktSYZb7w+KlaLX2Q== X-Received: by 2002:a2e:9d89:0:b0:2c5:2813:5534 with SMTP id c9-20020a2e9d89000000b002c528135534mr5248557ljj.51.1700492920828; Mon, 20 Nov 2023 07:08:40 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id fc16-20020a05600c525000b004054dcbf92asm13671291wmb.20.2023.11.20.07.08.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Nov 2023 07:08:38 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 7A66665773; Mon, 20 Nov 2023 15:08:34 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Wainer dos Santos Moschetta , =?utf-8?q?C=C3=A9dric?= =?utf-8?q?_Le_Goater?= , Mahmoud Mandour , Peter Maydell , David Hildenbrand , =?utf-8?q?Alex_Benn=C3=A9e?= , qemu-s390x@nongnu.org, Beraldo Leal , qemu-arm@nongnu.org, devel@lists.libvirt.org, qemu-ppc@nongnu.org, Daniel Henrique Barboza , Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Alexandre Iooss , Marek Vasut , Thomas Huth , Chris Wulff , Ilya Leoshkevich , Richard Henderson , Nicholas Piggin Subject: [PATCH v2 05/14] target/nios2: Deprecate the Nios II architecture Date: Mon, 20 Nov 2023 15:08:24 +0000 Message-Id: <20231120150833.2552739-6-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231120150833.2552739-1-alex.bennee@linaro.org> References: <20231120150833.2552739-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::22b; envelope-from=alex.bennee@linaro.org; helo=mail-lj1-x22b.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, T_SCC_BODY_TEXT_LINE=-0.01, T_SPF_TEMPERROR=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-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé See commit 9ba1caf510 ("MAINTAINERS: Mark the Nios II CPU as orphan"), last contribution from Chris was in 2012 [1] and Marek in 2018 [2]. [1] https://lore.kernel.org/qemu-devel/1352607539-10455-2-git-send-email-crwulff@gmail.com/ [2] https://lore.kernel.org/qemu-devel/805fc7b5-03f0-56d4-abfd-ed010d4fa769@denx.de/ Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Acked-by: Marek Vasut Reviewed-by: Thomas Huth Message-Id: <20231117070250.32932-1-philmd@linaro.org> Signed-off-by: Alex Bennée --- docs/about/deprecated.rst | 15 +++++++++++++++ hw/nios2/10m50_devboard.c | 1 + hw/nios2/generic_nommu.c | 1 + 3 files changed, 17 insertions(+) diff --git a/docs/about/deprecated.rst b/docs/about/deprecated.rst index 6c84db90b5..2e15040246 100644 --- a/docs/about/deprecated.rst +++ b/docs/about/deprecated.rst @@ -236,6 +236,16 @@ it. Since all recent x86 hardware from the past >10 years is capable of the 64-bit x86 extensions, a corresponding 64-bit OS should be used instead. +System emulator CPUs +-------------------- + +Nios II CPU (since 8.2) +''''''''''''''''''''''' + +The Nios II architecture is orphan. The ``nios2`` guest CPU support is +deprecated and will be removed in a future version of QEMU. + + System emulator machines ------------------------ @@ -254,6 +264,11 @@ These old machine types are quite neglected nowadays and thus might have various pitfalls with regards to live migration. Use a newer machine type instead. +Nios II ``10m50-ghrd`` and ``nios2-generic-nommu`` machines (since 8.2) +''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' + +The Nios II architecture is orphan. + Backend options --------------- diff --git a/hw/nios2/10m50_devboard.c b/hw/nios2/10m50_devboard.c index 952a0dc33e..6cb32f777b 100644 --- a/hw/nios2/10m50_devboard.c +++ b/hw/nios2/10m50_devboard.c @@ -160,6 +160,7 @@ static void nios2_10m50_ghrd_class_init(ObjectClass *oc, void *data) mc->desc = "Altera 10M50 GHRD Nios II design"; mc->init = nios2_10m50_ghrd_init; mc->is_default = true; + mc->deprecation_reason = "Nios II architecture is deprecated"; object_class_property_add_bool(oc, "vic", get_vic, set_vic); object_class_property_set_description(oc, "vic", diff --git a/hw/nios2/generic_nommu.c b/hw/nios2/generic_nommu.c index 48edb3ae37..defa16953f 100644 --- a/hw/nios2/generic_nommu.c +++ b/hw/nios2/generic_nommu.c @@ -95,6 +95,7 @@ static void nios2_generic_nommu_machine_init(struct MachineClass *mc) { mc->desc = "Generic NOMMU Nios II design"; mc->init = nios2_generic_nommu_init; + mc->deprecation_reason = "Nios II architecture is deprecated"; } DEFINE_MACHINE("nios2-generic-nommu", nios2_generic_nommu_machine_init); From patchwork Mon Nov 20 15:08:25 2023 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: 745373 Delivered-To: patch@linaro.org Received: by 2002:a5d:5052:0:b0:32d:baff:b0ca with SMTP id h18csp1347087wrt; Mon, 20 Nov 2023 07:13:30 -0800 (PST) X-Google-Smtp-Source: AGHT+IHprshhDcL7N4NlVIvT83+EzqGQgtD5h+tOTaQcMIhST5rYRmT88ceV9ium2u4M9UjjyTaC X-Received: by 2002:adf:fecf:0:b0:32d:b2e0:ed79 with SMTP id q15-20020adffecf000000b0032db2e0ed79mr4265103wrs.67.1700493210471; Mon, 20 Nov 2023 07:13:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700493210; cv=none; d=google.com; s=arc-20160816; b=bfpOsqeC1dJj2gwQcTmdq6zzYJnpGMNcvCgndoJcjB0VtOFtrLKYRAaKIdzNS2yPZS u2Q7S1p2IdzMgBf0/yI91WlNilYon3iPLcEPsfZNQudYA6nd9QaHHIBz9E5kHKLHLM5i ArpQB2bNovxCgVZ6ZWcD3OfZHXH/HejWtEazFm/1zgqxACb0z9NWmY0PM4c576/euGrX xz9F54EnK0ueUl1IPEbzRMdwa2yeBD37Oo2ccAxpr9lxRkbjYIH8Tq4xCj307pQAAvsb VGyxIrU0sYhoGOhc3ouwPNtb5ZIUIhPq1qlJDL+Zr233jjJlNWvuNql4odHH4hOY5keO BmDQ== 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=IjAJqKCk3iUb0SkYI6f8P9mLxZWi+VPPBoOgrXC8tUg=; fh=L8gboe2BpnMHPozXPXZ1zwcw4kd4+Ep8z61Ccww9Lhk=; b=Re+fLh+mps9HsEyb9ngGhn42LsLYoKPWj729q5fCDU/1p76NtNyUqzyR9+aqYtFRaB TyJvJRNZlB9w4MaGVSuR1+jhVdSVSRUTv8vXAZrkJPEYO3B9TpMDl0OnndeFrhZoYJU7 KgJwBWXCo39CGz6Nl19WJziuD6p29IXTAc1Mz4FWslldfcjTuJMqfj7dZrcCXUO3XA/V /y3ma/IeNO7AylOl7e/8im37160W/Zd78abr0YwcPn9qzsyc0btQanAf5cjYyhLzrtqb 0NAVRszsEOXabNI0rJAsS0EodiqfVdzCq9JSy7Tn0S1XpxsFq2niRJ2CJp1QmVTNbF5C AcoA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=BQKTFM0l; 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 u12-20020a5d434c000000b0033141b5b572si4972950wrr.366.2023.11.20.07.13.30 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 20 Nov 2023 07:13:30 -0800 (PST) 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=BQKTFM0l; 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] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r55te-0006J9-CT; Mon, 20 Nov 2023 10:09:10 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r55tL-0005qO-9L for qemu-devel@nongnu.org; Mon, 20 Nov 2023 10:08:56 -0500 Received: from mail-wr1-x432.google.com ([2a00:1450:4864:20::432]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r55tC-0001EQ-12 for qemu-devel@nongnu.org; Mon, 20 Nov 2023 10:08:49 -0500 Received: by mail-wr1-x432.google.com with SMTP id ffacd0b85a97d-32df66c691dso2866403f8f.3 for ; Mon, 20 Nov 2023 07:08:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1700492920; x=1701097720; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=IjAJqKCk3iUb0SkYI6f8P9mLxZWi+VPPBoOgrXC8tUg=; b=BQKTFM0lIX4FCT5KeM9hgHLytNqqSQcT6HboPktwPoEMlj/8Sd81OJ2If6iWTQZdZJ xrIs/n2EHtFm9PLPbatH1Lhum9p39YpStsl2nONmTEElEU/9CS6U2RmGbBZUIRnTKvtH MdUXlucrKCcE09Bc8Fy4m6gE0mChtxckaDKLUFE6Prci0bMZ5C8k/uLVfbJhssCkp2T+ FNBvP0ZrAbsuoeaxYTYZdE38a/bU1QdCnDWcSI4FyKO9GdzXqvFAj5EQDDSVvBLPGQaI ogBvUvu1ru6/xlQ4VC0q5HEVMk0vqqR0FsSMxtfunPEPzl76VX8ICUy/EgsXhECI9ctO Hn3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700492920; x=1701097720; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=IjAJqKCk3iUb0SkYI6f8P9mLxZWi+VPPBoOgrXC8tUg=; b=ocgAkokFFETsA7P+UdyJMDoKlwbPHviHPH1ke8faotsYcKKsjGHoKiAONmCH1XpznT ZLG5UTJkjG6DPTI2VoxFrW6FdoJyPGwsBxpJqOYJmajD4BxVL/JT+FNOWYmb1iKX8im4 dB1Kqfq5mRotqxONlATGAxq+Ye3DDdox9E8Mex1lHOqzVVf9vum75JL1xSKsbHdHv+fV xMQVvncB1bPjObTK/jSWcg1fLr4pRT1tu4gJhiniS/OVRtPefyudCzNFn0aV2+e+Lc4h S6pAy8qPH7PictPOYqJXEVT1r8PWsZUFKtdCmUdP/dIY73yChhrMXkEqwwsQu1GxY89X ruPQ== X-Gm-Message-State: AOJu0YxM+0vVV4vjyseICgek3kc1ev9GVX+7Ap6fJRxJf9/t4DjtFtBW FJAVg96Budi7/KglaK87slwZoA== X-Received: by 2002:a05:6000:1883:b0:32d:701b:a585 with SMTP id a3-20020a056000188300b0032d701ba585mr7086064wri.69.1700492920360; Mon, 20 Nov 2023 07:08:40 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id l5-20020a5d4bc5000000b00332c4055faesm4984373wrt.87.2023.11.20.07.08.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Nov 2023 07:08:38 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 8D8DD65774; Mon, 20 Nov 2023 15:08:34 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Wainer dos Santos Moschetta , =?utf-8?q?C=C3=A9dric?= =?utf-8?q?_Le_Goater?= , Mahmoud Mandour , Peter Maydell , David Hildenbrand , =?utf-8?q?Alex_Benn=C3=A9e?= , qemu-s390x@nongnu.org, Beraldo Leal , qemu-arm@nongnu.org, devel@lists.libvirt.org, qemu-ppc@nongnu.org, Daniel Henrique Barboza , Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Alexandre Iooss , Marek Vasut , Thomas Huth , Chris Wulff , Ilya Leoshkevich , Richard Henderson , Nicholas Piggin Subject: [PATCH v2 06/14] tests/tcg: fixup Aarch64 semiconsole test Date: Mon, 20 Nov 2023 15:08:25 +0000 Message-Id: <20231120150833.2552739-7-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231120150833.2552739-1-alex.bennee@linaro.org> References: <20231120150833.2552739-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-bounces+patch=linaro.org@nongnu.org We need to ensure we squash the serial port if we want to hand craft our muxed input. As a bonus emit the example with a V=1 build to make it easier for people to figure out. Signed-off-by: Alex Bennée --- tests/tcg/aarch64/Makefile.softmmu-target | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/tcg/aarch64/Makefile.softmmu-target b/tests/tcg/aarch64/Makefile.softmmu-target index b74a2534e3..77c5018e02 100644 --- a/tests/tcg/aarch64/Makefile.softmmu-target +++ b/tests/tcg/aarch64/Makefile.softmmu-target @@ -48,10 +48,11 @@ QEMU_BASE_MACHINE=-M virt -cpu max -display none QEMU_OPTS+=$(QEMU_BASE_MACHINE) -semihosting-config enable=on,target=native,chardev=output -kernel # console test is manual only -QEMU_SEMIHOST=-chardev stdio,mux=on,id=stdio0 -semihosting-config enable=on,chardev=stdio0 -mon chardev=stdio0,mode=readline -run-semiconsole: QEMU_OPTS=$(QEMU_BASE_MACHINE) $(QEMU_SEMIHOST) -kernel +QEMU_SEMIHOST=-serial none -chardev stdio,mux=on,id=stdio0 -semihosting-config enable=on,chardev=stdio0 -mon chardev=stdio0,mode=readline +run-semiconsole: QEMU_OPTS=$(QEMU_BASE_MACHINE) $(QEMU_SEMIHOST) -kernel run-semiconsole: semiconsole $(call skip-test, $<, "MANUAL ONLY") + $(if $(V),@printf " %-7s %s %s\n" "TO RUN" $(notdir $(QEMU)) "$(QEMU_OPTS) $<") run-plugin-semiconsole-with-%: semiconsole $(call skip-test, $<, "MANUAL ONLY") From patchwork Mon Nov 20 15:08:26 2023 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: 745371 Delivered-To: patch@linaro.org Received: by 2002:a5d:5052:0:b0:32d:baff:b0ca with SMTP id h18csp1346837wrt; Mon, 20 Nov 2023 07:13:11 -0800 (PST) X-Google-Smtp-Source: AGHT+IG75DyLFDUa1Z0Y+5JPPT2JDH9vDeU7r2GEwERFBs2R42n3IRj+0TCE0p8x1MrwqbAqjGJh X-Received: by 2002:a05:6000:156b:b0:332:c46c:f2ab with SMTP id 11-20020a056000156b00b00332c46cf2abmr3426366wrz.51.1700493191678; Mon, 20 Nov 2023 07:13:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700493191; cv=none; d=google.com; s=arc-20160816; b=scICyNvzTgO9ku2Ww+BUnrpeqwFmpIDkdkZVehMmgL/sCdPTyuGK8om4jLG4mJp4Jp 4+qC04WOBpbNyK2rzrtkp/WxuiM6TuSdh+dWVMAl0z3g3+5Ufhp/O1x9AMkcMmjs0OIn NBkZpe3tTYuJs9egTxYXDgm1wpgULlcP2a8eTuZTFYgKz1io9anPR2czvCRsDyozaBiJ 5Y/y8gxt1pwmk3v4tzk283PzOXTilqD1StB9BayKOs0/wBWGrFPX2Oh7T/kKtdlKv4g1 K07LJF0oReQRt34OCD9lkhcYMuQT+NLeEkWLhua0RlOFmBPlNQnituf0FuYi4JEE2edK gN6w== 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=/Am29rNstmoBjPWHdKzUHbk8KZyMNjdmqHD061pd8s4=; fh=L8gboe2BpnMHPozXPXZ1zwcw4kd4+Ep8z61Ccww9Lhk=; b=XpbKAGZK/3M/9huAwIzgumGDSUfDRtgYWFYBrWHDNfMiGiyXyMF7ip2xRg/2RUlJLP ZEhgOpUh8BU84diqJbxPezphVRh0pOPtSTJaEA/osYby/0YtovlQw+jIJc3MWzaGnxmk O54lWUPRlnE99ncwbP5RqUzqHYA4o/lrOprY4lV7vQQkNN8D1qpWCzr0tVfHtUHqTjCP 6cqQnqmqzE89mdq1pdId/85TzXBwP/iILtR4J+wQiOg0rZ0h1peWiJKmvHn3GhtW01EX b8f9hNqP429A/E112j5V6EtsGgp1yqlD8TaBtjLzrKtMxIiHHW3JHhfzlTNMEq37y6oc stQQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="xvpDD/Vq"; 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 d11-20020adfe88b000000b0032f7f3e90e2si5022518wrm.136.2023.11.20.07.13.11 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 20 Nov 2023 07:13:11 -0800 (PST) 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="xvpDD/Vq"; 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] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r55tl-0006T4-E4; Mon, 20 Nov 2023 10:09:17 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r55tQ-0005sf-W3 for qemu-devel@nongnu.org; Mon, 20 Nov 2023 10:08:59 -0500 Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r55tC-0001EZ-RB for qemu-devel@nongnu.org; Mon, 20 Nov 2023 10:08:52 -0500 Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-4083ac51d8aso16963245e9.2 for ; Mon, 20 Nov 2023 07:08:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1700492921; x=1701097721; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=/Am29rNstmoBjPWHdKzUHbk8KZyMNjdmqHD061pd8s4=; b=xvpDD/VqOy5u8dMnxMvewAW6XKwA+xGG16bTSKvRO/u9Inu1Wy1HZphlrm/XPAhHRO IXwtUQclud/8Uas5SIx084VffpX8bCiFlGdLnWsJEFtbgQeGhxAhtPjiQAVSDiAejTEf 6gnhgjXOwDsiOYB0oKlltEurluvovnv0DnGb3yTaLpjJM0CPv+9HIwavoXuN3Ab63t/4 BVT1yqcglWEI9mlxo6yqnrq66hNnsO3t1ITvxI/3uJ7I9KWy63oLy1YYHAwnfiN13wHz LChe92hArzydqrA1w2YYe2aieOI74/Rih9jNPOAUmONZVOhcLrPK0ohUfYv+E5wjPg7e VwFQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700492921; x=1701097721; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=/Am29rNstmoBjPWHdKzUHbk8KZyMNjdmqHD061pd8s4=; b=sJnz7m5yM9hah0qmm5uif5O8DGEEQBJXXJJGgQSwmVfn35VcNVlVRBPXJKoVEKx/JG UsYxq4GYmMONnByE6aa4UoL7K+4md9Osp8W7J3V6GQsm1w5MRCoDmmUFvaf0BB0hm4kN QoQfakd0NZU965PLCwL0HrsxgSe6pWxQ9/mpxOtSdJsOecGMVGqo9UnjhBnV4UFiz1Ru keGMgtriRmlTxka/xqGxsWhwGi+vT2TQ+vBqBkuqrsJyNBQMu9Q3ldFqyp74aU/7zo+2 ym+aIBgwkApGJFMu1eIPkJGpmsRtSxYoMdnyoqEbmzw0xLppxrZ+fPIo1xn+y0eICY6m PcKQ== X-Gm-Message-State: AOJu0YwEz0ADR8azdqaaSbCuDy5IMjTie9YJ8qcdEi4tAHDsH3G6fyKD HFxXcnhwC7XECH/TBzwdo1R9Kw== X-Received: by 2002:a7b:c342:0:b0:40a:4a7d:606b with SMTP id l2-20020a7bc342000000b0040a4a7d606bmr6547024wmj.40.1700492920613; Mon, 20 Nov 2023 07:08:40 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id y4-20020a5d4ac4000000b003316c8ad545sm10450206wrs.76.2023.11.20.07.08.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Nov 2023 07:08:38 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id A0DC365775; Mon, 20 Nov 2023 15:08:34 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Wainer dos Santos Moschetta , =?utf-8?q?C=C3=A9dric?= =?utf-8?q?_Le_Goater?= , Mahmoud Mandour , Peter Maydell , David Hildenbrand , =?utf-8?q?Alex_Benn=C3=A9e?= , qemu-s390x@nongnu.org, Beraldo Leal , qemu-arm@nongnu.org, devel@lists.libvirt.org, qemu-ppc@nongnu.org, Daniel Henrique Barboza , Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Alexandre Iooss , Marek Vasut , Thomas Huth , Chris Wulff , Ilya Leoshkevich , Richard Henderson , Nicholas Piggin Subject: [PATCH v2 07/14] docs/emulation: expand warning about semihosting Date: Mon, 20 Nov 2023 15:08:26 +0000 Message-Id: <20231120150833.2552739-8-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231120150833.2552739-1-alex.bennee@linaro.org> References: <20231120150833.2552739-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32a; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x32a.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-bounces+patch=linaro.org@nongnu.org A surprising feature of calls like SYS_READC is this can cause QEMU to indefinitely block as there is no handling for EOF. Clarifies: https://gitlab.com/qemu-project/qemu/-/issues/1963 Signed-off-by: Alex Bennée Reviewed-by: Richard Henderson --- docs/about/emulation.rst | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/about/emulation.rst b/docs/about/emulation.rst index 0ad0b86f0d..a2eefe3f3f 100644 --- a/docs/about/emulation.rst +++ b/docs/about/emulation.rst @@ -129,8 +129,9 @@ causing most hypervisors to trap and fault on them. .. warning:: Semihosting inherently bypasses any isolation there may be between the guest and the host. As a result a program using semihosting can - happily trash your host system. You should only ever run trusted - code with semihosting enabled. + happily trash your host system. Some semihosting calls (e.g. + ``SYS_READC``) can block execution indefinitely. You should only + ever run trusted code with semihosting enabled. Redirection ~~~~~~~~~~~ From patchwork Mon Nov 20 15:08:27 2023 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: 745369 Delivered-To: patch@linaro.org Received: by 2002:a5d:5052:0:b0:32d:baff:b0ca with SMTP id h18csp1345830wrt; Mon, 20 Nov 2023 07:11:57 -0800 (PST) X-Google-Smtp-Source: AGHT+IEX1AD3tqRRYcqLcUwabh8T7LFZ9W7nkDNq4UvFihMFJ7cGWprNkuSRgbPFjXFTWh8DMCj0 X-Received: by 2002:a2e:2243:0:b0:2c8:35a2:ab4c with SMTP id i64-20020a2e2243000000b002c835a2ab4cmr5076838lji.24.1700493117639; Mon, 20 Nov 2023 07:11:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700493117; cv=none; d=google.com; s=arc-20160816; b=H4bnyf4VVIfeyhU2wwyUS2mWwT8+VYnIoE5zZbZelJBhpbN9saYfcI0oyPz4A52gGp kpgs4MZfqX9bYm5zWHvfqd+OawMcr9k3IgL8qLmEEVSPnoBZ5+rHjKxgs/HvY/A4trH9 4xHQlaYvBqEJW5Oj3gjiv2/rNX2gJmE8EEHWrPwdAd9Irp/9snR8rCwvgBsS7RbFNIMG ve1EK+s8bBhVYJtHs7EvIsAJPQWnJ1JwTl4LuK0w/zsG0HZrtetkh1J+2yJXhUBmDBNv ljoMXa76hAhrYDW4vnGG0/wwzTFGrsTwjymh6LFwqb5gQWxs6HB4tjTCVOyCSQC/Pd+a iOCg== 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=nFCIY8a2prU+vxKx/Khs2e4u+A5y+AyU+weaY1KLmL0=; fh=L8gboe2BpnMHPozXPXZ1zwcw4kd4+Ep8z61Ccww9Lhk=; b=QrqVITkhh0ZsBc54vsQDJ3SYiZt8j7tMcMidGEV0O7FWPaiDarDCKjNoztXEiYKVgZ woLokdcdXKdH6jqgzZSe864CR12Z4pyZ3xqDi6rlY/Bu6Q1Gks4YlrfJBnGr/rkKsnP0 zLe+F8StNJxcZCSezqJ77ZjndTg9DlKbWPQmu1SVtRafiVMKHccxvEIeZhtExon7LfGK 7nMZyz9eX+UsJHMA6eKeF5ZWQWyrtnK0HmkInmZEj5HpYLq/UIdVyLBRbsRc25+yryMW CEWmxLT8zr0GFsYZI4/F794rSs9rEKxCncXUloBdzj3WkqklYSp95yOopruLslpHsarT IQKA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=oIuUzylE; 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 f15-20020a05600c4e8f00b004077ebd5ab1si4967790wmq.28.2023.11.20.07.11.57 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 20 Nov 2023 07:11:57 -0800 (PST) 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=oIuUzylE; 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] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r55tf-0006L0-G7; Mon, 20 Nov 2023 10:09:11 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r55tL-0005qL-8l for qemu-devel@nongnu.org; Mon, 20 Nov 2023 10:08:56 -0500 Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r55tA-0001Cv-7s for qemu-devel@nongnu.org; Mon, 20 Nov 2023 10:08:49 -0500 Received: by mail-wm1-x32b.google.com with SMTP id 5b1f17b1804b1-4084095722aso19156265e9.1 for ; Mon, 20 Nov 2023 07:08:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1700492918; x=1701097718; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=nFCIY8a2prU+vxKx/Khs2e4u+A5y+AyU+weaY1KLmL0=; b=oIuUzylEAc/Mtmflle9r+o+O2IPhKKxloPSQZxmSJjqmklXenc1irTJq6Je5HIeyUg piRJU9/hSdfJdrPRmVeXDFKHE8j1PhEkq6KEtD7wIfqfygRgXtVh0yX45P7JSJ7FOoVm 0jAOCefOpSuwghwuXHaH4EuAq+ALjOpAZhdrU3boXOYb9eBr1HG4YG0FH3tN05wdQQBW nY+A5tRiXh5dO7/K+kBc7LMkaZYVRpdvzV1047tcVNLI7V5ZRqUitxMpLwMPDKVjxKWI dqHDZOR7v+LWYY4JVsX8QTbhC6VWCjmSfvafus1Uo0tg4iW4EQF+465OKxUPzV//TBvF qUYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700492918; x=1701097718; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=nFCIY8a2prU+vxKx/Khs2e4u+A5y+AyU+weaY1KLmL0=; b=sXrz1AFYdpbXDxLFoTrW6M4jL3KjX+zR08+ZJpU6mjD8Rs5ppxdavRVSpsSzvhM8S8 eospmXZSgoviQbC4zioMdOnpsPUv5VGtaJF1/IiueASecce0tx/2UIcFT03kOpkLA50y inXVE/WKj1z4VOCqxOSFPIcsvZJPvDKj25Jjntd7mDyhOowDhhch6Qa4tu0uXHDsBcAw DPaWcAv1XZpUVsyDfNG0Hg7hEKXsiJ7T3j7OmR7mR9fgZ2wt3ODnx8LLjPXiaxonNQEF jE0iqOuLvxC1IDB/6rHf12lgUdjc+L5WT94WaEFOHJPz7IoBb1ja7zhQT0tI1CIeV35U w1GQ== X-Gm-Message-State: AOJu0YzplxzXef21zXisQtm0aiIAmGOI1vGoili+Ur1j6+I6JNCU6BGA KzOTBsHYd2723ea+59i5wEo2FA== X-Received: by 2002:a05:600c:3106:b0:404:4b6f:d70d with SMTP id g6-20020a05600c310600b004044b6fd70dmr6806538wmo.17.1700492918405; Mon, 20 Nov 2023 07:08:38 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id l6-20020a05600c4f0600b004068495910csm18174146wmq.23.2023.11.20.07.08.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Nov 2023 07:08:38 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id B663565776; Mon, 20 Nov 2023 15:08:34 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Wainer dos Santos Moschetta , =?utf-8?q?C=C3=A9dric?= =?utf-8?q?_Le_Goater?= , Mahmoud Mandour , Peter Maydell , David Hildenbrand , =?utf-8?q?Alex_Benn=C3=A9e?= , qemu-s390x@nongnu.org, Beraldo Leal , qemu-arm@nongnu.org, devel@lists.libvirt.org, qemu-ppc@nongnu.org, Daniel Henrique Barboza , Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Alexandre Iooss , Marek Vasut , Thomas Huth , Chris Wulff , Ilya Leoshkevich , Richard Henderson , Nicholas Piggin Subject: [PATCH v2 08/14] docs/system: clarify limits of using gdbstub in system emulation Date: Mon, 20 Nov 2023 15:08:27 +0000 Message-Id: <20231120150833.2552739-9-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231120150833.2552739-1-alex.bennee@linaro.org> References: <20231120150833.2552739-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32b; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x32b.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-bounces+patch=linaro.org@nongnu.org It seems some users will try and use the gdbstub to debug userspace inside a system emulation. While possible clarify the limitations of this approach and direct the users to a less head scratching way of debugging user-space. Signed-off-by: Alex Bennée Clarifies: https://gitlab.com/qemu-project/qemu/-/issues/1274 Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé --- docs/system/gdb.rst | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/docs/system/gdb.rst b/docs/system/gdb.rst index 9906991b84..c0cc0c9c7e 100644 --- a/docs/system/gdb.rst +++ b/docs/system/gdb.rst @@ -60,7 +60,7 @@ As TCG cannot track all memory accesses in user-mode there is no support for watchpoints. Relocating code ---------------- +=============== On modern kernels confusion can be caused by code being relocated by features such as address space layout randomisation. To avoid @@ -68,6 +68,17 @@ confusion when debugging such things you either need to update gdb's view of where things are in memory or perhaps more trivially disable ASLR when booting the system. +Debugging user-space in system emulation +======================================== + +While technically possible to debug a user-space program running +inside a system image it does present challenges. Kernel preemption +and execution mode changes between kernel and user mode can make it +hard to follow whats going on. Unless you are specifically trying to +debug some interaction between kernel and user-space you are better +off running your guest program with gdb either in the guest or using +a gdbserver exposed via a port to the outside world. + Debugging multicore machines ============================ From patchwork Mon Nov 20 15:08:28 2023 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: 745368 Delivered-To: patch@linaro.org Received: by 2002:a5d:5052:0:b0:32d:baff:b0ca with SMTP id h18csp1345194wrt; Mon, 20 Nov 2023 07:11:20 -0800 (PST) X-Google-Smtp-Source: AGHT+IH+AU1Gd8jl/nzLIBddBigEg1L/8RC1wsyYVbZfHvwvT3dUCxMHS17hWRo4PzsqOKnW1Uqd X-Received: by 2002:a5d:6052:0:b0:32d:aa11:221d with SMTP id j18-20020a5d6052000000b0032daa11221dmr5142567wrt.27.1700493080546; Mon, 20 Nov 2023 07:11:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700493080; cv=none; d=google.com; s=arc-20160816; b=Gq7Wek9OW6YV6yfEe5+vu6tEBdMkZXLwRj/NUWM4m5nrdgrbpsEx3Xpr+0dowY/QQN 8o6OW/UFpqU/ArFX0S66cPNhEbm5CgeJKBN3vB1Wqli0PBOggz7Kq4XBO6no0jN3QIB+ mTh1aXKlVc8t9Uf4nucEOZEURbPt/+hG0MiF4Cdz3owHUl+zuO9yKCetQ9ViFcOMMVNa I0wv/SS8UwTGHexZy0zfoKAa/FeZAamxc0hoSA8PFPguXDxHvAKXIYPP35gz0Kuo0DrM LjLfAsMXrKqQgvu2pL6wf7PDR82ZImIGJejnSf7tcqeK5W9JAa5pG2n71BkI0Ub+Ietj Q7Nw== 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=MdYIuvPCwbs1/SkyidzDPaAAsnYLQJ1SQQvqDWTDjY4=; fh=L8gboe2BpnMHPozXPXZ1zwcw4kd4+Ep8z61Ccww9Lhk=; b=LYJaEGvRfYA8GoFaIvkg8AhjPt9i3wH9Rjonz00WX1JqNLPwN8aNO6xa82zN9/l9UM HBrgbx4Pwnb620Ft1Ca9tGmQwDQZvJ+yGqvwpm6N1+AQXD6sU4VzQSbl2nxRw/PCW150 wsXWOK7HTxxDMRqKBl02u+I9Li1Qj0IdRxu8iyApkmFHkzdd/A6lMtSLxvYCGhpCEH5L h0SMWlEY6FUOzPVyQIfGVMGLFY8rubE5KncE1tb5zepdXmfHcxdfmrH1U43VV5FKyJer 9Kk2i/UEiWtJZ6WBWbzfFdtdTORR8EHgksl0zWtGskMD55tXk9qtSLtUGCUvQfsa5Utq VEng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=m6JTyB23; 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 g11-20020adfa48b000000b0032daa5adfdfsi5006467wrb.138.2023.11.20.07.11.20 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 20 Nov 2023 07:11:20 -0800 (PST) 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=m6JTyB23; 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] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r55tf-0006LZ-LN; Mon, 20 Nov 2023 10:09:11 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r55tR-0005tj-Ho for qemu-devel@nongnu.org; Mon, 20 Nov 2023 10:09:00 -0500 Received: from mail-lf1-x136.google.com ([2a00:1450:4864:20::136]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r55tG-0001Hr-8n for qemu-devel@nongnu.org; Mon, 20 Nov 2023 10:08:54 -0500 Received: by mail-lf1-x136.google.com with SMTP id 2adb3069b0e04-50943ccbbaeso6230384e87.2 for ; Mon, 20 Nov 2023 07:08:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1700492922; x=1701097722; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=MdYIuvPCwbs1/SkyidzDPaAAsnYLQJ1SQQvqDWTDjY4=; b=m6JTyB23Uz+26G2fTIGU0iRylMm+0RbjDkZiSu4MHuUs4PEPVq6/AF1fo/17ljRStr /+feY3oSx9RMbbT1U7eYjWKZp15GSilihxT+tSdlTo4UmiCQRdnGYpPR7fZGSW38z17n ldEoR3IAZ+rsTjFUkSikOJKGDvNyaAA2ZkeY9otPRMjbWk/xBtxbDKCmZ0LdXLk67UlL 5sf+5wVJfrqkkL+15p/2CLA9pfgBYtoLmmva/mkkjigI+EgyAYTkIFpZPSfTsS2Cw4Hh dImMv+qDYL+lSKVBlMN5EITeqnVzHp7tCVqZdqGcT70LF9fqw/W1BM/j2flIbMmD7YSo aUyQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700492922; x=1701097722; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=MdYIuvPCwbs1/SkyidzDPaAAsnYLQJ1SQQvqDWTDjY4=; b=M2XZTvNk2pfO0AllhUfNEG47fGfb0Z2qyE9FXPDQGq/L2UvYu3rHLnTkH+YH4isQlt 9G4uDpKKN3I/Rm/5HCRe7tCJi3dEu10NMikAT4puYxboUdBXcMJ/EpYE03434wd+Nuvu cRWfcb7Bzu8DANjqY/WgPozaTtrmZc/K7wLnq2tDXUYMGcdehQ6PszB3/b5ztQIKQwGy 1VRoQTNfWKBoOXHHFJEtmmzTSG0UxuVrx2MRU1xtAisZM0s4b+4trnS3Pdc03Mt+UdG0 mj8JO8mLHAAT8AxgRZVdonWtcBkpt03DstU6ycRoxVlfhW7tlGuL2MDX7UntCwK5Mh1a jB0g== X-Gm-Message-State: AOJu0YzTnXwUeBijo6Bi3AA/ePOsn72uuzRg4KKwE/U82x4KYRO9HzSt sZqmjPpy+l6/bMjruan7yEkqig== X-Received: by 2002:ac2:4469:0:b0:509:e5a4:2b03 with SMTP id y9-20020ac24469000000b00509e5a42b03mr5760174lfl.13.1700492922721; Mon, 20 Nov 2023 07:08:42 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id e29-20020adfa45d000000b0033169451a84sm11501414wra.29.2023.11.20.07.08.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Nov 2023 07:08:38 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id CD30865777; Mon, 20 Nov 2023 15:08:34 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Wainer dos Santos Moschetta , =?utf-8?q?C=C3=A9dric?= =?utf-8?q?_Le_Goater?= , Mahmoud Mandour , Peter Maydell , David Hildenbrand , =?utf-8?q?Alex_Benn=C3=A9e?= , qemu-s390x@nongnu.org, Beraldo Leal , qemu-arm@nongnu.org, devel@lists.libvirt.org, qemu-ppc@nongnu.org, Daniel Henrique Barboza , Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Alexandre Iooss , Marek Vasut , Thomas Huth , Chris Wulff , Ilya Leoshkevich , Richard Henderson , Nicholas Piggin Subject: [PATCH v2 09/14] hw/core: skip loading debug on all failures Date: Mon, 20 Nov 2023 15:08:28 +0000 Message-Id: <20231120150833.2552739-10-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231120150833.2552739-1-alex.bennee@linaro.org> References: <20231120150833.2552739-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::136; envelope-from=alex.bennee@linaro.org; helo=mail-lf1-x136.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-bounces+patch=linaro.org@nongnu.org ELF_LOAD_FAILED is one of many negative return codes we can have. Lets treat any positive size_t as a success for loading. Message-Id: <20231115205542.3092038-8-alex.bennee@linaro.org> Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Alex Bennée --- hw/core/loader.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/core/loader.c b/hw/core/loader.c index 3c79283777..e7a9b3775b 100644 --- a/hw/core/loader.c +++ b/hw/core/loader.c @@ -505,7 +505,7 @@ ssize_t load_elf_ram_sym(const char *filename, clear_lsb, data_swab, as, load_rom, sym_cb); } - if (ret != ELF_LOAD_FAILED) { + if (ret > 0) { debuginfo_report_elf(filename, fd, 0); } From patchwork Mon Nov 20 15:08:29 2023 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: 745370 Delivered-To: patch@linaro.org Received: by 2002:a5d:5052:0:b0:32d:baff:b0ca with SMTP id h18csp1345954wrt; Mon, 20 Nov 2023 07:12:05 -0800 (PST) X-Google-Smtp-Source: AGHT+IEbbPrYiqit7T1tFkd8bKPuYStzPWoiNmqXoDvWboZzECaogyKO3BDJUKap4Wl0NP21GpvC X-Received: by 2002:a05:6000:381:b0:332:c593:16e with SMTP id u1-20020a056000038100b00332c593016emr3773673wrf.18.1700493125155; Mon, 20 Nov 2023 07:12:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700493125; cv=none; d=google.com; s=arc-20160816; b=yFudRarj4DdtCet2rvFkFUmbnATfexYQ3J5vExVu1Kc6t8BZ9KMjYKl77wLZcAHM2M gIMcHHHc+H9KXJNAnzxu6hmBzkDZ8wXk/fAgK0jUv5Q/y2lrJeLm3FLW5xnZuxheu77p 6+0vVEOOHdBEhcqnrwhR7womJpBWZzd7d+k82CDSTTQH6SLHFkJhi9RhmdEsH30+EJ69 CCX0PCUJXmYqxhQ3TY6pEtyp6SIBYPt1wVn2KzgQQl/OYJ67gMSTvb/VvZX80MYs7ZOU czh100SEeXPVGnGU4iVEBfFQnrCsQYrV6jr8hsUCGpqR8ugxp7Do5gynY0gPC0trn2Qg S7aw== 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=O3M5so5KQtqF5mm95cyn9rkcyTI0JWjubshaMltcnQo=; fh=L8gboe2BpnMHPozXPXZ1zwcw4kd4+Ep8z61Ccww9Lhk=; b=OCdu4WRgHqlwdesNKWr7lsLlYgm56REUpt24OyRDv7gv9E7QSwXZf3qikGkKTEYZPV hN5JVLBnrzVyIKbhf4dwQHwxpwh3a5FGbzvFtggP42Gx+1FrKcshKxEu6RoNCVZxmM1L YmhDlppaa79Xh7+PCcdX+2wO5hy7fqJbXbAcEWif8ROgTBVuor64iZWmUt0HUWtjY+ye RnaDITonz70TXSS3u1/d5PoNnIrZ5yTx+KPnI6nDrLNk8kf9JrF4VRSVPEdxH3KkdWQ7 TW6jUgGx2Rf3Nvpjc2BOlCDXNJgPwD/x/0ITomB0CdCdSnzbXJeXU4SdYb0vrvPtZNfy mOZw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=EaXNvAAR; 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 n13-20020a5d598d000000b00332c68f8a8dsi818673wri.888.2023.11.20.07.12.05 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 20 Nov 2023 07:12:05 -0800 (PST) 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=EaXNvAAR; 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] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r55tu-0006ZJ-7N; Mon, 20 Nov 2023 10:09:26 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r55tU-0005uu-81 for qemu-devel@nongnu.org; Mon, 20 Nov 2023 10:09:01 -0500 Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r55tG-0001H0-FK for qemu-devel@nongnu.org; Mon, 20 Nov 2023 10:08:58 -0500 Received: by mail-wm1-x329.google.com with SMTP id 5b1f17b1804b1-40839807e82so11558025e9.0 for ; Mon, 20 Nov 2023 07:08:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1700492922; x=1701097722; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=O3M5so5KQtqF5mm95cyn9rkcyTI0JWjubshaMltcnQo=; b=EaXNvAARSoxDYNDl/4Wl5cL1fUfxP9m0OHmNRObetLADqmYTz7LBVHdRgTuB4SFF4k Y+oJEYFOEin3z6rsQeQ5y+5D9jM7iN0TdAajettLd06KxIlraShzi3ewLJCIet2y8Hl4 r+vgVFVM9ADbcK9IHao4laJKlVqIlI7Elrwzp4hsL1Lja9vyDU2ilR+L8cJtZoug3TUP Rg/ndm2I0WVcnyGBh48dcoorN8ZxlMq04tCZ5MUgppe8pg3yUP50Iwlgt2knitySd7eC XCYaRCPnrGFtkzQhkFJKlUuxYKen1f42s2bh7n2CghK3pGTUoT1x9mnm2Sbm2CsbJ2QI WrXA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700492922; x=1701097722; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=O3M5so5KQtqF5mm95cyn9rkcyTI0JWjubshaMltcnQo=; b=ADmvbEDs+SIv3SLFF74LwLVaUESFyjzD0SBjzGrrfR/Arswuv0v4N2bIWmlKvW1aYr Faf2eeCNPZ+AjXfP4f5iTapNqK4vHqzAHXhkwCbE6zPSQb4zuY5oMCtKQe6dpRNtCJ3d 8BXxcCIosk8RUCChnUlsvULJL8rmstQnDT4I1SAIs3rn0ld0J75YnK3k/blHyn90P3wI pV5fugfQ/xZ5AmrBCAOobUVIp0guaUvmyfH2881P6F1VUSfP6sSjvDEOJmH0cZmn+b2v A1O/Pg0ecpBtwrNzi03QfCJv0/usD8B9oxoKYJdEjPNt2nJ4I3rA95hXgl3k2Ohls1e1 7d0w== X-Gm-Message-State: AOJu0YxCX1tX8gBFwnkFHLWkMBbV3UxCsBTfdSBuw1IHzA4Yv6Rym+xN /38LhPyY6AffUTN48QJxrdW1Og== X-Received: by 2002:a05:600c:4f87:b0:407:4701:f9e with SMTP id n7-20020a05600c4f8700b0040747010f9emr6883890wmq.17.1700492922440; Mon, 20 Nov 2023 07:08:42 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id n23-20020a7bcbd7000000b004064ac107cfsm13599341wmi.39.2023.11.20.07.08.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Nov 2023 07:08:38 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id E0A3765778; Mon, 20 Nov 2023 15:08:34 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Wainer dos Santos Moschetta , =?utf-8?q?C=C3=A9dric?= =?utf-8?q?_Le_Goater?= , Mahmoud Mandour , Peter Maydell , David Hildenbrand , =?utf-8?q?Alex_Benn=C3=A9e?= , qemu-s390x@nongnu.org, Beraldo Leal , qemu-arm@nongnu.org, devel@lists.libvirt.org, qemu-ppc@nongnu.org, Daniel Henrique Barboza , Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Alexandre Iooss , Marek Vasut , Thomas Huth , Chris Wulff , Ilya Leoshkevich , Richard Henderson , Nicholas Piggin Subject: [PATCH v2 10/14] testing: move arm system tests into their own folder Date: Mon, 20 Nov 2023 15:08:29 +0000 Message-Id: <20231120150833.2552739-11-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231120150833.2552739-1-alex.bennee@linaro.org> References: <20231120150833.2552739-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::329; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x329.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-bounces+patch=linaro.org@nongnu.org Prepare for expanding the arm system tests by cleaning up the test directory. Message-Id: <20231115205542.3092038-9-alex.bennee@linaro.org> Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Alex Bennée --- tests/tcg/arm/Makefile.softmmu-target | 5 ++--- tests/tcg/arm/{ => system}/test-armv6m-undef.S | 0 tests/tcg/arm/{ => system}/test-armv6m-undef.ld | 0 3 files changed, 2 insertions(+), 3 deletions(-) rename tests/tcg/arm/{ => system}/test-armv6m-undef.S (100%) rename tests/tcg/arm/{ => system}/test-armv6m-undef.ld (100%) diff --git a/tests/tcg/arm/Makefile.softmmu-target b/tests/tcg/arm/Makefile.softmmu-target index 8b546e2aa3..7857ab9324 100644 --- a/tests/tcg/arm/Makefile.softmmu-target +++ b/tests/tcg/arm/Makefile.softmmu-target @@ -3,7 +3,7 @@ # ARM SoftMMU tests - included from tests/tcg/Makefile # -ARM_SRC=$(SRC_PATH)/tests/tcg/arm +ARM_SRC=$(SRC_PATH)/tests/tcg/arm/system # Set search path for all sources VPATH += $(ARM_SRC) @@ -12,7 +12,6 @@ ARM_TESTS=test-armv6m-undef TESTS += $(ARM_TESTS) -CFLAGS+=-Wl,--build-id=none -x assembler-with-cpp LDFLAGS+=-nostdlib -N -static %: %.S %.ld @@ -20,7 +19,7 @@ LDFLAGS+=-nostdlib -N -static # Specific Test Rules -test-armv6m-undef: EXTRA_CFLAGS+=-mcpu=cortex-m0 -mfloat-abi=soft +test-armv6m-undef: EXTRA_CFLAGS+=-mcpu=cortex-m0 -mfloat-abi=soft -Wl,--build-id=none -x assembler-with-cpp run-test-armv6m-undef: QEMU_OPTS+=-semihosting -M microbit -kernel diff --git a/tests/tcg/arm/test-armv6m-undef.S b/tests/tcg/arm/system/test-armv6m-undef.S similarity index 100% rename from tests/tcg/arm/test-armv6m-undef.S rename to tests/tcg/arm/system/test-armv6m-undef.S diff --git a/tests/tcg/arm/test-armv6m-undef.ld b/tests/tcg/arm/system/test-armv6m-undef.ld similarity index 100% rename from tests/tcg/arm/test-armv6m-undef.ld rename to tests/tcg/arm/system/test-armv6m-undef.ld From patchwork Mon Nov 20 15:08:30 2023 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: 745374 Delivered-To: patch@linaro.org Received: by 2002:a5d:5052:0:b0:32d:baff:b0ca with SMTP id h18csp1347210wrt; Mon, 20 Nov 2023 07:13:39 -0800 (PST) X-Google-Smtp-Source: AGHT+IHKbpfoXiHTSY8RVR4LM3QbsfawuA2JinvLVNESIgW26u1dIqrI16UgFD2FPjCrSeVOxzO+ X-Received: by 2002:ac2:5337:0:b0:504:3c1f:cbd1 with SMTP id f23-20020ac25337000000b005043c1fcbd1mr5666048lfh.12.1700493219350; Mon, 20 Nov 2023 07:13:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700493219; cv=none; d=google.com; s=arc-20160816; b=dQGFLqpt0p7eYu9udFGOOKTvs8BvBwlHsrtkAm95HEz56JFEp/Hvq/wZvg5qpQdtTM /Vg46KgQJ/x9OHkgRHaQW+VsaniaiLpAQrNagOPI/awJQ7Qq8NZdKO9eUR8InY6xPgXN 7QAozmmZRLsxoNvv1CuKoF1uQ1W32uwLR5+rELKpVvwkGcYiQMrP6YNFV2Toz8mMNDiS BdTdVDyajMaNH8KjDezm98++boT7JLAOAmAK1AT0hQUJ1aq03JIY2+rOiv1TwecqGeMQ LUJWNcWrmE+8b0Ze+iuRU46vOkgo0M3bBOrQHiRiby6/LFAM3JxlMWGxZxHr7A/rqTxi IhqA== 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=I9723xBaPChd48Q2Z6VrVXqqZ/PYaPzTSFScKX3Q69c=; fh=L8gboe2BpnMHPozXPXZ1zwcw4kd4+Ep8z61Ccww9Lhk=; b=t0A6P5gRvt7cWuLn+HUlsej4ClMzqysDOVLuHH70/zBJmCrpoXaHCrvJjucM/r/HvD AKQj8E2dryszjeHNUSpACvnLROt6JMjYfhBrwTWsvNNDaUCrariTVlTHM36dMstMkk9M XiXlgO1XdTzPPunngZ7aByEiqzVgn8TExQaYJpyTe/U+lsJfpDzpCYuy1Ey3kcrOXqSY JUnjzH17lLShp5HHkW5LuWJcBEkqh+a6QKGdUEpH+DoTG4sKjHta3PVeVTIYRfjYZ2f4 XNk/tCbgEvTdPNbdb2B/RxoMo5huJP47L/1toHlOZHZY669qTEEosRytvMXMFQx8BYVU XZ1w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=a3qztZ4y; 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 p16-20020a5d4590000000b0032d9b3187d9si4937764wrq.1075.2023.11.20.07.13.39 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 20 Nov 2023 07:13:39 -0800 (PST) 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=a3qztZ4y; 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] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r55th-0006O1-13; Mon, 20 Nov 2023 10:09:13 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r55tW-0005vo-74 for qemu-devel@nongnu.org; Mon, 20 Nov 2023 10:09:02 -0500 Received: from mail-wm1-x32f.google.com ([2a00:1450:4864:20::32f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r55tI-0001MK-Dt for qemu-devel@nongnu.org; Mon, 20 Nov 2023 10:09:01 -0500 Received: by mail-wm1-x32f.google.com with SMTP id 5b1f17b1804b1-4083f61312eso19090855e9.3 for ; Mon, 20 Nov 2023 07:08:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1700492926; x=1701097726; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=I9723xBaPChd48Q2Z6VrVXqqZ/PYaPzTSFScKX3Q69c=; b=a3qztZ4yxo48hbmTRTyVOlh4+0o4I6C4rKfebILfOD8RntrYJB0ejRurRqdSwVZjtb 197U/TcpJ9MbgkloSZUlRZqHo0XruyyIgLpHWUeAR1SRi3ZGM+oWj4gfZ4PgEpdtHHCT Bu45c3raxVDslHXZrPD9Z+K0cWHyaYvMrDpx2JdCSWZyoXNwgn2UXhXo13e2bmSru0or KF2oDxst4ciK5e6wA3i53whfPb9eJoMalFZOS3nCf/cbz5xRSYayLqWot7n2G3iBDRtg sz58uT8kChTods/Av7V5CEZmKNbc8VsZzzLzUxhMtmQdTtvoAUPS1idDOPtmIx/bnG9L FF2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700492926; x=1701097726; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=I9723xBaPChd48Q2Z6VrVXqqZ/PYaPzTSFScKX3Q69c=; b=Q4nA6CiSPK4iHUdh0bgC+vykVFUTVZOSuSXhawvgrY3zjzNhdUIHgV94TbCFYqYywt DvV2OhUhAHISGL34NJcjn5SAhp9ccxS03Xx87iTSmi36+ywC4usZG6OA5cTSW5C0osxL 79C/YBYWPTFPTDe2uHXLcZji84t21JXVxNDdxFBH7glsKBg3nNr4qqftV/j0ehyx9IiV P5Gxy3dPWgy/PzNJqaCx/QBF2CFKjOcmTYf1n6zOgE5TRuDLBG1V4SdBz7aNQkVfuZ5y Y+8p8Bf2OxLDVeL/+7FiECM86koguNrrRAHJRqIdrcNwZg12aD+B2x7DzyucbB4xOn30 AzaQ== X-Gm-Message-State: AOJu0YzjmDkMPElNAlSDxaoW3H2z+FbUgsHOxh/irvy9yhu1I5jHcJAO 91rUohj1vEtYCbur4iunp1RuWg== X-Received: by 2002:a05:600c:3ba2:b0:3fe:1b4e:c484 with SMTP id n34-20020a05600c3ba200b003fe1b4ec484mr6461662wms.5.1700492926286; Mon, 20 Nov 2023 07:08:46 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id b11-20020a05600010cb00b00332c0d256c5sm6570827wrx.80.2023.11.20.07.08.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Nov 2023 07:08:42 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 0279F655DF; Mon, 20 Nov 2023 15:08:35 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Wainer dos Santos Moschetta , =?utf-8?q?C=C3=A9dric?= =?utf-8?q?_Le_Goater?= , Mahmoud Mandour , Peter Maydell , David Hildenbrand , =?utf-8?q?Alex_Benn=C3=A9e?= , qemu-s390x@nongnu.org, Beraldo Leal , qemu-arm@nongnu.org, devel@lists.libvirt.org, qemu-ppc@nongnu.org, Daniel Henrique Barboza , Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Alexandre Iooss , Marek Vasut , Thomas Huth , Chris Wulff , Ilya Leoshkevich , Richard Henderson , Nicholas Piggin Subject: [PATCH v2 11/14] tests/tcg: enable arm softmmu tests Date: Mon, 20 Nov 2023 15:08:30 +0000 Message-Id: <20231120150833.2552739-12-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231120150833.2552739-1-alex.bennee@linaro.org> References: <20231120150833.2552739-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=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org To make it easier to test 32 bit Arm softmmu issues implement a basic boot.S so we can build the multiarch tests. Currently CHECK_UNALIGNED is disabled as I haven't got the right magic set for it to work. Message-Id: <20231115205542.3092038-10-alex.bennee@linaro.org> Signed-off-by: Alex Bennée Reviewed-by: Richard Henderson --- v2 - use endf macro for global function symbols in boot.S --- tests/tcg/arm/Makefile.softmmu-target | 64 +++++- tests/tcg/arm/system/boot.S | 301 ++++++++++++++++++++++++++ tests/tcg/arm/system/kernel.ld | 24 ++ 3 files changed, 379 insertions(+), 10 deletions(-) create mode 100644 tests/tcg/arm/system/boot.S create mode 100644 tests/tcg/arm/system/kernel.ld diff --git a/tests/tcg/arm/Makefile.softmmu-target b/tests/tcg/arm/Makefile.softmmu-target index 7857ab9324..aadc12767e 100644 --- a/tests/tcg/arm/Makefile.softmmu-target +++ b/tests/tcg/arm/Makefile.softmmu-target @@ -8,20 +8,64 @@ ARM_SRC=$(SRC_PATH)/tests/tcg/arm/system # Set search path for all sources VPATH += $(ARM_SRC) -ARM_TESTS=test-armv6m-undef +# Specific Test Rules -TESTS += $(ARM_TESTS) +test-armv6m-undef: test-armv6m-undef.S + $(CC) -mcpu=cortex-m0 -mfloat-abi=soft \ + -Wl,--build-id=none -x assembler-with-cpp \ + $< -o $@ -nostdlib -N -static \ + -T $(ARM_SRC)/$@.ld -LDFLAGS+=-nostdlib -N -static +run-test-armv6m-undef: QEMU_OPTS+=-semihosting -M microbit -kernel -%: %.S %.ld - $(CC) $(CFLAGS) $(ASFLAGS) $(EXTRA_CFLAGS) $< -o $@ $(LDFLAGS) -T $(ARM_SRC)/$@.ld +ARM_TESTS+=test-armv6m-undef -# Specific Test Rules +# These objects provide the basic boot code and helper functions for all tests +CRT_OBJS=boot.o -test-armv6m-undef: EXTRA_CFLAGS+=-mcpu=cortex-m0 -mfloat-abi=soft -Wl,--build-id=none -x assembler-with-cpp +ARM_TEST_SRCS=$(wildcard $(ARM_SRC)/*.c) +ARM_TESTS+=$(patsubst $(ARM_SRC)/%.c, %, $(ARM_TEST_SRCS)) -run-test-armv6m-undef: QEMU_OPTS+=-semihosting -M microbit -kernel +CRT_PATH=$(ARM_SRC) +LINK_SCRIPT=$(ARM_SRC)/kernel.ld +LDFLAGS=-Wl,-T$(LINK_SCRIPT) +CFLAGS+=-nostdlib -ggdb -O0 $(MINILIB_INC) +LDFLAGS+=-static -nostdlib -N $(CRT_OBJS) $(MINILIB_OBJS) -lgcc + +# building head blobs +.PRECIOUS: $(CRT_OBJS) + +%.o: $(ARM_SRC)/%.S + $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -x assembler-with-cpp -c $< -o $@ + +# Build and link the tests +%: %.c $(LINK_SCRIPT) $(CRT_OBJS) $(MINILIB_OBJS) + $(CC) $(CFLAGS) $(EXTRA_CFLAGS) $< -o $@ $(LDFLAGS) + +memory: CFLAGS+=-DCHECK_UNALIGNED=0 + +# Running +QEMU_BASE_MACHINE=-M virt -cpu max -display none +QEMU_OPTS+=$(QEMU_BASE_MACHINE) -semihosting-config enable=on,target=native,chardev=output -kernel + +# Simple Record/Replay Test +.PHONY: memory-record +run-memory-record: memory-record memory + $(call run-test, $<, \ + $(QEMU) -monitor none -display none \ + -chardev file$(COMMA)path=$<.out$(COMMA)id=output \ + -icount shift=5$(COMMA)rr=record$(COMMA)rrfile=record.bin \ + $(QEMU_OPTS) memory) + +.PHONY: memory-replay +run-memory-replay: memory-replay run-memory-record + $(call run-test, $<, \ + $(QEMU) -monitor none -display none \ + -chardev file$(COMMA)path=$<.out$(COMMA)id=output \ + -icount shift=5$(COMMA)rr=replay$(COMMA)rrfile=record.bin \ + $(QEMU_OPTS) memory) + +EXTRA_RUNS+=run-memory-replay -# We don't currently support the multiarch system tests -undefine MULTIARCH_TESTS +TESTS += $(ARM_TESTS) $(MULTIARCH_TESTS) +EXTRA_RUNS+=$(MULTIARCH_RUNS) diff --git a/tests/tcg/arm/system/boot.S b/tests/tcg/arm/system/boot.S new file mode 100644 index 0000000000..7915502ae4 --- /dev/null +++ b/tests/tcg/arm/system/boot.S @@ -0,0 +1,301 @@ +/* + * Minimal ArmV7 system boot code. + * + * Using semihosting for serial output and exit functions. + */ + +/* + * Semihosting interface on ARM AArch32 + * R0 - semihosting call number + * R1 - semihosting parameter + */ +#define semihosting_call svc 0x123456 +#define SYS_WRITEC 0x03 /* character to debug channel */ +#define SYS_WRITE0 0x04 /* string to debug channel */ +#define SYS_EXIT 0x18 + +#define ADP_Stopped_ApplicationExit 0x20026 +#define ADP_Stopped_InternalError 0x20024 + +/* + * Helper macro for the linker calling subroutines from the C code. + */ +.macro endf name + .global \name + .type \name, %function + .size \name, . - \name +.endm + + .section .interrupt_vector, "ax" + .align 5 + +vector_table: + b reset /* reset vector */ + b undef_instr /* undefined instruction vector */ + b software_intr /* software interrupt vector */ + b prefetch_abort /* prefetch abort vector */ + b data_abort /* data abort vector */ + nop /* reserved */ + b IRQ_handler /* IRQ vector */ + b FIQ_handler /* FIQ vector */ + + .text +__start: + ldr r0, =vector_table + mcr p15, 0, r0, c12, c0, 0 /* Set up VBAR */ + + ldr sp, =stack_end /* Set up the stack */ + bl mmu_setup /* Set up the MMU */ + bl main /* Jump to main */ + +endf __start + +_exit: + cmp r0, #0 + ite EQ // if-then-else. "EQ" is for if equal, else otherwise + ldreq r1, =ADP_Stopped_ApplicationExit // if r0 == 0 + ldrne r1, =ADP_Stopped_InternalError // else + mov r0, #SYS_EXIT + semihosting_call + +endf _exit + + /* + * Helper Functions + */ + +mmu_setup: + /* + * The MMU setup for this is very simple using two stage one + * translations. The first 1Mb section points to the text + * section and the second points to the data and rss. + * Currently the fattest test only needs ~50k for that so we + * have plenty of space. + * + * The short descriptor Section format is as follows: + * + * PA[31:20] - Section Base Address + * NS[19] - Non-secure bit + * 0[18] - Section (1 for Super Section) + * nG[17] - Not global bit + * S[16] - Shareable + * TEX[14:12] - Memory Region Attributes + * AP[15, 11:10] - Access Permission Bits + * IMPDEF[9] + * Domain[8:5] + * XN[4] - Execute never bit + * C[3] - Memory Region Attributes + * B[2] - Memory Region Attributes + * 1[1] + * PXN[0] - Privileged Execute Never + * + * r0 - point at the table + * r1 - address + * r2 - entry + * r3 - common section bits + * r4 - scratch + */ + + /* + * Memory Region Bits + * + * TEX[14:12] = 000 + * C[3] = 1 + * B[2] = 1 + * + * Outer and Inner WB, no write allocate + */ + mov r3, #0 + ldr r4, =(3 << 2) + orr r3, r4, r4 + + /* Section bit */ + orr r3, r3, #2 + + /* Page table setup (identity mapping). */ + ldr r0, =ttb + + /* First block: .text/RO/execute enabled */ + ldr r1, =.text + ldr r2, =0xFFF00000 /* 1MB block alignment */ + and r2, r1, r2 + orr r2, r2, r3 /* common bits */ + orr r2, r2, #(1 << 15) /* AP[2] = 1 */ + orr r2, r2, #(1 << 10) /* AP[0] = 1 => RO @ PL1 */ + + lsr r4, r2, #(20 - 2) + str r2, [r0, r4, lsl #0] /* write entry */ + + /* Second block: .data/RW/no execute */ + ldr r1, =.data + ldr r2, =0xFFF00000 /* 1MB block alignment */ + and r2, r1, r2 + orr r2, r2, r3 /* common bits */ + orr r2, r2, #(1 << 10) /* AP[0] = 1 => RW @ PL1 */ + orr r2, r2, #(1 << 4) /* XN[4] => no execute */ + + lsr r4, r2, #(20 - 2) + str r2, [r0, r4, lsl #0] /* write entry */ + + /* + * DACR - Domain Control + * + * Enable client mode for domain 0 (we don't use any others) + */ + ldr r0, =0x1 + mcr p15, 0, r0, c3, c0, 0 + + /* + * TTCBR - Translation Table Base Control Register + * + * EAE[31] = 0, 32-bit translation, short descriptor format + * N[2:0] = 5 ( TTBRO uses 31:14-5 => 9 bit lookup stage ) + */ + ldr r0, =0x5 + mcr p15, 0, r0, c1, c0, 2 + + /* + * TTBR0 -Translation Table Base Register 0 + * + * [31:9] = Base address of table + * + * QEMU doesn't really care about the cache sharing + * attributes so we don't need to either. + */ + ldr r0, =ttb + mcr p15, 0, r0, c2, c0, 0 + + /* + * SCTLR- System Control Register + * + * TE[30] = 0, exceptions to A32 state + * AFE[29] = 0, AP[0] is the access permissions bit + * EE[25] = 0, Little-endian + * WXN[19] = 0 = no effect, Write does not imply XN (execute never) + * I[12] = Instruction cachability control + * C[2] = Data cachability control + * M[0] = 1, enable stage 1 address translation for EL0/1 + * + * At this point virtual memory is enabled. + */ + ldr r0, =0x1005 + mcr p15, 0, r0, c1, c0, 0 + + isb + + mov pc, lr /* done, return to caller */ + +/* Output a single character to serial port */ +__sys_outc: + STMFD sp!, {r0-r1} // push r0, r1 onto stack + mov r1, sp + mov r0, #SYS_WRITEC + semihosting_call + LDMFD sp!, {r0-r1} // pop r0, r1 from stack + bx lr + +endf __sys_outc + +reset: + ldr r1, =reset_error + b exception_handler + +undef_instr: + ldr r1, =undef_intr_error + b exception_handler + +software_intr: + ldr r1, =software_intr_error + b exception_handler + +prefetch_abort: + ldr r1, =prefetch_abort_error + b exception_handler + +data_abort: + ldr r1, =data_abort_error + b exception_handler + +IRQ_handler: + ldr r1, =irq_error + b exception_handler + +FIQ_handler: + ldr r1, =fiq_error + b exception_handler + +/* + * Initiate a exit semihosting call whenever there is any exception + * r1 already holds the string. + */ +exception_handler: + mov r0, #SYS_WRITE0 + semihosting_call + mov r0, #SYS_EXIT + mov r1, #1 + semihosting_call + +endf exception_handler + +/* + * We implement a stub raise() function which errors out as tests + * shouldn't trigger maths errors. + */ + .global raise +raise: + mov r0, #SYS_WRITE0 + ldr r1, =maths_error + semihosting_call + mov r0, #SYS_EXIT + ldr r1, =ADP_Stopped_InternalError + semihosting_call + +endf raise + + .data + +.data + +reset_error: + .ascii "Reset exception occurred.\n\0" + +undef_intr_error: + .ascii "Undefined Instruction Exception Occurred.\n\0" + +software_intr_error: + .ascii "Software Interrupt Occurred.\n\0" + +prefetch_abort_error: + .ascii "Prefetch Abort Occurred.\n\0" + +data_abort_error: + .ascii "Data Abort Occurred.\n\0" + +irq_error: + .ascii "IRQ exception occurred.\n\0" + +fiq_error: + .ascii "FIQ exception occurred.\n\0" + +maths_error: + .ascii "Software maths exception.\n\0" + + + /* + * 1st Stage Translation table + * 4096 entries, indexed by [31:20] + * each entry covers 1Mb of address space + * aligned on 16kb + */ + .align 15 +ttb: + .space (4096 * 4), 0 + + .align 12 + + /* Space for stack */ + .align 5 + .section .bss +stack: + .space 65536, 0 +stack_end: diff --git a/tests/tcg/arm/system/kernel.ld b/tests/tcg/arm/system/kernel.ld new file mode 100644 index 0000000000..7b3a76dcbf --- /dev/null +++ b/tests/tcg/arm/system/kernel.ld @@ -0,0 +1,24 @@ +ENTRY(__start) + +SECTIONS +{ + /* virt machine, RAM starts at 1gb */ + . = (1 << 30); + .text : { + *(.text) + } + .rodata : { + *(.rodata) + } + /* align r/w section to next 2mb */ + . = ALIGN(1 << 21); + .data : { + *(.data) + } + .bss : { + *(.bss) + } + /DISCARD/ : { + *(.ARM.attributes) + } +} From patchwork Mon Nov 20 15:08:31 2023 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: 745363 Delivered-To: patch@linaro.org Received: by 2002:a5d:5052:0:b0:32d:baff:b0ca with SMTP id h18csp1343725wrt; Mon, 20 Nov 2023 07:09:56 -0800 (PST) X-Google-Smtp-Source: AGHT+IFf24WcK1kqgcjfdNnd3PH071elnHo+HevD4albEYpPPW5G9I+uMsws6IJWRMhNZpNY6hd2 X-Received: by 2002:a05:622a:145:b0:401:e2b1:d28d with SMTP id v5-20020a05622a014500b00401e2b1d28dmr8030161qtw.20.1700492995996; Mon, 20 Nov 2023 07:09:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700492995; cv=none; d=google.com; s=arc-20160816; b=tOWBM3sHxsaqMVjPJ5sjMSXjbeaxwtKIvHvOKY9w8vEmJX1tLeiMZwFBO/zVss3THy vcTmV37oBinkzRYAo4Yw/PXkZZxklwPXIIUrDhwekhK5F3sO0cXwsNj1xDOkZjUc0oQJ np2dLN04SRs5TvP4hqV83SF2ZE+aViX+aRmMV/lwVVFkjBb5GlXE0T1Wqhv15DfslMOd D06mrgRlBazLi/TtuLyuio09QHiCfthO61sOqmHY5aIoW0oywDfZS8l/v05LpVOwqAa1 O2lM2NGczjPqX9lEPpnQTFRai36v/VG2qQUmjlyJcuU/M8+vAjPs4G1UXwlYfbbxhldP 02CQ== 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=Gyb1IbDacWS+M0sLJpuM3eBiDXIMLrNrMXya8IYdc1k=; fh=L8gboe2BpnMHPozXPXZ1zwcw4kd4+Ep8z61Ccww9Lhk=; b=wji6aLVwY2/RTOMimFB5cCSujcQcHHBNLq+AOmOw5PDudb3Q/4jHpA1iGByDB1CU8b QQ6LNVJaTEHYhrq5vo51X7brhprUm2uhkOMma/w4GUWDvTg04kRlAkVU0QgNcdZPrirc PvdVlshkQg5OfrEEOYdPsCPI6Z+xQ+xm+XFw0J2zHBHbGZtnSsyQL2nNlF04++pWiD5x x7jPEXPOrG+PYXyHLhN5FmvI04MEiUEJWPRy0l4WyNKSpDSapZhPKZyQLQxonPpk4vyu kET/RSfAOlANTu5mejUMEnYIb9cE4CuohGLHGyzhHORjOl7dnHeYHSDUVZn38D97dIqn 5c1w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=YDrUotk2; 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 c1-20020ac87dc1000000b00419629d080fsi7594203qte.386.2023.11.20.07.09.55 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 20 Nov 2023 07:09:55 -0800 (PST) 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=YDrUotk2; 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] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r55tk-0006SD-JQ; Mon, 20 Nov 2023 10:09:16 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r55tU-0005vD-So for qemu-devel@nongnu.org; Mon, 20 Nov 2023 10:09:02 -0500 Received: from mail-lj1-x22e.google.com ([2a00:1450:4864:20::22e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r55tG-0001Im-Nc for qemu-devel@nongnu.org; Mon, 20 Nov 2023 10:09:00 -0500 Received: by mail-lj1-x22e.google.com with SMTP id 38308e7fff4ca-2c5071165d5so55854991fa.0 for ; Mon, 20 Nov 2023 07:08:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1700492924; x=1701097724; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Gyb1IbDacWS+M0sLJpuM3eBiDXIMLrNrMXya8IYdc1k=; b=YDrUotk2GqBTeKyBVfDfKYhW2+uvDVEcLj54dmHdwuBlQ7hFoRvMRG+yLoFwYvm66u 2L+zcbLfOySVXLLQf73fdXEmYAtIMNKsJOYn2uBqat62RHAWYbcfzLqBNgX2qxIbxRTT LYhe8uZDgCq/ngdkOr8iSZOWG5JRVSHqK6uNEYlO8EQDPn+tE73YMpXY6rXHiEnkwApB pucR+xZCRN2kPAi2KF56uRc+UyuFqimrMJy2lXFKLQXa4z95JnIGC9/6FUslf37irUe/ loE3iFlUadrKKareSf8sy3yfJ8CQcNjMmVyDJdLoRcUkm8JnJcVwXw9fjl4UhBUZV4Nu RtcA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700492924; x=1701097724; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Gyb1IbDacWS+M0sLJpuM3eBiDXIMLrNrMXya8IYdc1k=; b=IB57HMTfqAIMXOf56DAv4Z2GRR9y6lmbxNO5Nkuvgs2FxLWsYUZJsQwNd8SgCKMXIu gfYKgSjyCb6O+riSPA+de3t9JmeodS3qB8etAUeiFuWLhwSqzfn26yHUObtnHSgzVk2D njOONIly7HEeZbmuOvVh3ehqqyF95W9ge+Wh/YREGIaz7t1SUo8J+GoSCeAiTSOptfPf 7zBkLNPWdYL2CAJryflgz2CsbFsm/pVMfihIuYOC8WhegJZcf9/ahZRfzZidqJYKYIo/ n9WsZfCUo2BcKe08aISmHcx6x1p61tXAqonTZhkYrl21x8C8JnB+qUZ8nAKAnFW4TnUI ItRg== X-Gm-Message-State: AOJu0Yzxmu/KvprNYCcQXcgRAe5Z7xSBWZkHQN6kemu2hrFHdrzP+J3y 7q1J6/yCStnIRxw3SngrJrH7Hg== X-Received: by 2002:a2e:8ec2:0:b0:2c5:3139:2d04 with SMTP id e2-20020a2e8ec2000000b002c531392d04mr5312124ljl.47.1700492924291; Mon, 20 Nov 2023 07:08:44 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id fb11-20020a05600c520b00b004076f522058sm18057174wmb.0.2023.11.20.07.08.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Nov 2023 07:08:42 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 185C965779; Mon, 20 Nov 2023 15:08:35 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Wainer dos Santos Moschetta , =?utf-8?q?C=C3=A9dric?= =?utf-8?q?_Le_Goater?= , Mahmoud Mandour , Peter Maydell , David Hildenbrand , =?utf-8?q?Alex_Benn=C3=A9e?= , qemu-s390x@nongnu.org, Beraldo Leal , qemu-arm@nongnu.org, devel@lists.libvirt.org, qemu-ppc@nongnu.org, Daniel Henrique Barboza , Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Alexandre Iooss , Marek Vasut , Thomas Huth , Chris Wulff , Ilya Leoshkevich , Richard Henderson , Nicholas Piggin Subject: [PATCH v2 12/14] tests/tcg: enable semiconsole test for Arm Date: Mon, 20 Nov 2023 15:08:31 +0000 Message-Id: <20231120150833.2552739-13-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231120150833.2552739-1-alex.bennee@linaro.org> References: <20231120150833.2552739-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::22e; envelope-from=alex.bennee@linaro.org; helo=mail-lj1-x22e.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-bounces+patch=linaro.org@nongnu.org This still remains a MANUAL test due to blocking issues. Signed-off-by: Alex Bennée --- tests/tcg/arm/system/semiconsole.c | 42 +++++++++++++++++++++++++++ tests/tcg/arm/Makefile.softmmu-target | 9 ++++++ 2 files changed, 51 insertions(+) create mode 100644 tests/tcg/arm/system/semiconsole.c diff --git a/tests/tcg/arm/system/semiconsole.c b/tests/tcg/arm/system/semiconsole.c new file mode 100644 index 0000000000..206dd60eed --- /dev/null +++ b/tests/tcg/arm/system/semiconsole.c @@ -0,0 +1,42 @@ +/* + * Semihosting Console Test + * + * Copyright (c) 2019 Linaro Ltd + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + +#include +#include + +#define SYS_READC 0x7 + +uintptr_t __semi_call(uintptr_t type, uintptr_t arg0) +{ + register uintptr_t t asm("r0") = type; + register uintptr_t a0 asm("r1") = arg0; +#ifdef __thumb__ +# define SVC "svc 0xab" +#else +# define SVC "svc 0x123456" +#endif + asm(SVC : "=r" (t) + : "r" (t), "r" (a0)); + + return t; +} + +int main(void) +{ + char c; + + ml_printf("Semihosting Console Test\n"); + ml_printf("hit X to exit:"); + + do { + c = __semi_call(SYS_READC, 0); + __sys_outc(c); + } while (c != 'X'); + + return 0; +} diff --git a/tests/tcg/arm/Makefile.softmmu-target b/tests/tcg/arm/Makefile.softmmu-target index aadc12767e..4c9264057f 100644 --- a/tests/tcg/arm/Makefile.softmmu-target +++ b/tests/tcg/arm/Makefile.softmmu-target @@ -48,6 +48,15 @@ memory: CFLAGS+=-DCHECK_UNALIGNED=0 QEMU_BASE_MACHINE=-M virt -cpu max -display none QEMU_OPTS+=$(QEMU_BASE_MACHINE) -semihosting-config enable=on,target=native,chardev=output -kernel +# console test is manual only +QEMU_SEMIHOST=-serial none -chardev stdio,mux=on,id=stdio0 -semihosting-config enable=on,chardev=stdio0 -mon chardev=stdio0,mode=readline +run-semiconsole: QEMU_OPTS=$(QEMU_BASE_MACHINE) $(QEMU_SEMIHOST) -kernel +run-semiconsole: semiconsole + $(call skip-test, $<, "MANUAL ONLY") + $(if $(V),@printf " %-7s %s %s\n" "TO RUN" $(notdir $(QEMU)) "$(QEMU_OPTS) $<") +run-plugin-semiconsole-with-%: semiconsole + $(call skip-test, $<, "MANUAL ONLY") + # Simple Record/Replay Test .PHONY: memory-record run-memory-record: memory-record memory From patchwork Mon Nov 20 15:08:32 2023 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: 745372 Delivered-To: patch@linaro.org Received: by 2002:a5d:5052:0:b0:32d:baff:b0ca with SMTP id h18csp1347035wrt; Mon, 20 Nov 2023 07:13:27 -0800 (PST) X-Google-Smtp-Source: AGHT+IH1dYyGrZRK6bT0hVvdBm8EV/rF4PvZx/LEI0VgmlgPuTt8qvjAv+C/xx6VIUwr3W0YuH0O X-Received: by 2002:a5d:6d8f:0:b0:332:cb24:609 with SMTP id l15-20020a5d6d8f000000b00332cb240609mr1163481wrs.39.1700493206933; Mon, 20 Nov 2023 07:13:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700493206; cv=none; d=google.com; s=arc-20160816; b=EWxB3g9PDUPQe6N8qq+bjAVdSF5onfyAKLBuNOim3lOF062wqNLOcQJLGQ54tDkvZo F6CN7+uVqYSFIe+TP9vsMYAIL5HmX0PS3OMAOVbezlGPCGZLjYQjuyURao0Uczi4PAEJ bPVlFPADY2Be6qGBf7Y/XJPttHUyVbZexNZan0bzycG9p6wLY1Wg3okIeq3Hy4Pa3SQk vpGlVONvA2fxCxwIlRam4TIIvIljObHKEIgo9O8gK+07TfnbixEkqii4xRQ/yZ17Jc5j usKV8Umgfgoq+o01bK5rlG0K6VMN8knHVfi5BDUzyyNGKeknIGeohxTxVvWXoA5Ml7dn fgsw== 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=VAfJwOx8Ygtt+c022BojU5oHMeEbaLxK0MlwB3wYne0=; fh=L8gboe2BpnMHPozXPXZ1zwcw4kd4+Ep8z61Ccww9Lhk=; b=cKK63lzLQIbTmzEb5xsCyMUzgTWNlTucyZB7Obb1pYm29+89kmlxlQWApKv7qBgPzx NiDDmqbGR9G+NqEBPiheHbunOE+W+GlzWtYtxxAOTW/uRLJegXRQLJaGazMLsK/j5wrj RcB123h4e8ZnMBs0umlQvve1FA4bA5tHzGAX06hurTRp9l93GUo1WjnL5KZjhq4/5mW+ zSTZV0NFHN8xFF5UUdf1xz3tNCuE+HSxNdNeTYEVPh/Og2u1l6KonVZp/RH99FO3NIo3 TnbTM/90KajWGFGTWdu36A1CdnWTnyg6Uo1QAosgstTX++MctS9bZ8cYyHkQHDfAkHWq pLOw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="wV/yFCVS"; 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 t10-20020a5d6a4a000000b003316c69d48bsi3133656wrw.207.2023.11.20.07.13.26 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 20 Nov 2023 07:13:26 -0800 (PST) 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="wV/yFCVS"; 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] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r55te-0006Ir-8s; Mon, 20 Nov 2023 10:09:10 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r55tS-0005tz-PU for qemu-devel@nongnu.org; Mon, 20 Nov 2023 10:09:01 -0500 Received: from mail-wr1-x431.google.com ([2a00:1450:4864:20::431]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r55tG-0001Jr-EO for qemu-devel@nongnu.org; Mon, 20 Nov 2023 10:08:58 -0500 Received: by mail-wr1-x431.google.com with SMTP id ffacd0b85a97d-32d81864e3fso2864688f8f.2 for ; Mon, 20 Nov 2023 07:08:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1700492924; x=1701097724; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=VAfJwOx8Ygtt+c022BojU5oHMeEbaLxK0MlwB3wYne0=; b=wV/yFCVSisG+kHD1Tl5yJpTEv/Cyau0OGOYjp2t//3utln8nDJd7tH7Zsv9u/F3Pw5 XFAIfAdyTb8/dvLiwKfTMiM/CQqsWq/q25Xc+qExri5M8kyzqV+VHd+Lr+6t86sLb7xq nxBH9hTa8BzuSKzFttnL0ndoNvcxfTRWd9RmZQBoUICy5ir2EI9auRjmE5KhyPS10fSW W2KKpWi+rxjj42F/sF64pS6Jz+hcRLjxJKCEJGDritLFt0GKN9RUChurawq4Qi9J7iEx wUcIgUGcxNz35Tk2BTcuDT79R1FCciJieKXnvjoc6BPktt4hdEwkPR/A9LreM79zN1IN fHnQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700492924; x=1701097724; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=VAfJwOx8Ygtt+c022BojU5oHMeEbaLxK0MlwB3wYne0=; b=B1Im3e2NzoQfWIwvWkcGMNvtC6UMYkPX1irAu+OohhxiyaY3TbjoLIDPhL5ZhAxOLv gnuMd0X1tM/TZ2EipjyHPvJxwT0BW3xalSJKi1Imby418rcLGOMH+LLKsE9E789UPux8 ol9b35hox6tKHh+rIN309pRutdP5B1fLDYWz4E4uNabe9exWAu5dok08APXh8AOJve2r wgxXuS052uZKZ9+yMF1+8h02X1ImSmLQq9Xr0zWWo4NN0Z+m0n80ZxcyuKVEZBDIOBdA /R2MDaiOcqEIDS7ioYO0+qGbh70ShdNtjWSAgAkegKu7JDwXVrN+0Jk+KrfZafjw7FWB xB+A== X-Gm-Message-State: AOJu0YznPc9lrKsSThU3GJBlNZlPCL2ihyjq04KhNW+clZ5vZI5Ql7uG GGaIVzPr/LCFNE/F6tUt0UhAFA== X-Received: by 2002:adf:f610:0:b0:32d:aa14:875d with SMTP id t16-20020adff610000000b0032daa14875dmr4380189wrp.29.1700492924714; Mon, 20 Nov 2023 07:08:44 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id z5-20020adff745000000b0032d829e10c0sm11417440wrp.28.2023.11.20.07.08.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Nov 2023 07:08:42 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 2E96A6577A; Mon, 20 Nov 2023 15:08:35 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Wainer dos Santos Moschetta , =?utf-8?q?C=C3=A9dric?= =?utf-8?q?_Le_Goater?= , Mahmoud Mandour , Peter Maydell , David Hildenbrand , =?utf-8?q?Alex_Benn=C3=A9e?= , qemu-s390x@nongnu.org, Beraldo Leal , qemu-arm@nongnu.org, devel@lists.libvirt.org, qemu-ppc@nongnu.org, Daniel Henrique Barboza , Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Alexandre Iooss , Marek Vasut , Thomas Huth , Chris Wulff , Ilya Leoshkevich , Richard Henderson , Nicholas Piggin Subject: [PATCH v2 13/14] configure: don't try a "native" cross for linux-user Date: Mon, 20 Nov 2023 15:08:32 +0000 Message-Id: <20231120150833.2552739-14-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231120150833.2552739-1-alex.bennee@linaro.org> References: <20231120150833.2552739-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::431; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x431.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-bounces+patch=linaro.org@nongnu.org As 32 bit x86 become rarer we are starting to run into problems with search paths. Although we switched to a Debian container we still favour the native CC on a Bookworm host. As a result we have a broken cross compile setup which then fails to build with: BUILD i386-linux-user guest-tests In file included from /usr/include/linux/stat.h:5, from /usr/include/bits/statx.h:31, from /usr/include/sys/stat.h:465, from /home/alex/lsrc/qemu.git/tests/tcg/multiarch/linux/linux-test.c:28: /usr/include/linux/types.h:5:10: fatal error: asm/types.h: No such file or directory 5 | #include | ^~~~~~~~~~~~~ compilation terminated. make[1]: *** [Makefile:119: linux-test] Error 1 make: *** [/home/alex/lsrc/qemu.git/tests/Makefile.include:50: build-tcg-tests-i386-linux-user] Error 2 This is likely to affect more and more linux-user builds so wrap the whole check in a test for softmmu targets (aka bare metal) which don't worry about such header niceties. This allows us to keep using the host compiler for softmmu tests and the roms. Signed-off-by: Alex Bennée --- v2 - split fix for tests/docker: replace fedora-i386 with debian-i686 as still in my tree ;-) - didn't apply dpb rb due to change requested by bonzini --- configure | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/configure b/configure index 9ea0bf5698..42fe4d0510 100755 --- a/configure +++ b/configure @@ -1391,16 +1391,19 @@ probe_target_compiler() { done try=cross - case "$target_arch:$cpu" in - aarch64_be:aarch64 | \ - armeb:arm | \ - i386:x86_64 | \ - mips*:mips64 | \ - ppc*:ppc64 | \ - sparc:sparc64 | \ - "$cpu:$cpu") - try='native cross' ;; - esac + # For softmmu/roms we might be able to use the host compiler + if [ "${1%softmmu}" != "$1" ]; then + case "$target_arch:$cpu" in + aarch64_be:aarch64 | \ + armeb:arm | \ + i386:x86_64 | \ + mips*:mips64 | \ + ppc*:ppc64 | \ + sparc:sparc64 | \ + "$cpu:$cpu") + try='native cross' ;; + esac + fi eval "target_cflags=\${cross_cc_cflags_$target_arch}" for thistry in $try; do case $thistry in From patchwork Mon Nov 20 15:08:33 2023 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: 745365 Delivered-To: patch@linaro.org Received: by 2002:a5d:5052:0:b0:32d:baff:b0ca with SMTP id h18csp1344871wrt; Mon, 20 Nov 2023 07:11:03 -0800 (PST) X-Google-Smtp-Source: AGHT+IGEmay4ufedjVL8J+d+GgbaPAQXl1zQpqG+UvWCbAIQTtdVq+VT1dCKRmZ78hHlkj5F2HRa X-Received: by 2002:a05:600c:3c92:b0:401:2ee0:7558 with SMTP id bg18-20020a05600c3c9200b004012ee07558mr6154401wmb.32.1700493062877; Mon, 20 Nov 2023 07:11:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700493062; cv=none; d=google.com; s=arc-20160816; b=J4m1UQlnXVd5mYlkheOARlnbN7C1Z1IS/yCCwuZpwnkc4aiiTBkvn9YpNPsAK5OosB ritB1kBVWY05RU14md45SLGPimrFQVk3+vGevoiD9o990gTISBwkvdL7lRQQZ1b05oOo O9SrxS3VpqStWQpazHYv1ZD9B0Pt17CZLh/BkIr32uqlBzYrV/avBD8KZdcR/10GOu+R Vs/PxVGjA4Hy2pGYoGfzZxqa3j3VtDJmyLV6wfCdb8ASnGm/z9N3lINYUtLBZojVvCNP /mfs7dXDmky5NasmvSps20Mij6SROkgAMRCme0MsaXFf3SBghRwFmImlZS6kuXN3wOOq WEBQ== 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=L8kjzVNoA7e3cvqH6712uj0UfEN18Da8qVe7RzxNxzg=; fh=vuMr5Iq/iMnTlXliAuVMjPSqmXpFYJrVmR7aRVaPSRM=; b=iQwAanCYVay+MX2bnl4R3rtgz4USp40WC6V1Wx2/R/BXEinlTVKNAmawwL5dCQGMx7 9HaZMzT6lpkZHlYcu5ZwxOkdpCvhpx2caK3SorOjVGMrzMv+zOSQpOpiMdi3Sg1Gf/iX GiuvFm0mdGmTIN11+567cyaG6Oiv70Vx6+Mk3kk6VDQUJ1yFmU89aQqMkJbIkTv7Spaf HSwtMc825ZIHQRvREKChRS1oGQGkv/BVulN5vxKudKtaDYjDyZn1qKm+c1q+tPP8BKPx sD/yfwhNJU21F1StwHuOB0xLEVOakdslrmtO51c/CBW9QKFhSbRKD7ymMqWjkOjIcm5m M0eg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=s90ZyPdy; 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 d10-20020adfe88a000000b003316b5d2398si4674509wrm.1034.2023.11.20.07.11.02 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 20 Nov 2023 07:11:02 -0800 (PST) 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=s90ZyPdy; 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] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r55ty-0006gD-8P; Mon, 20 Nov 2023 10:09:30 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r55tU-0005v8-8r for qemu-devel@nongnu.org; Mon, 20 Nov 2023 10:09:01 -0500 Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r55tG-0001J4-FF for qemu-devel@nongnu.org; Mon, 20 Nov 2023 10:08:59 -0500 Received: by mail-wm1-x334.google.com with SMTP id 5b1f17b1804b1-408382da7f0so18221305e9.0 for ; Mon, 20 Nov 2023 07:08:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1700492924; x=1701097724; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=L8kjzVNoA7e3cvqH6712uj0UfEN18Da8qVe7RzxNxzg=; b=s90ZyPdy82Yrqg579JYbDvzGJF3c7EglpDX0o35QKX76cq5VqKFUEJDSgjL6vGNafe kx06A0He0O65aLvpQxF3ZhBg8MLslq7Oy5fF/IOESm0QiIB9oXtb3CZKD+DgT3i0N13V qkTlv24sMVSfgWtO7Yh7bzos63KUOKjEWig+g9MbwP904/OLuh0iuYOBDe4AO8la5cN5 fIdAXIhbJZKAU+9ECk1/6eVgTWNfyy6zi8yTGU7tqln87LeyRXuRI6x90tTv4s4lbQfC wrWQSEUZK1vTkc484vrtWiO3j/hCGCqsSQaaueonG0mel7U1Kyk+YoKKco4cVjFOWhDx qfEQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700492924; x=1701097724; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=L8kjzVNoA7e3cvqH6712uj0UfEN18Da8qVe7RzxNxzg=; b=R9q+jnSm6jOmLDXlqKPvgLhpODWmjIJecL9lSuj3OdIetKNHA+gZqTzNgy8nsPzoCD k8r7EmUDjEygLVLVMGGfdKKCbOdsYnTJ800zzloy1DebuWN2fqD18x9cITN/0YNQtJEp MKXOlnUHuSfWL7j6uiUT8X9Nz8Bdyi5t9HIHhZ5bVVRZYOuBp9Dh9fq+QIk+z8ph4pcF fETFNDcjP/wIdMyfjE3aR44P/HSEpsmlcDPvIJ9/08FoReH1gKasJA7bG23lcz06mMFY sVJi1izjEWmkVTBI31l9sK9rRVFoppStq2Qf8Sxv8pm9am+yQuv9/LopYRH/XeabVOeB Pe0Q== X-Gm-Message-State: AOJu0Yyjw68sJT0nqRaCg/yzZ/VLwKNKj+YJF93W9+WzlzhvoRJg4EgA kJ3Uhay1853X3BNO9MvLMKVfrQ== X-Received: by 2002:a05:600c:3108:b0:409:7aa9:a903 with SMTP id g8-20020a05600c310800b004097aa9a903mr6252825wmo.19.1700492924535; Mon, 20 Nov 2023 07:08:44 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id j7-20020a05600c190700b004064cd71aa8sm13821581wmq.34.2023.11.20.07.08.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Nov 2023 07:08:42 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 456B16577B; Mon, 20 Nov 2023 15:08:35 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Wainer dos Santos Moschetta , =?utf-8?q?C=C3=A9dric?= =?utf-8?q?_Le_Goater?= , Mahmoud Mandour , Peter Maydell , David Hildenbrand , =?utf-8?q?Alex_Benn=C3=A9e?= , qemu-s390x@nongnu.org, Beraldo Leal , qemu-arm@nongnu.org, devel@lists.libvirt.org, qemu-ppc@nongnu.org, Daniel Henrique Barboza , Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Alexandre Iooss , Marek Vasut , Thomas Huth , Chris Wulff , Ilya Leoshkevich , Richard Henderson , Nicholas Piggin , Luis Machado Subject: [PATCH v2 14/14] tests/tcg: finesse the registers check for "hidden" regs Date: Mon, 20 Nov 2023 15:08:33 +0000 Message-Id: <20231120150833.2552739-15-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231120150833.2552739-1-alex.bennee@linaro.org> References: <20231120150833.2552739-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=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org The reason the ppc64 and s390x test where failing was because gdb hides them although they are still accessible via regnum. We can re-arrange the test a little bit and include these two arches in our test. We still don't explicitly fail for registers that just disappear like in the ARM case: xml-tdesc has 228 registers remote-registers has 219 registers of which 0 are hidden {'name': 'CNTP_CVAL', 'regnum': 96} wasn't seen in remote-registers {'name': 'CNTV_CVAL', 'regnum': 101} wasn't seen in remote-registers {'name': 'PAR', 'regnum': 113} wasn't seen in remote-registers {'name': 'CPUACTLR', 'regnum': 114} wasn't seen in remote-registers {'name': 'CPUECTLR', 'regnum': 127} wasn't seen in remote-registers {'name': 'CPUMERRSR', 'regnum': 140} wasn't seen in remote-registers {'name': 'TTBR1', 'regnum': 148} wasn't seen in remote-registers {'name': 'L2MERRSR', 'regnum': 161} wasn't seen in remote-registers {'name': 'TTBR0', 'regnum': 168} wasn't seen in remote-registers Signed-off-by: Alex Bennée Cc: Ilya Leoshkevich Cc: qemu-s390x@nongnu.org Cc: Nicholas Piggin Cc: Daniel Henrique Barboza Cc: qemu-ppc@nongnu.org Cc: Luis Machado --- v2 - skip if check for total_regs != total_r_regs and always dump what is elided/missed --- tests/tcg/multiarch/gdbstub/registers.py | 87 +++++++++++++++++------- tests/tcg/ppc64/Makefile.target | 7 -- tests/tcg/s390x/Makefile.target | 4 -- 3 files changed, 64 insertions(+), 34 deletions(-) diff --git a/tests/tcg/multiarch/gdbstub/registers.py b/tests/tcg/multiarch/gdbstub/registers.py index ff6076b09e..8ba14099b5 100644 --- a/tests/tcg/multiarch/gdbstub/registers.py +++ b/tests/tcg/multiarch/gdbstub/registers.py @@ -44,7 +44,6 @@ def fetch_xml_regmap(): total_regs = 0 reg_map = {} - frame = gdb.selected_frame() tree = ET.fromstring(xml) for f in tree.findall("feature"): @@ -61,12 +60,8 @@ def fetch_xml_regmap(): for r in regs: name = r.attrib["name"] regnum = int(r.attrib["regnum"]) - try: - value = frame.read_register(name) - except ValueError: - report(False, f"failed to read reg: {name}") - entry = { "name": name, "initial": value, "regnum": regnum } + entry = { "name": name, "regnum": regnum } if name in reg_map: report(False, f"duplicate register {entry} vs {reg_map[name]}") @@ -80,6 +75,15 @@ def fetch_xml_regmap(): return reg_map +def get_register_by_regnum(reg_map, regnum): + """ + Helper to find a register from the map via its XML regnum + """ + for regname, entry in reg_map.items(): + if entry['regnum'] == regnum: + return entry + return None + def crosscheck_remote_xml(reg_map): """ Cross-check the list of remote-registers with the XML info. @@ -90,6 +94,7 @@ def crosscheck_remote_xml(reg_map): total_regs = len(reg_map.keys()) total_r_regs = 0 + total_r_elided_regs = 0 for r in r_regs: fields = r.split() @@ -100,6 +105,15 @@ def crosscheck_remote_xml(reg_map): r_name = fields[0] r_regnum = int(fields[6]) + # Some registers are "hidden" so don't have a name + # although they still should have a register number + if r_name == "''": + total_r_elided_regs += 1 + x_reg = get_register_by_regnum(reg_map, r_regnum) + if x_reg is not None: + x_reg["hidden"] = True + continue + # check in the XML try: x_reg = reg_map[r_name] @@ -117,14 +131,39 @@ def crosscheck_remote_xml(reg_map): # Just print a mismatch in totals as gdb will filter out 64 bit # registers on a 32 bit machine. Also print what is missing to # help with debug. - if total_regs != total_r_regs: - print(f"xml-tdesc has ({total_regs}) registers") - print(f"remote-registers has ({total_r_regs}) registers") + print(f"xml-tdesc has {total_regs} registers") + print(f"remote-registers has {total_r_regs} registers") + print(f"of which {total_r_elided_regs} are hidden") + + for x_key in reg_map.keys(): + x_reg = reg_map[x_key] + if "hidden" in x_reg: + print(f"{x_reg} elided by gdb") + elif "seen" not in x_reg: + print(f"{x_reg} wasn't seen in remote-registers") + +def initial_register_read(reg_map): + """ + Do an initial read of all registers that we know gdb cares about + (so ignore the elided ones). + """ + frame = gdb.selected_frame() + + for e in reg_map.values(): + name = e["name"] + regnum = e["regnum"] + + try: + if "hidden" in e: + value = frame.read_register(regnum) + e["initial"] = value + elif "seen" in e: + value = frame.read_register(name) + e["initial"] = value + + except ValueError: + report(False, f"failed to read reg: {name}") - for x_key in reg_map.keys(): - x_reg = reg_map[x_key] - if "seen" not in x_reg: - print(f"{x_reg} wasn't seen in remote-registers") def complete_and_diff(reg_map): """ @@ -144,18 +183,19 @@ def complete_and_diff(reg_map): changed = 0 for e in reg_map.values(): - name = e["name"] - old_val = e["initial"] + if "initial" in e and "hidden" not in e: + name = e["name"] + old_val = e["initial"] - try: - new_val = frame.read_register(name) - except: - report(False, f"failed to read {name} at end of run") - continue + try: + new_val = frame.read_register(name) + except ValueError: + report(False, f"failed to read {name} at end of run") + continue - if new_val != old_val: - print(f"{name} changes from {old_val} to {new_val}") - changed += 1 + if new_val != old_val: + print(f"{name} changes from {old_val} to {new_val}") + changed += 1 # as long as something changed we can be confident its working report(changed > 0, f"{changed} registers were changed") @@ -168,6 +208,7 @@ def run_test(): if reg_map is not None: crosscheck_remote_xml(reg_map) + initial_register_read(reg_map) complete_and_diff(reg_map) diff --git a/tests/tcg/ppc64/Makefile.target b/tests/tcg/ppc64/Makefile.target index 1d08076756..5721c159f2 100644 --- a/tests/tcg/ppc64/Makefile.target +++ b/tests/tcg/ppc64/Makefile.target @@ -38,11 +38,4 @@ PPC64_TESTS += signal_save_restore_xer PPC64_TESTS += xxspltw PPC64_TESTS += test-aes -ifneq ($(GDB),) -# Skip for now until vsx registers sorted out -run-gdbstub-registers: - $(call skip-test, $<, "BROKEN reading VSX registers") -endif - - TESTS += $(PPC64_TESTS) diff --git a/tests/tcg/s390x/Makefile.target b/tests/tcg/s390x/Makefile.target index 46544fecd4..0e670f3f8b 100644 --- a/tests/tcg/s390x/Makefile.target +++ b/tests/tcg/s390x/Makefile.target @@ -103,10 +103,6 @@ run-gdbstub-svc: hello-s390x-asm --bin $< --test $(S390X_SRC)/gdbstub/test-svc.py, \ single-stepping svc) -# Skip for now until vx registers sorted out -run-gdbstub-registers: - $(call skip-test, $<, "BROKEN reading VX registers") - EXTRA_RUNS += run-gdbstub-signals-s390x run-gdbstub-svc endif