summary refs log tree commit diff stats
path: root/rust/qemu-api/src
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2025-01-30 18:23:04 +0000
committerPeter Maydell <peter.maydell@linaro.org>2025-02-20 14:20:28 +0000
commit273d0e84ccd1f0a94f893d2f1ab750f812dfa219 (patch)
treea95086ba2c0a35889716c5bc5ed6b1fdb4265bdc /rust/qemu-api/src
parentff8b906a00494601687763446e470ff9b3580be7 (diff)
downloadfocaccia-qemu-273d0e84ccd1f0a94f893d2f1ab750f812dfa219.tar.gz
focaccia-qemu-273d0e84ccd1f0a94f893d2f1ab750f812dfa219.zip
target/arm: Support CP_ACCESS_TRAP_EL1 as a CPAccessResult
In the CPAccessResult enum, the CP_ACCESS_TRAP* values indicate the
equivalent of the pseudocode AArch64.SystemAccessTrap(..., 0x18),
causing a trap to a specified exception level with a syndrome value
giving information about the failing instructions.  In the
pseudocode, such traps are always taken to a specified target EL.  We
support that for target EL of 2 or 3 via CP_ACCESS_TRAP_EL2 and
CP_ACCESS_TRAP_EL3, but the only way to take the access trap to EL1
currently is to use CP_ACCESS_TRAP, which takes the trap to the
"usual target EL" (EL1 if in EL0, otherwise to the current EL).

Add CP_ACCESS_TRAP_EL1 so that access functions can follow the
pseudocode more closely.

(Note that for the common case in the pseudocode of "trap to
EL2 if HCR_EL2.TGE is set, otherwise trap to EL1", we handle
this in raise_exception(), so access functions don't need to
special case it and can use CP_ACCESS_TRAP_EL1.)

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20250130182309.717346-10-peter.maydell@linaro.org
Diffstat (limited to 'rust/qemu-api/src')
0 files changed, 0 insertions, 0 deletions