aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorPhilippe Mathieu-Daudé <philmd@linaro.org>2024-02-14 09:17:39 +0100
committerPhilippe Mathieu-Daudé <philmd@linaro.org>2024-02-22 12:47:40 +0100
commit1f88173ab9dfa34e96f5baa10b83ccb528de3030 (patch)
tree476c1464bbbb96813f4a0712edc8c3e079392a98 /hw
parent22dc8a47f9c68f98594449be713d4dde9389f960 (diff)
hw/ppc/spapr_cpu: Use qdev_is_realized() instead of QOM API
Prefer QDev API for QDev objects, avoid the underlying QOM layer. Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Zhao Liu <zhao1.liu@intel.com> Message-Id: <20240216110313.17039-4-philmd@linaro.org>
Diffstat (limited to 'hw')
-rw-r--r--hw/ppc/spapr_cpu_core.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/hw/ppc/spapr_cpu_core.c b/hw/ppc/spapr_cpu_core.c
index 0c0fb3f1b0..40b7c52f7f 100644
--- a/hw/ppc/spapr_cpu_core.c
+++ b/hw/ppc/spapr_cpu_core.c
@@ -245,8 +245,7 @@ static void spapr_cpu_core_unrealize(DeviceState *dev)
* spapr_cpu_core_realize(), make sure we only unrealize
* vCPUs that have already been realized.
*/
- if (object_property_get_bool(OBJECT(sc->threads[i]), "realized",
- &error_abort)) {
+ if (qdev_is_realized(DEVICE(sc->threads[i]))) {
spapr_unrealize_vcpu(sc->threads[i], sc);
}
spapr_delete_vcpu(sc->threads[i]);