Re: [Qemu-devel] [PATCH v2 9/9] chardev: tcp: postpone TLS work until machine done

2018-03-08 Thread Peter Xu
On Thu, Mar 08, 2018 at 01:31:43PM +, Daniel P. Berrangé wrote: > On Thu, Mar 08, 2018 at 07:42:13PM +0800, Peter Xu wrote: > > On Thu, Mar 08, 2018 at 10:13:59AM +, Daniel P. Berrangé wrote: > > > On Thu, Mar 08, 2018 at 11:44:09AM +0800, Peter Xu wrote: > > > > On Wed, Mar 07, 2018 at 12:

Re: [Qemu-devel] [PATCH v2 9/9] chardev: tcp: postpone TLS work until machine done

2018-03-08 Thread Daniel P . Berrangé
On Thu, Mar 08, 2018 at 07:42:13PM +0800, Peter Xu wrote: > On Thu, Mar 08, 2018 at 10:13:59AM +, Daniel P. Berrangé wrote: > > On Thu, Mar 08, 2018 at 11:44:09AM +0800, Peter Xu wrote: > > > On Wed, Mar 07, 2018 at 12:36:50PM +, Daniel P. Berrangé wrote: > > > > > > [...] > > > > > > > >

Re: [Qemu-devel] [PATCH v2 9/9] chardev: tcp: postpone TLS work until machine done

2018-03-08 Thread Peter Xu
On Thu, Mar 08, 2018 at 10:13:59AM +, Daniel P. Berrangé wrote: > On Thu, Mar 08, 2018 at 11:44:09AM +0800, Peter Xu wrote: > > On Wed, Mar 07, 2018 at 12:36:50PM +, Daniel P. Berrangé wrote: > > > > [...] > > > > > > diff --git a/chardev/char-socket.c b/chardev/char-socket.c > > > > inde

Re: [Qemu-devel] [PATCH v2 9/9] chardev: tcp: postpone TLS work until machine done

2018-03-08 Thread Daniel P . Berrangé
On Thu, Mar 08, 2018 at 11:44:09AM +0800, Peter Xu wrote: > On Wed, Mar 07, 2018 at 12:36:50PM +, Daniel P. Berrangé wrote: > > [...] > > > > diff --git a/chardev/char-socket.c b/chardev/char-socket.c > > > index bd40864f87..997c70dd7d 100644 > > > --- a/chardev/char-socket.c > > > +++ b/char

Re: [Qemu-devel] [PATCH v2 9/9] chardev: tcp: postpone TLS work until machine done

2018-03-07 Thread Peter Xu
On Wed, Mar 07, 2018 at 04:06:53PM +0100, Paolo Bonzini wrote: > On 07/03/2018 13:40, Daniel P. Berrangé wrote: > > On Wed, Mar 07, 2018 at 12:36:50PM +, Daniel P. Berrangé wrote: > >> On Tue, Mar 06, 2018 at 01:33:20PM +0800, Peter Xu wrote: > >>> TLS handshake may create background GSource ta

Re: [Qemu-devel] [PATCH v2 9/9] chardev: tcp: postpone TLS work until machine done

2018-03-07 Thread Peter Xu
On Wed, Mar 07, 2018 at 12:36:50PM +, Daniel P. Berrangé wrote: [...] > > diff --git a/chardev/char-socket.c b/chardev/char-socket.c > > index bd40864f87..997c70dd7d 100644 > > --- a/chardev/char-socket.c > > +++ b/chardev/char-socket.c > > @@ -31,6 +31,7 @@ > > #include "qemu/option.h" > >

Re: [Qemu-devel] [PATCH v2 9/9] chardev: tcp: postpone TLS work until machine done

2018-03-07 Thread Paolo Bonzini
On 07/03/2018 13:40, Daniel P. Berrangé wrote: > On Wed, Mar 07, 2018 at 12:36:50PM +, Daniel P. Berrangé wrote: >> On Tue, Mar 06, 2018 at 01:33:20PM +0800, Peter Xu wrote: >>> TLS handshake may create background GSource tasks, while we won't know >>> the correct GMainContext until the whole c

Re: [Qemu-devel] [PATCH v2 9/9] chardev: tcp: postpone TLS work until machine done

2018-03-07 Thread Daniel P . Berrangé
On Wed, Mar 07, 2018 at 12:36:50PM +, Daniel P. Berrangé wrote: > On Tue, Mar 06, 2018 at 01:33:20PM +0800, Peter Xu wrote: > > TLS handshake may create background GSource tasks, while we won't know > > the correct GMainContext until the whole chardev (including frontend) > > inited. Let's pos

Re: [Qemu-devel] [PATCH v2 9/9] chardev: tcp: postpone TLS work until machine done

2018-03-07 Thread Daniel P . Berrangé
On Tue, Mar 06, 2018 at 01:33:20PM +0800, Peter Xu wrote: > TLS handshake may create background GSource tasks, while we won't know > the correct GMainContext until the whole chardev (including frontend) > inited. Let's postpone the initial TLS handshake until machine done. > > For dynamically cre

[Qemu-devel] [PATCH v2 9/9] chardev: tcp: postpone TLS work until machine done

2018-03-05 Thread Peter Xu
TLS handshake may create background GSource tasks, while we won't know the correct GMainContext until the whole chardev (including frontend) inited. Let's postpone the initial TLS handshake until machine done. For dynamically created tcp chardev, we don't postpone that by checking the init_machin