From patchwork Fri Jun 10 16:07:30 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 580610 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:5806:0:0:0:0 with SMTP id j6csp1894128max; Fri, 10 Jun 2022 09:20:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzAPSohXk2oEhPnTp/EUV/qz4mcjRhtkiApqBPWKrnPuSa2E/Nmw4NSq6bkjn+yN7+SBgZI X-Received: by 2002:a37:678d:0:b0:6a6:8dd9:226 with SMTP id b135-20020a37678d000000b006a68dd90226mr29035918qkc.409.1654878011962; Fri, 10 Jun 2022 09:20:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654878011; cv=none; d=google.com; s=arc-20160816; b=hH0BxMGIK/2RT0LSa31nVUKoDgk+UiQAcMsj4tzx573bAptb/Dac52AczSQZB3DZxR maW2ZEn4r9k1oFurDqyp+hGQAgr3H4cYzYNnMBuSYbYQdZZkqbkMWD/FKixRVpfBSNLJ +gJ8FStxWdBlYcwlXJ8hCKNutUITx48jG6smFvndqDPl9C/pvcgBsoCWmJCb92Ce0QOr uDV+Rc5vZeOjXbrfmguhVVL9EY5FVaPsx7qxTiJNOvApUnZMBhSdU32CyTtyVc5EM81Y TNmD7jzgscyAfkJarv9iXLqGWeq4RdUfBgUuXJXgnBu8yPUKW9JWpeJGl0CaYDhXhZfK mOUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=PTKcpTgabAiFMHgyhQ3dFAFEIJg9vmipCiuWLa2KbuU=; b=B6LuWhOmqc9dkIftvdqM/NzJb2NUHqyN+Mp985gcY5QYRcpivuQ5XimwYeWuoH6dgW jjGPKJ0hzim32AjXHte205vvo1tnL+9EVwZKNR/LeuWFFOmo3CEqeE5iZF5PwEm6wKOU o+qEBHR2zuPlq/CyJnN89uvgPhWzj6rW4D1AOiuiCpY6YkWDP3JRXFoRmmf2d/ummMFi qxCVlvp0Fj2RvYHIUGODZLPrDrJehki1c9A6QraB65kV4mOHlBMsy1RvoUSKgTiOxJ+O 3NHQJY+mI+ebtjPSBk5uvlIWkvux244f1oDldWs3bkXB+c9ayhs/WXNgEqJYfF6Hcs4x CKwQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=hTLetWyv; 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 g7-20020ac85807000000b00304df7337acsi3861063qtg.603.2022.06.10.09.20.11 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 10 Jun 2022 09:20:11 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=hTLetWyv; 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]:54454 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nzhMp-00031K-Ic for patch@linaro.org; Fri, 10 Jun 2022 12:20:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37484) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nzhB6-0007ld-AX for qemu-devel@nongnu.org; Fri, 10 Jun 2022 12:08:05 -0400 Received: from mail-wr1-x42c.google.com ([2a00:1450:4864:20::42c]:41739) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nzhB1-0007HU-SN for qemu-devel@nongnu.org; Fri, 10 Jun 2022 12:08:01 -0400 Received: by mail-wr1-x42c.google.com with SMTP id k19so37123983wrd.8 for ; Fri, 10 Jun 2022 09:07:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=PTKcpTgabAiFMHgyhQ3dFAFEIJg9vmipCiuWLa2KbuU=; b=hTLetWyv83+n5PrqZd68p1In7wwV2gjcU0xc1wWvSwMAtZBkQwuFHF/zKE8OV5AHGM 3SjZHOneMOJ3MyDqm+wiU3JYdYeLUAxKUrPzq9u3iArAsxnC+ihMGwz81dbFBB5P3hWM 1x409yTYdMlb8NGzMkXUvQcljY0yBN8aY83tksP9KbbOm0DxIsbTk48CdE8kVo/ioI+9 AqtRvgzKSPMWrOdfohb8q6UXVpkjzQhlITfllzA5hi3sXV1DhmtrOJ5M4QInosM/Sgdz 8XSs+LPMTivt9npr5hgNGLNU7dedL8ngwl3dFyM+BKbjt8RK90nwuZBHJlTuOxwEvcnW bJSg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=PTKcpTgabAiFMHgyhQ3dFAFEIJg9vmipCiuWLa2KbuU=; b=N3TxHbXMWxPmERSIqW4c7cUFCdo+S0gLcJhuTPmcKrl13TGm+DXFZHtPvu+nsA/A8k 5BfwAVeRZqOuzp32WT4hTmafxnY1/Z7GSu+Na0x7MC8aKg7pqLySHD8VcJ2DPKqLkk/5 7Fev1P+1MnwhhWOi1gBCEx5RbnWFYaYgrw0ichwcxzmdwLEpIRLh4gCdQ8/VQ+ILYCZv 9utEEyusYvFyLyNRC5nH1KuxWSHWV8k+HAdxHpMzwgIDpW2t0uOsM3zcjazGyXXitAon JP/7XupJpo/6yw9GNOxR3mNVP4S26gNXOQSMWiL1e2iXoZfLREASM6z0FDmuNKyWidJW UnLw== X-Gm-Message-State: AOAM530bAKobQN3zRW4ekxkZrN6NEOY4L9uoElb0Udwqe42A15aPR/Xs 3CS/UPY+Nr5w7FXnofJhbR/aDnsK+/diug== X-Received: by 2002:a5d:67c9:0:b0:218:4a6a:298e with SMTP id n9-20020a5d67c9000000b002184a6a298emr23295963wrw.153.1654877278347; Fri, 10 Jun 2022 09:07:58 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id bp11-20020a5d5a8b000000b0020c5253d926sm14276053wrb.114.2022.06.10.09.07.57 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Jun 2022 09:07:57 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 20/28] target/arm: Remove default_exception_el Date: Fri, 10 Jun 2022 17:07:30 +0100 Message-Id: <20220610160738.2230762-21-peter.maydell@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220610160738.2230762-1-peter.maydell@linaro.org> References: <20220610160738.2230762-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42c; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x42c.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Richard Henderson This function is no longer used. At the same time, remove DisasContext.secure_routed_to_el3, as it in turn becomes unused. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson Message-id: 20220609202901.1177572-21-richard.henderson@linaro.org Signed-off-by: Peter Maydell --- target/arm/translate.h | 16 ---------------- target/arm/translate-a64.c | 5 ----- target/arm/translate.c | 5 ----- 3 files changed, 26 deletions(-) diff --git a/target/arm/translate.h b/target/arm/translate.h index 850bcdc155e..88dc18a034b 100644 --- a/target/arm/translate.h +++ b/target/arm/translate.h @@ -43,8 +43,6 @@ typedef struct DisasContext { int fp_excp_el; /* FP exception EL or 0 if enabled */ int sve_excp_el; /* SVE exception EL or 0 if enabled */ int vl; /* current vector length in bytes */ - /* Flag indicating that exceptions from secure mode are routed to EL3. */ - bool secure_routed_to_el3; bool vfp_enabled; /* FP enabled via FPSCR.EN */ int vec_len; int vec_stride; @@ -199,20 +197,6 @@ static inline int get_mem_index(DisasContext *s) return arm_to_core_mmu_idx(s->mmu_idx); } -/* Function used to determine the target exception EL when otherwise not known - * or default. - */ -static inline int default_exception_el(DisasContext *s) -{ - /* If we are coming from secure EL0 in a system with a 32-bit EL3, then - * there is no secure EL1, so we route exceptions to EL3. Otherwise, - * exceptions can only be routed to ELs above 1, so we target the higher of - * 1 or the current EL. - */ - return (s->mmu_idx == ARMMMUIdx_SE10_0 && s->secure_routed_to_el3) - ? 3 : MAX(1, s->current_el); -} - static inline void disas_set_insn_syndrome(DisasContext *s, uint32_t syn) { /* We don't need to save all of the syndrome so we mask and shift diff --git a/target/arm/translate-a64.c b/target/arm/translate-a64.c index 4f6181a5483..4c64546090c 100644 --- a/target/arm/translate-a64.c +++ b/target/arm/translate-a64.c @@ -14585,11 +14585,6 @@ static void aarch64_tr_init_disas_context(DisasContextBase *dcbase, dc->condjmp = 0; dc->aarch64 = true; - /* If we are coming from secure EL0 in a system with a 32-bit EL3, then - * there is no secure EL1, so we route exceptions to EL3. - */ - dc->secure_routed_to_el3 = arm_feature(env, ARM_FEATURE_EL3) && - !arm_el_is_aa64(env, 3); dc->thumb = false; dc->sctlr_b = 0; dc->be_data = EX_TBFLAG_ANY(tb_flags, BE_DATA) ? MO_BE : MO_LE; diff --git a/target/arm/translate.c b/target/arm/translate.c index 81c27e7c70c..6617de775fd 100644 --- a/target/arm/translate.c +++ b/target/arm/translate.c @@ -9319,11 +9319,6 @@ static void arm_tr_init_disas_context(DisasContextBase *dcbase, CPUState *cs) dc->condjmp = 0; dc->aarch64 = false; - /* If we are coming from secure EL0 in a system with a 32-bit EL3, then - * there is no secure EL1, so we route exceptions to EL3. - */ - dc->secure_routed_to_el3 = arm_feature(env, ARM_FEATURE_EL3) && - !arm_el_is_aa64(env, 3); dc->thumb = EX_TBFLAG_AM32(tb_flags, THUMB); dc->be_data = EX_TBFLAG_ANY(tb_flags, BE_DATA) ? MO_BE : MO_LE; condexec = EX_TBFLAG_AM32(tb_flags, CONDEXEC);