qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Jiahuan Zhang <jiahuanzhang90@gmail.com>
Cc: QEMU Developers <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] Guest application reading from pl011 without device driver
Date: Wed, 22 Mar 2017 10:37:50 +0100	[thread overview]
Message-ID: <218df442-1a31-e969-32ef-01184fae84c0@redhat.com> (raw)
In-Reply-To: <CAJy91CaUxFHJeGLLW4DqK6sBwx2qDnE9s20ZbdT86JDn8yQoHg@mail.gmail.com>



On 22/03/2017 09:48, Jiahuan Zhang wrote:
> 
> 
> On 22 March 2017 at 09:40, Paolo Bonzini <pbonzini@redhat.com
> <mailto:pbonzini@redhat.com>> wrote:
> 
> 
>     > > I am using a windows named pipe to get the data from a window
>     > > host program, which uses ReadFile () in char_win.c
>     >
>     > OK, bugs in the windows-specific char backend would be
>     > unsurprising.
>     >
>     > I'm not entirely sure how the chardev layer works, but
>     > at the pl011 end if we return 0 from our can_receive
>     > function then the chardev layer should decide it has
>     > nothing to do until the pl011 later calls
>     > qemu_chr_fe_accept_input(), I think.
>     >
>     > I've cc'd Paolo and Marc-André Lureau as the chardev
>     > maintainers.
> 
>     Windows named pipes do not support the equivalent of "select",
>     so it's possible that they cause a busy wait.  Try using a
>     TCP socket instead and see if the bug goes away.
> 
> 
> Hi, I am trying to use a Windows socket for serial redirection instead
> of Windows named pipe.
> What do you mean "the equivalent of 'select'"?

A function that lets a process sleep until data is available on the
socket.  The solution is to rewrite Windows chardev handling in QEMU to
use threads or overlapped I/O.

Paolo

  reply	other threads:[~2017-03-22  9:37 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 [this message]
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

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=218df442-1a31-e969-32ef-01184fae84c0@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=jiahuanzhang90@gmail.com \
    --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).