[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v3 15/22] target-arm: A64: Forbid ERET to unimpl
From: |
Edgar E. Iglesias |
Subject: |
Re: [Qemu-devel] [PATCH v3 15/22] target-arm: A64: Forbid ERET to unimplemented ELs |
Date: |
Wed, 21 May 2014 23:56:50 +0000 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Wed, May 21, 2014 at 08:06:32PM +0100, Peter Maydell wrote:
> On 19 May 2014 10:22, Edgar E. Iglesias <address@hidden> wrote:
> > From: "Edgar E. Iglesias" <address@hidden>
> >
> > Check for EL2 support before returning to it.
> >
> > Reviewed-by: Peter Crosthwaite <address@hidden>
> > Signed-off-by: Edgar E. Iglesias <address@hidden>
> > ---
> > target-arm/op_helper.c | 11 +++++------
> > 1 file changed, 5 insertions(+), 6 deletions(-)
> >
> > diff --git a/target-arm/op_helper.c b/target-arm/op_helper.c
> > index a6eedb2..d89755a 100644
> > --- a/target-arm/op_helper.c
> > +++ b/target-arm/op_helper.c
> > @@ -411,12 +411,11 @@ void HELPER(exception_return)(CPUARMState *env)
> > env->regs[15] = env->elr_el[1] & ~0x1;
> > } else {
> > new_el = extract32(spsr, 2, 2);
> > - if (new_el > cur_el) {
> > - /* Disallow returns to higher ELs than the current one. */
> > - goto illegal_return;
> > - }
>
> ...you just added this if() in the previous patch. Suggest
> squashing the two together.
Squashed
>
> > - if (new_el > 1) {
> > - /* Return to unimplemented EL */
> > + if (new_el > cur_el
> > + || (new_el == 2 && !arm_feature(env, ARM_FEATURE_EL2))) {
> > + /* Disallow return to an EL which is unimplemented or higher
> > + * than the current one.
> > + */
> > goto illegal_return;
> > }
> > if (extract32(spsr, 1, 1)) {
> > --
> > 1.8.3.2
> >
>
> thanks
> -- PMM
- [Qemu-devel] [PATCH v3 09/22] target-arm: A64: Introduce aarch64_banked_spsr_index(), (continued)
- [Qemu-devel] [PATCH v3 09/22] target-arm: A64: Introduce aarch64_banked_spsr_index(), Edgar E. Iglesias, 2014/05/19
- [Qemu-devel] [PATCH v3 10/22] target-arm: Add a feature flag for EL2, Edgar E. Iglesias, 2014/05/19
- [Qemu-devel] [PATCH v3 11/22] target-arm: Add a feature flag for EL3, Edgar E. Iglesias, 2014/05/19
- [Qemu-devel] [PATCH v3 12/22] target-arm: Register EL2 versions of ELR and SPSR, Edgar E. Iglesias, 2014/05/19
- [Qemu-devel] [PATCH v3 13/22] target-arm: Register EL3 versions of ELR and SPSR, Edgar E. Iglesias, 2014/05/19
- [Qemu-devel] [PATCH v3 14/22] target-arm: A64: Forbid ERET to increase the EL, Edgar E. Iglesias, 2014/05/19
- [Qemu-devel] [PATCH v3 15/22] target-arm: A64: Forbid ERET to unimplemented ELs, Edgar E. Iglesias, 2014/05/19
- [Qemu-devel] [PATCH v3 16/22] target-arm: A64: Generalize ERET to various ELs, Edgar E. Iglesias, 2014/05/19
- [Qemu-devel] [PATCH v3 17/22] target-arm: A64: Generalize update_spsel for the various ELs, Edgar E. Iglesias, 2014/05/19
- [Qemu-devel] [PATCH v3 18/22] target-arm: Make vbar_write writeback to any CPREG, Edgar E. Iglesias, 2014/05/19
- [Qemu-devel] [PATCH v3 19/22] target-arm: A64: Register VBAR_EL2, Edgar E. Iglesias, 2014/05/19