qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2 29/66] target/arm: Introduce arm_hcr_el2_eff_secstate


From: Richard Henderson
Subject: Re: [PATCH v2 29/66] target/arm: Introduce arm_hcr_el2_eff_secstate
Date: Wed, 28 Sep 2022 12:38:28 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0

On 9/20/22 08:52, Peter Maydell wrote:
On Mon, 22 Aug 2022 at 17:22, Richard Henderson
<richard.henderson@linaro.org> wrote:

For page walking, we may require HCR for a security state
that is not "current".

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
  target/arm/cpu.h    | 20 +++++++++++++-------
  target/arm/helper.c | 11 ++++++++---
  2 files changed, 21 insertions(+), 10 deletions(-)

diff --git a/target/arm/cpu.h b/target/arm/cpu.h
index cea2121f67..a08e546de4 100644
--- a/target/arm/cpu.h
+++ b/target/arm/cpu.h
@@ -2401,15 +2401,15 @@ static inline bool arm_is_secure(CPUARMState *env)
   * Return true if the current security state has AArch64 EL2 or AArch32 Hyp.
   * This corresponds to the pseudocode EL2Enabled()
   */
+static inline bool arm_is_el2_enabled_secstate(CPUARMState *env, bool secure)
+{
+    return (arm_feature(env, ARM_FEATURE_EL2)
+            && (!secure || (env->cp15.scr_el3 & SCR_EEL2)));

This doesn't need the outermost set of ().

Oh, that's an emacs alignment thing.

r~


Otherwise
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>

thanks
-- PMM




reply via email to

[Prev in Thread] Current Thread [Next in Thread]