[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 08/16] hw/arm/virt: Let boot.c handle PSCI enablement
From: |
Peter Maydell |
Subject: |
[PATCH 08/16] hw/arm/virt: Let boot.c handle PSCI enablement |
Date: |
Thu, 27 Jan 2022 15:46:31 +0000 |
Instead of setting the CPU psci-conduit and start-powered-off
properties in the virt board code, set the arm_boot_info psci_conduit
field so that the boot.c code can do it.
This will fix a corner case where we were incorrectly enabling PSCI
emulation when booting guest code into EL3 because it was an ELF file
passed to -kernel or to the generic loader. (EL3 guest code started
via -bios or -pflash was already being run with PSCI emulation
disabled.)
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
hw/arm/virt.c | 12 +-----------
1 file changed, 1 insertion(+), 11 deletions(-)
diff --git a/hw/arm/virt.c b/hw/arm/virt.c
index 141350bf215..398145a7180 100644
--- a/hw/arm/virt.c
+++ b/hw/arm/virt.c
@@ -2088,17 +2088,6 @@ static void machvirt_init(MachineState *machine)
object_property_set_bool(cpuobj, "has_el2", false, NULL);
}
- if (vms->psci_conduit != QEMU_PSCI_CONDUIT_DISABLED) {
- object_property_set_int(cpuobj, "psci-conduit", vms->psci_conduit,
- NULL);
-
- /* Secondary CPUs start in PSCI powered-down state */
- if (n > 0) {
- object_property_set_bool(cpuobj, "start-powered-off", true,
- NULL);
- }
- }
-
if (vmc->kvm_no_adjvtime &&
object_property_find(cpuobj, "kvm-no-adjvtime")) {
object_property_set_bool(cpuobj, "kvm-no-adjvtime", true, NULL);
@@ -2246,6 +2235,7 @@ static void machvirt_init(MachineState *machine)
vms->bootinfo.get_dtb = machvirt_dtb;
vms->bootinfo.skip_dtb_autoload = true;
vms->bootinfo.firmware_loaded = firmware_loaded;
+ vms->bootinfo.psci_conduit = vms->psci_conduit;
arm_load_kernel(ARM_CPU(first_cpu), machine, &vms->bootinfo);
vms->machine_done.notify = virt_machine_done;
--
2.25.1
- [PATCH 03/16] hw/arm/boot: Support setting psci-conduit based on guest EL, (continued)
- [PATCH 03/16] hw/arm/boot: Support setting psci-conduit based on guest EL, Peter Maydell, 2022/01/27
- [PATCH 04/16] hw/arm: imx: Don't enable PSCI conduit when booting guest in EL3, Peter Maydell, 2022/01/27
- [PATCH 05/16] hw/arm: allwinner: Don't enable PSCI conduit when booting guest in EL3, Peter Maydell, 2022/01/27
- [PATCH 06/16] hw/arm/xlnx-zcu102: Don't enable PSCI conduit when booting guest in EL3, Peter Maydell, 2022/01/27
- [PATCH 07/16] hw/arm/versal: Let boot.c handle PSCI enablement, Peter Maydell, 2022/01/27
- [PATCH 08/16] hw/arm/virt: Let boot.c handle PSCI enablement,
Peter Maydell <=
- [PATCH 09/16] hw/arm: highbank: For EL3 guests, don't enable PSCI, start all cores, Peter Maydell, 2022/01/27
- [PATCH 14/16] hw/arm/highbank: Drop unused secondary boot stub code, Peter Maydell, 2022/01/27
- [PATCH 10/16] Revert "Revert "arm: tcg: Adhere to SMCCC 1.3 section 5.2"", Peter Maydell, 2022/01/27
- [PATCH 13/16] hw/arm/boot: Don't write secondary boot stub if using PSCI, Peter Maydell, 2022/01/27
- [PATCH 11/16] hw/arm/highbank: Drop use of secure_board_setup, Peter Maydell, 2022/01/27