[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH-for-9.0 v2 1/8] hw/ppc/spapr_cpu_core: Access QDev properties wit
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH-for-9.0 v2 1/8] hw/ppc/spapr_cpu_core: Access QDev properties with proper API |
Date: |
Thu, 23 Nov 2023 15:38:05 +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>
---
hw/ppc/spapr_cpu_core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/ppc/spapr_cpu_core.c b/hw/ppc/spapr_cpu_core.c
index 91fae56573..24f759ba26 100644
--- a/hw/ppc/spapr_cpu_core.c
+++ b/hw/ppc/spapr_cpu_core.c
@@ -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;
--
2.41.0
- [PATCH-for-9.0 v2 0/8] hw: Simplify accesses to CPUState::'start-powered-off' property, Philippe Mathieu-Daudé, 2023/11/23
- [PATCH-for-9.0 v2 1/8] hw/ppc/spapr_cpu_core: Access QDev properties with proper API,
Philippe Mathieu-Daudé <=
- [PATCH-for-9.0 v2 2/8] hw/arm/bcm2836: Simplify use of 'reset-cbar' property, Philippe Mathieu-Daudé, 2023/11/23
- [PATCH-for-9.0 v2 3/8] hw/arm/bcm2836: Use ARM_CPU 'mp-affinity' property, Philippe Mathieu-Daudé, 2023/11/23
- [PATCH-for-9.0 v2 4/8] hw: Simplify accesses to the CPUState::'start-powered-off' property, Philippe Mathieu-Daudé, 2023/11/23
- [PATCH-for-9.0 v2 5/8] hw: Prefer qdev_prop_set_bit over object_property_set_bool for QDev, Philippe Mathieu-Daudé, 2023/11/23
- [PATCH-for-9.0 v2 7/8] hw/arm/bcm2836: Move code after error checks, Philippe Mathieu-Daudé, 2023/11/23
- [PATCH-for-9.0 v2 6/8] hw: Simplify uses of qdev_prop_set_bit(dev, 'start-powered-off'), Philippe Mathieu-Daudé, 2023/11/23
- [PATCH-for-9.0 v2 8/8] hw/arm/bcm2836: Add local variable to remove various DEVICE() casts, Philippe Mathieu-Daudé, 2023/11/23