From patchwork Sat Nov 9 10:13:53 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Tokarev X-Patchwork-Id: 842074 Delivered-To: patch@linaro.org Received: by 2002:a5d:6307:0:b0:381:e71e:8f7b with SMTP id i7csp2081902wru; Sat, 9 Nov 2024 02:18:07 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCX+m8BPIcrP7Pfvhflrt800FMscfF93Fsqte6tK5wc5/qaTb2gBkhc5Cz4edFpvQ48jcHku+w==@linaro.org X-Google-Smtp-Source: AGHT+IGUIVXe39Y/dyS8HhI5odOdGIGi1zooGPxMwXkImCEMTDfwnZfAf1O3kW6ANOcfTtS8E/Vx X-Received: by 2002:a05:620a:4686:b0:7b1:5763:4ba2 with SMTP id af79cd13be357-7b331f21c19mr657080685a.40.1731147487126; Sat, 09 Nov 2024 02:18:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1731147487; cv=none; d=google.com; s=arc-20240605; b=l1GRKTsILzvPG6PqxF4T4+d694/abT0vjfaKcMNbvSgC+CO/UtZh8lw4InPPD5/7xk ZH6RoL3TABGvYdGdObdGfnhcx0CqdhX2lqiyR7QMCk5199kiPLhDflBejqfW17PW0u/S sIQ+YwSxBF6lUj9VWj44j4L7YKRS0hBXpZ62l7/KOI1n/UnzffY47Zxc/HOnk2CagNbe XPyLCwwfTa+XqEVgetFhRz0tJZ04NIPTAQ8HFzR2SGs4Pp16EC99VEBqb2snT+8FYDh2 P2SvzTh60NRZDRg1D5xYjdmrXY8IuJ5udSf5j6UOpRdxyvrc38qFhIn0EsJADtqjDhtb 7JkQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from; bh=hTtPJSlftZLk1owsbIWiP20Lw6uJMHavy4TySeEyx1A=; fh=a0EThkoET2zX5h0F1tWE+vzAO6qNrt0J8z9IjVZ9J14=; b=XdY1MZCFEf/CgrMUoT8lnmwy9glo8trAYwSECscZ7nGDXus2gE13ilBll2DQSY0niD zVA37awEoIKTt7vTz5nz/66/t+xuzDac3WCgd+/rX2NCV3xBwi8flitceg2cpveB28+z po9qLT9z/dnF05yTCoj/TkfHq2oZumdywcmnfWToOTLkMTm7RxZqJ+YDmlmiUUf9ZPbF H4GFoaFB4XZFcTTAqj4AFIzPEm9nzgnSuukB+HZzUsFa0iLlvR5jCeN6+4ftKQy3UNI9 qHoI0aNWjp4RCeDQ1p7aYK+RDDXmLwGoUoVmpLoCtAoEQiJdIx50J+LKYzaz9jMVDKg2 knkA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org" Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7b32ad21db1si615611485a.626.2024.11.09.02.18.06 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sat, 09 Nov 2024 02:18:07 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org" Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t9iUl-0004Bd-Om; Sat, 09 Nov 2024 05:15:07 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t9iUW-0003q1-9j; Sat, 09 Nov 2024 05:14:52 -0500 Received: from isrv.corpit.ru ([86.62.121.231]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t9iUU-0007WF-NS; Sat, 09 Nov 2024 05:14:52 -0500 Received: from tsrv.corpit.ru (tsrv.tls.msk.ru [192.168.177.2]) by isrv.corpit.ru (Postfix) with ESMTP id 38AFAA13E6; Sat, 9 Nov 2024 13:13:49 +0300 (MSK) Received: from think4mjt.tls.msk.ru (mjtthink.wg.tls.msk.ru [192.168.177.146]) by tsrv.corpit.ru (Postfix) with ESMTP id D8D10167ED2; Sat, 9 Nov 2024 13:14:43 +0300 (MSK) From: Michael Tokarev To: qemu-devel@nongnu.org Cc: qemu-stable@nongnu.org, Peter Maydell , Marcin Juszkiewicz , Richard Henderson , Michael Tokarev Subject: [Stable-8.2.8 02/49] target/arm: Correct ID_AA64ISAR1_EL1 value for neoverse-v1 Date: Sat, 9 Nov 2024 13:13:53 +0300 Message-Id: <20241109101443.312701-2-mjt@tls.msk.ru> X-Mailer: git-send-email 2.39.5 In-Reply-To: References: MIME-Version: 1.0 Received-SPF: pass client-ip=86.62.121.231; envelope-from=mjt@tls.msk.ru; helo=isrv.corpit.ru X-Spam_score_int: -68 X-Spam_score: -6.9 X-Spam_bar: ------ X-Spam_report: (-6.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_HI=-5, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Peter Maydell The Neoverse-V1 TRM is a bit confused about the layout of the ID_AA64ISAR1_EL1 register, and so its table 3-6 has the wrong value for this ID register. Trust instead section 3.2.74's list of which fields are set. This means that we stop incorrectly reporting FEAT_XS as present, and now report the presence of FEAT_BF16. Cc: qemu-stable@nongnu.org Reported-by: Marcin Juszkiewicz Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson Message-id: 20240917161337.3012188-1-peter.maydell@linaro.org (cherry picked from commit 8676007eff04bb4e454bcdf92fab3f855bcc59b3) Signed-off-by: Michael Tokarev diff --git a/target/arm/tcg/cpu64.c b/target/arm/tcg/cpu64.c index fcda99e158..dfc0ebb796 100644 --- a/target/arm/tcg/cpu64.c +++ b/target/arm/tcg/cpu64.c @@ -678,7 +678,7 @@ static void aarch64_neoverse_v1_initfn(Object *obj) cpu->isar.id_aa64dfr0 = 0x000001f210305519ull; cpu->isar.id_aa64dfr1 = 0x00000000; cpu->isar.id_aa64isar0 = 0x1011111110212120ull; /* with FEAT_RNG */ - cpu->isar.id_aa64isar1 = 0x0111000001211032ull; + cpu->isar.id_aa64isar1 = 0x0011100001211032ull; cpu->isar.id_aa64mmfr0 = 0x0000000000101125ull; cpu->isar.id_aa64mmfr1 = 0x0000000010212122ull; cpu->isar.id_aa64mmfr2 = 0x0220011102101011ull; From patchwork Sat Nov 9 10:13:59 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Michael Tokarev X-Patchwork-Id: 842079 Delivered-To: patch@linaro.org Received: by 2002:a5d:6307:0:b0:381:e71e:8f7b with SMTP id i7csp2082472wru; Sat, 9 Nov 2024 02:20:20 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCUXtH79kxIsMU6pK8o9eA+a81H7TSjEt2fSlvwiSM5pzZKUXq+A4Gbc2PxQwl//xapH4dM2Lw==@linaro.org X-Google-Smtp-Source: AGHT+IFuZ3GTwoijUv59IgDWrG/9JZoLofpo9Y9b07tRtZUCAGtPG7Qb+B8qEGFebPyB7GXVuXZB X-Received: by 2002:a05:622a:178c:b0:461:148b:188b with SMTP id d75a77b69052e-46309322a23mr74888231cf.12.1731147620048; Sat, 09 Nov 2024 02:20:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1731147620; cv=none; d=google.com; s=arc-20240605; b=CijqUDBbGpCi9BcsrF1d6LaUfUSdT7FQA1VCWHgpmDa7wKB5bqBANIz10ugnkL9VVG +IFdrq12mgyGz09xSFmN3qtLJ2xLFO3tBQZ1Juha2uBZeKbdEABrK4JwLz5hHVbVGqke B9gk9uPnr0WIRmBmwjPaTZOUBibToFtEKpfJ25if+g3ki/JjPaYYuXeqigezbOPF4h2u MnhYyvEkSyKgTiJK7R1qLockzv8NLF6TnXeyEKM7VTy4t5e+f6HB3jdi0fwEVVn0HY1r 0uoJJpTGS/KikXuDWGdWNrM43nl0SVk/OEdru9Zzf+zy7ljVgNJtvheIBtuObZWYM0ik vMPQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from; bh=pJVCt9KBBZgBB9kWCj9I2a/t3IFdzZuEFnh6aEFCTbQ=; fh=PrwgnG+PRZeO9Thm5skT+QhxuDBVhuvAZuBRogqhBsM=; b=FO9/3eVi6v43ARVUHxokoDplXMrI0YD2XO2+sIoVMjDdkZ9Ng7GFqz2a2Kizn6R/e8 D++mrh/9fs9yD4/9hjoT9ZQCGSW4iBq0quzIXqXXWldSg5BYgdnZ4MiVpWLTuvPe1A3M DPlff+nrDGKe5xyfHEgM7CDl65Ji7D/77CwBbQf9vhK3x6t96LUCnA3Z8V8bWrHRAyE6 y4agL1h8uBhdBgA1GAWVEr4xm/Bbc0ILV/+ruoODVTBNOzqoWNvmkCP2rV1VGt0L8Ze2 I9PyoslqrgL4311SK7HjuelkOY0HJ96lar4Tpcr0DOWvF5m7xffOw+9WmOpeoaZO7zI8 meZw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org" Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-462ff40f37asi57227681cf.135.2024.11.09.02.20.19 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sat, 09 Nov 2024 02:20:20 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org" Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t9iWf-0006ge-4y; Sat, 09 Nov 2024 05:17:05 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t9iUg-0003zj-D8; Sat, 09 Nov 2024 05:15:02 -0500 Received: from isrv.corpit.ru ([86.62.121.231]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t9iUe-0007Xl-4k; Sat, 09 Nov 2024 05:15:02 -0500 Received: from tsrv.corpit.ru (tsrv.tls.msk.ru [192.168.177.2]) by isrv.corpit.ru (Postfix) with ESMTP id 84F76A13EC; Sat, 9 Nov 2024 13:13:49 +0300 (MSK) Received: from think4mjt.tls.msk.ru (mjtthink.wg.tls.msk.ru [192.168.177.146]) by tsrv.corpit.ru (Postfix) with ESMTP id 30DD7167ED8; Sat, 9 Nov 2024 13:14:44 +0300 (MSK) From: Michael Tokarev To: qemu-devel@nongnu.org Cc: qemu-stable@nongnu.org, =?utf-8?q?Alex_Benn=C3=A9e?= , =?utf-8?q?Daniel_P_?= =?utf-8?q?=2E_Berrang=C3=A9?= , Thomas Huth , Michael Tokarev Subject: [Stable-8.2.8 08/49] testing: bump mips64el cross to bookworm and fix package list Date: Sat, 9 Nov 2024 13:13:59 +0300 Message-Id: <20241109101443.312701-8-mjt@tls.msk.ru> X-Mailer: git-send-email 2.39.5 In-Reply-To: References: MIME-Version: 1.0 Received-SPF: pass client-ip=86.62.121.231; envelope-from=mjt@tls.msk.ru; helo=isrv.corpit.ru X-Spam_score_int: -68 X-Spam_score: -6.9 X-Spam_bar: ------ X-Spam_report: (-6.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_HI=-5, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Alex Bennée The mips64el cross setup is very broken for bullseye which has now entered LTS support so is unlikely to be fixed. While we still can't build the container with all packages for bookworm due to a single missing dependency that will hopefully get fixed in due course. For the sake of keeping the CI green we disable the problematic packages via the lcitool's mappings.yml file. See also: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1081535 Signed-off-by: Alex Bennée [thuth: Disable the problematic packages via lcitool's mappings.yml] Message-ID: <20241002080333.127172-1-thuth@redhat.com> Reviewed-by: Daniel P. Berrangé Signed-off-by: Thomas Huth (cherry picked from commit c60473d29254b79d9437eface8b342e84663ba66) Signed-off-by: Michael Tokarev (Mjt: context fix in tests/docker/dockerfiles/debian-mips64el-cross.docker) diff --git a/tests/docker/dockerfiles/debian-mips64el-cross.docker b/tests/docker/dockerfiles/debian-mips64el-cross.docker index 17d3e01ecc..3443a138a9 100644 --- a/tests/docker/dockerfiles/debian-mips64el-cross.docker +++ b/tests/docker/dockerfiles/debian-mips64el-cross.docker @@ -1,10 +1,10 @@ # THIS FILE WAS AUTO-GENERATED # -# $ lcitool dockerfile --layers all --cross-arch mips64el debian-11 qemu +# $ lcitool dockerfile --layers all --cross-arch mips64el 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 && \ @@ -47,16 +47,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 \ @@ -67,8 +66,6 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ sed -Ei 's,^# (en_US\.UTF-8 .*)$,\1,' /etc/locale.gen && \ dpkg-reconfigure locales -RUN /usr/bin/pip3 install tomli - ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers" ENV LANG "en_US.UTF-8" ENV MAKE "/usr/bin/make" @@ -96,17 +93,13 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ libcmocka-dev:mips64el \ libcurl4-gnutls-dev:mips64el \ libdaxctl-dev:mips64el \ - libdrm-dev:mips64el \ - libepoxy-dev:mips64el \ libfdt-dev:mips64el \ libffi-dev:mips64el \ libfuse3-dev:mips64el \ - libgbm-dev:mips64el \ libgcrypt20-dev:mips64el \ libglib2.0-dev:mips64el \ libglusterfs-dev:mips64el \ libgnutls28-dev:mips64el \ - libgtk-3-dev:mips64el \ libibumad-dev:mips64el \ libibverbs-dev:mips64el \ libiscsi-dev:mips64el \ @@ -126,8 +119,6 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ librbd-dev:mips64el \ librdmacm-dev:mips64el \ libsasl2-dev:mips64el \ - libsdl2-dev:mips64el \ - libsdl2-image-dev:mips64el \ libseccomp-dev:mips64el \ libselinux1-dev:mips64el \ libslirp-dev:mips64el \ @@ -141,8 +132,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ libusb-1.0-0-dev:mips64el \ libusbredirhost-dev:mips64el \ libvdeplug-dev:mips64el \ - libvirglrenderer-dev:mips64el \ - libvte-2.91-dev:mips64el \ + libxdp-dev:mips64el \ libzstd-dev:mips64el \ nettle-dev:mips64el \ systemtap-sdt-dev:mips64el \ diff --git a/tests/lcitool/mappings.yml b/tests/lcitool/mappings.yml index 03b974ad02..0ab3a89013 100644 --- a/tests/lcitool/mappings.yml +++ b/tests/lcitool/mappings.yml @@ -2,6 +2,20 @@ mappings: flake8: OpenSUSELeap15: + # Due to https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1081535 we + # have to disable all packages that depend on libgl1-mesa-dri:mips64el + gtk3: + mips64el-deb: + + libdrm: + mips64el-deb: + + libepoxy: + mips64el-deb: + + mesa-libgbm: + mips64el-deb: + meson: OpenSUSELeap15: @@ -60,6 +74,18 @@ mappings: python3-wheel: OpenSUSELeap15: python311-pip + sdl2: + mips64el-deb: + + sdl2-image: + mips64el-deb: + + virglrenderer: + mips64el-deb: + + vte: + mips64el-deb: + pypi_mappings: # Request more recent version meson: diff --git a/tests/lcitool/refresh b/tests/lcitool/refresh index 70c7498a2d..d4b9301311 100755 --- a/tests/lcitool/refresh +++ b/tests/lcitool/refresh @@ -160,7 +160,7 @@ try: "x86_64-linux-user," "i386-softmmu,i386-linux-user")) - generate_dockerfile("debian-mips64el-cross", "debian-11", + generate_dockerfile("debian-mips64el-cross", "debian-12", cross="mips64el", trailer=cross_build("mips64el-linux-gnuabi64-", "mips64el-softmmu,mips64el-linux-user")) From patchwork Sat Nov 9 10:14:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Michael Tokarev X-Patchwork-Id: 842078 Delivered-To: patch@linaro.org Received: by 2002:a5d:6307:0:b0:381:e71e:8f7b with SMTP id i7csp2082471wru; Sat, 9 Nov 2024 02:20:20 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCXDqVzc751cp75vrqQPTnjz7j53Hmj1ClIwWkX8Am8MNwdah6ZeDQHsPvLGpUdJhz3zRhTWyQ==@linaro.org X-Google-Smtp-Source: AGHT+IEZaCC2GrP+J4A3xGzzJiJIMjLrxEMYcyFNnRV/oXfnn5bEoCsBGfGehlc9V0vLOcDMxACT X-Received: by 2002:a05:620a:280e:b0:7b1:45ac:86b4 with SMTP id af79cd13be357-7b331e8c6damr740777485a.21.1731147619980; Sat, 09 Nov 2024 02:20:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1731147619; cv=none; d=google.com; s=arc-20240605; b=deeNfALDH4DxCRrHzFDJTgIj1itpyNHwkBY1gm8Rb1/GMEO43vRYxH1EpxfZdXtYKP RP8ggJxGILMTxz7pCSNDCLrvRMSIEyGeziHsEIw/Ss7+4o1OgMPrUYNm/7pb/4IhtcN2 a/2vmjBQVQN3lLDZZGY8X1eruFvh3DhTNjTKmUa3TuL18l8O0knnYAeM9XKbZS+A1iwg K0Y1kTdixAlnFb8ChzzbOU2CFHVqmPzKkhfQb1WZLduV+o8f3sPr+Jk6rxTfCoA0Qi4q 8eExYs89sfpmVm7oF2WBf1Gsqkx8FPeiyX0hwlPgWSgoQoEixToPU9MVj0Cxg1BD8w1s 6yzw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from; bh=Ocp+TixImrU72kxgC0b1Tth+I5Kt2wP9tQrn/W4nGW8=; fh=UbSczJHoK8QyPNwfbKMWepRwzNWZsm+gkdUzUXKForo=; b=Tj0LdkNcFcTqi+9KFZSsOBfGZSzNPuhz6yEGWqkx0yYD/knnEiCNuyzfcmkDvRwcPC IZnCL8hv//WJqvmlwRcm1A7oEbIU2jgGVh3tK6S9NdKLY6jcL3b7NA2DS00sZQtQB/6N PobyOjK7twbL3GnEvL+dVyeR1M4eDSae1f6jBgT3Dd6SyooFvS5y17PbgN8aT38z449K FyNBQx54Ke0YE4Zd62wyWgc++G+D2/31g99JIbKPitwbLCDWyboraUVXIA/ByzmJ13lK ThXBkMrZg1Q93hFN6UAf1Dyp0tWg3wOO60GxMfvmhKSXDdNSUuMFacAHf+mx0LBRL6N9 cvIw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org" Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7b32ac3d8bcsi611023785a.11.2024.11.09.02.20.19 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sat, 09 Nov 2024 02:20:19 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org" Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t9iVa-0004un-3F; Sat, 09 Nov 2024 05:15:58 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t9iUf-0003yV-GX; Sat, 09 Nov 2024 05:15:01 -0500 Received: from isrv.corpit.ru ([86.62.121.231]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t9iUd-0007Xj-PG; Sat, 09 Nov 2024 05:15:01 -0500 Received: from tsrv.corpit.ru (tsrv.tls.msk.ru [192.168.177.2]) by isrv.corpit.ru (Postfix) with ESMTP id 8C7C8A13ED; Sat, 9 Nov 2024 13:13:49 +0300 (MSK) Received: from think4mjt.tls.msk.ru (mjtthink.wg.tls.msk.ru [192.168.177.146]) by tsrv.corpit.ru (Postfix) with ESMTP id 39F75167ED9; Sat, 9 Nov 2024 13:14:44 +0300 (MSK) From: Michael Tokarev To: qemu-devel@nongnu.org Cc: qemu-stable@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Richard Henderson , Michael Tokarev Subject: [Stable-8.2.8 09/49] linux-user/flatload: Take mmap_lock in load_flt_binary() Date: Sat, 9 Nov 2024 13:14:00 +0300 Message-Id: <20241109101443.312701-9-mjt@tls.msk.ru> X-Mailer: git-send-email 2.39.5 In-Reply-To: References: MIME-Version: 1.0 Received-SPF: pass client-ip=86.62.121.231; envelope-from=mjt@tls.msk.ru; helo=isrv.corpit.ru X-Spam_score_int: -68 X-Spam_score: -6.9 X-Spam_bar: ------ X-Spam_report: (-6.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_HI=-5, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé load_flt_binary() calls load_flat_file() -> page_set_flags(). page_set_flags() must be called with the mmap_lock held, otherwise it aborts: $ qemu-arm -L stm32/lib/ stm32/bin/busybox qemu-arm: ../accel/tcg/user-exec.c:505: page_set_flags: Assertion `have_mmap_lock()' failed. Aborted (core dumped) Fix by taking the lock in load_flt_binary(). Fixes: fbd3c4cff6 ("linux-user/arm: Mark the commpage executable") Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2525 Suggested-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-ID: <20240822095045.72643-3-philmd@linaro.org> Signed-off-by: Richard Henderson (cherry picked from commit a9ee641bd46f5462eeed183ac3c3760bddfc2600) Signed-off-by: Michael Tokarev diff --git a/linux-user/flatload.c b/linux-user/flatload.c index 5b62aa0a2b..6278655574 100644 --- a/linux-user/flatload.c +++ b/linux-user/flatload.c @@ -747,7 +747,10 @@ int load_flt_binary(struct linux_binprm *bprm, struct image_info *info) stack_len += (bprm->envc + 1) * 4; /* the envp array */ + mmap_lock(); res = load_flat_file(bprm, libinfo, 0, &stack_len); + mmap_unlock(); + if (is_error(res)) { return res; } From patchwork Sat Nov 9 10:14:01 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Michael Tokarev X-Patchwork-Id: 842071 Delivered-To: patch@linaro.org Received: by 2002:a5d:6307:0:b0:381:e71e:8f7b with SMTP id i7csp2081468wru; Sat, 9 Nov 2024 02:16:26 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCWkPHXglI4YRe/aPcUMzr+yL4vjmEEwttw945dAiJVYZtqrmKi7dywv2SwdhTgrgVax90f97A==@linaro.org X-Google-Smtp-Source: AGHT+IE/0gkQccNOg1lbufXQGVRKcmq0MTrbpAbqlfFxxsYFESl+5d/ZqrB6l0aVnhBe0S4KPqA6 X-Received: by 2002:a05:622a:1907:b0:462:fef1:e1f5 with SMTP id d75a77b69052e-4630935bfcamr83550011cf.26.1731147385923; Sat, 09 Nov 2024 02:16:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1731147385; cv=none; d=google.com; s=arc-20240605; b=I6S+92FP+HD7LrFmGs7xMaQ9XlfAod/I5uKDN6TFHQYzgioEqgKo1ugO1y4YgQRVM5 iyc6UlctSuJzjfmi9eg+EQulU0yDF02p2QHOtYNY/QQ0ETErqLd+5ToLOi4hXQTX//3h McJcWyOBbK9Y30E35xXh2zp8GU3VVoFxadeweMzvryF2/Cq3/zaiyRGBedb5ZqWMsbdn jsK0ULGjrEvXfgmHNG/Sxyhv4hpmh9L15Kc8pxP4db9yJALjhJnVuSJnp0XKvwJACAPw xzAguc/exHnNhqTIgRYDODe0Rsq+h7/Kx1kGBwUgH1z40Pl6D0tkK2pofWQA/aGSI9oT ngKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from; bh=gNemSjruXi27ZWNxxU07nsaBN+EDru+D07mxZIgfjoE=; fh=K4abbxCgZAPvqzOXA+PZ7RIZh+KufMVJze7rXLOwES0=; b=LvZJ+u1g0MtRSMfIkynt3517fYUom+FWlGenhU9PwwNyc5NHEwSr7NH4hq4LpyO53i zUoN60095Ne61ZmSAxIRQDJxvrhFCOzssyeKjraJhXeMEjPYbi6PtbEGzc3vkW9pJT/l bHyNvDZ2zhCrgX0EdW/1tBsMG6iZfguthe2QaiYTkBWEkczfdqYXNRWjCfUDST2vYAQX yl67g3xFkFoUy/AoBL/A+r2gQT9HxaeQIra3PNZ8DAsRO2i5IsHEbEHW8WqAaNiI2qvq z/xrt5GyAALJ6qbklt5t33YJatbC+hjjvuYgZ1D0i8vO3TCY2i1RmaLdKWXsxPvaTFu8 yonw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org" Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-462ff62630csi63997041cf.497.2024.11.09.02.16.25 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sat, 09 Nov 2024 02:16:25 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org" Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t9iVg-0005Ma-T9; Sat, 09 Nov 2024 05:16:05 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t9iUk-00048D-86; Sat, 09 Nov 2024 05:15:06 -0500 Received: from isrv.corpit.ru ([86.62.121.231]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t9iUg-0007YM-Vf; Sat, 09 Nov 2024 05:15:05 -0500 Received: from tsrv.corpit.ru (tsrv.tls.msk.ru [192.168.177.2]) by isrv.corpit.ru (Postfix) with ESMTP id 9674EA13EE; Sat, 9 Nov 2024 13:13:49 +0300 (MSK) Received: from think4mjt.tls.msk.ru (mjtthink.wg.tls.msk.ru [192.168.177.146]) by tsrv.corpit.ru (Postfix) with ESMTP id 432D0167EDA; Sat, 9 Nov 2024 13:14:44 +0300 (MSK) From: Michael Tokarev To: qemu-devel@nongnu.org Cc: qemu-stable@nongnu.org, Richard Henderson , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Michael Tokarev Subject: [Stable-8.2.8 10/49] linux-user: Fix parse_elf_properties GNU0_MAGIC check Date: Sat, 9 Nov 2024 13:14:01 +0300 Message-Id: <20241109101443.312701-10-mjt@tls.msk.ru> X-Mailer: git-send-email 2.39.5 In-Reply-To: References: MIME-Version: 1.0 Received-SPF: pass client-ip=86.62.121.231; envelope-from=mjt@tls.msk.ru; helo=isrv.corpit.ru X-Spam_score_int: -68 X-Spam_score: -6.9 X-Spam_bar: ------ X-Spam_report: (-6.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_HI=-5, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Richard Henderson Comparing a string of 4 bytes only works in little-endian. Adjust bulk bswap to only apply to the note payload. Perform swapping of the note header manually; the magic is defined so that it does not need a runtime swap. Fixes: 83f990eb5adb ("linux-user/elfload: Parse NT_GNU_PROPERTY_TYPE_0 notes") Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2596 Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Michael Tokarev (cherry picked from commit 2884596f5f385b5712c356310dd4125a089888a8) Signed-off-by: Michael Tokarev diff --git a/linux-user/elfload.c b/linux-user/elfload.c index 7cc8d9685e..d11842cb94 100644 --- a/linux-user/elfload.c +++ b/linux-user/elfload.c @@ -3203,11 +3203,11 @@ static bool parse_elf_properties(const ImageSource *src, } /* - * The contents of a valid PT_GNU_PROPERTY is a sequence - * of uint32_t -- swap them all now. + * The contents of a valid PT_GNU_PROPERTY is a sequence of uint32_t. + * Swap most of them now, beyond the header and namesz. */ #ifdef BSWAP_NEEDED - for (int i = 0; i < n / 4; i++) { + for (int i = 4; i < n / 4; i++) { bswap32s(note.data + i); } #endif @@ -3217,15 +3217,15 @@ static bool parse_elf_properties(const ImageSource *src, * immediately follows nhdr and is thus at the 4th word. Further, all * of the inputs to the kernel's round_up are multiples of 4. */ - if (note.nhdr.n_type != NT_GNU_PROPERTY_TYPE_0 || - note.nhdr.n_namesz != NOTE_NAME_SZ || + if (tswap32(note.nhdr.n_type) != NT_GNU_PROPERTY_TYPE_0 || + tswap32(note.nhdr.n_namesz) != NOTE_NAME_SZ || note.data[3] != GNU0_MAGIC) { error_setg(errp, "Invalid note in PT_GNU_PROPERTY"); return false; } off = sizeof(note.nhdr) + NOTE_NAME_SZ; - datasz = note.nhdr.n_descsz + off; + datasz = tswap32(note.nhdr.n_descsz) + off; if (datasz > n) { error_setg(errp, "Invalid note size in PT_GNU_PROPERTY"); return false; From patchwork Sat Nov 9 10:14:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Tokarev X-Patchwork-Id: 842076 Delivered-To: patch@linaro.org Received: by 2002:a5d:6307:0:b0:381:e71e:8f7b with SMTP id i7csp2081975wru; Sat, 9 Nov 2024 02:18:27 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCVQ2b2xvESL0SRtGO5POeP9KFwq0yKJIp/Hh40IUuHrn0YGjEv+JGLA+bjh+COnN9VDKEsZyw==@linaro.org X-Google-Smtp-Source: AGHT+IEsQOTHuMN3YinhEYLNpj9OfaKS58J2a8gFkUO1Ng42UF2LI5GWjZywf+Ig/56VA4WqL4O+ X-Received: by 2002:a05:620a:450a:b0:7b1:3ff2:697a with SMTP id af79cd13be357-7b3328f5244mr966082885a.17.1731147507530; Sat, 09 Nov 2024 02:18:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1731147507; cv=none; d=google.com; s=arc-20240605; b=QTXuhm4dLQXeFapE0Q+fvi/uIy2zCkl5fHc41auDLW5MLkSa+ILivIDjTCkHzVulcs HNTOHIL1PXSLLNLcGKPEFN+6yqIW6U9NqJy78IzgmkZIxKfMQCytyhqC6DFJckXuOYbG Idoh+HeMad8OyHSMnouEaX05UK4jvKMKuKgw7SrN2xANQ9qyNz1hNBlrzqQsVFjEZhex OjsTH3IGxRDLkbqN5wOoOoTj407OL1jxYAaBAvxGL5xETvSl/pATqMJhDnG9oR0zQql5 Hsxhh+iL5B/RFW84kbvc73IHJWn+xlMbUqMbeGHTTEePWYD/o5Rd5qWxgutuzFKHbg/q E/Cw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from; bh=4xNwJ0P+TBDRtfUakneCg6hdWy7tnalmf5nXRiLuerk=; fh=bMaafE1clBtiBaCrlbrbcY1DSEPhhFUklUk4XoVHiPU=; b=N2dIaFnUKWBUBFM19XNDGXN7YoRaGLVQillaFCZgmLWOd/oXMRehYwrwFiIQcAbkfE DDkL2Plaz9woku98r+AhyXUQQkdmLk+BLpkkaT3xPIK1QeSsouSgku2a0Cm1KeaHuAeg AA7nZudIauPyFeURjxqak/etdzjlnF6ukYSVCOqNUZDXa/sIq8jk4VHdMNTqHeb+MwBY rePYzGoxt796v6vOebFSxjnTfI/ecmv9pPUopVpKb62dDWUW6tHts7xP7O64FD4Rz6e1 yYK1URfyETUOGgrsqQUjTKUhpfMQaNSiD1U8e870bO+Jw9IoAvxmm9DTJp3vuHXKZKq4 Z8mA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org" Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7b32ad1f597si652464485a.603.2024.11.09.02.18.27 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sat, 09 Nov 2024 02:18:27 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org" Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t9iWq-00073y-8j; Sat, 09 Nov 2024 05:17:16 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t9iV4-0004Zq-Fb; Sat, 09 Nov 2024 05:15:28 -0500 Received: from isrv.corpit.ru ([86.62.121.231]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t9iV2-0007Yj-R2; Sat, 09 Nov 2024 05:15:26 -0500 Received: from tsrv.corpit.ru (tsrv.tls.msk.ru [192.168.177.2]) by isrv.corpit.ru (Postfix) with ESMTP id 9F3F1A13EF; Sat, 9 Nov 2024 13:13:49 +0300 (MSK) Received: from think4mjt.tls.msk.ru (mjtthink.wg.tls.msk.ru [192.168.177.146]) by tsrv.corpit.ru (Postfix) with ESMTP id 4B746167EDB; Sat, 9 Nov 2024 13:14:44 +0300 (MSK) From: Michael Tokarev To: qemu-devel@nongnu.org Cc: qemu-stable@nongnu.org, Richard Henderson , Michael Tokarev Subject: [Stable-8.2.8 11/49] tcg/ppc: Use TCG_REG_TMP2 for scratch tcg_out_qemu_st Date: Sat, 9 Nov 2024 13:14:02 +0300 Message-Id: <20241109101443.312701-11-mjt@tls.msk.ru> X-Mailer: git-send-email 2.39.5 In-Reply-To: References: MIME-Version: 1.0 Received-SPF: pass client-ip=86.62.121.231; envelope-from=mjt@tls.msk.ru; helo=isrv.corpit.ru X-Spam_score_int: -68 X-Spam_score: -6.9 X-Spam_bar: ------ X-Spam_report: (-6.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_HI=-5, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Richard Henderson In the fallback when STDBRX is not available, avoid clobbering TCG_REG_TMP1, which might be h.base, which is still in use. Use TCG_REG_TMP2 instead. Cc: qemu-stable@nongnu.org Fixes: 01a112e2e9 ("tcg/ppc: Reorg tcg_out_tlb_read") Signed-off-by: Richard Henderson Tested-By: Michael Tokarev (cherry picked from commit 4cabcb89b101942346aebff081aa1453e958fe7f) Signed-off-by: Michael Tokarev diff --git a/tcg/ppc/tcg-target.c.inc b/tcg/ppc/tcg-target.c.inc index 54816967bc..192bb2120f 100644 --- a/tcg/ppc/tcg-target.c.inc +++ b/tcg/ppc/tcg-target.c.inc @@ -2556,9 +2556,9 @@ static void tcg_out_qemu_st(TCGContext *s, TCGReg datalo, TCGReg datahi, uint32_t insn = qemu_stx_opc[opc & (MO_BSWAP | MO_SIZE)]; if (!have_isa_2_06 && insn == STDBRX) { tcg_out32(s, STWBRX | SAB(datalo, h.base, h.index)); - tcg_out32(s, ADDI | TAI(TCG_REG_TMP1, h.index, 4)); + tcg_out32(s, ADDI | TAI(TCG_REG_TMP2, h.index, 4)); tcg_out_shri64(s, TCG_REG_R0, datalo, 32); - tcg_out32(s, STWBRX | SAB(TCG_REG_R0, h.base, TCG_REG_TMP1)); + tcg_out32(s, STWBRX | SAB(TCG_REG_R0, h.base, TCG_REG_TMP2)); } else { tcg_out32(s, insn | SAB(datalo, h.base, h.index)); } From patchwork Sat Nov 9 10:14:03 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Tokarev X-Patchwork-Id: 842073 Delivered-To: patch@linaro.org Received: by 2002:a5d:6307:0:b0:381:e71e:8f7b with SMTP id i7csp2081801wru; Sat, 9 Nov 2024 02:17:48 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCU+pNE7bmT3sZvBLwvQDkAqUn59gdjmnoUnkzU06wysngl3TqOX8DP8fOtZpXhayecpEgOY5w==@linaro.org X-Google-Smtp-Source: AGHT+IEIvsAZ8d78kxd3UtsbawDO3pSjiOUQ5qyr2KSBb/E7dAGrSBDWT8sG+y6vKJSxOXi4u6Px X-Received: by 2002:a05:622a:1350:b0:460:9946:56af with SMTP id d75a77b69052e-463093efdffmr82468041cf.44.1731147468463; Sat, 09 Nov 2024 02:17:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1731147468; cv=none; d=google.com; s=arc-20240605; b=FiKrOG96KB+6AlLLKrySL4bYZp1mV7iZOLqjweIZlfxlqfJeqRE4psqDrWi+CnUDCC tOlIWAk00ysrf7EoUEIHX3JAdRu1bE1sllRc34XHC+bj1ITOq98gJyw7oJlrQfQ1mZ1W 7ceHb11wVEOBMdlEQd6JrL1P1yPtnpqkmchWrEyZJpvepvk4fJUBlbbOu5xyzQPkriPh IEmLBNa9azYw61qyWeqBurWsrDs6gMkrYf4iylanbfd/ZfP/tWZLciI7FdeUqMtu0LjS X45tMVSXcpZau+d4iSlavjHu5xllTFGCtaMx2YxiM2pSflVWMVvZZCftAgqV/NbP2/yC Nrsw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from; bh=Xv8mqK9BNxr1f4IH8iXgcoodUHkNPeuxn6i7oMZkoVA=; fh=bMaafE1clBtiBaCrlbrbcY1DSEPhhFUklUk4XoVHiPU=; b=Mz5un0sQuFq2ujenb7B2Is3lEl7CMKwZJz64Ai6pOxy0anWgEHnvtA7exzcalxonjx 9GGit82rz8aBAPtFKKwuumSGHE3WuxNXJH2P818yIUUy1FeGywQuNz8k2RVUmd7Ljipt 9k6vBnb0lnRQipefRJyAVI2gLIEtDDluG7j9GSrZFuYG3W4nb/Npf2WZeLJNit7UiDch w4Yffw9ROyJ4ZmKy9g+FFYPIg4u2knFjyiTQA7oZD/9I0tD1mwcOWrOOjLar7GdDXkNj MWZOhEmR8gDuqX+fitW1B8PryfXlXUjMQNDSEGTc5xe9FwnbHuMa/h5ivrWMXGEbrN6/ zHNQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org" Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-462ff6260b7si63024721cf.474.2024.11.09.02.17.48 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sat, 09 Nov 2024 02:17:48 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org" Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t9iVh-0005QZ-4R; Sat, 09 Nov 2024 05:16:05 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t9iV8-0004dQ-2Q; Sat, 09 Nov 2024 05:15:32 -0500 Received: from isrv.corpit.ru ([86.62.121.231]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t9iV5-0007kI-Kh; Sat, 09 Nov 2024 05:15:29 -0500 Received: from tsrv.corpit.ru (tsrv.tls.msk.ru [192.168.177.2]) by isrv.corpit.ru (Postfix) with ESMTP id AFD20A13F0; Sat, 9 Nov 2024 13:13:49 +0300 (MSK) Received: from think4mjt.tls.msk.ru (mjtthink.wg.tls.msk.ru [192.168.177.146]) by tsrv.corpit.ru (Postfix) with ESMTP id 541D7167EDC; Sat, 9 Nov 2024 13:14:44 +0300 (MSK) From: Michael Tokarev To: qemu-devel@nongnu.org Cc: qemu-stable@nongnu.org, Richard Henderson , Michael Tokarev Subject: [Stable-8.2.8 12/49] tcg/ppc: Use TCG_REG_TMP2 for scratch index in prepare_host_addr Date: Sat, 9 Nov 2024 13:14:03 +0300 Message-Id: <20241109101443.312701-12-mjt@tls.msk.ru> X-Mailer: git-send-email 2.39.5 In-Reply-To: References: MIME-Version: 1.0 Received-SPF: pass client-ip=86.62.121.231; envelope-from=mjt@tls.msk.ru; helo=isrv.corpit.ru X-Spam_score_int: -68 X-Spam_score: -6.9 X-Spam_bar: ------ X-Spam_report: (-6.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_HI=-5, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Richard Henderson In tcg_out_qemu_ldst_i128, we need a non-zero index register, which we then use as a base register in several address modes. Since we always have TCG_REG_TMP2 available, use that. Cc: qemu-stable@nongnu.org Fixes: 526cd4ec01f ("tcg/ppc: Support 128-bit load/store") Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2597 Signed-off-by: Richard Henderson Tested-By: Michael Tokarev (cherry picked from commit 3213da7b9539581c6df95f8ced5b09d0b02d425f) Signed-off-by: Michael Tokarev diff --git a/tcg/ppc/tcg-target.c.inc b/tcg/ppc/tcg-target.c.inc index 192bb2120f..01c45cd17f 100644 --- a/tcg/ppc/tcg-target.c.inc +++ b/tcg/ppc/tcg-target.c.inc @@ -2469,8 +2469,8 @@ static TCGLabelQemuLdst *prepare_host_addr(TCGContext *s, HostAddress *h, if (TCG_TARGET_REG_BITS == 64 && addr_type == TCG_TYPE_I32) { /* Zero-extend the guest address for use in the host address. */ - tcg_out_ext32u(s, TCG_REG_R0, addrlo); - h->index = TCG_REG_R0; + tcg_out_ext32u(s, TCG_REG_TMP2, addrlo); + h->index = TCG_REG_TMP2; } else { h->index = addrlo; } From patchwork Sat Nov 9 10:14:04 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Michael Tokarev X-Patchwork-Id: 842072 Delivered-To: patch@linaro.org Received: by 2002:a5d:6307:0:b0:381:e71e:8f7b with SMTP id i7csp2081613wru; Sat, 9 Nov 2024 02:17:07 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCUncVhNwDO26sB95D31J5mLBWOHp68v4Fnxp4XbebhqKB3Xbts5ylbo05v2WOw6N3KTHls8QQ==@linaro.org X-Google-Smtp-Source: AGHT+IEHSS+dk4QsK50BtquPiCpaIvBqWAj83SiHZ1xRlrmjbd9CZGCX2P0c4SNVR1TaLJcCiNGX X-Received: by 2002:a05:622a:1b1e:b0:461:1393:fd8b with SMTP id d75a77b69052e-463093471b3mr92079771cf.15.1731147427266; Sat, 09 Nov 2024 02:17:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1731147427; cv=none; d=google.com; s=arc-20240605; b=c1wlBbWa10CCj3vHxn8OHJQcWe7kIILk5WwQ3unKJzguMWI0YPQQKg69lhKe5RLrOm spTVK6YMSSNffC1soGOQ11SOyp3PnAm+rMFtQJHDMfPcnVQ/HihYYL1Ai9vZI3swgpnw A1WiDSXpAXijBjMTyvZthskgdoBepvXAhBJE0E0jHa+fki7UVVzC6FPj2ehXhy2+JV+j QBPjJWAEaDuWhIYoRQ3oJHRwgFWBjSm+A2UDOHc7N31Iqvxjmt0eKQG1gkaNI+8IOQb0 O9+F3gM/orYIw1PdKNx86DCnQgWJ5n4YwhvoMugAfUPL7aIhffc9LgPVZwS/8IUCeGWR A6kA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from; bh=zWdAhrJoX6HrLUn5/YrOuN94CCEdyYtPkJDTqFT74UI=; fh=K4abbxCgZAPvqzOXA+PZ7RIZh+KufMVJze7rXLOwES0=; b=P7r3M9wTgB/vQJJAFqJq5zqJTUDfuzctPRXUnm2QSpOqOS0jb/2EnWCgFHlUdYBn/n T4VqzALGrjZdUfDN+gBHFcjbQxQW3RO+7HB2LHrP0Jn2M7f0I+4bMOaNOqNoA+yVzdLI XeqFVl2b/L61o0rdl2kIAaxm1Y4u5ajIm7wDoi+Xy6LoPwauRT7hbCQVMDJ4FAVnzWHf 7iV60Etsj3IJLL52DClgAnVmNaNZ490rBB3YzzFoGEzvOPMuaqFavHDM9BDh9s+l2/C3 tpDboTzrct98vyYvNzkZRL07vBWE5LFAE3Vf0EYUj+fh72yquXzE0D5iISSqOKFjO2qL Qz3w==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org" Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-462ff40f411si58046821cf.2.2024.11.09.02.17.07 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sat, 09 Nov 2024 02:17:07 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org" Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t9iWC-0005tS-Kw; Sat, 09 Nov 2024 05:16:40 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t9iV8-0004dW-OW; Sat, 09 Nov 2024 05:15:33 -0500 Received: from isrv.corpit.ru ([86.62.121.231]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t9iV5-0007nH-TT; Sat, 09 Nov 2024 05:15:29 -0500 Received: from tsrv.corpit.ru (tsrv.tls.msk.ru [192.168.177.2]) by isrv.corpit.ru (Postfix) with ESMTP id B961FA13F1; Sat, 9 Nov 2024 13:13:49 +0300 (MSK) Received: from think4mjt.tls.msk.ru (mjtthink.wg.tls.msk.ru [192.168.177.146]) by tsrv.corpit.ru (Postfix) with ESMTP id 64C28167EDD; Sat, 9 Nov 2024 13:14:44 +0300 (MSK) From: Michael Tokarev To: qemu-devel@nongnu.org Cc: qemu-stable@nongnu.org, Richard Henderson , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Michael Tokarev Subject: [Stable-8.2.8 13/49] target/m68k: Always return a temporary from gen_lea_mode Date: Sat, 9 Nov 2024 13:14:04 +0300 Message-Id: <20241109101443.312701-13-mjt@tls.msk.ru> X-Mailer: git-send-email 2.39.5 In-Reply-To: References: MIME-Version: 1.0 Received-SPF: pass client-ip=86.62.121.231; envelope-from=mjt@tls.msk.ru; helo=isrv.corpit.ru X-Spam_score_int: -68 X-Spam_score: -6.9 X-Spam_bar: ------ X-Spam_report: (-6.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_HI=-5, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Richard Henderson Returning a raw areg does not preserve the value if the areg is subsequently modified. Fixes, e.g. "jsr (sp)", where the return address is pushed before the branch. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2483 Signed-off-by: Richard Henderson Message-Id: <20240813000737.228470-1-richard.henderson@linaro.org> Reviewed-by: Philippe Mathieu-Daudé (cherry picked from commit 352cc9f300d83ea48b8154bfd2ff985fece887d0) Signed-off-by: Michael Tokarev diff --git a/target/m68k/translate.c b/target/m68k/translate.c index f8eeb70379..a5145e4cf4 100644 --- a/target/m68k/translate.c +++ b/target/m68k/translate.c @@ -722,7 +722,9 @@ static TCGv gen_lea_mode(CPUM68KState *env, DisasContext *s, } /* fallthru */ case 2: /* Indirect register */ - return get_areg(s, reg0); + tmp = tcg_temp_new(); + tcg_gen_mov_i32(tmp, get_areg(s, reg0)); + return tmp; case 4: /* Indirect predecrememnt. */ if (opsize == OS_UNSIZED) { return NULL_QREG; @@ -749,20 +751,23 @@ static TCGv gen_lea_mode(CPUM68KState *env, DisasContext *s, switch (reg0) { case 0: /* Absolute short. */ offset = (int16_t)read_im16(env, s); - return tcg_constant_i32(offset); + break; case 1: /* Absolute long. */ offset = read_im32(env, s); - return tcg_constant_i32(offset); + break; case 2: /* pc displacement */ offset = s->pc; offset += (int16_t)read_im16(env, s); - return tcg_constant_i32(offset); + break; case 3: /* pc index+displacement. */ return gen_lea_indexed(env, s, NULL_QREG); case 4: /* Immediate. */ default: return NULL_QREG; } + tmp = tcg_temp_new(); + tcg_gen_movi_i32(tmp, offset); + return tmp; } /* Should never happen. */ return NULL_QREG; From patchwork Sat Nov 9 10:14:11 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Tokarev X-Patchwork-Id: 842075 Delivered-To: patch@linaro.org Received: by 2002:a5d:6307:0:b0:381:e71e:8f7b with SMTP id i7csp2081933wru; Sat, 9 Nov 2024 02:18:16 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCWE/g228gMr9MJvXk6BI/ZlghzoJ7avjIDNrGU8IEyXJIaCrt99OsObRVM/nBKQjRame9MZKg==@linaro.org X-Google-Smtp-Source: AGHT+IEhtzLH58gis1yhfnVIbZdilZhfKtaVu4ThaF+zv/zk0w9fAYU4gqIi6TGTn96byDUblJBU X-Received: by 2002:a05:6214:33c4:b0:6cc:41cc:cab6 with SMTP id 6a1803df08f44-6d39e19712amr81441426d6.23.1731147496341; Sat, 09 Nov 2024 02:18:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1731147496; cv=none; d=google.com; s=arc-20240605; b=MwXeamuiSCQVBIrr/MyjgVJ9DRGOOj49TX1xGpitheK3MxBu0HPl6ZHJotg/6jHlPM EA4DlVHHNSiLzQlgw1cvrc5D7QhnhNNvcygiksMRcPHe7d2RbVmIEVpRp2paVBeM3L0h HvaOdov0lpjy5VE4pXIjUk4SSyIojN8veEAuo2Tu1B5/r7axYXPwRWpfaLltgBcbpV8O y4rWYMK3r7LyJcSjNVPSbZMFsyeM5U+gZW0HFWA0rhY6fK/il5uyInWoqna/FrtQSIFH 04BoyKnwJkOC8Q11giuke/9LuuPkqaAv/CAFIwm793MDr4K//d0XN70s622WhgOg3up3 5djw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from; bh=vekVV3PMv4fi3QNwvENGjfmoprF09aDBj2Un/BnwnKs=; fh=tGYCtd4Yk/5t63XyS9rxnTAEGu/ewInjrHJiBkfyCpE=; b=HZq9ClCBljZpyOUMaP0L7KjR5+txcoSg6V7V1JL/gjX36hDOSKM31tQd6eZcGmv8yJ KAS/G28Yxu3aZZ/mizrHiPA9F+sGE1y/R/yY93PFdAKSm6jYXuEDfrmtmNKQijLsGcWw cY+chLSMt6K6OGaEFAI8lfNrnPfc2qNGy9q7V8zR99dvZjWViOzRLroqHHLxUhZoU1cH AAAHE8n78QehAEeWGtyEvlEtgt9X8B6Td+o+AZw3Eg5rXO/yqBAMei4a8rqV1ULnPbRC XLg1HOWWaa6iBlRyziXvS5k1jXJKyo03EAmWOX8Kpg5WIbEDxO/FguoYJuTI7LiX6EAO 90LQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org" Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 6a1803df08f44-6d3966b2d31si58273726d6.474.2024.11.09.02.18.16 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sat, 09 Nov 2024 02:18:16 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org" Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t9iXk-0000Vb-IH; Sat, 09 Nov 2024 05:18:12 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t9iVg-0005K2-7K; Sat, 09 Nov 2024 05:16:04 -0500 Received: from isrv.corpit.ru ([86.62.121.231]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t9iVe-0007vK-GC; Sat, 09 Nov 2024 05:16:03 -0500 Received: from tsrv.corpit.ru (tsrv.tls.msk.ru [192.168.177.2]) by isrv.corpit.ru (Postfix) with ESMTP id 43232A13F8; Sat, 9 Nov 2024 13:13:50 +0300 (MSK) Received: from think4mjt.tls.msk.ru (mjtthink.wg.tls.msk.ru [192.168.177.146]) by tsrv.corpit.ru (Postfix) with ESMTP id E33C8167EE4; Sat, 9 Nov 2024 13:14:44 +0300 (MSK) From: Michael Tokarev To: qemu-devel@nongnu.org Cc: qemu-stable@nongnu.org, Peter Maydell , Kevin Wolf , Michael Tokarev Subject: [Stable-8.2.8 20/49] tests/qemu-iotests/211.out: Update to expect MapEntry 'compressed' field Date: Sat, 9 Nov 2024 13:14:11 +0300 Message-Id: <20241109101443.312701-20-mjt@tls.msk.ru> X-Mailer: git-send-email 2.39.5 In-Reply-To: References: MIME-Version: 1.0 Received-SPF: pass client-ip=86.62.121.231; envelope-from=mjt@tls.msk.ru; helo=isrv.corpit.ru X-Spam_score_int: -68 X-Spam_score: -6.9 X-Spam_bar: ------ X-Spam_report: (-6.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_HI=-5, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Peter Maydell In commit 52b10c9c0c68e90f in 2023 the QAPI MapEntry struct was updated to add a 'compressed' field. That commit updated a number of iotest expected-output files, but missed 211, which is vdi specific. The result is that ./check -vdi and more specifically ./check -vdi 211 fails because the expected and actual output don't match. Update the reference output. Cc: qemu-stable@nongnu.org Fixes: 52b10c9c0c68e90f ("qemu-img: map: report compressed data blocks") Signed-off-by: Peter Maydell Message-ID: <20241008164708.2966400-4-peter.maydell@linaro.org> Reviewed-by: Kevin Wolf Signed-off-by: Kevin Wolf (cherry picked from commit d60bd080e783107cb876a6f16561fe03f9dcbca7) Signed-off-by: Michael Tokarev diff --git a/tests/qemu-iotests/211.out b/tests/qemu-iotests/211.out index f02c75409c..ff9f9a6913 100644 --- a/tests/qemu-iotests/211.out +++ b/tests/qemu-iotests/211.out @@ -17,7 +17,7 @@ file format: IMGFMT virtual size: 128 MiB (134217728 bytes) cluster_size: 1048576 -[{"data": false, "depth": 0, "length": 134217728, "present": true, "start": 0, "zero": true}] +[{"compressed": false, "data": false, "depth": 0, "length": 134217728, "present": true, "start": 0, "zero": true}] === Successful image creation (explicit defaults) === {"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"driver": "file", "filename": "TEST_DIR/PID-t.vdi", "size": 0}}} @@ -35,7 +35,7 @@ file format: IMGFMT virtual size: 64 MiB (67108864 bytes) cluster_size: 1048576 -[{"data": false, "depth": 0, "length": 67108864, "present": true, "start": 0, "zero": true}] +[{"compressed": false, "data": false, "depth": 0, "length": 67108864, "present": true, "start": 0, "zero": true}] === Successful image creation (with non-default options) === {"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"driver": "file", "filename": "TEST_DIR/PID-t.vdi", "size": 0}}} @@ -53,7 +53,7 @@ file format: IMGFMT virtual size: 32 MiB (33554432 bytes) cluster_size: 1048576 -[{"data": true, "depth": 0, "length": 3072, "offset": 1024, "present": true, "start": 0, "zero": false}, {"data": true, "depth": 0, "length": 33551360, "offset": 4096, "present": true, "start": 3072, "zero": true}] +[{"compressed": false, "data": true, "depth": 0, "length": 3072, "offset": 1024, "present": true, "start": 0, "zero": false}, {"compressed": false, "data": true, "depth": 0, "length": 33551360, "offset": 4096, "present": true, "start": 3072, "zero": true}] === Invalid BlockdevRef === {"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"driver": "vdi", "file": "this doesn't exist", "size": 33554432}}} From patchwork Sat Nov 9 10:14:13 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Tokarev X-Patchwork-Id: 842083 Delivered-To: patch@linaro.org Received: by 2002:a5d:6307:0:b0:381:e71e:8f7b with SMTP id i7csp2084111wru; Sat, 9 Nov 2024 02:27:03 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCXkbpepbLnJbtHcYkVK0cacNBc+BhPrGUoALkmsloOixxcuWAS5Tq3fszUpfEcEofvNiKiw3w==@linaro.org X-Google-Smtp-Source: AGHT+IFPQkwQaj7ZPqnmQlc7+BzKefWqBa6q7qbgm7vo32WpFfpEcK//Lek/qvuNz40P6qffxe0X X-Received: by 2002:a05:620a:4414:b0:7ac:b213:36f3 with SMTP id af79cd13be357-7b331eaa522mr893675985a.14.1731148023429; Sat, 09 Nov 2024 02:27:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1731148023; cv=none; d=google.com; s=arc-20240605; b=dPBKGtHvGWOHYr5uGY2j32ZPPC4son0+2lVbYxp/DRUE3g6JoVzyhnct3LaZnVsY3w 1pQPEBqjUSpaG4TvEnOQVOY29nRytmdBNSC5HSzlrl7kp1atyeCSKkChEl4nK7p6mO0m 3uj6kpXfdL2pCy/LxzynaOAn7Wsvja9leL8KBG1F9sLnxuAIJA6JoZRvgeTB/C/jAeRu jv0K91yM/JqH/d8/CO9sjxhXHHCDjYFHgtJNR6ofUv1+CV+uaRArdRLUpWjZzR4ssjNz stIUQFtlCszJjreCWcj/+H9fndh7aNjrrdd1xxxq9NbIvVnD40kV2Ds/1zqsABIeEthU IHyg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from; bh=YKAcXknjA03wPR2IfNDIKLcRMacJaeRxXc1cw2YCsWo=; fh=vuhzQW7LNVNfoCzrQU/zlJ6j/7aL6vBNEyQhm6VZot4=; b=H3ugifOqq/QJq1KSjB/3crt1d0eJ3VMqA0o/EqHU9ZaGBRhtKpDT98jtJ4Y/2b2huz 3XzJmXDuDj5mSNfWQrDQ/1QrtRti4knK/IBN5pgFz0bg+89r04yeMebvZyxy4WGnciZ8 /buos+l04xyf14Tl5d5ewE6rwQhP5HrGRYKr86IQeoNT1GtIn2EW2hWGevZxw1aeZsG3 8GnkpQY1u9qKcwDyvAgSn/CSdZilXLQOlX6Yg6VabB22at3BnbfpLUtelHO43o2jbjeO HYlBAHmKvvN+ngqPw1A8NP9PAEKOOAgXGTzcIbE/Hd9d9L182i/OSbbSll2HgF7f6v6E WCXw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org" Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7b32ad3a0aesi610759385a.705.2024.11.09.02.27.03 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sat, 09 Nov 2024 02:27:03 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org" Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t9iY4-0001m2-Dw; Sat, 09 Nov 2024 05:18:34 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t9iW3-00060P-7U; Sat, 09 Nov 2024 05:16:34 -0500 Received: from isrv.corpit.ru ([86.62.121.231]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t9iW1-0007wH-Mx; Sat, 09 Nov 2024 05:16:26 -0500 Received: from tsrv.corpit.ru (tsrv.tls.msk.ru [192.168.177.2]) by isrv.corpit.ru (Postfix) with ESMTP id 6F4F7A13FA; Sat, 9 Nov 2024 13:13:50 +0300 (MSK) Received: from think4mjt.tls.msk.ru (mjtthink.wg.tls.msk.ru [192.168.177.146]) by tsrv.corpit.ru (Postfix) with ESMTP id 07F50167EE6; Sat, 9 Nov 2024 13:14:45 +0300 (MSK) From: Michael Tokarev To: qemu-devel@nongnu.org Cc: qemu-stable@nongnu.org, Richard Henderson , Alistair Francis , Pierrick Bouvier , LIU Zhiwei , Michael Tokarev Subject: [Stable-8.2.8 22/49] tcg: Reset data_gen_ptr correctly Date: Sat, 9 Nov 2024 13:14:13 +0300 Message-Id: <20241109101443.312701-22-mjt@tls.msk.ru> X-Mailer: git-send-email 2.39.5 In-Reply-To: References: MIME-Version: 1.0 Received-SPF: pass client-ip=86.62.121.231; envelope-from=mjt@tls.msk.ru; helo=isrv.corpit.ru X-Spam_score_int: -68 X-Spam_score: -6.9 X-Spam_bar: ------ X-Spam_report: (-6.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_HI=-5, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Richard Henderson This pointer needs to be reset after overflow just like code_buf and code_ptr. Cc: qemu-stable@nongnu.org Fixes: 57a269469db ("tcg: Infrastructure for managing constant pools") Acked-by: Alistair Francis Reviewed-by: Pierrick Bouvier Reviewed-by: LIU Zhiwei Signed-off-by: Richard Henderson (cherry picked from commit a7cfd751fb269de4a93bf1658cb13911c7ac77cc) Signed-off-by: Michael Tokarev diff --git a/tcg/tcg.c b/tcg/tcg.c index e2c38f6d11..7d07a1166b 100644 --- a/tcg/tcg.c +++ b/tcg/tcg.c @@ -1410,7 +1410,6 @@ TranslationBlock *tcg_tb_alloc(TCGContext *s) goto retry; } qatomic_set(&s->code_gen_ptr, next); - s->data_gen_ptr = NULL; return tb; } @@ -6114,6 +6113,7 @@ int tcg_gen_code(TCGContext *s, TranslationBlock *tb, uint64_t pc_start) */ s->code_buf = tcg_splitwx_to_rw(tb->tc.ptr); s->code_ptr = s->code_buf; + s->data_gen_ptr = NULL; #ifdef TCG_TARGET_NEED_LDST_LABELS QSIMPLEQ_INIT(&s->ldst_labels); From patchwork Sat Nov 9 10:14:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Michael Tokarev X-Patchwork-Id: 842077 Delivered-To: patch@linaro.org Received: by 2002:a5d:6307:0:b0:381:e71e:8f7b with SMTP id i7csp2082368wru; Sat, 9 Nov 2024 02:19:57 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCV1c+7uwVMm6whEmbo9CRNyaVgjzZ+R2+uRvDti+rRsKwRpzXll8IMtaIUSuIJDcv2PtjhDVA==@linaro.org X-Google-Smtp-Source: AGHT+IGU9lVU6tuvTmPNo260gWuB5E3680iGL9c2k7UWSOcE6xaTOuyr1R0NxuezagE3xRdCy2Yu X-Received: by 2002:ac8:5794:0:b0:460:8f80:9091 with SMTP id d75a77b69052e-4630933aad6mr93041031cf.15.1731147597193; Sat, 09 Nov 2024 02:19:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1731147597; cv=none; d=google.com; s=arc-20240605; b=a1v7KJmJfUsdDAJhw8ZPHw9r8w++Z6SO/Lzyki+Kq06A4taRRVXPIw0asfLKOXJ6xJ 7XNbgVWZDQuxO55hpMriKAtbekWAQBOK9pLaxD+Db33kDGEwoolCLN0fre+mV3s9JlxT 9v64fZJbuAYA0gY5LDpVqFT0PcYQ7/Gix8aMPrJauMT3P0UzuJL6lDAvwvq1VWBdGFbu cCxDLTd8htAh4MkbJvSjCPyP/Ghi1CElJ7YlLexiq7VSm0PqJGdHV9jzWsX1nCZ9G11K fxG0MbIiWSk4388hKOsrHlqNI/3WhzR9iZuYI8OwgnGJ2kiu+pmA2klUDh0chz7Fh5lP 4OGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from; bh=h9aVlYLCKD1NhC9xGKdu2g3w7SBQlop+lT5iyoi0Aco=; fh=jnOGvdacaTpco5Be5Zrr9OXpoek4qPe+c7L5Gapq/Ic=; b=Hxq2kunWCz2P83cg5U1Oxv+PE1eBE1cq3qRF1QzODMPC5IgZVaZ5U05JD0yXNs0mRu QxNy2faGCLmzx7gGX1hLbY665JS4z9RTKj4GTApRWeR57ZyYWefj+P1qfdr2A/NMsDq8 QWsoFKVuLp+7zUfSNnB0B5om1/G9yyLxibaMrhqHf1z0vaUEjl/fkgQt2vmgmyMSwQDi Pe5+VVDR5Mbl6QrVTtsdRABzuTxyj1y8zftPfrIYv9cpTEHLNNOhddfGfUZ7o0L/oIbI GGqn9HRZWQ8uiz10cAYPz8WrxnH8Dj1jr4GTM4QHrC3EfZqC5EvwF+xEeqdPH/cTMpVL 7h+g==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org" Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-462ff61b171si59172471cf.429.2024.11.09.02.19.57 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sat, 09 Nov 2024 02:19:57 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org" Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t9iYd-0002FM-W6; Sat, 09 Nov 2024 05:19:08 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t9iW6-00060h-SD; Sat, 09 Nov 2024 05:16:34 -0500 Received: from isrv.corpit.ru ([86.62.121.231]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t9iW5-0007yu-AP; Sat, 09 Nov 2024 05:16:30 -0500 Received: from tsrv.corpit.ru (tsrv.tls.msk.ru [192.168.177.2]) by isrv.corpit.ru (Postfix) with ESMTP id 88111A13FD; Sat, 9 Nov 2024 13:13:50 +0300 (MSK) Received: from think4mjt.tls.msk.ru (mjtthink.wg.tls.msk.ru [192.168.177.146]) by tsrv.corpit.ru (Postfix) with ESMTP id 358B6167EE8; Sat, 9 Nov 2024 13:14:45 +0300 (MSK) From: Michael Tokarev To: qemu-devel@nongnu.org Cc: qemu-stable@nongnu.org, Richard Henderson , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , =?utf-8?q?Alex?= =?utf-8?q?_Benn=C3=A9e?= , Michael Tokarev Subject: [Stable-8.2.8 24/49] target/i386: Use probe_access_full_mmu in ptw_translate Date: Sat, 9 Nov 2024 13:14:15 +0300 Message-Id: <20241109101443.312701-24-mjt@tls.msk.ru> X-Mailer: git-send-email 2.39.5 In-Reply-To: References: MIME-Version: 1.0 Received-SPF: pass client-ip=86.62.121.231; envelope-from=mjt@tls.msk.ru; helo=isrv.corpit.ru X-Spam_score_int: -68 X-Spam_score: -6.9 X-Spam_bar: ------ X-Spam_report: (-6.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_HI=-5, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Richard Henderson The probe_access_full_mmu function was designed for this purpose, and does not report the memory operation event to plugins. Cc: qemu-stable@nongnu.org Fixes: 6d03226b422 ("plugins: force slow path when plugins instrument memory ops") Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Alex Bennée Signed-off-by: Richard Henderson Message-ID: <20241013184733.1423747-3-richard.henderson@linaro.org> (cherry picked from commit 115ade42d50144c15b74368d32dc734ea277d853) Signed-off-by: Michael Tokarev diff --git a/target/i386/tcg/sysemu/excp_helper.c b/target/i386/tcg/sysemu/excp_helper.c index 319b23762c..31c5032ace 100644 --- a/target/i386/tcg/sysemu/excp_helper.c +++ b/target/i386/tcg/sysemu/excp_helper.c @@ -61,12 +61,11 @@ typedef struct PTETranslate { static bool ptw_translate(PTETranslate *inout, hwaddr addr, uint64_t ra) { - CPUTLBEntryFull *full; int flags; inout->gaddr = addr; - flags = probe_access_full(inout->env, addr, 0, MMU_DATA_STORE, - inout->ptw_idx, true, &inout->haddr, &full, ra); + flags = probe_access_full_mmu(inout->env, addr, 0, MMU_DATA_STORE, + inout->ptw_idx, &inout->haddr, NULL); if (unlikely(flags & TLB_INVALID_MASK)) { TranslateFault *err = inout->err; @@ -439,9 +438,8 @@ do_check_protect_pse36: CPUTLBEntryFull *full; int flags, nested_page_size; - flags = probe_access_full(env, paddr, 0, access_type, - MMU_NESTED_IDX, true, - &pte_trans.haddr, &full, 0); + flags = probe_access_full_mmu(env, paddr, 0, access_type, + MMU_NESTED_IDX, &pte_trans.haddr, &full); if (unlikely(flags & TLB_INVALID_MASK)) { *err = (TranslateFault){ .error_code = env->error_code, From patchwork Sat Nov 9 10:14:19 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Michael Tokarev X-Patchwork-Id: 842081 Delivered-To: patch@linaro.org Received: by 2002:a5d:6307:0:b0:381:e71e:8f7b with SMTP id i7csp2083706wru; Sat, 9 Nov 2024 02:25:22 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCUN1ocg0FBv7gbGcJ+Fn3vZQdC1V7YMchdUdpkU2KBZUHMsD/tsZtlsZtXJoomCUd+FA48SwA==@linaro.org X-Google-Smtp-Source: AGHT+IGIkQrAic+pud39kTZYpE0MfJIH77ErdoQ69zzcxRLgtVAkRe9ZGRY40x3YhOulHweoa1MG X-Received: by 2002:a05:6214:2d44:b0:6d3:4553:49ac with SMTP id 6a1803df08f44-6d39e1cf0b6mr80309556d6.30.1731147921929; Sat, 09 Nov 2024 02:25:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1731147921; cv=none; d=google.com; s=arc-20240605; b=G2WTrxTwmd0MdsIrBcKW6jNBOlOT3U8pbtUEyreiWpHbL1JAB7fV7ioGfoUi5NabYA 5u9lrlzkeGNFKjgcdmvwnwsqNsAwQfB0/szGqX+gAzu3IXFQ9p9GQM/vJdl5LfyJJbku 4s5FDSYY8WWumecRlRwnSEymezy3mly7/kSXPem2B5r03F/O9sphDh3cl+Nnx+29tA33 +EBUta9fZ4RW9Xt9Ym5ATkj9RTEc2QlybS5/Cpv0U9W0D1K4kfjKtNDLeoiezQiu+KJy 2IUq5ByJD49Z8Kmh7rsR6wtdCTkMvtHYg+tKPr0Rk30N29qsXLYidftFnfLPG7/bT0bm T68w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from; bh=mITr+4ff3/eJn4ZukbuQ+0LdyhP5DuTqc2drUwlfOmE=; fh=QunmYwzbXWilzKUSCm5rGLvrKB9FGWCyqo7FW/+IwZI=; b=cSTu8oAXzL8mBeYiKM28s19Fdk1kY245i4ej4P1tjYFYRLirIHhm+fZqcDMbP/AVy2 JZvbUvGb6qkJ8ywiXa6vdYflSOYJBwCut0K/tJu7TuRtYD04nmmiD47xv6oVExcYMy4y KQIuRdzGF4QHen+tpwX79rfdLEX2sGoB1emsUXDBHwyBUPL/qEXYXVvm3TQ1Hi6BuiJn 9VCGkmpARreSYwqsAUFCOh1UwPfng65BBQCQnbF7H7jpcIbK1idWj9B82PmXBen8+ap4 GJaiPKTYT56SZWv3I4mlH84qBuAR0NIwo7Q9mUlzvCj1Q0mRMBAFfoQCFt6prxSRYOaG bFAA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org" Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 6a1803df08f44-6d3962106d7si60526176d6.84.2024.11.09.02.25.21 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sat, 09 Nov 2024 02:25:21 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org" Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t9iax-0004y7-Ud; Sat, 09 Nov 2024 05:21:36 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t9iWX-0006ME-VC; Sat, 09 Nov 2024 05:17:01 -0500 Received: from isrv.corpit.ru ([86.62.121.231]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t9iWW-00086w-22; Sat, 09 Nov 2024 05:16:57 -0500 Received: from tsrv.corpit.ru (tsrv.tls.msk.ru [192.168.177.2]) by isrv.corpit.ru (Postfix) with ESMTP id BE6EBA1401; Sat, 9 Nov 2024 13:13:50 +0300 (MSK) Received: from think4mjt.tls.msk.ru (mjtthink.wg.tls.msk.ru [192.168.177.146]) by tsrv.corpit.ru (Postfix) with ESMTP id 65131167EEC; Sat, 9 Nov 2024 13:14:45 +0300 (MSK) From: Michael Tokarev To: qemu-devel@nongnu.org Cc: qemu-stable@nongnu.org, =?utf-8?q?Alex_Benn=C3=A9e?= , =?utf-8?q?Daniel_P_?= =?utf-8?q?=2E_Berrang=C3=A9?= , Michael Tokarev Subject: [Stable-8.2.8 28/49] gitlab: make check-[dco|patch] a little more verbose Date: Sat, 9 Nov 2024 13:14:19 +0300 Message-Id: <20241109101443.312701-28-mjt@tls.msk.ru> X-Mailer: git-send-email 2.39.5 In-Reply-To: References: MIME-Version: 1.0 Received-SPF: pass client-ip=86.62.121.231; envelope-from=mjt@tls.msk.ru; helo=isrv.corpit.ru X-Spam_score_int: -68 X-Spam_score: -6.9 X-Spam_bar: ------ X-Spam_report: (-6.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_HI=-5, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Alex Bennée When git fails the rather terse backtrace only indicates it failed without some useful context. Add some to make the log a little more useful. Reviewed-by: Daniel P. Berrangé Signed-off-by: Alex Bennée Message-Id: <20241023113406.1284676-11-alex.bennee@linaro.org> (cherry picked from commit 97f116f9c6fd127b6ed2953993fa9fb05e82f450) Signed-off-by: Michael Tokarev diff --git a/.gitlab-ci.d/check-dco.py b/.gitlab-ci.d/check-dco.py index 632c8bcce8..d221b16bd5 100755 --- a/.gitlab-ci.d/check-dco.py +++ b/.gitlab-ci.d/check-dco.py @@ -19,10 +19,9 @@ reponame = os.path.basename(cwd) repourl = "https://gitlab.com/%s/%s.git" % (namespace, reponame) +print(f"adding upstream git repo @ {repourl}") subprocess.check_call(["git", "remote", "add", "check-dco", repourl]) -subprocess.check_call(["git", "fetch", "check-dco", "master"], - stdout=subprocess.DEVNULL, - stderr=subprocess.DEVNULL) +subprocess.check_call(["git", "fetch", "check-dco", "master"]) ancestor = subprocess.check_output(["git", "merge-base", "check-dco/master", "HEAD"], diff --git a/.gitlab-ci.d/check-patch.py b/.gitlab-ci.d/check-patch.py index 39e2b403c9..68c549a146 100755 --- a/.gitlab-ci.d/check-patch.py +++ b/.gitlab-ci.d/check-patch.py @@ -19,13 +19,12 @@ reponame = os.path.basename(cwd) repourl = "https://gitlab.com/%s/%s.git" % (namespace, reponame) +print(f"adding upstream git repo @ {repourl}") # GitLab CI environment does not give us any direct info about the # base for the user's branch. We thus need to figure out a common # ancestor between the user's branch and current git master. subprocess.check_call(["git", "remote", "add", "check-patch", repourl]) -subprocess.check_call(["git", "fetch", "check-patch", "master"], - stdout=subprocess.DEVNULL, - stderr=subprocess.DEVNULL) +subprocess.check_call(["git", "fetch", "check-patch", "master"]) ancestor = subprocess.check_output(["git", "merge-base", "check-patch/master", "HEAD"], From patchwork Sat Nov 9 10:14:20 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Michael Tokarev X-Patchwork-Id: 842080 Delivered-To: patch@linaro.org Received: by 2002:a5d:6307:0:b0:381:e71e:8f7b with SMTP id i7csp2083040wru; Sat, 9 Nov 2024 02:22:37 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCU9QAbmgrgBdbaoi2ntaLLIB95auEJZCCLAZPUazV4eOq4WF82EF+S3pSnZEaXZfu27qOH+gg==@linaro.org X-Google-Smtp-Source: AGHT+IFUQfvMdVEapHnsPP7F/dEEakOAUTtpsEMm/6HsYWD2etg5Xu8PWiybd/kQVa9svc5XSFwP X-Received: by 2002:ad4:576e:0:b0:6cb:c9cf:cd40 with SMTP id 6a1803df08f44-6d39d57c04cmr100266266d6.8.1731147757130; Sat, 09 Nov 2024 02:22:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1731147757; cv=none; d=google.com; s=arc-20240605; b=bnGDsjTjdxiICZqdV0II5+y+OxmR6hjaQptE8kiJUEQUOhxEXIkE1x07KZd115ufd0 OYTPU3LWstup7vzq1SwAmCt8Y1L70FKkIDlxVp/3naE30j4v3QJyLHJiarqSfC1RC2RB cSoMJ+/1bHbNmxmQUT/FOMl5KbSt5KpKEFAnJU7GxdZNTOKV1TFFULSs8yAbgQ5ws4Q7 2cDYYj18oXyTb8QZyzMhfxUX5s3cFP9BZcCKL1JeXUTlV7EoZEmxhp3cKu9Q98N++fOe hOV3J4CYYtaAzsAKqW0Hr/REh1QW90we633drlMGNus6zoE4xPP71SAm/Qu2qnX+8jas zlHg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from; bh=UdsA3pdBh5spqwRR20WzH4ZL2bUgT2PGiWwAxdLveBM=; fh=Z6A3QxoiTOnqevo4AGsseOCUPnIEjEls/lO6Frh9MJI=; b=eCgsvcrn7biAQL4QsfVtde+igaQMjFkBZKck64OGyCsy4ZBegGv4PUdzfzlPMUQ7yk DswaYnuuoGZLcXvNk45UCD8JbDzfUclhAhz5fyKQZ5oO2yG0TXVtdeqa9/0w9Zig2EFv Bq5W1KBsLsQoJ4P1kshstjzpEtyzvpNjrxBcE9wfRA0kL7exbDe/LTK75SPMxGm8hxOQ zVaptPWc4TbiH7MgSqEljQ+ZgV7N+ZijVas21znTkB6aZ+MjAWOqwgwM88CdnyV01pDg ii9RDeMszZqu6SCYVlU/erPDhZ8wuzfqdLjy/kPytAwqIoEX33xmr2BuRi26FncmWXMJ qm2A==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org" Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 6a1803df08f44-6d39664b875si69338976d6.189.2024.11.09.02.22.36 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sat, 09 Nov 2024 02:22:37 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org" Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t9ibc-0005gI-O0; Sat, 09 Nov 2024 05:22:13 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t9iWb-0006Tl-0K; Sat, 09 Nov 2024 05:17:01 -0500 Received: from isrv.corpit.ru ([86.62.121.231]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t9iWY-000879-6w; Sat, 09 Nov 2024 05:17:00 -0500 Received: from tsrv.corpit.ru (tsrv.tls.msk.ru [192.168.177.2]) by isrv.corpit.ru (Postfix) with ESMTP id CEEBBA1402; Sat, 9 Nov 2024 13:13:50 +0300 (MSK) Received: from think4mjt.tls.msk.ru (mjtthink.wg.tls.msk.ru [192.168.177.146]) by tsrv.corpit.ru (Postfix) with ESMTP id 79DC0167EED; Sat, 9 Nov 2024 13:14:45 +0300 (MSK) From: Michael Tokarev To: qemu-devel@nongnu.org Cc: qemu-stable@nongnu.org, Pierrick Bouvier , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Thomas Huth , =?utf-8?q?Alex_Benn=C3=A9e?= , Michael Tokarev Subject: [Stable-8.2.8 29/49] dockerfiles: fix default targets for debian-loongarch-cross Date: Sat, 9 Nov 2024 13:14:20 +0300 Message-Id: <20241109101443.312701-29-mjt@tls.msk.ru> X-Mailer: git-send-email 2.39.5 In-Reply-To: References: MIME-Version: 1.0 Received-SPF: pass client-ip=86.62.121.231; envelope-from=mjt@tls.msk.ru; helo=isrv.corpit.ru X-Spam_score_int: -68 X-Spam_score: -6.9 X-Spam_bar: ------ X-Spam_report: (-6.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_HI=-5, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Pierrick Bouvier fix system target name, and remove --disable-system (which deactivates system target). Found using: make docker-test-build@debian-loongarch-cross V=1 Signed-off-by: Pierrick Bouvier Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth Message-Id: <20241020213759.2168248-1-pierrick.bouvier@linaro.org> Signed-off-by: Alex Bennée Message-Id: <20241023113406.1284676-10-alex.bennee@linaro.org> (cherry picked from commit 24be5341fbeea341cca38b59d4c0928a8cf5fac1) Signed-off-by: Michael Tokarev diff --git a/tests/docker/dockerfiles/debian-loongarch-cross.docker b/tests/docker/dockerfiles/debian-loongarch-cross.docker index 6a9197528b..576e35972f 100644 --- a/tests/docker/dockerfiles/debian-loongarch-cross.docker +++ b/tests/docker/dockerfiles/debian-loongarch-cross.docker @@ -42,8 +42,8 @@ RUN curl -#SL https://github.com/loongson/build-tools/releases/download/2023.08. ENV PATH $PATH:/opt/cross-tools/bin ENV LD_LIBRARY_PATH /opt/cross-tools/lib:/opt/cross-tools/loongarch64-unknown-linux-gnu/lib:$LD_LIBRARY_PATH -ENV QEMU_CONFIGURE_OPTS --disable-system --disable-docs --disable-tools -ENV DEF_TARGET_LIST loongarch64-linux-user,loongarch-softmmu +ENV QEMU_CONFIGURE_OPTS --disable-docs --disable-tools +ENV DEF_TARGET_LIST loongarch64-linux-user,loongarch64-softmmu ENV MAKE /usr/bin/make # As a final step configure the user (if env is defined) From patchwork Sat Nov 9 10:14:24 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Michael Tokarev X-Patchwork-Id: 842084 Delivered-To: patch@linaro.org Received: by 2002:a5d:6307:0:b0:381:e71e:8f7b with SMTP id i7csp2084175wru; Sat, 9 Nov 2024 02:27:20 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCWjKAPhJpNShR9Da+64bs8axtn6P0EFqfB7fHTmxTPqQPirvoBLnKVDSN6aAifzSa4hWdZkiA==@linaro.org X-Google-Smtp-Source: AGHT+IENXuf46rd6D2h5z6UOzdClH+r3u98tzc4cznLbyClrSUgEnU/+H12DcmG+ST1TV9YcjkNE X-Received: by 2002:a05:6214:3202:b0:6d3:6542:8496 with SMTP id 6a1803df08f44-6d39e107d0fmr85209606d6.10.1731148040348; Sat, 09 Nov 2024 02:27:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1731148040; cv=none; d=google.com; s=arc-20240605; b=Qae5OXrTmrOCHI26IrqDoyQ/xca7wvcTkTtmRQWAOCIg0RsRm/yfiHzhXfKiQmywy2 /8pEhzr/6Jnz9EROCLNSHbncdYUd4hNxRgWc/S2ZdxZF1hLNbzR2rR98y7zLkfCSkfMX 2vs0z0qRnShdTkflx5/6GtUNCDmxSz0R+gmVSJGmSnzZoaw6EiOR6XSd0shIYX1naVsr PBXpNhU0bdk9HO9+fHfKOjXxiDYGkikJCULYPxE79q+d22H8q3eItLh0uIE0E0Y3qRDx nVcYJFMbzhXksrBDnF0yqdXfwV1k18Ls38UcI68snmHqPl/NFRCBxqIGPpKTeYVU3rZo moLg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from; bh=NYdkYZ1EP0Zm0QH1ngej+4zYXjM/imy4Lapg9BwvMLE=; fh=GanseRjrcQuAMREH5dzTEIrzdKej3kFdmGlqcUMu4ko=; b=XRFg1/0myyoIJNmyHzWcNyA3436H3dmkMbwF3DIxy804IDX+upkaaQ3oGlH1YOfXUj GDIX03m/d3oZT2a/veP1Q5QtxwqGKGForg0JEF24IE7ay4PFHd5AT0geppt9+75b/fdA TdJnMTLyqPi8aDNiio1CRsO3N+aHP7Y8O0uApKMU41Qdys/ZJLDjTIm/B7WN6Vx7/JCd s8aBEf7sosVPCGpYwGbNkkFX5kZlpjGf6mFzBQM9uAMlZH/lOMORAgSIsNvwyveBBSQ+ ArP2EaiAD1Y/q1TEWV0VPirABu+Iis3BR6bd+0oHbjoEjbafdj4N/NaZD+52d73xkjdz cq4A==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org" Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 6a1803df08f44-6d39664dfa5si63596556d6.204.2024.11.09.02.27.20 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sat, 09 Nov 2024 02:27:20 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org" Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t9ib4-00053G-Lv; Sat, 09 Nov 2024 05:21:40 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t9iX1-0007O1-PK; Sat, 09 Nov 2024 05:17:31 -0500 Received: from isrv.corpit.ru ([86.62.121.231]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t9iWz-00088y-P6; Sat, 09 Nov 2024 05:17:27 -0500 Received: from tsrv.corpit.ru (tsrv.tls.msk.ru [192.168.177.2]) by isrv.corpit.ru (Postfix) with ESMTP id 1C423A1406; Sat, 9 Nov 2024 13:13:51 +0300 (MSK) Received: from think4mjt.tls.msk.ru (mjtthink.wg.tls.msk.ru [192.168.177.146]) by tsrv.corpit.ru (Postfix) with ESMTP id BDCB6167EF1; Sat, 9 Nov 2024 13:14:45 +0300 (MSK) From: Michael Tokarev To: qemu-devel@nongnu.org Cc: qemu-stable@nongnu.org, Peter Maydell , Richard Henderson , =?utf-8?q?Alex_Benn=C3=A9?= =?utf-8?q?e?= , Michael Tokarev Subject: [Stable-8.2.8 33/49] target/arm: Don't assert in regime_is_user() for E10 mmuidx values Date: Sat, 9 Nov 2024 13:14:24 +0300 Message-Id: <20241109101443.312701-33-mjt@tls.msk.ru> X-Mailer: git-send-email 2.39.5 In-Reply-To: References: MIME-Version: 1.0 Received-SPF: pass client-ip=86.62.121.231; envelope-from=mjt@tls.msk.ru; helo=isrv.corpit.ru X-Spam_score_int: -68 X-Spam_score: -6.9 X-Spam_bar: ------ X-Spam_report: (-6.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_HI=-5, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Peter Maydell In regime_is_user() we assert if we're passed an ARMMMUIdx_E10_* mmuidx value. This used to make sense because we only used this function in ptw.c and would never use it on this kind of stage 1+2 mmuidx, only for an individual stage 1 or stage 2 mmuidx. However, when we implemented FEAT_E0PD we added a callsite in aa64_va_parameters(), which means this can now be called for stage 1+2 mmuidx values if the guest sets the TCG_ELX.{E0PD0,E0PD1} bits to enable use of the feature. This will then result in an assertion failure later, for instance on a TLBI operation: #6 0x00007ffff6d0e70f in g_assertion_message_expr (domain=0x0, file=0x55555676eeba "../../target/arm/internals.h", line=978, func=0x555556771d48 <__func__.5> "regime_is_user", expr=) at ../../../glib/gtestutils.c:3279 #7 0x0000555555f286d2 in regime_is_user (env=0x555557f2fe00, mmu_idx=ARMMMUIdx_E10_0) at ../../target/arm/internals.h:978 #8 0x0000555555f3e31c in aa64_va_parameters (env=0x555557f2fe00, va=18446744073709551615, mmu_idx=ARMMMUIdx_E10_0, data=true, el1_is_aa32=false) at ../../target/arm/helper.c:12048 #9 0x0000555555f3163b in tlbi_aa64_get_range (env=0x555557f2fe00, mmuidx=ARMMMUIdx_E10_0, value=106721347371041) at ../../target/arm/helper.c:5214 #10 0x0000555555f317e8 in do_rvae_write (env=0x555557f2fe00, value=106721347371041, idxmap=21, synced=true) at ../../target/arm/helper.c:5260 #11 0x0000555555f31925 in tlbi_aa64_rvae1is_write (env=0x555557f2fe00, ri=0x555557fbeae0, value=106721347371041) at ../../target/arm/helper.c:5302 #12 0x0000555556036f8f in helper_set_cp_reg64 (env=0x555557f2fe00, rip=0x555557fbeae0, value=106721347371041) at ../../target/arm/tcg/op_helper.c:965 Since we do know whether these mmuidx values are for usermode or not, we can easily make regime_is_user() handle them: ARMMMUIdx_E10_0 is user, and the other two are not. Cc: qemu-stable@nongnu.org Fixes: e4c93e44ab103f ("target/arm: Implement FEAT_E0PD") Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Tested-by: Alex Bennée Message-id: 20241017172331.822587-1-peter.maydell@linaro.org (cherry picked from commit 1505b651fdbd9af59a4a90876a62ae7ea2d4cd39) Signed-off-by: Michael Tokarev diff --git a/target/arm/internals.h b/target/arm/internals.h index 0aa49a0b42..b93206f88f 100644 --- a/target/arm/internals.h +++ b/target/arm/internals.h @@ -752,6 +752,7 @@ static inline uint32_t regime_el(CPUARMState *env, ARMMMUIdx mmu_idx) static inline bool regime_is_user(CPUARMState *env, ARMMMUIdx mmu_idx) { switch (mmu_idx) { + case ARMMMUIdx_E10_0: case ARMMMUIdx_E20_0: case ARMMMUIdx_Stage1_E0: case ARMMMUIdx_MUser: @@ -761,10 +762,6 @@ static inline bool regime_is_user(CPUARMState *env, ARMMMUIdx mmu_idx) return true; default: return false; - case ARMMMUIdx_E10_0: - case ARMMMUIdx_E10_1: - case ARMMMUIdx_E10_1_PAN: - g_assert_not_reached(); } } From patchwork Sat Nov 9 10:14:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Tokarev X-Patchwork-Id: 842082 Delivered-To: patch@linaro.org Received: by 2002:a5d:6307:0:b0:381:e71e:8f7b with SMTP id i7csp2083835wru; Sat, 9 Nov 2024 02:25:58 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCUgsyNUZlGLsQlTQZH9loS3v8lVk24AibonvbLGuzTlHscA5CrV3Iaxn5kU0wIhxsdvz3i/ZQ==@linaro.org X-Google-Smtp-Source: AGHT+IFdTE9KYaUJXpRfvKGJSWZJnyGPEJ0UE+KNiMLi0Cr6XZTuWFzM+IzDbMQ01+6IxaU4ZBQo X-Received: by 2002:a05:6214:4883:b0:6d3:4055:e92c with SMTP id 6a1803df08f44-6d39e107723mr82818216d6.8.1731147958293; Sat, 09 Nov 2024 02:25:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1731147958; cv=none; d=google.com; s=arc-20240605; b=kN4BBDTYU51IG5ti0e/DeW0ORRQI/nnUBIKVYDn2A8f8534dcevf4PGDRDpybCzBdE UjiPiH6k+Zbrp/30/SRILGywEiiFbZOW4ZENbqnRCm8bg+MUUXoqxKnKVWaTUzG1upRK WW5kcoz58p5GbbZ7ZxsLlYg0hff5yxqn5lK//7emXQ1+iRt0wjYoXFLzZ87tS7tCZka/ AKunrMdwxyGbBySsbcmq/T7vrpLIJOuPrIDz49PTyUfh1phWEBCSegf5M3Bm2p3Yay89 AEKzIHTLHDhPuE+zEAv4h290ibBY3h0YIF0A6jPrhYhp6ze5PsiwyczHjCLBG1nb6NRq G8Bg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from; bh=NXRdhNpj3c57V4KwWz02rsxabYnTTFQnY03v7e9T8nE=; fh=xJ1URYKcMN3TM0/XAv5v+aCN+5tIbzAdcfBx5UNgoLw=; b=el5gmOAsazALJ/bChQ2SRIcFrjQdzaaMg8PYTvyYxpANyTV/tcrY390u1oUk65ll9/ US4+oDvCfWewMHWyRUiS9uEIZ5Sf3twWfcmkUzi8UDAh5XJaXad8dE+oo/zhL9E6+7Ue BT02tnhrwrLLXzHIGi2JFesUebre9yO3Jdl4c2WAypedzdzDdyVdCc7JGRIYcE9SlaPY CucMwedweVQ6SHTZY2ksEXnUEO9el6NDTgZZjxqQ8x7oo/6DBHAeiFQlT1RZ1bqbMWpl N9Amn+RvYgfpse1KHpjLNtasAXeWiDYlt2y40YkxG+KW4Nv4yDItd9aJX+81CcZdqyw8 t4Yg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org" Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7b32acfb80esi638898385a.471.2024.11.09.02.25.58 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sat, 09 Nov 2024 02:25:58 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org" Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t9idO-00032P-VE; Sat, 09 Nov 2024 05:24:03 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t9iYM-00029s-HG; Sat, 09 Nov 2024 05:18:52 -0500 Received: from isrv.corpit.ru ([86.62.121.231]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t9iYK-0008EW-Jf; Sat, 09 Nov 2024 05:18:50 -0500 Received: from tsrv.corpit.ru (tsrv.tls.msk.ru [192.168.177.2]) by isrv.corpit.ru (Postfix) with ESMTP id D0099A1413; Sat, 9 Nov 2024 13:13:51 +0300 (MSK) Received: from think4mjt.tls.msk.ru (mjtthink.wg.tls.msk.ru [192.168.177.146]) by tsrv.corpit.ru (Postfix) with ESMTP id 7CF79167EFE; Sat, 9 Nov 2024 13:14:46 +0300 (MSK) From: Michael Tokarev To: qemu-devel@nongnu.org Cc: qemu-stable@nongnu.org, Peter Maydell , Richard Henderson , Michael Tokarev Subject: [Stable-8.2.8 46/49] target/arm: Fix SVE SDOT/UDOT/USDOT (4-way, indexed) Date: Sat, 9 Nov 2024 13:14:37 +0300 Message-Id: <20241109101443.312701-46-mjt@tls.msk.ru> X-Mailer: git-send-email 2.39.5 In-Reply-To: References: MIME-Version: 1.0 Received-SPF: pass client-ip=86.62.121.231; envelope-from=mjt@tls.msk.ru; helo=isrv.corpit.ru X-Spam_score_int: -68 X-Spam_score: -6.9 X-Spam_bar: ------ X-Spam_report: (-6.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_HI=-5, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Peter Maydell Our implementation of the indexed version of SVE SDOT/UDOT/USDOT got the calculation of the inner loop terminator wrong. Although we correctly account for the element size when we calculate the terminator for the first iteration: intptr_t segend = MIN(16 / sizeof(TYPED), opr_sz_n); we don't do that when we move it forward after the first inner loop completes. The intention is that we process the vector in 128-bit segments, which for a 64-bit element size should mean (1, 2), (3, 4), (5, 6), etc. This bug meant that we would iterate (1, 2), (3, 4, 5, 6), (7, 8, 9, 10) etc and apply the wrong indexed element to some of the operations, and also index off the end of the vector. You don't see this bug if the vector length is small enough that we don't need to iterate the outer loop, i.e. if it is only 128 bits, or if it is the 64-bit special case from AA32/AA64 AdvSIMD. If the vector length is 256 bits then we calculate the right results for the elements in the vector but do index off the end of the vector. Vector lengths greater than 256 bits see wrong answers. The instructions that produce 32-bit results behave correctly. Fix the recalculation of 'segend' for subsequent iterations, and restore a version of the comment that was lost in the refactor of commit 7020ffd656a5 that explains why we only need to clamp segend to opr_sz_n for the first iteration, not the later ones. Cc: qemu-stable@nongnu.org Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2595 Fixes: 7020ffd656a5 ("target/arm: Macroize helper_gvec_{s,u}dot_idx_{b,h}") Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson Message-id: 20241101185544.2130972-1-peter.maydell@linaro.org (cherry picked from commit e6b2fa1b81ac6b05c4397237c846a295a9857920) Signed-off-by: Michael Tokarev diff --git a/target/arm/tcg/vec_helper.c b/target/arm/tcg/vec_helper.c index cc7cab338c..83b49ef009 100644 --- a/target/arm/tcg/vec_helper.c +++ b/target/arm/tcg/vec_helper.c @@ -692,6 +692,13 @@ void HELPER(NAME)(void *vd, void *vn, void *vm, void *va, uint32_t desc) \ { \ intptr_t i = 0, opr_sz = simd_oprsz(desc); \ intptr_t opr_sz_n = opr_sz / sizeof(TYPED); \ + /* \ + * Special case: opr_sz == 8 from AA64/AA32 advsimd means the \ + * first iteration might not be a full 16 byte segment. But \ + * for vector lengths beyond that this must be SVE and we know \ + * opr_sz is a multiple of 16, so we need not clamp segend \ + * to opr_sz_n when we advance it at the end of the loop. \ + */ \ intptr_t segend = MIN(16 / sizeof(TYPED), opr_sz_n); \ intptr_t index = simd_data(desc); \ TYPED *d = vd, *a = va; \ @@ -709,7 +716,7 @@ void HELPER(NAME)(void *vd, void *vn, void *vm, void *va, uint32_t desc) \ n[i * 4 + 2] * m2 + \ n[i * 4 + 3] * m3); \ } while (++i < segend); \ - segend = i + 4; \ + segend = i + (16 / sizeof(TYPED)); \ } while (i < opr_sz_n); \ clear_tail(d, opr_sz, simd_maxsz(desc)); \ }