hw/intc/arm_gicv3_its: Don't clear GITS_CREADR when GITS_CTLR.ENABLED is set
authorPeter Maydell <peter.maydell@linaro.org>
Sat, 22 Jan 2022 18:24:34 +0000 (18:24 +0000)
committerPeter Maydell <peter.maydell@linaro.org>
Fri, 28 Jan 2022 14:29:47 +0000 (14:29 +0000)
The current ITS code clears GITS_CREADR when GITS_CTLR.ENABLED is set.
This is not correct -- guest code can validly clear ENABLED and then
set it again and expect the ITS to continue processing where it left
off. Remove the erroneous assignment.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20220122182444.724087-5-peter.maydell@linaro.org

hw/intc/arm_gicv3_its.c

index 67f12d98af39606cb91ef361a8b31997cb040d0e..1763ba4a671fc7b9094974de9214ae3ba938abbf 100644 (file)
@@ -853,7 +853,6 @@ static bool its_writel(GICv3ITSState *s, hwaddr offset,
             s->ctlr |= R_GITS_CTLR_ENABLED_MASK;
             extract_table_params(s);
             extract_cmdq_params(s);
-            s->creadr = 0;
             process_cmdq(s);
         } else {
             s->ctlr &= ~R_GITS_CTLR_ENABLED_MASK;