]> git.proxmox.com Git - mirror_qemu.git/commit
chardev: allow telnet gsource to switch gcontext
authorPeter Xu <peterx@redhat.com>
Tue, 6 Mar 2018 05:33:15 +0000 (13:33 +0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Mon, 12 Mar 2018 15:12:46 +0000 (16:12 +0100)
commitce1230c054e97932660aecd9ba61ee31d461e339
tree710c36664f86686f277e5d541be62347288e39a2
parent3da9de5ce22125c917f722f13f91a0e3b096a251
chardev: allow telnet gsource to switch gcontext

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 and TCPChardevTelnetInit (which holds the
handshake data) in SocketChardev.telnet_source so that we can also do
dynamic context switch when update read handlers.

Signed-off-by: Peter Xu <peterx@redhat.com>
Message-Id: <20180306053320.15401-5-peterx@redhat.com>
Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
chardev/char-socket.c