mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 09:13:55 -06:00
target/arm: set HPFAR_EL2.NS on secure stage 2 faults
Signed-off-by: Rémi Denis-Courmont <remi.denis.courmont@huawei.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-id: 20210112104511.36576-15-remi.denis.courmont@huawei.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
parent
b1a10c868f
commit
9861248f63
4 changed files with 13 additions and 0 deletions
|
@ -63,6 +63,9 @@ static void QEMU_NORETURN arm_deliver_fault(ARMCPU *cpu, vaddr addr,
|
|||
if (fi->stage2) {
|
||||
target_el = 2;
|
||||
env->cp15.hpfar_el2 = extract64(fi->s2addr, 12, 47) << 4;
|
||||
if (arm_is_secure_below_el3(env) && fi->s1ns) {
|
||||
env->cp15.hpfar_el2 |= HPFAR_NS;
|
||||
}
|
||||
}
|
||||
same_el = (arm_current_el(env) == target_el);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue