[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v6 02/32] target-arm: add arm_is_secure() functi
From: |
Peter Maydell |
Subject: |
Re: [Qemu-devel] [PATCH v6 02/32] target-arm: add arm_is_secure() function |
Date: |
Mon, 13 Oct 2014 14:41:22 +0200 |
On 10 October 2014 18:03, Greg Bellows <address@hidden> wrote:
> From: Fabian Aggeler <address@hidden>
>
> arm_is_secure() function allows to determine CPU security state
> if the CPU implements Security Extensions/EL3.
> arm_is_secure_below_el3() returns true if CPU is in secure state
> below EL3.
>
> Signed-off-by: Sergey Fedorov <address@hidden>
> Signed-off-by: Fabian Aggeler <address@hidden>
> Signed-off-by: Greg Bellows <address@hidden>
>
> ==========
>
> v5 -> v6
> - Broaden CONFIG_USER conditional
> - Merge resulting false returns with common comment
> - Globally change Aarch# to AArch#
> - Replace direct access of env->aarch64 with is_a64()
> ---
> target-arm/cpu.h | 42 ++++++++++++++++++++++++++++++++++++++++++
> 1 file changed, 42 insertions(+)
>
> diff --git a/target-arm/cpu.h b/target-arm/cpu.h
> index 81fffd2..4f6db0f 100644
> --- a/target-arm/cpu.h
> +++ b/target-arm/cpu.h
> @@ -753,6 +753,48 @@ static inline int arm_feature(CPUARMState *env, int
> feature)
> return (env->features & (1ULL << feature)) != 0;
> }
>
> +#if !defined(CONFIG_USER_ONLY)
> +/* Return true if exception level below EL3 is in secure state */
This is still missing the clarifying comment I was hoping for.
Make this:
/* Return true if exception levels below EL3 are in secure state,
* or would be following an exception return to that level.
* Unlike arm_is_secure() (which is alvays a question about the
* _current_ state of the CPU) this doesn't care about the current
* EL or mode.
*/
and then you can add my reviewed-by tag.
thanks
-- PMM
- [Qemu-devel] [PATCH v6 00/32] target-arm: add Security Extensions for CPUs, Greg Bellows, 2014/10/10
- [Qemu-devel] [PATCH v6 02/32] target-arm: add arm_is_secure() function, Greg Bellows, 2014/10/10
- Re: [Qemu-devel] [PATCH v6 02/32] target-arm: add arm_is_secure() function,
Peter Maydell <=
- [Qemu-devel] [PATCH v6 03/32] target-arm: reject switching to monitor mode, Greg Bellows, 2014/10/10
- [Qemu-devel] [PATCH v6 01/32] target-arm: increase arrays of registers R13 & R14, Greg Bellows, 2014/10/10
- [Qemu-devel] [PATCH v6 05/32] target-arm: make arm_current_el() return EL3, Greg Bellows, 2014/10/10
- [Qemu-devel] [PATCH v6 04/32] target-arm: rename arm_current_pl to arm_current_el, Greg Bellows, 2014/10/10
- [Qemu-devel] [PATCH v6 06/32] target-arm: A32: Emulate the SMC instruction, Greg Bellows, 2014/10/10