Re: [PATCH v2 1/4] Introduce yank feature

2020-06-19 Thread Lukas Straub
On Wed, 17 Jun 2020 15:39:36 +0100 Stefan Hajnoczi wrote: > On Thu, May 21, 2020 at 04:48:06PM +0100, Daniel P. Berrangé wrote: > > On Thu, May 21, 2020 at 05:42:41PM +0200, Lukas Straub wrote: > > > On Thu, 21 May 2020 16:03:35 +0100 > > > Stefan Hajnoczi wrote: > > > > > > > On Wed, May 2

Re: [PATCH v2 1/4] Introduce yank feature

2020-06-17 Thread Stefan Hajnoczi
On Thu, May 21, 2020 at 04:48:06PM +0100, Daniel P. Berrangé wrote: > On Thu, May 21, 2020 at 05:42:41PM +0200, Lukas Straub wrote: > > On Thu, 21 May 2020 16:03:35 +0100 > > Stefan Hajnoczi wrote: > > > > > On Wed, May 20, 2020 at 11:05:39PM +0200, Lukas Straub wrote: > > > > +void yank_generic_

Re: [PATCH v2 1/4] Introduce yank feature

2020-05-21 Thread Daniel P . Berrangé
On Thu, May 21, 2020 at 05:42:41PM +0200, Lukas Straub wrote: > On Thu, 21 May 2020 16:03:35 +0100 > Stefan Hajnoczi wrote: > > > On Wed, May 20, 2020 at 11:05:39PM +0200, Lukas Straub wrote: > > > +void yank_generic_iochannel(void *opaque) > > > +{ > > > +QIOChannel *ioc = QIO_CHANNEL(opaque

Re: [PATCH v2 1/4] Introduce yank feature

2020-05-21 Thread Lukas Straub
On Thu, 21 May 2020 16:03:35 +0100 Stefan Hajnoczi wrote: > On Wed, May 20, 2020 at 11:05:39PM +0200, Lukas Straub wrote: > > +void yank_generic_iochannel(void *opaque) > > +{ > > +QIOChannel *ioc = QIO_CHANNEL(opaque); > > + > > +qio_channel_shutdown(ioc, QIO_CHANNEL_SHUTDOWN_BOTH, NULL)

Re: [PATCH v2 1/4] Introduce yank feature

2020-05-21 Thread Stefan Hajnoczi
On Wed, May 20, 2020 at 11:05:39PM +0200, Lukas Straub wrote: > +void yank_generic_iochannel(void *opaque) > +{ > +QIOChannel *ioc = QIO_CHANNEL(opaque); > + > +qio_channel_shutdown(ioc, QIO_CHANNEL_SHUTDOWN_BOTH, NULL); > +} > + > +void qmp_yank(strList *instances, Error **errp) > +{ > +

Re: [PATCH v2 1/4] Introduce yank feature

2020-05-20 Thread Paolo Bonzini
On 20/05/20 23:05, Lukas Straub wrote: > + > +void yank_init(void) > +{ > +qemu_mutex_init(&lock); > +} You can use __constructor__ for this to avoid the call in vl.c. See job.c for an example. Thanks, Paolo

[PATCH v2 1/4] Introduce yank feature

2020-05-20 Thread Lukas Straub
The yank feature allows to recover from hanging qemu by "yanking" at various parts. Other qemu systems can register themselves and multiple yank functions. Then all yank functions for selected instances can be called by the 'yank' out-of-band qmp command. Available instances can be queried by a 'qu