diff options
| author | Shashi Mallela <shashi.mallela@linaro.org> | 2021-11-24 13:22:46 -0500 |
|---|---|---|
| committer | Peter Maydell <peter.maydell@linaro.org> | 2021-11-26 16:54:09 +0000 |
| commit | 2f459cd1a80d24189598fd3416e270d1feb7dc87 (patch) | |
| tree | 57419897b15f7051c5f1695b04d4a167dff851db | |
| parent | bede01170e9cb8f9ac9c6a0665ee9f3989a57e6a (diff) | |
| download | focaccia-qemu-2f459cd1a80d24189598fd3416e270d1feb7dc87.tar.gz focaccia-qemu-2f459cd1a80d24189598fd3416e270d1feb7dc87.zip | |
hw/intc: cannot clear GICv3 ITS CTLR[Enabled] bit
When Enabled bit is cleared in GITS_CTLR,ITS feature continues to be enabled.This patch fixes the issue. Signed-off-by: Shashi Mallela <shashi.mallela@linaro.org> Tested-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Message-id: 20211124182246.67691-1-shashi.mallela@linaro.org Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| -rw-r--r-- | hw/intc/arm_gicv3_its.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/hw/intc/arm_gicv3_its.c b/hw/intc/arm_gicv3_its.c index 84bcbb5f56..c929a9cb5c 100644 --- a/hw/intc/arm_gicv3_its.c +++ b/hw/intc/arm_gicv3_its.c @@ -896,13 +896,14 @@ static bool its_writel(GICv3ITSState *s, hwaddr offset, switch (offset) { case GITS_CTLR: - s->ctlr |= (value & ~(s->ctlr)); - - if (s->ctlr & ITS_CTLR_ENABLED) { + if (value & R_GITS_CTLR_ENABLED_MASK) { + s->ctlr |= ITS_CTLR_ENABLED; extract_table_params(s); extract_cmdq_params(s); s->creadr = 0; process_cmdq(s); + } else { + s->ctlr &= ~ITS_CTLR_ENABLED; } break; case GITS_CBASER: |