* [PATCH 1/1] hw/arm/sbsa-ref.c: Start APs powered off
@ 2023-01-02 15:46 Rebecca Cran
2023-01-05 17:34 ` Peter Maydell
0 siblings, 1 reply; 3+ messages in thread
From: Rebecca Cran @ 2023-01-02 15:46 UTC (permalink / raw)
To: Radoslaw Biernacki, Peter Maydell, Leif Lindholm
Cc: Rebecca Cran, qemu-arm, qemu-devel
For the SBSA-REF machine start all APs in the powered-off state.
This reduces host CPU usage until PSCI_CPU_ON is called when the APs
are needed.
Signed-off-by: Rebecca Cran <rebecca@quicinc.com>
---
hw/arm/sbsa-ref.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/hw/arm/sbsa-ref.c b/hw/arm/sbsa-ref.c
index 4bb444684f40..cf0af35c7807 100644
--- a/hw/arm/sbsa-ref.c
+++ b/hw/arm/sbsa-ref.c
@@ -753,6 +753,12 @@ static void sbsa_ref_init(MachineState *machine)
&error_abort);
}
+ /* Configure all APs to be powered off at start */
+ if (n != 0 && object_property_find(cpuobj, "start-powered-off")) {
+ object_property_set_bool(cpuobj, "start-powered-off",
+ true, &error_abort);
+ }
+
object_property_set_link(cpuobj, "memory", OBJECT(sysmem),
&error_abort);
--
2.30.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 1/1] hw/arm/sbsa-ref.c: Start APs powered off
2023-01-02 15:46 [PATCH 1/1] hw/arm/sbsa-ref.c: Start APs powered off Rebecca Cran
@ 2023-01-05 17:34 ` Peter Maydell
2023-01-10 18:35 ` Rebecca Cran
0 siblings, 1 reply; 3+ messages in thread
From: Peter Maydell @ 2023-01-05 17:34 UTC (permalink / raw)
To: Rebecca Cran; +Cc: Radoslaw Biernacki, Leif Lindholm, qemu-arm, qemu-devel
On Mon, 2 Jan 2023 at 15:46, Rebecca Cran <rebecca@quicinc.com> wrote:
>
> For the SBSA-REF machine start all APs in the powered-off state.
> This reduces host CPU usage until PSCI_CPU_ON is called when the APs
> are needed.
>
> Signed-off-by: Rebecca Cran <rebecca@quicinc.com>
> ---
> hw/arm/sbsa-ref.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/hw/arm/sbsa-ref.c b/hw/arm/sbsa-ref.c
> index 4bb444684f40..cf0af35c7807 100644
> --- a/hw/arm/sbsa-ref.c
> +++ b/hw/arm/sbsa-ref.c
> @@ -753,6 +753,12 @@ static void sbsa_ref_init(MachineState *machine)
> &error_abort);
> }
>
> + /* Configure all APs to be powered off at start */
> + if (n != 0 && object_property_find(cpuobj, "start-powered-off")) {
> + object_property_set_bool(cpuobj, "start-powered-off",
> + true, &error_abort);
> + }
> +
> object_property_set_link(cpuobj, "memory", OBJECT(sysmem),
> &error_abort);
This board disables QEMU's own PSCI implementation and relies on
a guest EL3 firmware to provide PSCI. So how will that EL3
firmware implement the "power on" to bring up the secondaries?
QEMU has the APIs to allow implementation of a model of a
hardware power controller (target/arm/arm-powerctl.h) but
as far as I can see the sbsa-ref board doesn't yet implement
one, so if you start the CPUs in the powered-off state there's
no way for them ever to be powered on.
thanks
-- PMM
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 1/1] hw/arm/sbsa-ref.c: Start APs powered off
2023-01-05 17:34 ` Peter Maydell
@ 2023-01-10 18:35 ` Rebecca Cran
0 siblings, 0 replies; 3+ messages in thread
From: Rebecca Cran @ 2023-01-10 18:35 UTC (permalink / raw)
To: Peter Maydell; +Cc: Radoslaw Biernacki, Leif Lindholm, qemu-arm, qemu-devel
On 1/5/23 10:34, Peter Maydell wrote:
> This board disables QEMU's own PSCI implementation and relies on
> a guest EL3 firmware to provide PSCI. So how will that EL3
> firmware implement the "power on" to bring up the secondaries?
> QEMU has the APIs to allow implementation of a model of a
> hardware power controller (target/arm/arm-powerctl.h) but
> as far as I can see the sbsa-ref board doesn't yet implement
> one, so if you start the CPUs in the powered-off state there's
> no way for them ever to be powered on.
Sorry, I've been working on a machine where the power controller _was_
implemented so I missed that that's not present in sbsa-ref.
--
Rebecca Cran
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-01-10 19:51 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-02 15:46 [PATCH 1/1] hw/arm/sbsa-ref.c: Start APs powered off Rebecca Cran
2023-01-05 17:34 ` Peter Maydell
2023-01-10 18:35 ` Rebecca Cran
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).