mirror of https://github.com/xemu-project/xemu.git
hw/arm/virt: Let boot.c handle PSCI enablement
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> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Niek Linnenbank <nieklinnenbank@gmail.com> Tested-by: Cédric Le Goater <clg@kaod.org> Tested-by: Niek Linnenbank <nieklinnenbank@gmail.com> Message-id: 20220127154639.2090164-9-peter.maydell@linaro.org
This commit is contained in:
parent
9437a76e10
commit
52c235ad75
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue