aboutsummaryrefslogtreecommitdiff
path: root/hw/core/cpu-common.c
diff options
context:
space:
mode:
authorAke Koomsin <ake@igel.co.jp>2022-10-17 18:24:32 +0900
committerPeter Maydell <peter.maydell@linaro.org>2022-10-27 10:27:23 +0100
commitc939a7c7b93ee44a4963fabe81454e1f956ecd4b (patch)
tree99926d002bf2a68e2f78f60188dbdc8e5d1c1146 /hw/core/cpu-common.c
parent7cd5d384bb298ce3c595a3774213b5b478881ac8 (diff)
target/arm: honor HCR_E2H and HCR_TGE in arm_excp_unmasked()
An exception targeting EL2 from lower EL is actually maskable when HCR_E2H and HCR_TGE are both set. This applies to both secure and non-secure Security state. We can remove the conditions that try to suppress masking of interrupts when we are Secure and the exception targets EL2 and Secure EL2 is disabled. This is OK because in that situation arm_phys_excp_target_el() will never return 2 as the target EL. The 'not if secure' check in this function was originally written before arm_hcr_el2_eff(), and back then the target EL returned by arm_phys_excp_target_el() could be 2 even if we were in Secure EL0/EL1; but it is no longer needed. Signed-off-by: Ake Koomsin <ake@igel.co.jp> Message-id: 20221017092432.546881-1-ake@igel.co.jp [PMM: Add commit message paragraph explaining why it's OK to remove the checks on secure and SCR_EEL2] Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/core/cpu-common.c')
0 files changed, 0 insertions, 0 deletions