mirror of
https://github.com/Motorhead1991/qemu.git
synced 2026-01-07 23:17:43 -07:00
target/arm: Make CNTPS_* UNDEF from Secure EL1 when Secure EL2 is enabled
When we added Secure EL2 support, we missed that this needs an update
to the access code for the EL3 physical timer registers. These are
supposed to UNDEF from Secure EL1 when Secure EL2 is enabled.
(Note for stable backporting: for backports to branches where
CP_ACCESS_UNDEFINED is not defined, the old name to use instead
is CP_ACCESS_TRAP_UNCATEGORIZED.)
Cc: qemu-stable@nongnu.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Message-id: 20250204125009.2281315-4-peter.maydell@linaro.org
(cherry picked from commit bdd641541f)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
This commit is contained in:
parent
033367d0af
commit
b692aea803
1 changed files with 3 additions and 0 deletions
|
|
@ -2654,6 +2654,9 @@ static CPAccessResult gt_stimer_access(CPUARMState *env,
|
|||
if (!arm_is_secure(env)) {
|
||||
return CP_ACCESS_TRAP_UNCATEGORIZED;
|
||||
}
|
||||
if (arm_is_el2_enabled(env)) {
|
||||
return CP_ACCESS_UNDEFINED;
|
||||
}
|
||||
if (!(env->cp15.scr_el3 & SCR_ST)) {
|
||||
return CP_ACCESS_TRAP_EL3;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue