From: Peter Maydell <peter.maydell@linaro.org>
To: qemu-arm@nongnu.org, qemu-devel@nongnu.org
Cc: "Shashi Mallela" <shashi.mallela@linaro.org>,
"Alex Bennée" <alex.bennee@linaro.org>
Subject: [PATCH 09/14] hw/intc/arm_gicv3: Set GICR_CTLR.CES if LPIs are supported
Date: Sat, 22 Jan 2022 18:24:39 +0000 [thread overview]
Message-ID: <20220122182444.724087-10-peter.maydell@linaro.org> (raw)
In-Reply-To: <20220122182444.724087-1-peter.maydell@linaro.org>
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>
---
hw/intc/gicv3_internal.h | 1 +
hw/intc/arm_gicv3_common.c | 4 ++++
2 files changed, 5 insertions(+)
diff --git a/hw/intc/gicv3_internal.h b/hw/intc/gicv3_internal.h
index 5394266aaf4..a316f6c58a5 100644
--- a/hw/intc/gicv3_internal.h
+++ b/hw/intc/gicv3_internal.h
@@ -110,6 +110,7 @@
#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)
diff --git a/hw/intc/arm_gicv3_common.c b/hw/intc/arm_gicv3_common.c
index 579aa0cb9ed..4ca5ae9bc56 100644
--- a/hw/intc/arm_gicv3_common.c
+++ b/hw/intc/arm_gicv3_common.c
@@ -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;
--
2.25.1
next prev parent reply other threads:[~2022-01-22 18:45 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-22 18:24 [PATCH 00/14] arm_gicv3_its: Implement MOVI and MOVALL commands Peter Maydell
2022-01-22 18:24 ` [PATCH 01/14] target/arm: Log CPU index in 'Taking exception' log Peter Maydell
2022-01-23 22:00 ` Philippe Mathieu-Daudé via
2022-01-28 3:09 ` Richard Henderson
2022-01-22 18:24 ` [PATCH 02/14] hw/intc/arm_gicv3_its: Add tracepoints Peter Maydell
2022-01-23 22:01 ` Philippe Mathieu-Daudé via
2022-01-28 3:10 ` Richard Henderson
2022-01-22 18:24 ` [PATCH 03/14] hw/intc/arm_gicv3: Initialise dma_as in GIC, not ITS Peter Maydell
2022-01-28 3:12 ` Richard Henderson
2022-01-22 18:24 ` [PATCH 04/14] hw/intc/arm_gicv3_its: Don't clear GITS_CREADR when GITS_CTLR.ENABLED is set Peter Maydell
2022-01-28 3:12 ` Richard Henderson
2022-01-22 18:24 ` [PATCH 05/14] hw/intc/arm_gicv3_its: Don't clear GITS_CWRITER on writes to GITS_CBASER Peter Maydell
2022-01-28 3:13 ` Richard Henderson
2022-01-22 18:24 ` [PATCH 06/14] hw/intc/arm_gicv3: Honour GICD_CTLR.EnableGrp1NS for LPIs Peter Maydell
2022-01-28 3:15 ` Richard Henderson
2022-01-22 18:24 ` [PATCH 07/14] hw/intc/arm_gicv3_its: Sort ITS command list into numeric order Peter Maydell
2022-01-23 22:02 ` Philippe Mathieu-Daudé via
2022-01-28 3:15 ` Richard Henderson
2022-01-22 18:24 ` [PATCH 08/14] hw/intc/arm_gicv3_redist: Remove unnecessary zero checks Peter Maydell
2022-01-28 3:17 ` Richard Henderson
2022-01-22 18:24 ` Peter Maydell [this message]
2022-01-28 3:19 ` [PATCH 09/14] hw/intc/arm_gicv3: Set GICR_CTLR.CES if LPIs are supported Richard Henderson
2022-01-22 18:24 ` [PATCH 10/14] hw/intc/arm_gicv3_its: Provide read accessor for translation_ops Peter Maydell
2022-01-23 22:04 ` Philippe Mathieu-Daudé via
2022-01-28 3:27 ` Richard Henderson
2022-01-22 18:24 ` [PATCH 11/14] hw/intc/arm_gicv3_its: Make GITS_BASER<n> RAZ/WI for unimplemented registers Peter Maydell
2022-01-28 3:31 ` Richard Henderson
2022-01-22 18:24 ` [PATCH 12/14] hw/intc/arm_gicv3_its: Check table bounds against correct limit Peter Maydell
2022-01-28 3:32 ` Richard Henderson
2022-01-22 18:24 ` [PATCH 13/14] hw/intc/arm_gicv3_its: Implement MOVALL Peter Maydell
2022-01-28 3:37 ` Richard Henderson
2022-01-22 18:24 ` [PATCH 14/14] hw/intc/arm_gicv3_its: Implement MOVI Peter Maydell
2022-01-28 3:38 ` Richard Henderson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220122182444.724087-10-peter.maydell@linaro.org \
--to=peter.maydell@linaro.org \
--cc=alex.bennee@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=shashi.mallela@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).