Currently pty code does not register i/o handler properly, so that one have to "ping" the pty in order for qemu to work, or else it is sitting in main loop doing nothing and using 100% CPU.
qemu -nographic -kernel /boot/vmlinuz-$(uname -r) -append console=ttyS0 -serial pty shows this nicely: the process is eating 100% CPU until someone connects to the pty in question and sends a char to it. Fix this by adding a call to pty_chr_update_read_handler() into qemu_chr_open_pty(). I'm not sure whenever this is the right thing to do, but at least it fixes the hang for me. Signed-off-by: Michael Tokarev <m...@tls.msk.ru> --- qemu-char.c | 1 + 1 file changed, 1 insertion(+) diff --git a/qemu-char.c b/qemu-char.c index 398baf1..35a58bf 100644 --- a/qemu-char.c +++ b/qemu-char.c @@ -1015,6 +1015,7 @@ static CharDriverState *qemu_chr_open_pty(QemuOpts *opts) s->fd = master_fd; s->timer = qemu_new_timer_ms(rt_clock, pty_chr_timer, chr); + pty_chr_update_read_handler(chr); return chr; } -- 1.7.10.4