]> git.proxmox.com Git - mirror_qemu.git/commit
target/arm: make psci-conduit settable after realize
authorPeter Maydell <peter.maydell@linaro.org>
Thu, 27 Jan 2022 15:46:24 +0000 (15:46 +0000)
committerPeter Maydell <peter.maydell@linaro.org>
Tue, 8 Feb 2022 10:56:27 +0000 (10:56 +0000)
commitbddd892ef1920c9ede00ad2009b3c3b3b0cf7a44
tree63414b71179e02e8342b776c813ff7f391fca7ca
parentc74ccb5dd6955736907256aab8229f63385a5e2e
target/arm: make psci-conduit settable after realize

We want to allow the psci-conduit property to be set after realize,
because the parts of the code which are best placed to decide if it's
OK to enable QEMU's builtin PSCI emulation (the board code and the
arm_load_kernel() function are distant from the code which creates
and realizes CPUs (typically inside an SoC object's init and realize
method) and run afterwards.

Since the DEFINE_PROP_* macros don't have support for creating
properties which can be changed after realize, change the property to
be created with object_property_add_uint32_ptr(), which is what we
already use in this function for creating settable-after-realize
properties like init-svtor and init-nsvtor.

Note that it doesn't conceptually make sense to change the setting of
the property after the machine has been completely initialized,
beacuse this would mean that the behaviour of the machine when first
started would differ from its behaviour when the system is
subsequently reset.  (It would also require the underlying state to
be migrated, which we don't do.)

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Tested-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Tested-by: Cédric Le Goater <clg@kaod.org>
Message-id: 20220127154639.2090164-2-peter.maydell@linaro.org
target/arm/cpu.c