unicorn/qemu/target
Peter Maydell 55985b40f8
target/arm: Use correct mmu_idx for exception-return unstacking
For M-profile exception returns, the mmu index to use for exception
return unstacking is supposed to be that of wherever we are returning to:
* if returning to handler mode, privileged
* if returning to thread mode, privileged or unprivileged depending on
CONTROL.nPRIV for the destination security state

We were passing the wrong thing as the 'priv' argument to
arm_v7m_mmu_idx_for_secstate_and_priv(). The effect was that guests
which programmed the MPU to behave differently for privileged and
unprivileged code could get spurious MemManage Unstack exceptions.

Backports commit 2b83714d4ea659899069a4b94aa2dfadc847a013 from qemu
2018-07-10 12:55:59 -04:00
..
arm target/arm: Use correct mmu_idx for exception-return unstacking 2018-07-10 12:55:59 -04:00
i386 target-i386: Add NPT support 2018-07-03 19:52:56 -04:00
m68k target/m68k: Merge disas_m68k_insn into m68k_tr_translate_insn 2018-06-15 11:40:18 -04:00
mips target/mips: Fix data type for offset 2018-07-03 01:01:09 -04:00
sparc tcg: Pass tb and index to tcg_gen_exit_tb separately 2018-06-07 11:56:32 -04:00