hw/ppc/spapr_cpu_core: Access QDev properties with proper API
authorPhilippe Mathieu-Daudé <philmd@linaro.org>
Thu, 23 Nov 2023 12:42:35 +0000 (13:42 +0100)
committerPhilippe Mathieu-Daudé <philmd@linaro.org>
Fri, 5 Jan 2024 15:20:15 +0000 (16:20 +0100)
CPUState::start_powered_off field is part of the internal
implementation of a QDev CPU. It is exposed as the QDev
"start-powered-off" property. External components should
use the qdev properties API to access it.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Harsh Prateek Bora <harshpb@linux.ibm.com>
Message-Id: <20231123143813.42632-2-philmd@linaro.org>

hw/ppc/spapr_cpu_core.c

index 710078e9f72d1f8bca41495988a0c3fdb99fa75d..5aa1ed474ad6c44e34bc297c69c4aa67f9af4cce 100644 (file)
@@ -306,7 +306,7 @@ static PowerPCCPU *spapr_create_vcpu(SpaprCpuCore *sc, int i, Error **errp)
      * All CPUs start halted. CPU0 is unhalted from the machine level reset code
      * and the rest are explicitly started up by the guest using an RTAS call.
      */
-    cs->start_powered_off = true;
+    qdev_prop_set_bit(DEVICE(obj), "start-powered-off", true);
     cs->cpu_index = cc->core_id + i;
     if (!spapr_set_vcpu_id(cpu, cs->cpu_index, errp)) {
         return NULL;