hw/intc/arm_gicv3: Check correct HCR_EL2 bit when routing IRQ
PATCH 1/1 hw/intc/arm_gicv3: Check correct HCR_EL2 bit when routing IRQ
In icc_dir_write() we were incorrectly checking HCR_EL2.FMO when determining whether IRQ should be routed to EL2; this should be HCR_EL2.IMO (compare the GICv3 pseudocode ICC_DIR_EL1[]). Use the correct mask.
---
Cut-n-paste bug we've had since forever. Linux always sets FMO and IMO to the same thing, so we haven't noticed this. Probably should go into 3.0, though...
hw/intc/arm_gicv3_cpuif.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
hw/intc/arm_gicv3_cpuif.c +1 -1
@@ -1550,7 +1550,7 @@ static void icc_dir_write(CPUARMState *env, const ARMCPRegInfo *ri,* tested in cases where we know !IsSecure is true. */ route_fiq_to_el2 = env->cp15.hcr_el2 &HCR_FMO ; - route_irq_to_el2 = env->cp15.hcr_el2 &HCR_FMO ; + route_irq_to_el2 = env->cp15.hcr_el2 &HCR_IMO ;switch (arm_current_el (env)) {case 3 :
Signature · 1 line
2.17.1
Quoted 5 lines · Peter Maydell
In
icc_dir_write()we were incorrectly checking HCR_EL2.FMO when determining whether IRQ should be routed to EL2; this should be HCR_EL2.IMO (compare the GICv3 pseudocode ICC_DIR_EL1[]). Use the correct mask.
Quoted 8 lines
Signed-off-by Peter Maydell <[email protected]>---
Cut-n-paste bug we've had since forever. Linux always sets FMO and IMO to the same thing, so we haven't noticed this. Probably should go into 3.0, though...hw/intc/arm_gicv3_cpuif.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
r~