From patchwork Tue Sep 10 17:38:51 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 1983432 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=VTvAdUai; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4X39yF1Qzyz1y1v for ; Wed, 11 Sep 2024 03:42:29 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1so4pr-0005gb-9A; Tue, 10 Sep 2024 13:39:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1so4pZ-0004lh-FY for qemu-devel@nongnu.org; Tue, 10 Sep 2024 13:39:09 -0400 Received: from mail-lf1-x12b.google.com ([2a00:1450:4864:20::12b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1so4pV-0004Z9-T5 for qemu-devel@nongnu.org; Tue, 10 Sep 2024 13:39:08 -0400 Received: by mail-lf1-x12b.google.com with SMTP id 2adb3069b0e04-5365a9574b6so6640889e87.1 for ; Tue, 10 Sep 2024 10:39:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1725989944; x=1726594744; 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=x182aOeWN0VUpTIjJ/KVESHfoVOy56+KeRdhKF4bGRU=; b=VTvAdUaiSv7bs6SF4fpAXWjIYzoZcp8Ty2CGTr5XLIWBtHnmQmnoPrgQvkN6+ZEFYy gPb/7/0OIxy1U56QWgkuRdnJvXimWfIxVgo90MMUTnejh4zqLPiOYhLHjUaW5IaEUAXE pBiMOSAjVrb2ELi4V7i5HfWFzPkoKH46k12ePF+vFBq9Muv76Qfn4bObg07nVc5Ujc6N wJO0AbjVse5SD8vnUmxFY98eNT6DS1+hP+1r+LpezpmfO5PoBzQlPbXqwRANyHEHpt7L EX1KLXV9ZM2GyN/DK3wSkn+JRYmDZAppoOMHqVTJ+mZiYItI0Kmo1J5gwqNazl6uSnh4 y6MQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725989944; x=1726594744; 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=x182aOeWN0VUpTIjJ/KVESHfoVOy56+KeRdhKF4bGRU=; b=XO/rpcr1/GBgMvMFHqUOyfZpWrNol/bHick6vPah0/6mD70WryQuKCIkqlgBjX1oip K1XlvE/ihbIZgcsZnZ9H0ykhwaC50lgCvSPEciyporSQgtqN+nCVAdwt0A+3JPxdOVZk ancJlAAS53Zhbd12NAorqEZgbTpqIqh99pCff+JZbA4pf4wQ+xfEKaPWWPTXxfD6uWMd 7Myw2GjgjR1qRfSLhCxlepwcTKk+mk8XkrhG/VASq+royvMg9tVVBcWcU9KVM45JZ4DR XcUC2ujEcuJThuYuve5VCkWCymnUflFBApnmd7x3LQyzxFJkp0pDMW5kAsJcGHDYsgfX Sd0g== X-Gm-Message-State: AOJu0Yz35LPPILOeUPHIqE/ypjMglg8IbSMO7pu4k/RCufVTPlF/wT/w 9ZauouLXqe5EGatPtE1sEvGpxXzgpj3lQoE5nyhKt0DkfAi7nLrsOp7ec/zrX4E= X-Google-Smtp-Source: AGHT+IEqDtyW7LzNvYTqOawZYfdKrXV6Cn0I4oO96SU86YfF/QyZnYCHGy903SXVHaFtudcazSfl/w== X-Received: by 2002:a05:6512:3983:b0:533:71f:3a3d with SMTP id 2adb3069b0e04-536587ae7a3mr14453478e87.24.1725989943063; Tue, 10 Sep 2024 10:39:03 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a8d25c60ef3sm504237166b.110.2024.09.10.10.39.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Sep 2024 10:39:01 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 852115F78C; Tue, 10 Sep 2024 18:39:00 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Thomas Huth , Zhao Liu , Peter Maydell , Paolo Bonzini , Marcel Apfelbaum , qemu-arm@nongnu.org, devel@lists.libvirt.org, Pierrick Bouvier , Alexandre Iooss , =?utf-8?q?Alex_Benn=C3=A9e?= , =?utf-8?q?Philippe_M?= =?utf-8?q?athieu-Daud=C3=A9?= , Jiaxun Yang , Beraldo Leal , Eduardo Habkost , Richard Henderson , Mahmoud Mandour , Yanan Wang , Wainer dos Santos Moschetta Subject: [PATCH v2 01/10] tests/docker: remove debian-armel-cross Date: Tue, 10 Sep 2024 18:38:51 +0100 Message-Id: <20240910173900.4154726-2-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240910173900.4154726-1-alex.bennee@linaro.org> References: <20240910173900.4154726-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::12b; envelope-from=alex.bennee@linaro.org; helo=mail-lf1-x12b.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org As debian-11 transitions to LTS we are starting to have problems building the image. While we could update to a later Debian building a 32 bit QEMU without modern floating point is niche host amongst the few remaining 32 bit hosts we regularly build for. For now we still have armhf-debian-cross-container which is currently built from the more recent debian-12. Message-Id: <20240910140733.4007719-2-alex.bennee@linaro.org> Reviewed-by: Pierrick Bouvier Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson --- .gitlab-ci.d/container-cross.yml | 6 - .gitlab-ci.d/crossbuilds.yml | 7 - .../dockerfiles/debian-armel-cross.docker | 179 ------------------ tests/lcitool/refresh | 6 - 4 files changed, 198 deletions(-) delete mode 100644 tests/docker/dockerfiles/debian-armel-cross.docker diff --git a/.gitlab-ci.d/container-cross.yml b/.gitlab-ci.d/container-cross.yml index e3103940a0..9a3ebd885e 100644 --- a/.gitlab-ci.d/container-cross.yml +++ b/.gitlab-ci.d/container-cross.yml @@ -22,12 +22,6 @@ arm64-debian-cross-container: variables: NAME: debian-arm64-cross -armel-debian-cross-container: - extends: .container_job_template - stage: containers - variables: - NAME: debian-armel-cross - armhf-debian-cross-container: extends: .container_job_template stage: containers diff --git a/.gitlab-ci.d/crossbuilds.yml b/.gitlab-ci.d/crossbuilds.yml index cb499e4ee0..459273f9da 100644 --- a/.gitlab-ci.d/crossbuilds.yml +++ b/.gitlab-ci.d/crossbuilds.yml @@ -1,13 +1,6 @@ include: - local: '/.gitlab-ci.d/crossbuild-template.yml' -cross-armel-user: - extends: .cross_user_build_job - needs: - job: armel-debian-cross-container - variables: - IMAGE: debian-armel-cross - cross-armhf-user: extends: .cross_user_build_job needs: diff --git a/tests/docker/dockerfiles/debian-armel-cross.docker b/tests/docker/dockerfiles/debian-armel-cross.docker deleted file mode 100644 index 8476fc8cce..0000000000 --- a/tests/docker/dockerfiles/debian-armel-cross.docker +++ /dev/null @@ -1,179 +0,0 @@ -# THIS FILE WAS AUTO-GENERATED -# -# $ lcitool dockerfile --layers all --cross-arch armv6l 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 \ - libgtk-vnc-2.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 && \ - rm -f /usr/lib*/python3*/EXTERNALLY-MANAGED - -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 armel && \ - 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 \ - gcc-arm-linux-gnueabi \ - libaio-dev:armel \ - libasan6:armel \ - libasound2-dev:armel \ - libattr1-dev:armel \ - libbpf-dev:armel \ - libbrlapi-dev:armel \ - libbz2-dev:armel \ - libc6-dev:armel \ - libcacard-dev:armel \ - libcap-ng-dev:armel \ - libcapstone-dev:armel \ - libcmocka-dev:armel \ - libcurl4-gnutls-dev:armel \ - libdaxctl-dev:armel \ - libdrm-dev:armel \ - libepoxy-dev:armel \ - libfdt-dev:armel \ - libffi-dev:armel \ - libfuse3-dev:armel \ - libgbm-dev:armel \ - libgcrypt20-dev:armel \ - libglib2.0-dev:armel \ - libglusterfs-dev:armel \ - libgnutls28-dev:armel \ - libgtk-3-dev:armel \ - libibverbs-dev:armel \ - libiscsi-dev:armel \ - libjemalloc-dev:armel \ - libjpeg62-turbo-dev:armel \ - libjson-c-dev:armel \ - liblttng-ust-dev:armel \ - liblzo2-dev:armel \ - libncursesw5-dev:armel \ - libnfs-dev:armel \ - libnuma-dev:armel \ - libpam0g-dev:armel \ - libpipewire-0.3-dev:armel \ - libpixman-1-dev:armel \ - libpng-dev:armel \ - libpulse-dev:armel \ - librbd-dev:armel \ - librdmacm-dev:armel \ - libsasl2-dev:armel \ - libsdl2-dev:armel \ - libsdl2-image-dev:armel \ - libseccomp-dev:armel \ - libselinux1-dev:armel \ - libslirp-dev:armel \ - libsnappy-dev:armel \ - libspice-server-dev:armel \ - libssh-gcrypt-dev:armel \ - libsystemd-dev:armel \ - libtasn1-6-dev:armel \ - libubsan1:armel \ - libudev-dev:armel \ - liburing-dev:armel \ - libusb-1.0-0-dev:armel \ - libusbredirhost-dev:armel \ - libvdeplug-dev:armel \ - libvirglrenderer-dev:armel \ - libvte-2.91-dev:armel \ - libzstd-dev:armel \ - nettle-dev:armel \ - systemtap-sdt-dev:armel \ - zlib1g-dev:armel && \ - eatmydata apt-get autoremove -y && \ - eatmydata apt-get autoclean -y && \ - mkdir -p /usr/local/share/meson/cross && \ - printf "[binaries]\n\ -c = '/usr/bin/arm-linux-gnueabi-gcc'\n\ -ar = '/usr/bin/arm-linux-gnueabi-gcc-ar'\n\ -strip = '/usr/bin/arm-linux-gnueabi-strip'\n\ -pkgconfig = '/usr/bin/arm-linux-gnueabi-pkg-config'\n\ -\n\ -[host_machine]\n\ -system = 'linux'\n\ -cpu_family = 'arm'\n\ -cpu = 'arm'\n\ -endian = 'little'\n" > /usr/local/share/meson/cross/arm-linux-gnueabi && \ - 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/arm-linux-gnueabi-cc && \ - ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/arm-linux-gnueabi-gcc - -ENV ABI "arm-linux-gnueabi" -ENV MESON_OPTS "--cross-file=arm-linux-gnueabi" -ENV QEMU_CONFIGURE_OPTS --cross-prefix=arm-linux-gnueabi- -ENV DEF_TARGET_LIST arm-softmmu,arm-linux-user,armeb-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/lcitool/refresh b/tests/lcitool/refresh index ac803e34f1..199d5fad87 100755 --- a/tests/lcitool/refresh +++ b/tests/lcitool/refresh @@ -154,12 +154,6 @@ try: trailer=cross_build("aarch64-linux-gnu-", "aarch64-softmmu,aarch64-linux-user")) - # migration to bookworm stalled: https://lists.debian.org/debian-arm/2023/09/msg00006.html - generate_dockerfile("debian-armel-cross", "debian-11", - cross="armv6l", - trailer=cross_build("arm-linux-gnueabi-", - "arm-softmmu,arm-linux-user,armeb-linux-user")) - generate_dockerfile("debian-armhf-cross", "debian-12", cross="armv7l", trailer=cross_build("arm-linux-gnueabihf-", From patchwork Tue Sep 10 17:38:52 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 1983423 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=ggfKaOWQ; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4X39xH42Q2z1y1S for ; Wed, 11 Sep 2024 03:41:39 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1so4ps-0005jm-5i; Tue, 10 Sep 2024 13:39:28 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1so4pZ-0004lX-EG for qemu-devel@nongnu.org; Tue, 10 Sep 2024 13:39:09 -0400 Received: from mail-ed1-x531.google.com ([2a00:1450:4864:20::531]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1so4pW-0004ZN-7h for qemu-devel@nongnu.org; Tue, 10 Sep 2024 13:39:09 -0400 Received: by mail-ed1-x531.google.com with SMTP id 4fb4d7f45d1cf-5c25554ec1eso7583301a12.1 for ; Tue, 10 Sep 2024 10:39:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1725989945; x=1726594745; 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=rxdRaiTcMZc5S1W+zC5XJ30AZucjTk2s7eZ1WW+ddog=; b=ggfKaOWQPe1dS893CgpGZ5mGcfBrOPYpqL0Nvz2KzaMixQClCybr6odljo7HROtuTw 6KzKtXt5tIrippbctoMsf2p44FuEs29Cnnyk9LAlr+E8AcnYvRirmAPhv4QY17zpICty fHInb0UFFpFxisBJ5iRmXExC+3IPu2ReG9SE75XRfeQa9PEj6lMfofyr65lxa2bVMFEX UP0B/G/fpz6wWMbXGP6WmvPTGW+Jj5nzwVRlgs4BXFk899xCYn+hrd/xYitciD/Jj6NC 9DikcGw+FrwdSRXUcix5bx3RuRArcf2YNcJwOgvE8jt9Mo8Qg7V93rcAgS23am4Vbpgp lsGQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725989945; x=1726594745; 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=rxdRaiTcMZc5S1W+zC5XJ30AZucjTk2s7eZ1WW+ddog=; b=UnkjI+/gNj5vOFyBccRQx1XjFGcmHHAtNw62Vpk16Qw7f1hIxDi75k8dytAVQxiflV giAUc5qouD0394Fa/zcNaFuojt8LlvNYiy+QQ3AP5dlixvWBX98dsoIhqXkJV/hzuM2O U3WI6kqL4DUGQ4corUftYUE7cv6jvoEQ9zDBMJ8i1wUuzUT9eJnPzxDOD+b6hdVxTz36 0A4VvqkRSRe90SB07TR72VdSG6rwmBOzEJa0ZM1UmFpw6UaQ0r4PffUcDaR7b5L77LgP Va2HH9QI1gBZX4A8CkaqCBDCvYB+YzKBA0RuBBPBJI+4eHYIdTsc4/Gs5XoqWV/8jFDa EpVA== X-Gm-Message-State: AOJu0YwIa+y9H7v1+RRVT60vblmgyb87X7yFcl+er9RWymJa2OB7wPHj PVJ7bEfnSdyakeH2eV0DpVnCkwYtHVbeXkasCd5u9vwJT1ZCZpWFGPpgDl7z7/4= X-Google-Smtp-Source: AGHT+IEy8xm9TQ/OfdiMVTVxFx9PsY1/i7uDVqSwJfXKQyMFqLVYM95l36xLFNnAVnlOxzL43plRbQ== X-Received: by 2002:a05:6402:5111:b0:5c2:6d80:b4ed with SMTP id 4fb4d7f45d1cf-5c3e9630ee6mr8601383a12.13.1725989944583; Tue, 10 Sep 2024 10:39:04 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5c3ebd41c36sm4512760a12.2.2024.09.10.10.39.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Sep 2024 10:39:01 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 9CFDA5F7B4; Tue, 10 Sep 2024 18:39:00 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Thomas Huth , Zhao Liu , Peter Maydell , Paolo Bonzini , Marcel Apfelbaum , qemu-arm@nongnu.org, devel@lists.libvirt.org, Pierrick Bouvier , Alexandre Iooss , =?utf-8?q?Alex_Benn=C3=A9e?= , =?utf-8?q?Philippe_M?= =?utf-8?q?athieu-Daud=C3=A9?= , Jiaxun Yang , Beraldo Leal , Eduardo Habkost , Richard Henderson , Mahmoud Mandour , Yanan Wang , Wainer dos Santos Moschetta Subject: [PATCH v2 02/10] tests/docker: update debian i686 and mipsel images to bookworm Date: Tue, 10 Sep 2024 18:38:52 +0100 Message-Id: <20240910173900.4154726-3-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240910173900.4154726-1-alex.bennee@linaro.org> References: <20240910173900.4154726-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::531; envelope-from=alex.bennee@linaro.org; helo=mail-ed1-x531.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Whatever issues there were which stopped these being updates when the rest were have now been resolved. However mips64el continues to be broken so don't update it here. Message-Id: <20240910140733.4007719-3-alex.bennee@linaro.org> Reviewed-by: Pierrick Bouvier Signed-off-by: Alex Bennée Reviewed-by: Richard Henderson --- tests/docker/dockerfiles/debian-i686-cross.docker | 10 ++++------ tests/docker/dockerfiles/debian-mipsel-cross.docker | 10 ++++------ tests/lcitool/refresh | 4 ++-- 3 files changed, 10 insertions(+), 14 deletions(-) diff --git a/tests/docker/dockerfiles/debian-i686-cross.docker b/tests/docker/dockerfiles/debian-i686-cross.docker index 3fe8ee623d..2328ee1732 100644 --- a/tests/docker/dockerfiles/debian-i686-cross.docker +++ b/tests/docker/dockerfiles/debian-i686-cross.docker @@ -1,10 +1,10 @@ # THIS FILE WAS AUTO-GENERATED # -# $ lcitool dockerfile --layers all --cross-arch i686 debian-11 qemu +# $ lcitool dockerfile --layers all --cross-arch i686 debian-12 qemu # # https://gitlab.com/libvirt/libvirt-ci -FROM docker.io/library/debian:11-slim +FROM docker.io/library/debian:12-slim RUN export DEBIAN_FRONTEND=noninteractive && \ apt-get update && \ @@ -48,16 +48,15 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ python3-opencv \ python3-pillow \ python3-pip \ - python3-setuptools \ python3-sphinx \ python3-sphinx-rtd-theme \ python3-venv \ - python3-wheel \ python3-yaml \ rpm2cpio \ sed \ socat \ sparse \ + swtpm \ tar \ tesseract-ocr \ tesseract-ocr-eng \ @@ -69,8 +68,6 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ dpkg-reconfigure locales && \ rm -f /usr/lib*/python3*/EXTERNALLY-MANAGED -RUN /usr/bin/pip3 install tomli - ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers" ENV LANG "en_US.UTF-8" ENV MAKE "/usr/bin/make" @@ -145,6 +142,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ libvdeplug-dev:i386 \ libvirglrenderer-dev:i386 \ libvte-2.91-dev:i386 \ + libxdp-dev:i386 \ libzstd-dev:i386 \ nettle-dev:i386 \ systemtap-sdt-dev:i386 \ diff --git a/tests/docker/dockerfiles/debian-mipsel-cross.docker b/tests/docker/dockerfiles/debian-mipsel-cross.docker index 0d559ae4ba..4ac314e22e 100644 --- a/tests/docker/dockerfiles/debian-mipsel-cross.docker +++ b/tests/docker/dockerfiles/debian-mipsel-cross.docker @@ -1,10 +1,10 @@ # THIS FILE WAS AUTO-GENERATED # -# $ lcitool dockerfile --layers all --cross-arch mipsel debian-11 qemu +# $ lcitool dockerfile --layers all --cross-arch mipsel debian-12 qemu # # https://gitlab.com/libvirt/libvirt-ci -FROM docker.io/library/debian:11-slim +FROM docker.io/library/debian:12-slim RUN export DEBIAN_FRONTEND=noninteractive && \ apt-get update && \ @@ -48,16 +48,15 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ python3-opencv \ python3-pillow \ python3-pip \ - python3-setuptools \ python3-sphinx \ python3-sphinx-rtd-theme \ python3-venv \ - python3-wheel \ python3-yaml \ rpm2cpio \ sed \ socat \ sparse \ + swtpm \ tar \ tesseract-ocr \ tesseract-ocr-eng \ @@ -69,8 +68,6 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ dpkg-reconfigure locales && \ rm -f /usr/lib*/python3*/EXTERNALLY-MANAGED -RUN /usr/bin/pip3 install tomli - ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers" ENV LANG "en_US.UTF-8" ENV MAKE "/usr/bin/make" @@ -143,6 +140,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ libvdeplug-dev:mipsel \ libvirglrenderer-dev:mipsel \ libvte-2.91-dev:mipsel \ + libxdp-dev:mipsel \ libzstd-dev:mipsel \ nettle-dev:mipsel \ systemtap-sdt-dev:mipsel \ diff --git a/tests/lcitool/refresh b/tests/lcitool/refresh index 199d5fad87..c60490a7fa 100755 --- a/tests/lcitool/refresh +++ b/tests/lcitool/refresh @@ -159,7 +159,7 @@ try: trailer=cross_build("arm-linux-gnueabihf-", "arm-softmmu,arm-linux-user")) - generate_dockerfile("debian-i686-cross", "debian-11", + generate_dockerfile("debian-i686-cross", "debian-12", cross="i686", trailer=cross_build("i686-linux-gnu-", "x86_64-softmmu," @@ -171,7 +171,7 @@ try: trailer=cross_build("mips64el-linux-gnuabi64-", "mips64el-softmmu,mips64el-linux-user")) - generate_dockerfile("debian-mipsel-cross", "debian-11", + generate_dockerfile("debian-mipsel-cross", "debian-12", cross="mipsel", trailer=cross_build("mipsel-linux-gnu-", "mipsel-softmmu,mipsel-linux-user")) From patchwork Tue Sep 10 17:38:53 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 1983420 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=wgbl8zWf; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4X39w627Znz1y1v for ; Wed, 11 Sep 2024 03:40:38 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1so4pb-0004mH-IN; Tue, 10 Sep 2024 13:39:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1so4pW-0004iD-DM for qemu-devel@nongnu.org; Tue, 10 Sep 2024 13:39:06 -0400 Received: from mail-ed1-x534.google.com ([2a00:1450:4864:20::534]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1so4pU-0004Yu-LO for qemu-devel@nongnu.org; Tue, 10 Sep 2024 13:39:06 -0400 Received: by mail-ed1-x534.google.com with SMTP id 4fb4d7f45d1cf-5c26852aff1so6797927a12.3 for ; Tue, 10 Sep 2024 10:39:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1725989943; x=1726594743; 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=nL+5j3KYtdxOCvyuGBLquGt4laEVHE2D17hxCL7BaSA=; b=wgbl8zWfQ2ip0louKbCujN541fUQhMapdwR42a8xVkI1RmKH0ax9DigyBSvKg8oCDS Ez60UQExM4xsaUSGxM0oNtig6lHePv9cZG0THV30QuZtFOON4c/UyARWYJr8mVq4TqiP gVVmQ/FA/rmBM2pnDEPyW8LHrUljUcj4O5//k17gTL7ujFbYjkTRQvIrP4bP8+KyfR6m 6i86Oq5nzm6ejo+QNYpOY7uOKYmOoO1Jvyx4AZgwlV23f89lHBGpZZO8WrVa1GD9iZyW vDuhdLiUa2HYiB2tKPLBL+8OZua7BfFyqd7ijI33eenUaMx8QTXdEey9wooFo3nPNhqp 9ltQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725989943; x=1726594743; 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=nL+5j3KYtdxOCvyuGBLquGt4laEVHE2D17hxCL7BaSA=; b=MuAXQnw7y+z4Fuw12cEGCJWTq3HA6Vs8zyRLS2As4ZJ9p8JL8pGj4UCcqPDT6dkbWK b1Eu2xpMF0chlOm7fyMhVM6mwR+ga8YYjAm/OfzZlv7m7ZH5ZvMiaSalVlykUg3FnQfZ 6n0rCF1shABiXS5Lc9ageNmR+JyNxeV7rM6OLgtI446QqM+AGpB1z8ZPY3TK9HrfzG3x GQt58pc+/fuFhdy9KgkCj6YPae7zb05ppXepORJ+uHiABCP5ooQIUzYGs8ai2G3vt6hP 75VzrlRdsZFSuGNe5ZDZnie5C2thQbT5tHObh1msCl0i68Eo3m1ugj6Bu1/SwzGoijel q6Jg== X-Gm-Message-State: AOJu0YxcUYvQnUK3ClGdjYe5s/LOVR72QLrrk4zmiBzaUS9MXjfonxyv z5UUyKSJ1OtDK4qmkVh5wtZ93i+90gcBqUdyjMi+eIeleeaf6wAVGxY3hKAVDss= X-Google-Smtp-Source: AGHT+IFb5qWQFky2KBuxH+J7nhBtTftWNhiPNJhITTQsDLJazgFRriqeBjGZzCFoWs/APZW6aaPb+g== X-Received: by 2002:a17:907:268e:b0:a86:8953:e1fe with SMTP id a640c23a62f3a-a8ffadf3c37mr155638566b.47.1725989941865; Tue, 10 Sep 2024 10:39:01 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a8d25ced20csm510791366b.172.2024.09.10.10.39.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Sep 2024 10:39:01 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id B33C05F86D; Tue, 10 Sep 2024 18:39:00 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Thomas Huth , Zhao Liu , Peter Maydell , Paolo Bonzini , Marcel Apfelbaum , qemu-arm@nongnu.org, devel@lists.libvirt.org, Pierrick Bouvier , Alexandre Iooss , =?utf-8?q?Alex_Benn=C3=A9e?= , =?utf-8?q?Philippe_M?= =?utf-8?q?athieu-Daud=C3=A9?= , Jiaxun Yang , Beraldo Leal , Eduardo Habkost , Richard Henderson , Mahmoud Mandour , Yanan Wang , Wainer dos Santos Moschetta Subject: [PATCH v2 03/10] tests/docker: use debian-all-test-cross for mips64el tests Date: Tue, 10 Sep 2024 18:38:53 +0100 Message-Id: <20240910173900.4154726-4-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240910173900.4154726-1-alex.bennee@linaro.org> References: <20240910173900.4154726-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::534; envelope-from=alex.bennee@linaro.org; helo=mail-ed1-x534.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org While the mips64el cross compilation environment is busted in Debian we can use the debian-all-test-cross image for building TCG tests like we do in the CI. Signed-off-by: Alex Bennée Reviewed-by: Richard Henderson --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure b/configure index d08b71f14b..39a284ddfe 100755 --- a/configure +++ b/configure @@ -1328,7 +1328,7 @@ probe_target_compiler() { container_cross_prefix=microblaze-linux-musl- ;; mips64el) - container_image=debian-mips64el-cross + container_image=debian-all-test-cross container_cross_prefix=mips64el-linux-gnuabi64- ;; tricore) From patchwork Tue Sep 10 17:38:54 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 1983428 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=nn7UI0N5; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4X39xq4TxXz1y1v for ; Wed, 11 Sep 2024 03:42:07 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1so4pm-0005Nw-GI; Tue, 10 Sep 2024 13:39:22 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1so4pX-0004iH-MG for qemu-devel@nongnu.org; Tue, 10 Sep 2024 13:39:08 -0400 Received: from mail-ed1-x534.google.com ([2a00:1450:4864:20::534]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1so4pV-0004ZD-Oo for qemu-devel@nongnu.org; Tue, 10 Sep 2024 13:39:07 -0400 Received: by mail-ed1-x534.google.com with SMTP id 4fb4d7f45d1cf-5c26852af8fso7610616a12.2 for ; Tue, 10 Sep 2024 10:39:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1725989944; x=1726594744; 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=uDAMP75hxzkvSxh1nZDBhj94P3LXNhJD9uwli3Aulp8=; b=nn7UI0N5tnIt8ydaqDPf9TdOxJeqj3v6JvWRNlbZhD2h5T8I9u4axM0yRSuz28lTyC ODGbDxiSaJtSm0HwS1VBw07d7dr7vS12OBD0Xx1gNphUCMk1WRZkmcZwwuuGaadpOXTg Gof81od4GIvg/f6zRKjcn3csE1P0pAU2DAcJNLgCmjsKfEwJNAJ0A9cLr8C1XuawXwSx jdqmZFhpTfuoW0bt6u1zaki8pKj5Sd++pE0s77H1bY5NhRniEKADrE4VXxgn4pQtTO3U YAFHagACXx7uOdNem2xw8NVs8WOMKgyk+p23Siw8OK48CJjmaY9BF2PAaUKPrfCnCIIj Au7A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725989944; x=1726594744; 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=uDAMP75hxzkvSxh1nZDBhj94P3LXNhJD9uwli3Aulp8=; b=Tecchyt2K4Sp47SXXeaz2fWxfgZMhRnszNNIS1onTLSnJ1uzb5ehlVwMEuB9fJ+F+B 7hM322svyOPYNIcyCojXQC25Yirb4l8BItz9Qin69pUE+ztGUn1o1pz/Nfrs2Ks0ssNX 9nfLaI9bI0t4oJ6QrjAU9enmNOvWjbz91okLhXmfMIkt7gPknHI1dpeBSmdHQ2XCvrzT 5wMzsAQ2j1prJO365cmbroUrEDmPSxDE3YFkEL0bQhMLU28BlcPrJ+Oozpt3oLKB0sbt wI7C2w1FFDPyXBddOMk+DKHh0pKdkH8MMPK6MxFNWFxI5eHyYX9kUrb5eaCByBCqwA+C FafA== X-Gm-Message-State: AOJu0YzCdN+e2qmfpoPTY5hSqyWZ8cfqv4c5zyi68MolSKmpb5Cb9Ki9 CnYLiUh64vzrS+Yt4hiyRWjC6foRlHGQnmjEWAiEM2PaKPK/pQk43YLLbX6iuV0= X-Google-Smtp-Source: AGHT+IG5eom9WBJpGw3ncMWrCxqN2raB7ElUMFe30Zp8kmSx3WAkK5FfD3K7tSVj1bQxhju1fEeSVg== X-Received: by 2002:a05:6402:34c4:b0:5c2:6083:6256 with SMTP id 4fb4d7f45d1cf-5c3e962d91dmr10904004a12.10.1725989943384; Tue, 10 Sep 2024 10:39:03 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5c3ebd46819sm4453099a12.31.2024.09.10.10.39.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Sep 2024 10:39:01 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id C93A85F9CC; Tue, 10 Sep 2024 18:39:00 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Thomas Huth , Zhao Liu , Peter Maydell , Paolo Bonzini , Marcel Apfelbaum , qemu-arm@nongnu.org, devel@lists.libvirt.org, Pierrick Bouvier , Alexandre Iooss , =?utf-8?q?Alex_Benn=C3=A9e?= , =?utf-8?q?Philippe_M?= =?utf-8?q?athieu-Daud=C3=A9?= , Jiaxun Yang , Beraldo Leal , Eduardo Habkost , Richard Henderson , Mahmoud Mandour , Yanan Wang , Wainer dos Santos Moschetta Subject: [PATCH v2 04/10] docs/devel: fix duplicate line Date: Tue, 10 Sep 2024 18:38:54 +0100 Message-Id: <20240910173900.4154726-5-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240910173900.4154726-1-alex.bennee@linaro.org> References: <20240910173900.4154726-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::534; envelope-from=alex.bennee@linaro.org; helo=mail-ed1-x534.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org I guess the same change came in via two patch series. Remove the repetition. Fixes: 2a851fca9f (docs/devel: remind developers to run CI container pipeline when updating images) Message-Id: <20240910140733.4007719-4-alex.bennee@linaro.org> Reviewed-by: Pierrick Bouvier Signed-off-by: Alex Bennée --- docs/devel/testing/main.rst | 6 ------ 1 file changed, 6 deletions(-) diff --git a/docs/devel/testing/main.rst b/docs/devel/testing/main.rst index e9921a4b10..09725e8ea9 100644 --- a/docs/devel/testing/main.rst +++ b/docs/devel/testing/main.rst @@ -500,12 +500,6 @@ first to contribute the mapping to the ``libvirt-ci`` project: `CI `__ documentation page on how to trigger gitlab CI pipelines on your change. - * Please also trigger gitlab container generation pipelines on your change - for as many OS distros as practical to make sure that there are no - obvious breakages when adding the new pre-requisite. Please see - `CI `__ documentation - page on how to trigger gitlab CI pipelines on your change. - For enterprise distros that default to old, end-of-life versions of the Python runtime, QEMU uses a separate set of mappings that work with more recent versions. These can be found in ``tests/lcitool/mappings.yml``. From patchwork Tue Sep 10 17:38:55 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 1983426 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=j7aYyE4X; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4X39xl40G0z1y1v for ; Wed, 11 Sep 2024 03:42:01 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1so4pv-0005p4-JJ; Tue, 10 Sep 2024 13:39:32 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1so4pZ-0004me-V7 for qemu-devel@nongnu.org; Tue, 10 Sep 2024 13:39:11 -0400 Received: from mail-ej1-x635.google.com ([2a00:1450:4864:20::635]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1so4pX-0004Zm-D7 for qemu-devel@nongnu.org; Tue, 10 Sep 2024 13:39:09 -0400 Received: by mail-ej1-x635.google.com with SMTP id a640c23a62f3a-a8a7b1c2f2bso167212066b.0 for ; Tue, 10 Sep 2024 10:39:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1725989946; x=1726594746; 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=3rTxwacRyl+bWtsw8yvVr2/Byzv5V7eVXyx+MM0eORw=; b=j7aYyE4Xa5FqddUOOkh/qeCGuEGRzjI/8SeU0hjB4xOdUKSvK8Lc8BiXIRCEGdYe7U 0T3EU15uwD0JS7p+BnwX7TvEfrGWpWzjtdMpQ3QFPvvUK/xE0q9NMbDTtFcU2PG46EdE GSnJ8E4Q2eKQrTdyuoK+xuDAqAKEbZdeKGKBgyMOlmng/V8r4NZbV5wb5fPWpcYjBGaK ZQ7jQkHOxuk/BZGSBH+Fm+WJusgkTGentQG+s571StWxLmgLDc7DGmJTnzTTp86nKdmq e7l12f4QnDb32FXeQOwXnGtx/ewrOoDHsOoDfqpv7YGBcXfVIGnqsA29KMyPBw9ZCxoa CoMg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725989946; x=1726594746; 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=3rTxwacRyl+bWtsw8yvVr2/Byzv5V7eVXyx+MM0eORw=; b=Jsa32f3PK/vdn6+Lzf5SRl2tpildd5fC+uuXTdUZdoNtJXz1u4vCYdstabM2FCvHPR 0K22SZAAGoJw5eeAu3k/Z3vqc5GPzl8AfY+f10StGirPSn5oFSVFySau+cE9KrKABPe6 MGuyZ/bxKY5Aak0yOh0kv3/YtOaBZ2mjS+6Ic/NQiupsJ3rRy5Vl07l38/Z1kZ6EOqtg HjnIX+mW9F9Gp0DMHSpEHGq3C3z9uowqGTBIQB4X85BPwPhfIA8nBfxgoh2xsYe1qn0s zKqHdv+4k0ridCvSteRSGgUtzKDUO8kXZWa2oAEIS5j7Ykgmg1pX6N06de7onM6dxsmi Seug== X-Gm-Message-State: AOJu0YwACc1gne1C9ztmhhC5rssY2kwzdf6q4C8atbhyHIsVuiCJScIG tltJO2Y3eVuqfRAWQttv5GBhNOQwDKjlzkqKBJBfQrmGCOVQUc3EqXmGvBgHAro= X-Google-Smtp-Source: AGHT+IE0k9TBw1KZtC5bnOYFS68MWn5Sz/qewV0BRe90PR3RY5lZ8Au07wLZwuup8S4m73snV6DoSQ== X-Received: by 2002:a17:907:7292:b0:a8d:2ab2:c990 with SMTP id a640c23a62f3a-a9004aba7ebmr28322066b.64.1725989945877; Tue, 10 Sep 2024 10:39:05 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a8d2592647esm508348266b.48.2024.09.10.10.39.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Sep 2024 10:39:04 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id E07665F9CE; Tue, 10 Sep 2024 18:39:00 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Thomas Huth , Zhao Liu , Peter Maydell , Paolo Bonzini , Marcel Apfelbaum , qemu-arm@nongnu.org, devel@lists.libvirt.org, Pierrick Bouvier , Alexandre Iooss , =?utf-8?q?Alex_Benn=C3=A9e?= , =?utf-8?q?Philippe_M?= =?utf-8?q?athieu-Daud=C3=A9?= , Jiaxun Yang , Beraldo Leal , Eduardo Habkost , Richard Henderson , Mahmoud Mandour , Yanan Wang , Wainer dos Santos Moschetta Subject: [PATCH v2 05/10] scripts/ci: update the gitlab-runner playbook Date: Tue, 10 Sep 2024 18:38:55 +0100 Message-Id: <20240910173900.4154726-6-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240910173900.4154726-1-alex.bennee@linaro.org> References: <20240910173900.4154726-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::635; envelope-from=alex.bennee@linaro.org; helo=mail-ej1-x635.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org The upstream install instructions: https://docs.gitlab.com/runner/install/linux-repository.html Now refer to repositories and a setup script. Modernise the playbook to use the preferred delivery method. Message-Id: <20240910140733.4007719-5-alex.bennee@linaro.org> Reviewed-by: Pierrick Bouvier Signed-off-by: Alex Bennée --- scripts/ci/setup/gitlab-runner.yml | 39 +++++++++++++++++++++++------- 1 file changed, 30 insertions(+), 9 deletions(-) diff --git a/scripts/ci/setup/gitlab-runner.yml b/scripts/ci/setup/gitlab-runner.yml index 7bdafab511..57e7faebf1 100644 --- a/scripts/ci/setup/gitlab-runner.yml +++ b/scripts/ci/setup/gitlab-runner.yml @@ -49,30 +49,51 @@ - debug: msg: gitlab-runner arch is {{ gitlab_runner_arch }} - - name: Download the matching gitlab-runner (DEB) + # Debian/Ubuntu setup + - name: Get gitlab-runner repo setup script (DEB) get_url: dest: "/root/" - url: "https://gitlab-runner-downloads.s3.amazonaws.com/latest/deb/gitlab-runner_{{ gitlab_runner_arch }}.deb" + url: "https://packages.gitlab.com/install/repositories/runner/gitlab-runner/script.deb.sh" + mode: 0755 when: - ansible_facts['distribution'] == 'Ubuntu' - - name: Download the matching gitlab-runner (RPM) + - name: Run gitlab-runner repo setup script (DEB) + shell: "/root/script.deb.sh" + when: + - ansible_facts['distribution'] == 'Ubuntu' + + - name: Install gitlab-runner (DEB) + ansible.builtin.apt: + name: gitlab-runner + update_cache: yes + state: present + when: + - ansible_facts['distribution'] == 'Ubuntu' + + # RPM setup + - name: Get gitlab-runner repo setup script (RPM) get_url: dest: "/root/" - url: "https://gitlab-runner-downloads.s3.amazonaws.com/latest/rpm/gitlab-runner_{{ gitlab_runner_arch }}.rpm" + url: "https://packages.gitlab.com/install/repositories/runner/gitlab-runner/script.rpm.sh" + mode: 0755 when: - ansible_facts['distribution'] == 'CentOS' - - name: Install gitlab-runner via package manager (DEB) - apt: deb="/root/gitlab-runner_{{ gitlab_runner_arch }}.deb" + - name: Run gitlab-runner repo setup script (RPM) + shell: "/root/script.rpm.sh" when: - - ansible_facts['distribution'] == 'Ubuntu' + - ansible_facts['distribution'] == 'CentOS' - - name: Install gitlab-runner via package manager (RPM) - yum: name="/root/gitlab-runner_{{ gitlab_runner_arch }}.rpm" + - name: Install gitlab-runner (RPM) + yum: + name: gitlab-runner + update_cache: yes + state: present when: - ansible_facts['distribution'] == 'CentOS' + # Register Runners - name: Register the gitlab-runner command: "/usr/bin/gitlab-runner register --non-interactive --url {{ gitlab_runner_server_url }} --registration-token {{ gitlab_runner_registration_token }} --executor shell --tag-list {{ ansible_facts[\"architecture\"] }},{{ ansible_facts[\"distribution\"]|lower }}_{{ ansible_facts[\"distribution_version\"] }} --description '{{ ansible_facts[\"distribution\"] }} {{ ansible_facts[\"distribution_version\"] }} {{ ansible_facts[\"architecture\"] }} ({{ ansible_facts[\"os_family\"] }})'" From patchwork Tue Sep 10 17:38:56 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 1983417 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=pmJuufhh; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4X39w41vgBz1y1S for ; Wed, 11 Sep 2024 03:40:36 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1so4ps-0005lK-CU; Tue, 10 Sep 2024 13:39:28 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1so4pa-0004mi-TY for qemu-devel@nongnu.org; Tue, 10 Sep 2024 13:39:11 -0400 Received: from mail-ed1-x534.google.com ([2a00:1450:4864:20::534]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1so4pY-0004a2-43 for qemu-devel@nongnu.org; Tue, 10 Sep 2024 13:39:10 -0400 Received: by mail-ed1-x534.google.com with SMTP id 4fb4d7f45d1cf-5c3c30e663fso1197774a12.1 for ; Tue, 10 Sep 2024 10:39:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1725989947; x=1726594747; 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=4x/2lUUGLpLRO+8rqUP/+rQmXa+2LMUSZP6UGcSNzgE=; b=pmJuufhhEeVxIgHBm7w4URAbm6RtYPrSVCPuWAn/9GBnp4Oprj1hX81QfFx0mUDjDF XwM/0H23UBMpUkitPnN7avyBrvYJjRoMEijKJkqgmp6fcnVqscgaBBR8YONIQa0U97AQ 3bcAlk++I31kvqUVnFM2MzPWiawZiKs8hvpeV4ec3aQ/mMYUK3QLc/UWLzLT30+5YWQ0 pC7u6Q7dGLHtZEsOyAlXneOrqqbdq3XzGBDtkiWXJaJFL89oMkJz7EY8d8lkf5z7ZYQp 8LnDVLAg2xPmUfuIMSKNV4R/xJbWoT0eiNu4wpAV2fq1ZoQdeBh4bt8X/e+7Dwl46KDn J6VA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725989947; x=1726594747; 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=4x/2lUUGLpLRO+8rqUP/+rQmXa+2LMUSZP6UGcSNzgE=; b=IRO9/zCWTvnsCU9QE+D+n6R1l0V34BbDbjSXuULlLWjKMl8patiETyWpEHBPDEMcPj EOj47UiHIeQ+gnjrJVJoW6/OagFakRU5HJvC1mHkMlKlm9KRVyZP/SsCj0QaxAfUuXA4 +vg5P89/S2V/RUwNJBvc0xMzYRuwkBJFZwKErnCBTH8lTDmrl8E8yxsAj5QAk2Z+rfun +xuzec54qbFlQp7dlN6YHnv9lzyXmwpOnDH2I9AMjpaX0RbU4d9quhujchvi3kSKgRGj dVsBgEBpXMxEszZsr8awehx/030Ua9R1Q5mqhHctkTmqiqNe81rAZODEt2hvadZTx2u9 irXA== X-Gm-Message-State: AOJu0YxLMj/ucniJKnQgih/K8KY6xyxnEoL2+gu1WHOhWBPKJ9QqzUOd FnhhWjBIXbCRQu4UaoDgU83uXDXVkG/rFtvaJzoo7Sjdu76hohm1H6hhNidh6oY= X-Google-Smtp-Source: AGHT+IEjRyIc6i/258npWh4FAc//VInayQfzNOCF7k8IdBTXDr/nd0pQvaqevcqiGcohd0fLAi/L+A== X-Received: by 2002:a17:907:f15a:b0:a8d:5472:b591 with SMTP id a640c23a62f3a-a900478ee2bmr34753866b.5.1725989946510; Tue, 10 Sep 2024 10:39:06 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a8d25c624efsm507008566b.114.2024.09.10.10.39.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Sep 2024 10:39:04 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 05B555FA08; Tue, 10 Sep 2024 18:39:01 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Thomas Huth , Zhao Liu , Peter Maydell , Paolo Bonzini , Marcel Apfelbaum , qemu-arm@nongnu.org, devel@lists.libvirt.org, Pierrick Bouvier , Alexandre Iooss , =?utf-8?q?Alex_Benn=C3=A9e?= , =?utf-8?q?Philippe_M?= =?utf-8?q?athieu-Daud=C3=A9?= , Jiaxun Yang , Beraldo Leal , Eduardo Habkost , Richard Henderson , Mahmoud Mandour , Yanan Wang , Wainer dos Santos Moschetta , Gustavo Romero Subject: [PATCH v2 06/10] gdbstub: Use specific MMU index when probing MTE addresses Date: Tue, 10 Sep 2024 18:38:56 +0100 Message-Id: <20240910173900.4154726-7-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240910173900.4154726-1-alex.bennee@linaro.org> References: <20240910173900.4154726-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::534; envelope-from=alex.bennee@linaro.org; helo=mail-ed1-x534.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Gustavo Romero Use cpu_mmu_index() to determine the specific translation regime (MMU index) before probing addresses using allocation_tag_mem_probe(). Currently, the MMU index is hardcoded to 0 and only works for user mode. By obtaining the specific MMU index according to the translation regime, future use of the stubs relying on allocation_tag_mem_probe in other regimes will be possible, like in EL1. This commit also changes the ptr_size value passed to allocation_tag_mem_probe() from 8 to 1. The ptr_size parameter actually represents the number of bytes in the memory access (which can be as small as 1 byte), rather than the number of bits used in the address space pointed to by ptr. Signed-off-by: Gustavo Romero Reviewed-by: Richard Henderson Message-Id: <20240906143316.657436-2-gustavo.romero@linaro.org> Signed-off-by: Alex Bennée --- target/arm/gdbstub64.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/target/arm/gdbstub64.c b/target/arm/gdbstub64.c index 5221381cc8..85a19c14c7 100644 --- a/target/arm/gdbstub64.c +++ b/target/arm/gdbstub64.c @@ -435,6 +435,7 @@ static void handle_q_memtag(GArray *params, void *user_ctx) { ARMCPU *cpu = ARM_CPU(user_ctx); CPUARMState *env = &cpu->env; + uint32_t mmu_index; uint64_t addr = gdb_get_cmd_param(params, 0)->val_ull; uint64_t len = gdb_get_cmd_param(params, 1)->val_ul; @@ -458,8 +459,10 @@ static void handle_q_memtag(GArray *params, void *user_ctx) gdb_put_packet("E03"); } + /* Find out the current translation regime for probe. */ + mmu_index = cpu_mmu_index(env_cpu(env), false); /* Note that tags are packed here (2 tags packed in one byte). */ - tags = allocation_tag_mem_probe(env, 0, addr, MMU_DATA_LOAD, 8 /* 64-bit */, + tags = allocation_tag_mem_probe(env, mmu_index, addr, MMU_DATA_LOAD, 1, MMU_DATA_LOAD, true, 0); if (!tags) { /* Address is not in a tagged region. */ @@ -478,13 +481,16 @@ static void handle_q_isaddresstagged(GArray *params, void *user_ctx) { ARMCPU *cpu = ARM_CPU(user_ctx); CPUARMState *env = &cpu->env; + uint32_t mmu_index; uint64_t addr = gdb_get_cmd_param(params, 0)->val_ull; uint8_t *tags; const char *reply; - tags = allocation_tag_mem_probe(env, 0, addr, MMU_DATA_LOAD, 8 /* 64-bit */, + /* Find out the current translation regime for probe. */ + mmu_index = cpu_mmu_index(env_cpu(env), false); + tags = allocation_tag_mem_probe(env, mmu_index, addr, MMU_DATA_LOAD, 1, MMU_DATA_LOAD, true, 0); reply = tags ? "01" : "00"; @@ -495,6 +501,7 @@ static void handle_Q_memtag(GArray *params, void *user_ctx) { ARMCPU *cpu = ARM_CPU(user_ctx); CPUARMState *env = &cpu->env; + uint32_t mmu_index; uint64_t start_addr = gdb_get_cmd_param(params, 0)->val_ull; uint64_t len = gdb_get_cmd_param(params, 1)->val_ul; @@ -527,8 +534,10 @@ static void handle_Q_memtag(GArray *params, void *user_ctx) * Get all tags in the page starting from the tag of the start address. * Note that there are two tags packed into a single byte here. */ - tags = allocation_tag_mem_probe(env, 0, start_addr, MMU_DATA_STORE, - 8 /* 64-bit */, MMU_DATA_STORE, true, 0); + /* Find out the current translation regime for probe. */ + mmu_index = cpu_mmu_index(env_cpu(env), false); + tags = allocation_tag_mem_probe(env, mmu_index, start_addr, MMU_DATA_STORE, + 1, MMU_DATA_STORE, true, 0); if (!tags) { /* Address is not in a tagged region. */ gdb_put_packet("E04"); From patchwork Tue Sep 10 17:38:57 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 1983422 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=pzDz8okp; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4X39wP1ng9z1y1S for ; Wed, 11 Sep 2024 03:40:53 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1so4pw-0005pY-5Y; Tue, 10 Sep 2024 13:39:32 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1so4pc-0004pw-5u for qemu-devel@nongnu.org; Tue, 10 Sep 2024 13:39:13 -0400 Received: from mail-ej1-x62c.google.com ([2a00:1450:4864:20::62c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1so4pZ-0004ak-OI for qemu-devel@nongnu.org; Tue, 10 Sep 2024 13:39:11 -0400 Received: by mail-ej1-x62c.google.com with SMTP id a640c23a62f3a-a8d29b7edc2so474940166b.1 for ; Tue, 10 Sep 2024 10:39:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1725989948; x=1726594748; 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=4JYCYUJifJOf8IAr8uZJXdISd8++rwC9FrhK6nCyU7M=; b=pzDz8okpSnvB5sZALhzWB4nYHRQVcicma5IhzJylcfpfDfuGaDrPtk2rr6dUjTo4pK cCU6WufHroT/s6Pch9cLsUN5o2cA78sN1D9CcZOaibRx1+tcaR0lLcZfQ+dlnRUvabpF CVNcujBvNemihuc9gf6K6k72CHJvO1la6xqSYigL+YdbEP3deNBGuqIrQeEdhXVLH40z AB9EMTyphn6jubOeQ20nnaUMFsRmnSheZmF+ZyZHfMk1I0Ig3vjYg+7WBtUqVRDWlYdP l08wxCaP2dI6qBNgD5wz/6oHyo2Figa3nemIiv3uFcpltedm1zfH1Ya3BFXTMjy6AVq4 4BaQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725989948; x=1726594748; 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=4JYCYUJifJOf8IAr8uZJXdISd8++rwC9FrhK6nCyU7M=; b=S6BJCSxzNrq4ytYNsm7klRftSnpGQWaIcWiDyRKYylgvyX1ZMXCGFx6CTDGVsf4ugS ckjKH824U1+hSL5eAYUqmaZHkiPXqiG01BpkkgWXU5pOfms7zfPQul2k42wg/9hKIzkx xlBAZCVnkVv7Pug1OA65vOt1hw/gVji1/29tMTJsattCaBFcFxz4rv2dOt3vznf8vHtg lhs1Dk4heM5wa7bMrQr89eW7vTRBi+RXjRNTIqK/WmlVhWsoIx8CCjXoQeJFBYmBuE0r T5hSu23yNWI+Q6cDgIuLwSFjAwYSTqMNLVicbgkTBJXa2XkjE5YFJ6PTveemB0ffzTxo ZKjw== X-Gm-Message-State: AOJu0Ywl8Z/1kJiTrHyKojmrTw/NzoXCX0WEf9+n2vrk1fYz1ZKW/4Bg 5Rrwf0mU16PiXhCKCsdafqvUMTlR4bpkIpkqrUf+Xn8SpUinax2Q2NdKF3rvxn8= X-Google-Smtp-Source: AGHT+IF01JF6bkpfXUUAD7B8/SqE9++NilsryYre//MgoT1zo4BQkG9c196L9fAV75D2WwY7jhIKCA== X-Received: by 2002:a17:907:7fa8:b0:a8d:128a:cc49 with SMTP id a640c23a62f3a-a8ffadc8c5amr121943666b.52.1725989948025; Tue, 10 Sep 2024 10:39:08 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a8d2597ac96sm510004966b.73.2024.09.10.10.39.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Sep 2024 10:39:04 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 1C1475FA0E; Tue, 10 Sep 2024 18:39:01 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Thomas Huth , Zhao Liu , Peter Maydell , Paolo Bonzini , Marcel Apfelbaum , qemu-arm@nongnu.org, devel@lists.libvirt.org, Pierrick Bouvier , Alexandre Iooss , =?utf-8?q?Alex_Benn=C3=A9e?= , =?utf-8?q?Philippe_M?= =?utf-8?q?athieu-Daud=C3=A9?= , Jiaxun Yang , Beraldo Leal , Eduardo Habkost , Richard Henderson , Mahmoud Mandour , Yanan Wang , Wainer dos Santos Moschetta , Gustavo Romero Subject: [PATCH v2 07/10] gdbstub: Add support for MTE in system mode Date: Tue, 10 Sep 2024 18:38:57 +0100 Message-Id: <20240910173900.4154726-8-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240910173900.4154726-1-alex.bennee@linaro.org> References: <20240910173900.4154726-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::62c; envelope-from=alex.bennee@linaro.org; helo=mail-ej1-x62c.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Gustavo Romero This commit makes handle_q_memtag, handle_q_isaddresstagged, and handle_Q_memtag stubs build for system mode, allowing all GDB 'memory-tag' subcommands to work with QEMU gdbstub on aarch64 system mode. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/620 Signed-off-by: Gustavo Romero Reviewed-by: Richard Henderson Message-Id: <20240906143316.657436-3-gustavo.romero@linaro.org> [AJB: add #ifdef CONFIG_TCG guards] Signed-off-by: Alex Bennée --- v2 - while we enable system mode it is still TCG only so added guards to handle the --disable-tcg case (native KVM and Xen builds) --- target/arm/gdbstub64.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/target/arm/gdbstub64.c b/target/arm/gdbstub64.c index 85a19c14c7..1a4dbec567 100644 --- a/target/arm/gdbstub64.c +++ b/target/arm/gdbstub64.c @@ -430,7 +430,9 @@ int aarch64_gdb_set_tag_ctl_reg(CPUState *cs, uint8_t *buf, int reg) return 0; #endif } +#endif /* CONFIG_USER_ONLY */ +#ifdef CONFIG_TCG static void handle_q_memtag(GArray *params, void *user_ctx) { ARMCPU *cpu = ARM_CPU(user_ctx); @@ -600,13 +602,13 @@ static const GdbCmdParseEntry cmd_handler_table[NUM_CMDS] = { .need_cpu_context = true }, }; -#endif /* CONFIG_USER_ONLY */ +#endif /* CONFIG_TCG */ void aarch64_cpu_register_gdb_commands(ARMCPU *cpu, GString *qsupported, GPtrArray *qtable, GPtrArray *stable) { -#ifdef CONFIG_USER_ONLY /* MTE */ +#ifdef CONFIG_TCG if (cpu_isar_feature(aa64_mte, cpu)) { g_string_append(qsupported, ";memory-tagging+"); From patchwork Tue Sep 10 17:38:58 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 1983419 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=CFUJVCMA; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4X39w53x27z1y1S for ; Wed, 11 Sep 2024 03:40:37 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1so4pk-0005EO-8Y; Tue, 10 Sep 2024 13:39:20 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1so4pa-0004mh-TV for qemu-devel@nongnu.org; Tue, 10 Sep 2024 13:39:11 -0400 Received: from mail-ej1-x629.google.com ([2a00:1450:4864:20::629]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1so4pY-0004Zt-8S for qemu-devel@nongnu.org; Tue, 10 Sep 2024 13:39:10 -0400 Received: by mail-ej1-x629.google.com with SMTP id a640c23a62f3a-a8a7b1c2f2bso167213166b.0 for ; Tue, 10 Sep 2024 10:39:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1725989946; x=1726594746; 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=0gsP/ANf70RJH0KlgA0KWCypst2Oh4Yb8PQcZ6VG+qU=; b=CFUJVCMA2vm7cJSDLpxCLFDM5b+5sHQYqPquJSiJBUBOqR6fy0Gbvf8mZtKc9u+YO5 LVMh5cPVGOcsdcO9pTnqc8uWVHMS5K/0I1io8hCXWJkPF/FmKCWThgZXzUs7lxg3tyxF h6LnaHTvTA5/ZHvkb84f0QLJbbEUTT8KWYNdsOuDIN+xhjA/4/oGKTMwtGjWG5r/e0tV MiGCVD28NJS04hYUMXurtRqK/H5RTfEPvhWyxfGh4IGAHWDF8DJQf/uK6aaSanZfBcW8 RA3fbKogTmVnS2WcrL/Lx/7GvX5MF4zefoSsbvzcl1dsaig3kwo2FJYp7/GRVYipYT9R kQAw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725989946; x=1726594746; 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=0gsP/ANf70RJH0KlgA0KWCypst2Oh4Yb8PQcZ6VG+qU=; b=ZWCCPyfAK/3KKr/IoMSD/u1UZUQkq1q2goVy8w6yvD4oB0KOvQTQ3AGiNBRz7OBcbA j1fVg0hQqyUk22xQnBSABVL3gpNAzlSuz950I/wOjCs2xvPTM9b3bYHZ30TcKycOTLaz EBbRfdow+pTGlDDHlYLpuyAQINzMKLV2otC9t6g5y4TATusAS60mqY6GT9CS5W4AOAo/ SK3uPkDP9QAJvXUcUah6YcjHeWq/KXB6gKs535XB2BM62qCHmYWchEO2QOGxYuRb1vwJ yNLTE5dkhMEa3i2EiVleZ3UoVQanABaMUSA7nIKE7+XCqbRByaL78DYsvvR8lfZviBnz s7Uw== X-Gm-Message-State: AOJu0Yz8KHuxj4cU+JT3TysXS3i189usksYeqzUm7Fd4sYxaFrwoGgnZ Ulz0XRWh0TYs9PcCBRLWsg9YBhtSMFVo415AaSUwn1iYxc9TeYDwPptkjXavFEY= X-Google-Smtp-Source: AGHT+IHSFzOvB+PcMjQG2dt4gKhB4ImBN52E3779TS1kH8SZo8hP+j8Q4GUBszrP1/TrrvUd5BY40w== X-Received: by 2002:a17:907:2d13:b0:a86:aa57:57b8 with SMTP id a640c23a62f3a-a9004aba7c7mr29382466b.63.1725989946197; Tue, 10 Sep 2024 10:39:06 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a8d25ce970csm505277266b.159.2024.09.10.10.39.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Sep 2024 10:39:04 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 335A35FA11; Tue, 10 Sep 2024 18:39:01 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Thomas Huth , Zhao Liu , Peter Maydell , Paolo Bonzini , Marcel Apfelbaum , qemu-arm@nongnu.org, devel@lists.libvirt.org, Pierrick Bouvier , Alexandre Iooss , =?utf-8?q?Alex_Benn=C3=A9e?= , =?utf-8?q?Philippe_M?= =?utf-8?q?athieu-Daud=C3=A9?= , Jiaxun Yang , Beraldo Leal , Eduardo Habkost , Richard Henderson , Mahmoud Mandour , Yanan Wang , Wainer dos Santos Moschetta , Gustavo Romero Subject: [PATCH v2 08/10] tests/guest-debug: Support passing arguments to the GDB test script Date: Tue, 10 Sep 2024 18:38:58 +0100 Message-Id: <20240910173900.4154726-9-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240910173900.4154726-1-alex.bennee@linaro.org> References: <20240910173900.4154726-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::629; envelope-from=alex.bennee@linaro.org; helo=mail-ej1-x629.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Gustavo Romero This commit adds support for passing arguments to the GDB test scripts so it's possible to parse the args in an "argparse way" in the test scripts launched by the runner. The arguments should be preceded by -- when passed to the runner. For example, passing "--help" arg to the GDB_TEST_SCRIPT: run-test.py [...] --test -- --help The test script should not use the argparse module directly but import arg_parser from test_gdbstub module. arg_parser then can be used just like the argparse.ArgumentParser class: from test_gdbstub import arg_parser p = arg_parser(prog="test-mytest.py", description="My test.") p.add_argument("--vowel", help="Select vowel", required=True, choices=['a','e','i','o','u']) [...] The arg_parser allows a smooth and informative exit if, for instance, the caller of the runner script passes an invalid argument or misses a required argument by the test script. Signed-off-by: Gustavo Romero Reviewed-by: Alex Bennée Message-Id: <20240906143316.657436-4-gustavo.romero@linaro.org> Signed-off-by: Alex Bennée --- tests/guest-debug/run-test.py | 6 ++++++ tests/guest-debug/test_gdbstub.py | 5 +++++ 2 files changed, 11 insertions(+) diff --git a/tests/guest-debug/run-test.py b/tests/guest-debug/run-test.py index 368ff8a890..5a091db8be 100755 --- a/tests/guest-debug/run-test.py +++ b/tests/guest-debug/run-test.py @@ -27,6 +27,10 @@ def get_args(): parser.add_argument("--binary", help="Binary to debug", required=True) parser.add_argument("--test", help="GDB test script") + parser.add_argument('test_args', nargs='*', + help="Additional args for GDB test script. " + "The args should be preceded by -- to avoid confusion " + "with flags for runner script") parser.add_argument("--gdb", help="The gdb binary to use", default=None) parser.add_argument("--gdb-args", help="Additional gdb arguments") @@ -91,6 +95,8 @@ def log(output, msg): gdb_cmd += " -ex 'target remote %s'" % (socket_name) # finally the test script itself if args.test: + if args.test_args: + gdb_cmd += f" -ex \"py sys.argv={args.test_args}\"" gdb_cmd += " -x %s" % (args.test) diff --git a/tests/guest-debug/test_gdbstub.py b/tests/guest-debug/test_gdbstub.py index 46fbf98f0c..a715c0e3f5 100644 --- a/tests/guest-debug/test_gdbstub.py +++ b/tests/guest-debug/test_gdbstub.py @@ -2,6 +2,7 @@ """ from __future__ import print_function +import argparse import gdb import os import sys @@ -9,6 +10,10 @@ fail_count = 0 +class arg_parser(argparse.ArgumentParser): + def exit(self, status=None, message=""): + print("Wrong GDB script test argument! " + message) + gdb.execute("exit 1") def report(cond, msg): """Report success/fail of a test""" From patchwork Tue Sep 10 17:38:59 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 1983430 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=niRGpHpH; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4X39y92K7hz1y1S for ; Wed, 11 Sep 2024 03:42:25 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1so4py-0006Ao-7Z; Tue, 10 Sep 2024 13:39:34 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1so4pd-0004t5-I9 for qemu-devel@nongnu.org; Tue, 10 Sep 2024 13:39:13 -0400 Received: from mail-ed1-x52e.google.com ([2a00:1450:4864:20::52e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1so4pc-0004be-0e for qemu-devel@nongnu.org; Tue, 10 Sep 2024 13:39:13 -0400 Received: by mail-ed1-x52e.google.com with SMTP id 4fb4d7f45d1cf-5c26852af8fso7610781a12.2 for ; Tue, 10 Sep 2024 10:39:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1725989950; x=1726594750; 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=Y9b0lTkZojj9hYO/C00YAyDV7juvCe44sJPqhBOockE=; b=niRGpHpH5EsrPY1FiN7NDMoDWph4ZgorKU0nMTyg9NN/qfDafzZT6mA5ybPux0Xkdd aZqK3eE/xsPpeNz800wb7XRU+yAcn53j7J7K74xBp0OEJ3DREZdraSUYitJlS3q0Ld5W cfkapTyRWJ6lLxFAfZMBrdVqb0QFJXcbWt7DcQ/Ys4yJ4IhEwjYCuiawiRupz7WdNiM7 VRDYcsYzLOVqyxAmihnR1duT0HT9AhZSmowO6ROrA9b9N3jcbk9y3Wd/rgdsl3OtUenp smA6IRkQhBaX0uvrsz7dIYA1O5OKB2zDuHixCSs2O0nr1V59pS4uw1j+EnTObGcGDvQJ Mnpw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725989950; x=1726594750; 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=Y9b0lTkZojj9hYO/C00YAyDV7juvCe44sJPqhBOockE=; b=qM60yoVFk3y8qrvq8SlyJRCT55yohan+WEQitve+87XW8ac/Yy3kTJMf1AW27FF4DE huQcwZp60PmgMZlWaVl0ogx4YqLbinApXd3NWy3zB0Lv3qTMs1yfRc3MBM6gPPHsizMO Bnxtkfdsu8UtfumrnupB0R8CjXf9dmK1wTmFIF4I5my7ZYGBGX4+905qr4tX+GOnHObi 5/30BCX4PtX372YQWdjhcscSquzGdoOtIVEbr62GrkUb4TeI9BqViSl078jwMPdyjt+S W+U90fCsAxf56vGsDaf1LU3yNA7ZhtafHp7NSdTAJHIyAcP8SslCfGjcW9TXWcBtqaFM IKYg== X-Gm-Message-State: AOJu0YxEWHnF8PXqc94LrF8Tn4Cl7cazGIvBz6azkl0Ofo468LHVWRPf HH++aTqz1zrEl7rgHicxkKsczNUkt8yZCJKEdpaLqdvCD7Pot1Tr+sSSyS4nc0M= X-Google-Smtp-Source: AGHT+IGrxVKIESzIJrGE5gev1YvX+OVp+hxpav5vdJTFtBGEDe6nXHUWkOtTnpFiSYZCl8Bivru0hA== X-Received: by 2002:a05:6402:3506:b0:5c2:60cd:b814 with SMTP id 4fb4d7f45d1cf-5c3e9630d6emr9848491a12.12.1725989950314; Tue, 10 Sep 2024 10:39:10 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5c3ebd76f96sm4438739a12.74.2024.09.10.10.39.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Sep 2024 10:39:08 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 4B5045FA14; Tue, 10 Sep 2024 18:39:01 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Thomas Huth , Zhao Liu , Peter Maydell , Paolo Bonzini , Marcel Apfelbaum , qemu-arm@nongnu.org, devel@lists.libvirt.org, Pierrick Bouvier , Alexandre Iooss , =?utf-8?q?Alex_Benn=C3=A9e?= , =?utf-8?q?Philippe_M?= =?utf-8?q?athieu-Daud=C3=A9?= , Jiaxun Yang , Beraldo Leal , Eduardo Habkost , Richard Henderson , Mahmoud Mandour , Yanan Wang , Wainer dos Santos Moschetta , Gustavo Romero Subject: [PATCH v2 09/10] tests/tcg/aarch64: Improve linker script organization Date: Tue, 10 Sep 2024 18:38:59 +0100 Message-Id: <20240910173900.4154726-10-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240910173900.4154726-1-alex.bennee@linaro.org> References: <20240910173900.4154726-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::52e; envelope-from=alex.bennee@linaro.org; helo=mail-ed1-x52e.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=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+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Gustavo Romero Improve kernel.ld linker script organization by using MEMORY command. Signed-off-by: Richard Henderson Signed-off-by: Gustavo Romero Message-Id: <20240906143316.657436-5-gustavo.romero@linaro.org> Signed-off-by: Alex Bennée --- tests/tcg/aarch64/system/kernel.ld | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/tests/tcg/aarch64/system/kernel.ld b/tests/tcg/aarch64/system/kernel.ld index 7b3a76dcbf..5f39258d32 100644 --- a/tests/tcg/aarch64/system/kernel.ld +++ b/tests/tcg/aarch64/system/kernel.ld @@ -1,23 +1,23 @@ ENTRY(__start) -SECTIONS -{ - /* virt machine, RAM starts at 1gb */ - . = (1 << 30); +MEMORY { + /* On virt machine RAM starts at 1 GiB. */ + + /* Align text and rodata to the 1st 2 MiB chunk. */ + TXT (rx) : ORIGIN = 1 << 30, LENGTH = 2M + /* Align r/w data to the 2nd 2 MiB chunk. */ + DAT (rw) : ORIGIN = (1 << 30) + 2M, LENGTH = 2M +} + +SECTIONS { .text : { *(.text) - } - .rodata : { *(.rodata) - } - /* align r/w section to next 2mb */ - . = ALIGN(1 << 21); + } >TXT .data : { *(.data) - } - .bss : { *(.bss) - } + } >DAT /DISCARD/ : { *(.ARM.attributes) } From patchwork Tue Sep 10 17:39:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 1983431 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=tHh3nFZQ; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4X39yD3nSMz1y1S for ; Wed, 11 Sep 2024 03:42:28 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1so4pr-0005fQ-5F; Tue, 10 Sep 2024 13:39:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1so4pg-00056A-Ms for qemu-devel@nongnu.org; Tue, 10 Sep 2024 13:39:20 -0400 Received: from mail-lf1-x135.google.com ([2a00:1450:4864:20::135]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1so4pa-0004b9-LU for qemu-devel@nongnu.org; Tue, 10 Sep 2024 13:39:16 -0400 Received: by mail-lf1-x135.google.com with SMTP id 2adb3069b0e04-53661ac5ba1so1209469e87.2 for ; Tue, 10 Sep 2024 10:39:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1725989949; x=1726594749; 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=HoFAgf8Kp5KNK0KvKfU77RN/Ll2Ls2Lkh4OwDrxuJmk=; b=tHh3nFZQ79BGYzaEBrlDfL5f0bDGIv37Dz68dcn/4HS+UUk7b6ND3DDiUaDNFWxc8/ 4OsqgUn2OaUSD0+GFjyHv049fRyOkOqFKa2tS7CIchqjRjK3ImKPG1yGVByN/THM5/KO iAM4jdLi5VcZ9IHY1UECEQ0U0RaBLap+hfPyI48phlq61uXlRLOhTcubZvpA2Mx0J8dl fHjcDUXnGrQpW06zKZbfXRwhpg714POS6b9DAkJYnZ4YhxA5GpETi9Vcgd7X7+m4PzPI 1LZ/iRkv5/VtNQegQv7ypcmaTwRnG5G8ydwe9WquXL74dFVswbSeciVmoszzcP1hah/8 7K5Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725989949; x=1726594749; 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=HoFAgf8Kp5KNK0KvKfU77RN/Ll2Ls2Lkh4OwDrxuJmk=; b=cY+Dv1sy7ozDJHE+lSa8dU4EDc/1Hrd9R1zsZg3/yVle7ehoSJDgEakuPNJ916DHAS xB1TlRVIq5XH899tvAth7jfwtyqZxll7Ys7Y/9Dki70XtH6pLva+bTVEtiyLvxQ8ej6t fCjVThxN1BM4vho6cx+WMloni9yjYRFRLolHvlC6cEcEBuH2XXLmuk1Qb/p9HaHFvlsD cULmhX0dY2hAfgIC/s8/ZAW9P+iwaBrAvmSSfKJ4w83BClHdycIw6wOU8ueU0O2QLfRF 59/FVsfrhEP5ZrIuZXjQzdKyVt6/8ZGqYveWm6D3xBLaXNHe2im9+kOY3wOxpJzczbUG Ecxw== X-Gm-Message-State: AOJu0YzHFd73xfWBzcj3LF1e7OdYJM96VM8TbZ9/0767g3D27jKVEXS/ 7tJ/IZMm18f1TirHDiLlk207XeZwaIu4eDfCgxptpFHruIUPagC4kPh5xDqvywM= X-Google-Smtp-Source: AGHT+IHb2kLp9A8L8blR4JmweQg6DfqcrrvGyLUppuFRX+QxgJGGpDn9smWL+0G7kB7I945pwI8YYg== X-Received: by 2002:a05:6512:12ca:b0:536:5530:af46 with SMTP id 2adb3069b0e04-53673ca14f4mr191544e87.52.1725989948456; Tue, 10 Sep 2024 10:39:08 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a8d25c73bc1sm509364866b.136.2024.09.10.10.39.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Sep 2024 10:39:04 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 6A9185FA18; Tue, 10 Sep 2024 18:39:01 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Thomas Huth , Zhao Liu , Peter Maydell , Paolo Bonzini , Marcel Apfelbaum , qemu-arm@nongnu.org, devel@lists.libvirt.org, Pierrick Bouvier , Alexandre Iooss , =?utf-8?q?Alex_Benn=C3=A9e?= , =?utf-8?q?Philippe_M?= =?utf-8?q?athieu-Daud=C3=A9?= , Jiaxun Yang , Beraldo Leal , Eduardo Habkost , Richard Henderson , Mahmoud Mandour , Yanan Wang , Wainer dos Santos Moschetta , Gustavo Romero Subject: [PATCH v2 10/10] tests/tcg/aarch64: Extend MTE gdbstub tests to system mode Date: Tue, 10 Sep 2024 18:39:00 +0100 Message-Id: <20240910173900.4154726-11-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240910173900.4154726-1-alex.bennee@linaro.org> References: <20240910173900.4154726-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::135; envelope-from=alex.bennee@linaro.org; helo=mail-lf1-x135.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_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+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Gustavo Romero Extend MTE gdbstub tests to also run in system mode (share tests between user mode and system mode). The tests will only run if a version of GDB that supports MTE on baremetal is available in the test environment and if available compiler supports the 'memtag' flag (-march=armv8.5-a+memtag). For the tests running in system mode, a page that supports MTE ops. is necessary. Therefore, an MTE-enabled page is made available (mapped) in the third 2 MB chunk of the second 1 GB space in the flat mapping set in boot.S. A new binary, mte.S, is also introduced for the tests. It links against boot.S and is executed by QEMU in system mode. Signed-off-by: Gustavo Romero Message-Id: <20240906143316.657436-6-gustavo.romero@linaro.org> [AJB: fix stray _] Signed-off-by: Alex Bennée --- v2 fixed stray underline causing tests to be skipped --- configure | 5 + tests/tcg/aarch64/Makefile.softmmu-target | 49 +++++++++- tests/tcg/aarch64/Makefile.target | 3 +- tests/tcg/aarch64/gdbstub/test-mte.py | 71 +++++++++----- tests/tcg/aarch64/system/boot.S | 11 +++ tests/tcg/aarch64/system/kernel.ld | 9 ++ tests/tcg/aarch64/system/mte.S | 109 ++++++++++++++++++++++ 7 files changed, 229 insertions(+), 28 deletions(-) create mode 100644 tests/tcg/aarch64/system/mte.S diff --git a/configure b/configure index 39a284ddfe..7f6eb6b331 100755 --- a/configure +++ b/configure @@ -1679,6 +1679,11 @@ for target in $target_list; do echo "GDB_HAS_MTE=y" >> $config_target_mak fi + if test "${gdb_arches#*aarch64}" != "$gdb_arches" && version_ge $gdb_version 16.0; then + # GDB has to support MTE in baremetal to allow debugging MTE in QEMU system mode + echo "GDB_SUPPORTS_MTE_IN_BAREMETAL=y" >> $config_target_mak + fi + echo "run-tcg-tests-$target: $qemu\$(EXESUF)" >> Makefile.prereqs tcg_tests_targets="$tcg_tests_targets $target" fi diff --git a/tests/tcg/aarch64/Makefile.softmmu-target b/tests/tcg/aarch64/Makefile.softmmu-target index 139e04d15f..d08d9b01de 100644 --- a/tests/tcg/aarch64/Makefile.softmmu-target +++ b/tests/tcg/aarch64/Makefile.softmmu-target @@ -2,14 +2,22 @@ # Aarch64 system tests # -AARCH64_SYSTEM_SRC=$(SRC_PATH)/tests/tcg/aarch64/system +AARCH64_SRC=$(SRC_PATH)/tests/tcg/aarch64 +AARCH64_SYSTEM_SRC=$(AARCH64_SRC)/system + VPATH+=$(AARCH64_SYSTEM_SRC) # These objects provide the basic boot code and helper functions for all tests CRT_OBJS=boot.o -AARCH64_TEST_SRCS=$(wildcard $(AARCH64_SYSTEM_SRC)/*.c) -AARCH64_TESTS = $(patsubst $(AARCH64_SYSTEM_SRC)/%.c, %, $(AARCH64_TEST_SRCS)) +AARCH64_TEST_C_SRCS=$(wildcard $(AARCH64_SYSTEM_SRC)/*.c) +AARCH64_TEST_S_SRCS=$(AARCH64_SYSTEM_SRC)/mte.S + +AARCH64_C_TESTS = $(patsubst $(AARCH64_SYSTEM_SRC)/%.c, %, $(AARCH64_TEST_C_SRCS)) +AARCH64_S_TESTS = $(patsubst $(AARCH64_SYSTEM_SRC)/%.S, %, $(AARCH64_TEST_S_SRCS)) + +AARCH64_TESTS = $(AARCH64_C_TESTS) +AARCH64_TESTS += $(AARCH64_S_TESTS) CRT_PATH=$(AARCH64_SYSTEM_SRC) LINK_SCRIPT=$(AARCH64_SYSTEM_SRC)/kernel.ld @@ -21,7 +29,8 @@ LDFLAGS+=-static -nostdlib $(CRT_OBJS) $(MINILIB_OBJS) -lgcc config-cc.mak: Makefile $(quiet-@)( \ - $(call cc-option,-march=armv8.3-a, CROSS_CC_HAS_ARMV8_3)) 3> config-cc.mak + $(call cc-option,-march=armv8.3-a, CROSS_CC_HAS_ARMV8_3); \ + $(call cc-option,-march=armv8.5-a+memtag, CROSS_CC_HAS_ARMV8_MTE)) 3> config-cc.mak -include config-cc.mak # building head blobs @@ -88,3 +97,35 @@ pauth-3: run-pauth-3: $(call skip-test, "RUN of pauth-3", "not built") endif + +ifneq ($(CROSS_CC_HAS_ARMV8_MTE),) +QEMU_MTE_ENABLED_MACHINE=-M virt,mte=on -cpu max -display none +QEMU_OPTS_WITH_MTE_ON = $(QEMU_MTE_ENABLED_MACHINE) $(QEMU_BASE_ARGS) -kernel +mte: CFLAGS+=-march=armv8.5-a+memtag +mte: mte.S $(LINK_SCRIPT) $(CRT_OBJS) $(MINILIB_OBJS) + $(CC) $(CFLAGS) $(EXTRA_CFLAGS) $< -o $@ $(LDFLAGS) + +run-mte: QEMU_OPTS=$(QEMU_OPTS_WITH_MTE_ON) +run-mte: mte + +ifeq ($(GDB_SUPPORTS_MTE_IN_BAREMETAL),y) +run-gdbstub-mte: QEMU_OPTS=$(QEMU_OPTS_WITH_MTE_ON) +run-gdbstub-mte: mte + $(call run-test, $@, $(GDB_SCRIPT) \ + --output run-gdbstub-mte.out \ + --gdb $(GDB) \ + --qemu $(QEMU) --qargs "-chardev null$(COMMA)id=output $(QEMU_OPTS)" \ + --bin $< --test $(AARCH64_SRC)/gdbstub/test-mte.py -- --mode=system, \ + gdbstub MTE support) + +EXTRA_RUNS += run-gdbstub-mte +else # !GDB_SUPPORTS_MTE_IN_BAREMETAL +run-gdbstub-mte: + $(call skip-test "RUN of gdbstub-mte", "GDB does not support MTE in baremetal!") +endif +else # !CROSS_CC_HAS_ARMV8_MTE +mte: + $(call skip-test, "BUILD of $@", "missing compiler support") +run-mte: + $(call skip-test, "RUN of mte", "not build") +endif diff --git a/tests/tcg/aarch64/Makefile.target b/tests/tcg/aarch64/Makefile.target index 8cc62eb456..9efe2f81ad 100644 --- a/tests/tcg/aarch64/Makefile.target +++ b/tests/tcg/aarch64/Makefile.target @@ -138,7 +138,8 @@ run-gdbstub-mte: mte-8 $(call run-test, $@, $(GDB_SCRIPT) \ --gdb $(GDB) \ --qemu $(QEMU) --qargs "$(QEMU_OPTS)" \ - --bin $< --test $(AARCH64_SRC)/gdbstub/test-mte.py, \ + --bin $< --test $(AARCH64_SRC)/gdbstub/test-mte.py \ + -- --mode=user, \ gdbstub MTE support) EXTRA_RUNS += run-gdbstub-mte diff --git a/tests/tcg/aarch64/gdbstub/test-mte.py b/tests/tcg/aarch64/gdbstub/test-mte.py index 66f9c25f8a..a4cae6caa0 100644 --- a/tests/tcg/aarch64/gdbstub/test-mte.py +++ b/tests/tcg/aarch64/gdbstub/test-mte.py @@ -1,21 +1,26 @@ from __future__ import print_function # # Test GDB memory-tag commands that exercise the stubs for the qIsAddressTagged, -# qMemTag, and QMemTag packets. Logical tag-only commands rely on local -# operations, hence don't exercise any stub. +# qMemTag, and QMemTag packets, which are used for manipulating allocation tags. +# Logical tags-related commands rely on local operations, hence don't exercise +# any stub and so are not used in this test. # -# The test consists in breaking just after a atag() call (which sets the -# allocation tag -- see mte-8.c for details) and setting/getting tags in -# different memory locations and ranges starting at the address of the array -# 'a'. +# The test consists in breaking just after a tag is set in a specific memory +# chunk, and then using the GDB 'memory-tagging' subcommands to set/get tags in +# different memory locations and ranges in the MTE-enabled memory chunk. # # This is launched via tests/guest-debug/run-test.py # -import gdb +try: + import gdb +except ModuleNotFoundError: + from sys import exit + exit("This script must be launched via tests/guest-debug/run-test.py!") import re -from test_gdbstub import main, report +from sys import argv +from test_gdbstub import arg_parser, main, report PATTERN_0 = "Memory tags for address 0x[0-9a-f]+ match \\(0x[0-9a-f]+\\)." @@ -23,12 +28,32 @@ def run_test(): - gdb.execute("break 95", False, True) + p = arg_parser(prog="test-mte.py", description="TCG MTE tests.") + p.add_argument("--mode", help="Run test for QEMU system or user mode.", + required=True, choices=['system','user']) + + args = p.parse_args(args=argv) + + if args.mode == "system": + # Break address: where to break before performing the tests + # See mte.S for details about this label. + ba = "main_end" + # Tagged address: the start of the MTE-enabled memory chunk to be tested + # 'tagged_addr' (x1) is a pointer to the MTE-enabled page. See mte.S. + ta = "$x1" + else: # mode="user" + # Line 95 in mte-8.c + ba = "95" + # 'a' array. See mte-8.c + ta = "a" + + gdb.execute(f"break {ba}", False, True) gdb.execute("continue", False, True) + try: - # Test if we can check correctly that the allocation tag for - # array 'a' matches the logical tag after atag() is called. - co = gdb.execute("memory-tag check a", False, True) + # Test if we can check correctly that the allocation tag for the address + # in {ta} matches the logical tag in {ta}. + co = gdb.execute(f"memory-tag check {ta}", False, True) tags_match = re.findall(PATTERN_0, co, re.MULTILINE) if tags_match: report(True, f"{tags_match[0]}") @@ -39,20 +64,20 @@ def run_test(): # tags rely on local operation and so don't exercise any stub. # Set the allocation tag for the first granule (16 bytes) of - # address starting at 'a' address to a known value, i.e. 0x04. - gdb.execute("memory-tag set-allocation-tag a 1 04", False, True) + # address starting at {ta} address to a known value, i.e. 0x04. + gdb.execute(f"memory-tag set-allocation-tag {ta} 1 04", False, True) # Then set the allocation tag for the second granule to a known # value, i.e. 0x06. This tests that contiguous tag granules are - # set correct and don't run over each other. - gdb.execute("memory-tag set-allocation-tag a+16 1 06", False, True) + # set correctly and don't run over each other. + gdb.execute(f"memory-tag set-allocation-tag {ta}+16 1 06", False, True) # Read the known values back and check if they remain the same. - co = gdb.execute("memory-tag print-allocation-tag a", False, True) + co = gdb.execute(f"memory-tag print-allocation-tag {ta}", False, True) first_tag = re.match(PATTERN_1, co)[1] - co = gdb.execute("memory-tag print-allocation-tag a+16", False, True) + co = gdb.execute(f"memory-tag print-allocation-tag {ta}+16", False, True) second_tag = re.match(PATTERN_1, co)[1] if first_tag == "0x4" and second_tag == "0x6": @@ -61,15 +86,15 @@ def run_test(): report(False, "Can't set/print allocation tags!") # Now test fill pattern by setting a whole page with a pattern. - gdb.execute("memory-tag set-allocation-tag a 4096 0a0b", False, True) + gdb.execute(f"memory-tag set-allocation-tag {ta} 4096 0a0b", False, True) # And read back the tags of the last two granules in page so # we also test if the pattern is set correctly up to the end of # the page. - co = gdb.execute("memory-tag print-allocation-tag a+4096-32", False, True) + co = gdb.execute(f"memory-tag print-allocation-tag {ta}+4096-32", False, True) tag = re.match(PATTERN_1, co)[1] - co = gdb.execute("memory-tag print-allocation-tag a+4096-16", False, True) + co = gdb.execute(f"memory-tag print-allocation-tag {ta}+4096-16", False, True) last_tag = re.match(PATTERN_1, co)[1] if tag == "0xa" and last_tag == "0xb": @@ -78,8 +103,8 @@ def run_test(): report(False, "Fill pattern failed!") except gdb.error: - # This usually happens because a GDB version that does not - # support memory tagging was used to run the test. + # This usually happens because a GDB version that does not support + # memory tagging was used to run the test. report(False, "'memory-tag' command failed!") diff --git a/tests/tcg/aarch64/system/boot.S b/tests/tcg/aarch64/system/boot.S index 501685d0ec..4eb1b35b88 100644 --- a/tests/tcg/aarch64/system/boot.S +++ b/tests/tcg/aarch64/system/boot.S @@ -135,6 +135,17 @@ __start: orr x1, x1, x3 str x1, [x2] /* 2nd 2mb (.data & .bss)*/ + /* Third block: at 'mte_page', set in kernel.ld */ + adrp x1, mte_page + add x1, x1, :lo12:mte_page + bic x1, x1, #(1 << 21) - 1 + and x4, x1, x5 + add x2, x0, x4, lsr #(21 - 3) + /* attr(AF, NX, block, AttrIndx=Attr1) */ + ldr x3, =(3 << 53) | 0x401 | (1 << 2) + orr x1, x1, x3 + str x1, [x2] + /* Setup/enable the MMU. */ /* diff --git a/tests/tcg/aarch64/system/kernel.ld b/tests/tcg/aarch64/system/kernel.ld index 5f39258d32..aef043e31d 100644 --- a/tests/tcg/aarch64/system/kernel.ld +++ b/tests/tcg/aarch64/system/kernel.ld @@ -7,6 +7,8 @@ MEMORY { TXT (rx) : ORIGIN = 1 << 30, LENGTH = 2M /* Align r/w data to the 2nd 2 MiB chunk. */ DAT (rw) : ORIGIN = (1 << 30) + 2M, LENGTH = 2M + /* Align the MTE-enabled page to the 3rd 2 MiB chunk. */ + TAG (rw) : ORIGIN = (1 << 30) + 4M, LENGTH = 2M } SECTIONS { @@ -18,6 +20,13 @@ SECTIONS { *(.data) *(.bss) } >DAT + .tag : { + /* + * Symbol 'mte_page' is used in boot.S to setup the PTE and in the mte.S + * test as the address that the MTE instructions operate on. + */ + mte_page = .; + } >TAG /DISCARD/ : { *(.ARM.attributes) } diff --git a/tests/tcg/aarch64/system/mte.S b/tests/tcg/aarch64/system/mte.S new file mode 100644 index 0000000000..b611240a95 --- /dev/null +++ b/tests/tcg/aarch64/system/mte.S @@ -0,0 +1,109 @@ +/* + * Code to help test the MTE gdbstubs in system mode. + * + * Copyright (c) 2024 Linaro Limited + * + * Author: Gustavo Romero + * + * SPDX-License-Identifier: LGPL-2.1-or-later + */ + +#define addr x0 /* Ptr to the start of the MTE-enabled page. */ +#define tagged_addr x1 /* 'addr' ptr with a random-generated tag added. */ +#define tmp0 x2 /* Scratch register. */ +#define tmp1 x3 /* Scratch register. */ +#define tmp2 x4 /* Scratch register. */ +#define tmp3 x5 /* Sctatch register. */ + + .file "mte.S" + + .text + .align 4 + + .globl main + .type main, @function + +main: + /* + * Set MAIR_EL1 (Memory Attribute Index Register). In boot.S, the + * attribute index for .mte_page is set to point to MAILR_EL field Attr1 + * (AttrIndx=Attr1), so set Attr1 as Tagged Normal (MTE) to enable MTE + * on this page. + * + * Attr1 = 0xF0 => Tagged Normal (MTE) + */ + mrs tmp0, mair_el1 + orr tmp0, tmp0, (0xF0 << 8) + msr mair_el1, tmp0 + + /* + * Set TCR_EL1 (Translation Control Registers) to ignore the top byte + * in the translated addresses so it can be used to keep the tags. + * + * TBI0[37] = 0b1 => Top Byte ignored and used for tagged addresses + */ + mrs tmp1, tcr_el1 + orr tmp1, tmp1, (1 << 37) + msr tcr_el1, tmp1 + + /* + * Set SCTLR_EL1 (System Control Register) to enable the use of MTE + * insns., like stg & friends, and to enable synchronous exception in + * case of a tag mismatch, i.e., when the logical tag in 'tagged_addr' + * is different from the allocation tag related to 'addr' address. + * + * ATA[43] = 0b1 => Enable access to allocation tags at EL1 + * TCF[41:40] = 0b01 => Tag Check Faults cause a synchronous exception + * + */ + mrs tmp2, sctlr_el1 + mov tmp3, (1 << 43) | (1 << 40) + orr tmp2, tmp2, tmp3 + msr sctlr_el1, tmp2 + + isb + + /* + * MTE-enabled page resides at the 3rd 2MB chunk in the second 1GB + * block, i.e., at 0x40400000 address. See .mte_page section in boot.S + * and kernel.ld (where the address is effectively computed). + * + * Load .mte_page address into 'addr' register. + */ + adrp addr, mte_page + add addr, addr, :lo12:mte_page + + /* + * Set GCR for random tag generation. 0xA5 is just a random value to set + * GCR != 0 so the tag generated by 'irg' insn. is not zero, which is + * more interesting for the tests than when tag is zero. + */ + mov tmp0, 0xA5 + msr gcr_el1, tmp0 + + /* + * Generate a logical tag, add it to 'addr' address and put it into + * 'tagged_addr'. + */ + irg tagged_addr, addr + + /* + * Store the generated tag to memory region pointed to by 'addr', i.e. + * set the allocation tag for granule at 'addr'. The tag is extracted + * by stg from tagged_addr pointer. + */ + stg tagged_addr, [addr] + + /* + * Store a random value (0xdeadbeef) to tagged_addr address. This must + * not cause any Tag Check Fault since logical tag in tagged_addr and + * allocation tag associated with the memory pointed by tagged_addr are + * set the same, otherwise something is off and the test fails -- an + * exception is generated. + */ + ldr tmp1, =0xdeadbeef + str tmp1, [tagged_addr] + + /* This label is used by GDB Python script test-mte.py. */ +main_end: + ret