On Wed, Apr 11, 2018 at 11:38:58AM +0200, Paolo Bonzini wrote: > On 11/04/2018 11:35, Peter Xu wrote: > > Yeah, the inheritance will only make sure cur_mon be initialized > > always with correct value just like when we are without Out-Of-Band. > > For example, it's still possible a thread is created within a QMP > > handler. If without current change, the cur_mon in the new thread > > would be NULL. > > > > AFAIU even if cur_mon==NULL we should mostly be fine (e.g., > > error_vprintf will handle that case well). If any of you can help me > > confirm this, then I agree that this patch is not really needed. > > Yes, though the solution is to not use error_vprintf from auxiliary > threads. :) Just make sure all the communication happens through a > struct that's passed in the thread entry point, and possibly bottom > halves from the auxiliary thread to the monitor iothread.
Okay. :) Thanks for confirming. Then let me repost this patch without touching the qemu-threads. Btw, do you want me to repost the first patch separately too, or keep the code as is? I believe it depends on whether you treat that one as a cleanup or not. Thanks, -- Peter Xu
