Re: [Qemu-devel] [PATCH 4/5] qom: delay DeviceState's reclaim to main-loop

2012-07-25 Thread Paolo Bonzini
Il 25/07/2012 10:16, liu ping fan ha scritto: > > It's not clear how to me. The only reference to devices from an > > iohandler/bh/timer can be in the opaque. Now, if you have a > > iohandler/bh/timer whose opaque is a DeviceState, you should bump the > > refcount before setting it up, and unref

Re: [Qemu-devel] [PATCH 4/5] qom: delay DeviceState's reclaim to main-loop

2012-07-25 Thread liu ping fan
On Wed, Jul 25, 2012 at 3:03 PM, Stefan Hajnoczi wrote: > On Wed, Jul 25, 2012 at 4:31 AM, Liu Ping Fan wrote: >> From: Liu Ping Fan >> >> iohandler/bh/timer may use DeviceState when its refcnt=0, >> postpone the reclaimer till they have done with it. >> >> Signed-off-by: Liu Ping Fan >> --- >>

Re: [Qemu-devel] [PATCH 4/5] qom: delay DeviceState's reclaim to main-loop

2012-07-25 Thread liu ping fan
On Wed, Jul 25, 2012 at 3:37 PM, Paolo Bonzini wrote: > Il 25/07/2012 09:03, Stefan Hajnoczi ha scritto: >> From: Liu Ping Fan >> >> iohandler/bh/timer may use DeviceState when its refcnt=0, > > It's not clear how to me. The only reference to devices from an > iohandler/bh/timer can be in the op

Re: [Qemu-devel] [PATCH 4/5] qom: delay DeviceState's reclaim to main-loop

2012-07-25 Thread Paolo Bonzini
Il 25/07/2012 09:03, Stefan Hajnoczi ha scritto: > From: Liu Ping Fan > > iohandler/bh/timer may use DeviceState when its refcnt=0, It's not clear how to me. The only reference to devices from an iohandler/bh/timer can be in the opaque. Now, if you have a iohandler/bh/timer whose opaque is a De

Re: [Qemu-devel] [PATCH 4/5] qom: delay DeviceState's reclaim to main-loop

2012-07-25 Thread Stefan Hajnoczi
On Wed, Jul 25, 2012 at 4:31 AM, Liu Ping Fan wrote: > From: Liu Ping Fan > > iohandler/bh/timer may use DeviceState when its refcnt=0, > postpone the reclaimer till they have done with it. > > Signed-off-by: Liu Ping Fan > --- > include/qemu/object.h |2 +- > main-loop.c |4 +

[Qemu-devel] [PATCH 4/5] qom: delay DeviceState's reclaim to main-loop

2012-07-24 Thread Liu Ping Fan
From: Liu Ping Fan iohandler/bh/timer may use DeviceState when its refcnt=0, postpone the reclaimer till they have done with it. Signed-off-by: Liu Ping Fan --- include/qemu/object.h |2 +- main-loop.c |4 main-loop.h |2 ++ qemu-tool.c |4 +++