[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v1 16/22] target-arm: A64: Forbid ERET to unimpl
From: |
Peter Maydell |
Subject: |
Re: [Qemu-devel] [PATCH v1 16/22] target-arm: A64: Forbid ERET to unimplemented ELs |
Date: |
Wed, 7 May 2014 10:00:11 +0100 |
On 6 May 2014 07:08, Edgar E. Iglesias <address@hidden> wrote:
> From: "Edgar E. Iglesias" <address@hidden>
>
> Check for EL2 support before returning to it.
>
> Signed-off-by: Edgar E. Iglesias <address@hidden>
> ---
> target-arm/op_helper.c | 8 +++-----
> 1 file changed, 3 insertions(+), 5 deletions(-)
>
> diff --git a/target-arm/op_helper.c b/target-arm/op_helper.c
> index 770c776..f1ae05e 100644
> --- a/target-arm/op_helper.c
> +++ b/target-arm/op_helper.c
> @@ -411,12 +411,10 @@ void HELPER(exception_return)(CPUARMState *env)
> env->regs[15] = env->elr_el[ELR_EL_IDX(1)] & ~0x1;
> } else {
> new_el = extract32(spsr, 2, 2);
> - if (new_el > cur_el) {
> + if (new_el > cur_el
> + || (new_el == 2 && !arm_feature(env, ARM_FEATURE_EL2))) {
> /* Disallow returns to higher ELs than the current one. */
> - goto illegal_return;
> - }
> - if (new_el > 1) {
> - /* Return to unimplemented EL */
> + /* Disallow returns to unimplemented ELs. */
Merge the comments rather than having two one-liners one after
the other, please.
/* Disallow return to an EL which is unimplemented or higher
* than the current one.
*/
thanks
-- PMM
- Re: [Qemu-devel] [PATCH v1 12/22] target-arm: Add a feature flag for EL3, (continued)
- [Qemu-devel] [PATCH v1 13/22] target-arm: Register EL2 versions of ELR and SPSR, Edgar E. Iglesias, 2014/05/06
- [Qemu-devel] [PATCH v1 14/22] target-arm: Register EL3 versions of ELR and SPSR, Edgar E. Iglesias, 2014/05/06
- [Qemu-devel] [PATCH v1 15/22] target-arm: A64: Forbid ERET to increase the EL, Edgar E. Iglesias, 2014/05/06
- [Qemu-devel] [PATCH v1 16/22] target-arm: A64: Forbid ERET to unimplemented ELs, Edgar E. Iglesias, 2014/05/06
- [Qemu-devel] [PATCH v1 17/22] target-arm: A64: Generalize ERET to various ELs, Edgar E. Iglesias, 2014/05/06
- [Qemu-devel] [PATCH v1 18/22] target-arm: A64: Generalize update_spsel for the various ELs, Edgar E. Iglesias, 2014/05/06
- [Qemu-devel] [PATCH v1 19/22] target-arm: Add storage for VBAR_EL2 and 3, Edgar E. Iglesias, 2014/05/06