qemu-s390x
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 50/55] s390x/event-facility: Simplify creation of SCLP event


From: Paolo Bonzini
Subject: Re: [PATCH 50/55] s390x/event-facility: Simplify creation of SCLP event devices
Date: Tue, 26 May 2020 09:51:57 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0

On 26/05/20 08:27, Markus Armbruster wrote:
>> It cannot happen, because a device must be unparented before it's
>> destroyed and unparenting takes care of unrealizing the device.
> 
> I can't see where unparenting takes care of unrealizing.  Can you help
> me?

Hidden in plain sight:

static void device_unparent(Object *obj)
{
    DeviceState *dev = DEVICE(obj);
    BusState *bus;

    if (dev->realized) {
        object_property_set_bool(obj, false, "realized", NULL);
    }
    ...
}

and the call stack is object_unparent -> object_property_del_child ->
object_finalize_child_property (via prop->release) -> class->unparent.

Thanks,

Paolo




reply via email to

[Prev in Thread] Current Thread [Next in Thread]