Re: [Qemu-devel] [PATCH] qom: trigger unrealized when device_finalize

2013-07-05 Thread Paolo Bonzini
Il 05/07/2013 05:26, Liu Ping Fan ha scritto: > Currently, unrealized is triggered in device_unparent(). But > unrealized normally involves the reclaim of resource occupied by > DeviceState. To obey the idiom that reclaiming resource when > refcnt reach zero, move it on the path of object_finalize(

[Qemu-devel] [PATCH] qom: trigger unrealized when device_finalize

2013-07-04 Thread Liu Ping Fan
Currently, unrealized is triggered in device_unparent(). But unrealized normally involves the reclaim of resource occupied by DeviceState. To obey the idiom that reclaiming resource when refcnt reach zero, move it on the path of object_finalize(). As for device_unparent(), it would be the place to