Il 16/03/2012 09:17, Jan Kiszka ha scritto: > I'm starting to understand the issue: The serial port can only accept a > single byte. Once this arrived, serial_can_receive1 returns 0, and the > backend fd is not longer polled by the io-thread. This should change > again as soon as the guest read that byte. But qemu_chr_accept_input, > which is properly called by the serial device, didn't kick the io-thread > in some way. I solved it this way now: > > diff --git a/qemu-char.c b/qemu-char.c > index 9a5be75..a589a84 100644 > --- a/qemu-char.c > +++ b/qemu-char.c > @@ -177,6 +177,7 @@ void qemu_chr_accept_input(CharDriverState *s) > { > if (s->chr_accept_input) > s->chr_accept_input(s); > + qemu_notify_event(); > } > > void qemu_chr_fe_printf(CharDriverState *s, const char *fmt, ...) > > > But I'm not yet sure if this is correct. Comments welcome!
I think so. qemu_chr_accept_input signals that qemu_chr_be_can_write could have changed, which means that the can_read handler could have changed and has to be reevaluated. qemu_notify_event is the right way to do so. Paolo