From: Paolo Bonzini <pbonzini@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: "Jiahuan Zhang" <jiahuanzhang90@gmail.com>,
"QEMU Developers" <qemu-devel@nongnu.org>,
"Marc-André Lureau" <marcandre.lureau@redhat.com>
Subject: Re: [Qemu-devel] Guest application reading from pl011 without device driver
Date: Wed, 22 Mar 2017 12:33:22 +0100 [thread overview]
Message-ID: <5917da98-e569-47e8-016d-6cfb6e8c6958@redhat.com> (raw)
In-Reply-To: <CAFEAcA9zd_gXZjY2fnHdK-7XbKFTj-UDtpWq6A9h6ApERysu=Q@mail.gmail.com>
On 22/03/2017 12:07, Peter Maydell wrote:
> That's not the end that's a problem. Here we know we have
> data available from the Windows end to read, we just
> can't feed it to the QEMU UART model yet because the
> UART model is saying "my FIFO is full, try later".
> We should be able to handle that. (I couldn't figure
> out how it works for the socket code either.)
On every iteration of the glib main loop, tcp_chr_read_poll returns zero
and io_watch_poll_prepare removes any previously created QIOChannel
event source for the file descriptor
When hw/char/pl011.c has free space in the FIFO tcp_chr_read_poll
returns nonzero, io_watch_poll_prepare adds again the QIOChannel event
source, the event source calls tcp_chr_read which reads from the socket
and passes the data to the PL011.
qemu_chr_fe_accept_input is only needed to force another call to
tcp_chr_read_poll.
Paolo
prev parent reply other threads:[~2017-03-22 11:33 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-21 16:32 [Qemu-devel] Guest application reading from pl011 without device driver Jiahuan Zhang
2017-03-21 16:39 ` Peter Maydell
2017-03-21 16:47 ` Jiahuan Zhang
2017-03-21 16:50 ` Peter Maydell
2017-03-21 16:59 ` Jiahuan Zhang
2017-03-21 17:10 ` Jiahuan Zhang
2017-03-21 17:16 ` Peter Maydell
2017-03-21 17:48 ` Jiahuan Zhang
2017-03-21 17:55 ` Peter Maydell
[not found] ` <CAJy91CZ4Ed-HGHLkzEc1dqQbo32d-eTE1S1ovO_ZwkDdTpkQXQ@mail.gmail.com>
[not found] ` <CAJy91CaCV40FgSP55qWZeZgkQ=2+E8Cr7xdbu9pn5HLEo+6JJQ@mail.gmail.com>
2017-03-21 18:11 ` Jiahuan Zhang
2017-03-21 18:28 ` Peter Maydell
2017-03-21 18:33 ` Jiahuan Zhang
2017-03-22 8:40 ` Paolo Bonzini
2017-03-22 8:48 ` Jiahuan Zhang
2017-03-22 9:37 ` Paolo Bonzini
2017-03-22 10:28 ` Jiahuan Zhang
2017-03-22 11:27 ` Paolo Bonzini
2017-03-23 10:12 ` Jiahuan Zhang
2017-03-23 10:35 ` Paolo Bonzini
2017-03-23 17:28 ` Jiahuan Zhang
2017-03-23 17:31 ` Paolo Bonzini
2017-03-24 7:24 ` Jiahuan Zhang
2017-03-24 10:00 ` Jiahuan Zhang
2017-05-01 12:06 ` Jiahuan Zhang
2017-03-22 11:07 ` Peter Maydell
2017-03-22 11:33 ` Paolo Bonzini [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5917da98-e569-47e8-016d-6cfb6e8c6958@redhat.com \
--to=pbonzini@redhat.com \
--cc=jiahuanzhang90@gmail.com \
--cc=marcandre.lureau@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).