[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 06/14] hw/intc/arm_gicv3_cpuif: Don't downgrade monitor traps for
From: |
Peter Maydell |
Subject: |
[PATCH 06/14] hw/intc/arm_gicv3_cpuif: Don't downgrade monitor traps for AArch32 EL3 |
Date: |
Thu, 30 Jan 2025 18:23:01 +0000 |
In the gicv3_{irq,fiq,irqfiq}_access() functions, there is a check
which downgrades a CP_ACCESS_TRAP_EL3 to CP_ACCESS_TRAP if EL3 is not
AArch64. This has been there since the GIC was first implemented,
but it isn't right: if we are trapping because of SCR.IRQ or SCR.FIQ
then we definitely want to be going to EL3 (doing
AArch32.TakeMonitorTrapException() in pseudocode terms). We might
want to not take a trap at all, but we don't ever want to go to the
default target EL, because that would mean, for instance, taking a
trap to Hyp mode if the trapped access was made from Hyp mode.
(This might have been an attempt to work around our failure to
properly implement Monitor Traps.)
Remove the bogus check.
Cc: qemu-stable@nongnu.org
Fixes: 359fbe65e01e ("hw/intc/arm_gicv3: Implement GICv3 CPU interface
registers")
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
hw/intc/arm_gicv3_cpuif.c | 9 ---------
1 file changed, 9 deletions(-)
diff --git a/hw/intc/arm_gicv3_cpuif.c b/hw/intc/arm_gicv3_cpuif.c
index 9cad8313a3a..8a715b3510b 100644
--- a/hw/intc/arm_gicv3_cpuif.c
+++ b/hw/intc/arm_gicv3_cpuif.c
@@ -2300,9 +2300,6 @@ static CPAccessResult gicv3_irqfiq_access(CPUARMState
*env,
}
}
- if (r == CP_ACCESS_TRAP_EL3 && !arm_el_is_aa64(env, 3)) {
- r = CP_ACCESS_TRAP;
- }
return r;
}
@@ -2365,9 +2362,6 @@ static CPAccessResult gicv3_fiq_access(CPUARMState *env,
}
}
- if (r == CP_ACCESS_TRAP_EL3 && !arm_el_is_aa64(env, 3)) {
- r = CP_ACCESS_TRAP;
- }
return r;
}
@@ -2404,9 +2398,6 @@ static CPAccessResult gicv3_irq_access(CPUARMState *env,
}
}
- if (r == CP_ACCESS_TRAP_EL3 && !arm_el_is_aa64(env, 3)) {
- r = CP_ACCESS_TRAP;
- }
return r;
}
--
2.34.1
- [PATCH 00/14] target/arm: Clean up some corner cases of sysreg traps, Peter Maydell, 2025/01/30
- [PATCH 01/14] target/arm: Report correct syndrome for UNDEFINED CNTPS_*_EL1 from EL2 and NS EL1, Peter Maydell, 2025/01/30
- [PATCH 02/14] target/arm: Report correct syndrome for UNDEFINED AT ops with wrong NSE, NS, Peter Maydell, 2025/01/30
- [PATCH 04/14] target/arm: Report correct syndrome for UNDEFINED LOR sysregs when NS=0, Peter Maydell, 2025/01/30
- [PATCH 03/14] target/arm: Report correct syndrome for UNDEFINED S1E2 AT ops at EL3, Peter Maydell, 2025/01/30
- [PATCH 05/14] target/arm: Make CP_ACCESS_TRAPs to AArch32 EL3 be Monitor traps, Peter Maydell, 2025/01/30
- [PATCH 06/14] hw/intc/arm_gicv3_cpuif: Don't downgrade monitor traps for AArch32 EL3,
Peter Maydell <=
- [PATCH 10/14] target/arm: Use CP_ACCESS_TRAP_EL1 for traps that are always to EL1, Peter Maydell, 2025/01/30
- [PATCH 07/14] target/arm: Honour SDCR.TDCC and SCR.TERR in AArch32 EL3 non-Monitor modes, Peter Maydell, 2025/01/30
- [PATCH 08/14] hw/intc/arm_gicv3_cpuif(): Remove redundant tests of is_a64(), Peter Maydell, 2025/01/30
- [PATCH 14/14] target/arm: Correct errors in WFI/WFE trapping, Peter Maydell, 2025/01/30
- [PATCH 12/14] target/arm: Remove CP_ACCESS_TRAP handling, Peter Maydell, 2025/01/30
- [PATCH 13/14] target/arm: Rename CP_ACCESS_TRAP_UNCATEGORIZED to CP_ACCESS_UNDEFINED, Peter Maydell, 2025/01/30
- [PATCH 09/14] target/arm: Support CP_ACCESS_TRAP_EL1 as a CPAccessResult, Peter Maydell, 2025/01/30
- [PATCH 11/14] target/arm: Use TRAP_UNCATEGORIZED for XScale CPAR traps, Peter Maydell, 2025/01/30