19b254e86a
When we do an AT address translation operation, the page table walk
is supposed to be performed in the context of the EL we're doing the
walk for, so for instance an AT S1E2R walk is done for EL2. In the
pseudocode an EL is passed to AArch64.AT(), which calls
SecurityStateAtEL() to find the security state that we should be
doing the walk with.
In ats_write64() we get this wrong, instead using the current
security space always. This is fine for AT operations performed from
EL1 and EL2, because there the current security state and the
security state for the lower EL are the same. But for AT operations
performed from EL3, the current security state is always either
Secure or Root, whereas we want to use the security state defined by
SCR_EL3.{NS,NSE} for the walk. This affects not just guests using
FEAT_RME but also ones where EL3 is Secure state and the EL3 code
is trying to do an AT for a NonSecure EL2 or EL1.
Use arm_security_space_below_el3() to get the SecuritySpace to
pass to do_ats_write() for all AT operations except the
AT S1E3* operations.
Cc: qemu-stable@nongnu.org
Fixes:
|
||
---|---|---|
.. | ||
hvf | ||
tcg | ||
arch_dump.c | ||
arm-powerctl.c | ||
arm-powerctl.h | ||
arm-qmp-cmds.c | ||
common-semi-target.h | ||
cortex-regs.c | ||
cpregs.h | ||
cpu64.c | ||
cpu-features.h | ||
cpu-param.h | ||
cpu-qom.h | ||
cpu.c | ||
cpu.h | ||
debug_helper.c | ||
gdbstub64.c | ||
gdbstub.c | ||
gtimer.h | ||
helper.c | ||
helper.h | ||
hvf_arm.h | ||
hyp_gdbstub.c | ||
idau.h | ||
internals.h | ||
Kconfig | ||
kvm_arm.h | ||
kvm-consts.h | ||
kvm-stub.c | ||
kvm.c | ||
machine.c | ||
meson.build | ||
multiprocessing.h | ||
op_addsub.h | ||
ptw.c | ||
syndrome.h | ||
tcg-stubs.c | ||
trace-events | ||
trace.h | ||
vfp_helper.c |