qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 2/2] Drop obsolete nographic timer


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH 2/2] Drop obsolete nographic timer
Date: Fri, 16 Mar 2012 09:55:32 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.1) Gecko/20120216 Thunderbird/10.0.1

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]