From: Peter Maydell <peter.maydell@linaro.org>
To: qemu-devel@nongnu.org
Subject: [PULL 11/39] hw/arm/xlnx-zcu102: Don't enable PSCI conduit when booting guest in EL3
Date: Tue, 8 Feb 2022 11:39:20 +0000 [thread overview]
Message-ID: <20220208113948.3217356-12-peter.maydell@linaro.org> (raw)
In-Reply-To: <20220208113948.3217356-1-peter.maydell@linaro.org>
Change the Xilinx ZynqMP-based board xlnx-zcu102 to use the new
boot.c functionality to allow us to enable psci-conduit only if
the guest is being booted in EL1 or EL2, so that if the user runs
guest EL3 firmware code our PSCI emulation doesn't get in its
way.
To do this we stop setting the psci-conduit property on the CPU
objects in the SoC code, and instead set the psci_conduit field in
the arm_boot_info struct to tell the common boot loader code that
we'd like PSCI if the guest is starting at an EL that it makes
sense with.
Note that this means that EL3 guest code will have no way
to power on secondary cores, because we don't model any
kind of power controller that does that on this SoC.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Niek Linnenbank <nieklinnenbank@gmail.com>
Tested-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Tested-by: Cédric Le Goater <clg@kaod.org>
Tested-by: Niek Linnenbank <nieklinnenbank@gmail.com>
Acked-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20220127154639.2090164-7-peter.maydell@linaro.org
---
hw/arm/xlnx-zcu102.c | 1 +
hw/arm/xlnx-zynqmp.c | 11 ++++++-----
2 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/hw/arm/xlnx-zcu102.c b/hw/arm/xlnx-zcu102.c
index 45eb19ab3b7..4c84bb932aa 100644
--- a/hw/arm/xlnx-zcu102.c
+++ b/hw/arm/xlnx-zcu102.c
@@ -236,6 +236,7 @@ static void xlnx_zcu102_init(MachineState *machine)
s->binfo.ram_size = ram_size;
s->binfo.loader_start = 0;
s->binfo.modify_dtb = zcu102_modify_dtb;
+ s->binfo.psci_conduit = QEMU_PSCI_CONDUIT_SMC;
arm_load_kernel(s->soc.boot_cpu_ptr, machine, &s->binfo);
}
diff --git a/hw/arm/xlnx-zynqmp.c b/hw/arm/xlnx-zynqmp.c
index 5fbf38c4660..6d0e4116db7 100644
--- a/hw/arm/xlnx-zynqmp.c
+++ b/hw/arm/xlnx-zynqmp.c
@@ -216,7 +216,9 @@ static void xlnx_zynqmp_create_rpu(MachineState *ms, XlnxZynqMPState *s,
name = object_get_canonical_path_component(OBJECT(&s->rpu_cpu[i]));
if (strcmp(name, boot_cpu)) {
- /* Secondary CPUs start in PSCI powered-down state */
+ /*
+ * Secondary CPUs start in powered-down state.
+ */
object_property_set_bool(OBJECT(&s->rpu_cpu[i]),
"start-powered-off", true, &error_abort);
} else {
@@ -438,12 +440,11 @@ static void xlnx_zynqmp_realize(DeviceState *dev, Error **errp)
for (i = 0; i < num_apus; i++) {
const char *name;
- object_property_set_int(OBJECT(&s->apu_cpu[i]), "psci-conduit",
- QEMU_PSCI_CONDUIT_SMC, &error_abort);
-
name = object_get_canonical_path_component(OBJECT(&s->apu_cpu[i]));
if (strcmp(name, boot_cpu)) {
- /* Secondary CPUs start in PSCI powered-down state */
+ /*
+ * Secondary CPUs start in powered-down state.
+ */
object_property_set_bool(OBJECT(&s->apu_cpu[i]),
"start-powered-off", true, &error_abort);
} else {
--
2.25.1
next prev parent reply other threads:[~2022-02-08 12:14 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-08 11:39 [PULL 00/39] target-arm queue Peter Maydell
2022-02-08 11:39 ` [PULL 01/39] target/arm: Fix sve_zcr_len_for_el for VHE mode running Peter Maydell
2022-02-08 11:39 ` [PULL 02/39] target/arm: Tidy sve_exception_el for CPACR_EL1 access Peter Maydell
2022-02-08 11:39 ` [PULL 03/39] target/arm: Fix {fp, sve}_exception_el for VHE mode running Peter Maydell
2022-02-08 11:39 ` [PULL 04/39] target/arm: Use CPTR_TFP with CPTR_EL3 in fp_exception_el Peter Maydell
2022-02-08 11:39 ` [PULL 05/39] hw/arm/xlnx-zynqmp: 'Or' the QSPI / QSPI DMA IRQs Peter Maydell
2022-02-08 11:39 ` [PULL 06/39] target/arm: make psci-conduit settable after realize Peter Maydell
2022-02-08 11:39 ` [PULL 07/39] cpu.c: Make start-powered-off " Peter Maydell
2022-02-08 11:39 ` [PULL 08/39] hw/arm/boot: Support setting psci-conduit based on guest EL Peter Maydell
2022-02-08 11:39 ` [PULL 09/39] hw/arm: imx: Don't enable PSCI conduit when booting guest in EL3 Peter Maydell
2022-02-08 11:39 ` [PULL 10/39] hw/arm: allwinner: " Peter Maydell
2022-02-08 11:39 ` Peter Maydell [this message]
2022-02-08 11:39 ` [PULL 12/39] hw/arm/versal: Let boot.c handle PSCI enablement Peter Maydell
2022-02-08 11:39 ` [PULL 13/39] hw/arm/virt: " Peter Maydell
2022-02-08 11:39 ` [PULL 14/39] hw/arm: highbank: For EL3 guests, don't enable PSCI, start all cores Peter Maydell
2022-02-08 11:39 ` [PULL 15/39] arm: tcg: Adhere to SMCCC 1.3 section 5.2 Peter Maydell
2022-02-08 11:39 ` [PULL 16/39] hw/arm/highbank: Drop use of secure_board_setup Peter Maydell
2022-02-08 11:39 ` [PULL 17/39] hw/arm/boot: Prevent setting both psci_conduit and secure_board_setup Peter Maydell
2022-02-08 11:39 ` [PULL 18/39] hw/arm/boot: Don't write secondary boot stub if using PSCI Peter Maydell
2022-02-08 11:39 ` [PULL 19/39] hw/arm/highbank: Drop unused secondary boot stub code Peter Maydell
2022-02-08 11:39 ` [PULL 20/39] hw/arm/boot: Drop nb_cpus field from arm_boot_info Peter Maydell
2022-02-08 11:39 ` [PULL 21/39] hw/arm/boot: Drop existing dtb /psci node rather than retaining it Peter Maydell
2022-02-08 11:39 ` [PULL 22/39] hw/arm: versal-virt: Always call arm_load_kernel() Peter Maydell
2022-02-08 11:39 ` [PULL 23/39] arm: force flag recalculation when messing with DAIF Peter Maydell
2022-02-08 11:39 ` [PULL 24/39] hw/timer/armv7m_systick: Update clock source before enabling timer Peter Maydell
2022-02-08 11:39 ` [PULL 25/39] hw/arm/smmuv3: Fix device reset Peter Maydell
2022-02-08 11:39 ` [PULL 26/39] hw/intc/arm_gicv3_its: Use address_space_map() to access command queue packets Peter Maydell
2022-02-08 11:39 ` [PULL 27/39] hw/intc/arm_gicv3_its: Keep DTEs as a struct, not a raw uint64_t Peter Maydell
2022-02-08 11:39 ` [PULL 28/39] hw/intc/arm_gicv3_its: Pass DTEntry to update_dte() Peter Maydell
2022-02-08 11:39 ` [PULL 29/39] hw/intc/arm_gicv3_its: Keep CTEs as a struct, not a raw uint64_t Peter Maydell
2022-02-08 11:39 ` [PULL 30/39] hw/intc/arm_gicv3_its: Pass CTEntry to update_cte() Peter Maydell
2022-02-08 11:39 ` [PULL 31/39] hw/intc/arm_gicv3_its: Fix address calculation in get_ite() and update_ite() Peter Maydell
2022-02-08 11:39 ` [PULL 32/39] hw/intc/arm_gicv3_its: Avoid nested ifs in get_ite() Peter Maydell
2022-02-08 11:39 ` [PULL 33/39] hw/intc/arm_gicv3_its: Pass ITE values back from get_ite() via a struct Peter Maydell
2022-02-08 11:39 ` [PULL 34/39] hw/intc/arm_gicv3_its: Make update_ite() use ITEntry Peter Maydell
2022-02-08 11:39 ` [PULL 35/39] hw/intc/arm_gicv3_its: Drop TableDesc and CmdQDesc valid fields Peter Maydell
2022-02-08 11:39 ` [PULL 36/39] hw/intc/arm_gicv3_its: In MAPC with V=0, don't check rdbase field Peter Maydell
2022-02-08 11:39 ` [PULL 37/39] hw/intc/arm_gicv3_its: Don't allow intid 1023 in MAPI/MAPTI Peter Maydell
2022-02-08 11:39 ` [PULL 38/39] hw/intc/arm_gicv3_its: Split error checks Peter Maydell
2022-02-08 11:39 ` [PULL 39/39] hw/sensor: Add lsm303dlhc magnetometer device Peter Maydell
2022-02-08 15:03 ` [PULL 00/39] target-arm queue Peter Maydell
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=20220208113948.3217356-12-peter.maydell@linaro.org \
--to=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.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).