[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v4 2/3] mac_via: fix incorrect creation of mos6522 device in
From: |
Markus Armbruster |
Subject: |
Re: [PATCH v4 2/3] mac_via: fix incorrect creation of mos6522 device in mac_via |
Date: |
Sun, 15 Mar 2020 15:56:24 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) |
Paolo Bonzini <address@hidden> writes:
> On 14/03/20 14:19, Mark Cave-Ayland wrote:
>>> Observe that mac_via_init() has obvious side effects. In particular, it
>>> creates two devices that are then visible in "info qtree", and that's
>>> caught by device-introspect-test.
>>>
>>> I believe these things need to be done in .realize().
>
> That is not a problem; the devices should be removed when the device is
> finalized. In theory the steps would be:
>
> - the child properties are removed
>
> - this causes unparent to be called on the child devices
>
> - this causes the child devices to be unrealized
>
> - this causes the child devices to remove themselves from their bus (and
> from "info qtree")
>
> - this causes the refcount to drop to zero and the devices to be
> finalized themselves.
>
> The question is why they are not, i.e. where does the above reasoning break.
I don't know. But let's for the sake of the argument assume this
actually worked. Asking for help in the monitor then *still* has side
effects visible in the time span between .instance_init() and
finalization.
Why is that harmless?
> So, sysbus_init_child_obj is fine.
- Re: [PATCH v4 2/3] mac_via: fix incorrect creation of mos6522 device in mac_via, (continued)
- Re: [PATCH v4 2/3] mac_via: fix incorrect creation of mos6522 device in mac_via, Markus Armbruster, 2020/03/09
- Re: [PATCH v4 2/3] mac_via: fix incorrect creation of mos6522 device in mac_via, Pan Nengyuan, 2020/03/09
- Re: [PATCH v4 2/3] mac_via: fix incorrect creation of mos6522 device in mac_via, Markus Armbruster, 2020/03/09
- Re: [PATCH v4 2/3] mac_via: fix incorrect creation of mos6522 device in mac_via, Mark Cave-Ayland, 2020/03/09
- Re: [PATCH v4 2/3] mac_via: fix incorrect creation of mos6522 device in mac_via, Pan Nengyuan, 2020/03/09
- Re: [PATCH v4 2/3] mac_via: fix incorrect creation of mos6522 device in mac_via, Markus Armbruster, 2020/03/10
- Re: [PATCH v4 2/3] mac_via: fix incorrect creation of mos6522 device in mac_via, Peter Maydell, 2020/03/10
- Re: [PATCH v4 2/3] mac_via: fix incorrect creation of mos6522 device in mac_via, BALATON Zoltan, 2020/03/10
- Re: [PATCH v4 2/3] mac_via: fix incorrect creation of mos6522 device in mac_via, Mark Cave-Ayland, 2020/03/14
- Re: [PATCH v4 2/3] mac_via: fix incorrect creation of mos6522 device in mac_via, Paolo Bonzini, 2020/03/14
- Re: [PATCH v4 2/3] mac_via: fix incorrect creation of mos6522 device in mac_via,
Markus Armbruster <=
- Re: [PATCH v4 2/3] mac_via: fix incorrect creation of mos6522 device in mac_via, Paolo Bonzini, 2020/03/15
- Re: [PATCH v4 2/3] mac_via: fix incorrect creation of mos6522 device in mac_via, Markus Armbruster, 2020/03/16
- Re: [PATCH v4 2/3] mac_via: fix incorrect creation of mos6522 device in mac_via, Paolo Bonzini, 2020/03/16
- Re: [PATCH v4 2/3] mac_via: fix incorrect creation of mos6522 device in mac_via, Markus Armbruster, 2020/03/18
- Re: [PATCH v4 2/3] mac_via: fix incorrect creation of mos6522 device in mac_via, Paolo Bonzini, 2020/03/18
- Re: [PATCH v4 2/3] mac_via: fix incorrect creation of mos6522 device in mac_via, Peter Maydell, 2020/03/18
- Re: [PATCH v4 2/3] mac_via: fix incorrect creation of mos6522 device in mac_via, Markus Armbruster, 2020/03/18
- Re: [PATCH v4 2/3] mac_via: fix incorrect creation of mos6522 device in mac_via, Paolo Bonzini, 2020/03/18
- Re: [PATCH v4 2/3] mac_via: fix incorrect creation of mos6522 device in mac_via, Markus Armbruster, 2020/03/19
- Re: [PATCH v4 2/3] mac_via: fix incorrect creation of mos6522 device in mac_via, Paolo Bonzini, 2020/03/19