mirror of https://github.com/xemu-project/xemu.git
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>
This commit is contained in:
parent
22dc8a47f9
commit
1f88173ab9
|
@ -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]);
|
||||
|
|
Loading…
Reference in New Issue