qemu-cr16/target
Peter Maydell 2b83714d4e 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.

Reported-by: Adithya Baglody <adithya.nagaraj.baglody@intel.com>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20180709124535.1116-1-peter.maydell@linaro.org
2018-07-10 10:54:40 +01:00
..
alpha
arm target/arm: Use correct mmu_idx for exception-return unstacking 2018-07-10 10:54:40 +01:00
cris
hppa
i386 i386: fix '-cpu ?' output for host cpu type 2018-07-06 18:39:19 +02:00
lm32
m68k
microblaze
mips
moxie
nios2
openrisc target/openrisc: Fix writes to interrupt mask register 2018-07-03 22:40:33 +09:00
ppc target/ppc: fix build on ppc64 host 2018-07-07 12:12:27 +10:00
riscv
s390x
sh4 target/sh4: Fix translator.c assertion failure for gUSA 2018-07-09 10:34:04 -07:00
sparc
tilegx
tricore
unicore32
xtensa