From patchwork Wed Nov 3 04:03:42 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 516705 Delivered-To: patch@linaro.org Received: by 2002:ad5:5208:0:0:0:0:0 with SMTP id p8csp178670iml; Tue, 2 Nov 2021 21:06:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw1ynwvJGkVOX/3stqnuEYwMYvDJUqM0uyeHMiUSlE9HaqGNxiWYhESZfm48m5d2BN/TJ2X X-Received: by 2002:a9d:7617:: with SMTP id k23mr15635231otl.351.1635912362327; Tue, 02 Nov 2021 21:06:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635912362; cv=none; d=google.com; s=arc-20160816; b=eYFrNDt/7Ye+TIqCzM20TEXHva34P88tahhFZR8CybOxjHZL2KdeAkUL6l66N/Iwrn SvTGH9DpYlSdqnPUFjPoHzWUqRwUdVtNZ8cNm0MztcbRKnHSpXHhvI1IvTas4vK8dszJ eV6/nlf8t3GxMb8TkAfosb2WeE2taJCOscXZ4kKc16ydstuN8vow7gaVWvXRMAMLhePw CoMPHfIN1/OQTV5l4u6nVZZ7vkUWYHuMCyR3gTkZQjpABgckNvXWQM6iWm0W6SCmY/iz ukiAyw5uzzItOos24yutSHKM9n5CMZf1yDF5AfEqS+L+mDs/G36pGT02gru+uTqn0BZr y0aQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:to:from:dkim-signature; bh=NHJ/SF6iOxyqykACaNp1q0DJ2H6kHi8msEbDEmyiepw=; b=y2k0gwZOmL5Fy0zQT0wNr4KjBJwdcP3QvhXE7rxhnMtuIQuWUFMCJYDqZCctFDoT9e Wo2QZCxAaiwDKYKB0xTw5UjkHAlkWp2hTEPOSu02Zu/c1+uiLhYiqAGwDkRcwcH1m0kE 4RyH0M7/IKlU6hl5y6ZmaMljYeFF2u/eipCBua4GKRFQahu/VBM3XlCILSCIRQThMRQX 37hqTd46JugBPhaWn1KkrndrHishEqrZaiwJTKASqD3breGqx71cHuT6xETvM5ZjHWd9 gxz11SJwmTdvoAPv0KtCgaDipsICg4AhMiAAwAGDkjXZ6pvFUZd2oCOzzKO81flNlWuy Yqmg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="Ko/ZjUCw"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id g16si1458419otn.297.2021.11.02.21.06.02 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 02 Nov 2021 21:06:02 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="Ko/ZjUCw"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:36864 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mi7XE-00055F-Mk for patch@linaro.org; Wed, 03 Nov 2021 00:06:01 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46458) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mi7VF-00054Z-6C for qemu-devel@nongnu.org; Wed, 03 Nov 2021 00:03:57 -0400 Received: from mail-qv1-xf29.google.com ([2607:f8b0:4864:20::f29]:43918) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mi7VD-0000tZ-KQ for qemu-devel@nongnu.org; Wed, 03 Nov 2021 00:03:56 -0400 Received: by mail-qv1-xf29.google.com with SMTP id j9so1473851qvm.10 for ; Tue, 02 Nov 2021 21:03:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=NHJ/SF6iOxyqykACaNp1q0DJ2H6kHi8msEbDEmyiepw=; b=Ko/ZjUCwXM5Zy2m1W9sHsaEfmEA7iVbzV+VYKSNUEURMGTZKVfkvrWFmSY9t5lX1DN zJfWliwnPhvxCvHoh2kYjqU3fo7PCPUxFhPDqTi3eUla8Lm+kaQNFoSvF2t9e7UW6VN3 VQMl+HwDJnOexwXVxQ1R3O0xzFKQlGiRHHodM6wdL8Xi5SZT9I994jS/QkQviJBdWhDZ 3LnvzpVinQED0QHLF5Z9MrSyzEKcxyKMtontNlG2OEz31VRicdW9xMdMRje4YsDfLZ3p pzRWaZIM7BD/P5LhL9uPzValQ/vxgHh9Xiff4HFRhdOlFIhQeXC6BxxBI80QEBnnwEVu wmew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=NHJ/SF6iOxyqykACaNp1q0DJ2H6kHi8msEbDEmyiepw=; b=LvpjREzdob5ePYxALL8lbizIsKxNt7Jl+OVZ6o6dE6CX12otarxQWBPmG4v/kS3xi8 z6AM8vKtt9LfSKQ8Z91yYjXBIVLLulOdQhFBPdEDvN4BbT0qEaDtQDoLgclnN36mZY3Y lO87kO6JmbjsCx0qxXE73e2qMEjJmesZFj3jT8HWlD/fz0vXAwzXv7lxs20I77sbKzXS RgMHThQMgvv7OPbyWODmvbcnDnFAPTzcQIFaovCM/J47w4H2BXsrEzhc3X7thTUGFQNm D2mayHzoGr7oVQhcHReQkGL+mlSmiSAzoyPjW+md4Hc39ZNX7kwaZF+cddXapAQ+zM6g fnLw== X-Gm-Message-State: AOAM532hIQRy/LpvTydNB/wmtxO5HXvoHsNTui+17R5c0+WvbxtH+3d/ 0TiMf/pL63l5TvEUyaWT4Sqhc+lu9vCzbg== X-Received: by 2002:ac8:701b:: with SMTP id x27mr42549414qtm.246.1635912234275; Tue, 02 Nov 2021 21:03:54 -0700 (PDT) Received: from localhost.localdomain (rrcs-172-254-253-57.nyc.biz.rr.com. [172.254.253.57]) by smtp.gmail.com with ESMTPSA id br20sm730408qkb.104.2021.11.02.21.03.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Nov 2021 21:03:53 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v4 00/10] target/arm: Fix insn exception priorities Date: Wed, 3 Nov 2021 00:03:42 -0400 Message-Id: <20211103040352.373688-1-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::f29; envelope-from=richard.henderson@linaro.org; helo=mail-qv1-xf29.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-arm@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Raise pc alignment faults. Fix single-step and pc-align priority over breakpoints. Not yet fixing insn abort priority over breakpoints. r~ Changes for v4: * Rebase on master. * Split some cleanups into new patches. * No special cases in helper_exception_pc_alignment. Changes for v3: * Rebase on siginfo_t patch set -- while probably only force_sig_fault is required, I suspect minor conflicts with the other cleanups. * Typo fix. Changes for v2: * Handle the exceptions in cpu_loop. * Fix how the instruction is raised for aa32 el1. * Add pc alignment test cases. Richard Henderson (10): target/arm: Hoist pc_next to a local variable in aarch64_tr_translate_insn target/arm: Hoist pc_next to a local variable in arm_tr_translate_insn target/arm: Hoist pc_next to a local variable in thumb_tr_translate_insn target/arm: Split arm_pre_translate_insn target/arm: Advance pc for arch single-step exception target/arm: Split compute_fsr_fsc out of arm_deliver_fault target/arm: Take an exception if PC is misaligned target/arm: Assert thumb pc is aligned target/arm: Suppress bp for exceptions with more priority tests/tcg: Add arm and aarch64 pc alignment tests target/arm/helper.h | 1 + target/arm/syndrome.h | 5 +++ linux-user/aarch64/cpu_loop.c | 46 ++++++++++++---------- target/arm/debug_helper.c | 23 +++++++++++ target/arm/gdbstub.c | 9 ++++- target/arm/machine.c | 10 +++++ target/arm/tlb_helper.c | 63 ++++++++++++++++++++++--------- target/arm/translate-a64.c | 23 +++++++++-- target/arm/translate.c | 58 ++++++++++++++++++++-------- tests/tcg/aarch64/pcalign-a64.c | 37 ++++++++++++++++++ tests/tcg/arm/pcalign-a32.c | 46 ++++++++++++++++++++++ tests/tcg/aarch64/Makefile.target | 4 +- tests/tcg/arm/Makefile.target | 4 ++ 13 files changed, 271 insertions(+), 58 deletions(-) create mode 100644 tests/tcg/aarch64/pcalign-a64.c create mode 100644 tests/tcg/arm/pcalign-a32.c -- 2.25.1