[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-ppc] [Qemu-devel] [PATCH v3 6/7] qdev: Protect device-list-pro
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-ppc] [Qemu-devel] [PATCH v3 6/7] qdev: Protect device-list-properties against broken devices |
Date: |
Mon, 28 Sep 2015 10:38:24 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 |
On 28/09/2015 10:15, Andreas Färber wrote:
> Am 28.09.2015 um 10:11 schrieb Markus Armbruster:
>> Hmm, does creating and destroying a macio object leave the memory region
>> behind?
>>
>> Paolo, is calling memory_region_init() in an instance_init() method
>> okay?
>>
>> If yes, where should they be destroyed, and how?
>
> The counterpart to .instance_init is .instance_finalize aka uninit.
memory_region_init adds the region as a child of the object, so it need
not be destroyed anywhere.
Lo and behold, it's even documented in docs/memory.txt: "Destruction of
a memory region happens automatically when the owner object dies".
Paolo
- [Qemu-ppc] [PATCH v3 6/7] qdev: Protect device-list-properties against broken devices, Markus Armbruster, 2015/09/24
- Re: [Qemu-ppc] [Qemu-devel] [PATCH v3 6/7] qdev: Protect device-list-properties against broken devices, Thomas Huth, 2015/09/28
- Re: [Qemu-ppc] [Qemu-devel] [PATCH v3 6/7] qdev: Protect device-list-properties against broken devices, Peter Maydell, 2015/09/28
- Re: [Qemu-ppc] [Qemu-devel] [PATCH v3 6/7] qdev: Protect device-list-properties against broken devices, Markus Armbruster, 2015/09/29
- Re: [Qemu-ppc] [Qemu-devel] [PATCH v3 6/7] qdev: Protect device-list-properties against broken devices, Peter Maydell, 2015/09/29
- Re: [Qemu-ppc] [Qemu-devel] [PATCH v3 6/7] qdev: Protect device-list-properties against broken devices, Markus Armbruster, 2015/09/29
- Re: [Qemu-ppc] [Qemu-devel] [PATCH v3 6/7] qdev: Protect device-list-properties against broken devices, Peter Maydell, 2015/09/29