]> git.proxmox.com Git - mirror_qemu.git/commitdiff
hw/intc/arm_gicv3: Set GICR_CTLR.CES if LPIs are supported
authorPeter Maydell <peter.maydell@linaro.org>
Sat, 22 Jan 2022 18:24:39 +0000 (18:24 +0000)
committerPeter Maydell <peter.maydell@linaro.org>
Fri, 28 Jan 2022 14:29:47 +0000 (14:29 +0000)
The GICR_CTLR.CES bit is a read-only bit which is set to 1 to indicate
that the GICR_CTLR.EnableLPIs bit can be written to 0 to disable
LPIs (as opposed to allowing LPIs to be enabled but not subsequently
disabled). Our implementation permits this, so advertise it
by setting CES to 1.

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

hw/intc/arm_gicv3_common.c
hw/intc/gicv3_internal.h

index 579aa0cb9ed2b3fd7c8921b0facd613df87591ea..4ca5ae9bc5643f416fc7b1defd7eaf25de7a6f51 100644 (file)
@@ -429,6 +429,10 @@ static void arm_gicv3_common_reset(DeviceState *dev)
 
         cs->level = 0;
         cs->gicr_ctlr = 0;
+        if (s->lpi_enable) {
+            /* Our implementation supports clearing GICR_CTLR.EnableLPIs */
+            cs->gicr_ctlr |= GICR_CTLR_CES;
+        }
         cs->gicr_statusr[GICV3_S] = 0;
         cs->gicr_statusr[GICV3_NS] = 0;
         cs->gicr_waker = GICR_WAKER_ProcessorSleep | GICR_WAKER_ChildrenAsleep;
index 5394266aaf4dca98b2b0e903e9765e102bbe1f66..a316f6c58a53be0bd266c2fdb5e6d5375fdc84a2 100644 (file)
 #define GICR_NSACR            (GICR_SGI_OFFSET + 0x0E00)
 
 #define GICR_CTLR_ENABLE_LPIS        (1U << 0)
+#define GICR_CTLR_CES                (1U << 1)
 #define GICR_CTLR_RWP                (1U << 3)
 #define GICR_CTLR_DPG0               (1U << 24)
 #define GICR_CTLR_DPG1NS             (1U << 25)