diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2022-01-27 15:46:25 +0000 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2022-02-08 10:56:27 +0000 |
commit | 0c3c25fcda4b7e8a458ab5ca8e5c74be3cc456f1 (patch) | |
tree | 213902061695d77a56211eb318fd93852daccaa7 /hw | |
parent | bddd892ef1920c9ede00ad2009b3c3b3b0cf7a44 (diff) | |
download | qemu-0c3c25fcda4b7e8a458ab5ca8e5c74be3cc456f1.zip qemu-0c3c25fcda4b7e8a458ab5ca8e5c74be3cc456f1.tar.gz qemu-0c3c25fcda4b7e8a458ab5ca8e5c74be3cc456f1.tar.bz2 |
cpu.c: Make start-powered-off settable after realize
The CPU object's start-powered-off property is currently only
settable before the CPU object is realized. For arm machines this is
awkward, because we would like to decide whether the CPU should be
powered-off based on how we are booting the guest code, which is
something done in the machine model code and in common code called by
the machine model, which runs much later and in completely different
parts of the codebase from the SoC object code that is responsible
for creating and realizing the CPU objects.
Allow start-powered-off to be set after realize. Since this isn't
something that's supported by the DEFINE_PROP_* macros, we have to
switch the property definition to use the
object_class_property_add_bool() function.
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-3-peter.maydell@linaro.org
Diffstat (limited to 'hw')
0 files changed, 0 insertions, 0 deletions