On 11/08/2017 04:32 PM, Alex Bennée wrote: > - if (retaddr) { > - cpu_restore_state(cs, retaddr); > - } > + cpu_restore_state(cs, retaddr); > /* Exception index and error code are already set */ > cpu_loop_exit(cs);
Not that this is wrong, but while we're cleaning things up, this call combo is cpu_loop_exit_restore. You create at least 8 of these pairs in this patch. > +++ b/target/moxie/helper.c > @@ -36,9 +36,7 @@ void tlb_fill(CPUState *cs, target_ulong addr, > MMUAccessType access_type, > > ret = moxie_cpu_handle_mmu_fault(cs, addr, access_type, mmu_idx); > if (unlikely(ret)) { > - if (retaddr) { > - cpu_restore_state(cs, retaddr); > - } > + cpu_restore_state(cs, retaddr); > } > cpu_loop_exit(cs); > } This one *should* have been such a pair, but there's an existing bug in moxie that should have restricted the cpu_loop_exit to inside the if. All that said, Reviewed-by: Richard Henderson <richard.hender...@linaro.org> r~