qemu-devel
[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: Markus Armbruster
Subject: Re: [PATCH 50/55] s390x/event-facility: Simplify creation of SCLP event devices
Date: Tue, 26 May 2020 08:27:25 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux)

Paolo Bonzini <address@hidden> writes:

> On 25/05/20 09:01, Markus Armbruster wrote:
>>> Just remembered that we fail creating the machine and therefore abort. So 
>>> not necessary :)
>> True.
>> 
>> But let's review briefly what happens when a realize method fails.
>> 
>> In theory, realize fails cleanly, i.e. doing nothing.  Another attempt
>> could be made then.
>> 
>> In practice, realize failure is always followed by destruction, unless
>> preempted by outright exit(1).
>> 
>> Destroying a device must also destroy its components.
>> 
>> Paolo, is destroying a realized device okay, or does it have to be
>> unrealized first?  I can't see automatic unrealize on destruction...
>
> 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?

>                                                                  So the
> stageobject lifetime should always proceed in this order:
>
>    created
>    created, with parent
>    created, with parent, with bus (if applicable)
>    realizing
>    realized
>    unrealizing
>    unrealized
>    unrealized, without parent, with bus (if applicable)
>    unrealized, without parent, without bus
>    finalizing (without references)
>    finalized
>    freed
>
> Where the second and third would be fixed by moving /machine/unattached
> from device_set_realized to qdev_realize.
>
> Paolo




reply via email to

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