qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: qemu-arm@nongnu.org, qemu-devel@nongnu.org
Subject: [PATCH 09/14] target/arm/ptw: Remove S1Translate::in_secure
Date: Fri, 14 Jul 2023 16:46:43 +0100	[thread overview]
Message-ID: <20230714154648.327466-10-peter.maydell@linaro.org> (raw)
In-Reply-To: <20230714154648.327466-1-peter.maydell@linaro.org>

We no longer look at the in_secure field of the S1Translate struct
anyway, so we can remove it and all the code which sets it.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
 target/arm/ptw.c | 13 -------------
 1 file changed, 13 deletions(-)

diff --git a/target/arm/ptw.c b/target/arm/ptw.c
index bc834675fb2..77b8382ceff 100644
--- a/target/arm/ptw.c
+++ b/target/arm/ptw.c
@@ -51,13 +51,6 @@ typedef struct S1Translate {
      *    value being Stage2 vs Stage2_S distinguishes those.
      */
     ARMSecuritySpace in_space;
-    /*
-     * in_secure: whether the translation regime is a Secure one.
-     * This is always equal to arm_space_is_secure(in_space).
-     * If a Secure ptw is "downgraded" to NonSecure by an NSTable bit,
-     * this field is updated accordingly.
-     */
-    bool in_secure;
     /*
      * in_debug: is this a QEMU debug access (gdbstub, etc)? Debug
      * accesses will not update the guest page table access flags
@@ -545,7 +538,6 @@ static bool S1_ptw_translate(CPUARMState *env, S1Translate *ptw,
         S1Translate s2ptw = {
             .in_mmu_idx = s2_mmu_idx,
             .in_ptw_idx = ptw_idx_for_stage_2(env, s2_mmu_idx),
-            .in_secure = arm_space_is_secure(s2_space),
             .in_space = s2_space,
             .in_debug = true,
         };
@@ -1782,7 +1774,6 @@ static bool get_phys_addr_lpae(CPUARMState *env, S1Translate *ptw,
         QEMU_BUILD_BUG_ON(ARMMMUIdx_Phys_S + 1 != ARMMMUIdx_Phys_NS);
         QEMU_BUILD_BUG_ON(ARMMMUIdx_Stage2_S + 1 != ARMMMUIdx_Stage2);
         ptw->in_ptw_idx += 1;
-        ptw->in_secure = false;
         ptw->in_space = ARMSS_NonSecure;
     }
 
@@ -3165,7 +3156,6 @@ static bool get_phys_addr_twostage(CPUARMState *env, S1Translate *ptw,
 
     ptw->in_s1_is_el0 = ptw->in_mmu_idx == ARMMMUIdx_Stage1_E0;
     ptw->in_mmu_idx = ipa_secure ? ARMMMUIdx_Stage2_S : ARMMMUIdx_Stage2;
-    ptw->in_secure = ipa_secure;
     ptw->in_space = ipa_space;
     ptw->in_ptw_idx = ptw_idx_for_stage_2(env, ptw->in_mmu_idx);
 
@@ -3401,7 +3391,6 @@ bool get_phys_addr_with_secure(CPUARMState *env, target_ulong address,
 {
     S1Translate ptw = {
         .in_mmu_idx = mmu_idx,
-        .in_secure = is_secure,
         .in_space = arm_secure_to_space(is_secure),
     };
     return get_phys_addr_gpc(env, &ptw, address, access_type, result, fi);
@@ -3473,7 +3462,6 @@ bool get_phys_addr(CPUARMState *env, target_ulong address,
     }
 
     ptw.in_space = ss;
-    ptw.in_secure = arm_space_is_secure(ss);
     return get_phys_addr_gpc(env, &ptw, address, access_type, result, fi);
 }
 
@@ -3487,7 +3475,6 @@ hwaddr arm_cpu_get_phys_page_attrs_debug(CPUState *cs, vaddr addr,
     S1Translate ptw = {
         .in_mmu_idx = mmu_idx,
         .in_space = ss,
-        .in_secure = arm_space_is_secure(ss),
         .in_debug = true,
     };
     GetPhysAddrResult res = {};
-- 
2.34.1



  parent reply	other threads:[~2023-07-14 15:48 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-14 15:46 [PATCH 00/14] target/arm/ptw: Cleanups and a few bugfixes Peter Maydell
2023-07-14 15:46 ` [PATCH 01/14] target/arm/ptw: Don't set fi->s1ptw for UnsuppAtomicUpdate fault Peter Maydell
2023-07-23  9:22   ` Richard Henderson
2023-07-14 15:46 ` [PATCH 02/14] target/arm/ptw: Don't report GPC faults on stage 1 ptw as stage2 faults Peter Maydell
2023-07-23  9:34   ` Richard Henderson
2023-07-14 15:46 ` [PATCH 03/14] target/arm/ptw: Set s1ns bit in fault info more consistently Peter Maydell
2023-07-23  9:54   ` Richard Henderson
2023-07-14 15:46 ` [PATCH 04/14] target/arm/ptw: Pass ptw into get_phys_addr_pmsa*() and get_phys_addr_disabled() Peter Maydell
2023-07-23 10:25   ` Richard Henderson
2023-07-14 15:46 ` [PATCH 05/14] target/arm/ptw: Pass ARMSecurityState to regime_translation_disabled() Peter Maydell
2023-07-23 10:25   ` Richard Henderson
2023-07-14 15:46 ` [PATCH 06/14] target/arm/ptw: Pass an ARMSecuritySpace to arm_hcr_el2_eff_secstate() Peter Maydell
2023-07-23 15:24   ` Richard Henderson
2023-07-24 13:42     ` Peter Maydell
2023-07-24 14:38       ` Peter Maydell
2023-07-25 18:36         ` Richard Henderson
2023-07-14 15:46 ` [PATCH 07/14] target/arm/ptw: Only fold in NSTable bit effects in Secure state Peter Maydell
2023-07-23 15:29   ` Richard Henderson
2023-07-14 15:46 ` [PATCH 08/14] target/arm/ptw: Remove last uses of ptw->in_secure Peter Maydell
2023-07-23 15:35   ` Richard Henderson
2023-07-14 15:46 ` Peter Maydell [this message]
2023-07-23 15:48   ` [PATCH 09/14] target/arm/ptw: Remove S1Translate::in_secure Richard Henderson
2023-07-14 15:46 ` [PATCH 10/14] target/arm/ptw: Drop S1Translate::out_secure Peter Maydell
2023-07-23 15:49   ` Richard Henderson
2023-07-14 15:46 ` [PATCH 11/14] target/arm/ptw: Set attributes correctly for MMU disabled data accesses Peter Maydell
2023-07-23 15:50   ` Richard Henderson
2023-07-14 15:46 ` [PATCH 12/14] target/arm/ptw: Check for block descriptors at invalid levels Peter Maydell
2023-07-23 15:58   ` Richard Henderson
2023-07-14 15:46 ` [PATCH 13/14] target/arm/ptw: Report stage 2 fault level for stage 2 faults on stage 1 ptw Peter Maydell
2023-07-23 16:00   ` Richard Henderson
2023-07-14 15:46 ` [PATCH 14/14] target/arm: Adjust PAR_EL1.SH for Device and Normal-NC memory types Peter Maydell
2023-07-23 16:02   ` Richard Henderson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230714154648.327466-10-peter.maydell@linaro.org \
    --to=peter.maydell@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).