Re: [Qemu-devel] [PATCH v2 08/15] chardev: allow telnet gsource to switch gcontext

2018-03-02 Thread Daniel P . Berrangé
On Thu, Mar 01, 2018 at 06:16:53PM +0100, Paolo Bonzini wrote: > On 01/03/2018 16:46, Daniel P. Berrangé wrote: > > On Thu, Mar 01, 2018 at 04:44:31PM +0800, Peter Xu wrote: > >> It was originally created by qio_channel_add_watch() so it's always > >> assigning the task to main context. Now we

Re: [Qemu-devel] [PATCH v2 08/15] chardev: allow telnet gsource to switch gcontext

2018-03-01 Thread Peter Xu
On Thu, Mar 01, 2018 at 06:16:53PM +0100, Paolo Bonzini wrote: > On 01/03/2018 16:46, Daniel P. Berrangé wrote: > > On Thu, Mar 01, 2018 at 04:44:31PM +0800, Peter Xu wrote: > >> It was originally created by qio_channel_add_watch() so it's always > >> assigning the task to main context. Now we

Re: [Qemu-devel] [PATCH v2 08/15] chardev: allow telnet gsource to switch gcontext

2018-03-01 Thread Paolo Bonzini
On 01/03/2018 16:46, Daniel P. Berrangé wrote: > On Thu, Mar 01, 2018 at 04:44:31PM +0800, Peter Xu wrote: >> It was originally created by qio_channel_add_watch() so it's always >> assigning the task to main context. Now we use the new API called >> qio_channel_add_watch_source() so that we get

Re: [Qemu-devel] [PATCH v2 08/15] chardev: allow telnet gsource to switch gcontext

2018-03-01 Thread Daniel P . Berrangé
On Thu, Mar 01, 2018 at 04:44:31PM +0800, Peter Xu wrote: > It was originally created by qio_channel_add_watch() so it's always > assigning the task to main context. Now we use the new API called > qio_channel_add_watch_source() so that we get the GSource handle rather > than the tag ID. > >

[Qemu-devel] [PATCH v2 08/15] chardev: allow telnet gsource to switch gcontext

2018-03-01 Thread Peter Xu
It was originally created by qio_channel_add_watch() so it's always assigning the task to main context. Now we use the new API called qio_channel_add_watch_source() so that we get the GSource handle rather than the tag ID. Meanwhile, caching the gsource in SocketChardev.telnet_source so that we