On 17 June 2014 09:45, Edgar E. Iglesias <edgar.igles...@gmail.com> wrote: > From: "Edgar E. Iglesias" <edgar.igles...@xilinx.com>
> --- a/target-arm/helper.c > +++ b/target-arm/helper.c > @@ -3312,6 +3312,19 @@ unsigned int arm_excp_target_el(CPUState *cs, unsigned > int excp_idx) > target_el = 2; > } > break; > + case EXCP_FIQ: > + case EXCP_IRQ: { A trivial style nit, but I prefer the { to go on its own line when opening a new scope for a case statement like this. > + const uint64_t hcr_mask = excp_idx == EXCP_FIQ ? HCR_FMO : > HCR_IMO; > + const uint32_t scr_mask = excp_idx == EXCP_FIQ ? SCR_FIQ : > SCR_IRQ; > + > + if (!secure && (env->cp15.hcr_el2 & hcr_mask)) { > + target_el = 2; > + } > + if (env->cp15.scr_el3 & scr_mask) { > + target_el = 3; > + } > + break; > + } > } > return target_el; > } thanks -- PMM