qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] Guest application reading from pl011 without device dri


From: Jiahuan Zhang
Subject: Re: [Qemu-devel] Guest application reading from pl011 without device driver
Date: Thu, 23 Mar 2017 18:28:21 +0100

Hi, the method doesn't work for pipe. It still causes the same issue.
The only difference is that the first byte in the UART fifo can be read by
the guest app.
So now my guest app can immediately read 17bytes when the host is sending
data continuously,
then guest app is unable to read.

Now there is a solution-to-be. Set the qemu pipe chardev to wait for 1
millisecond before do a next ReadFile(),
then the pl011 can deliver the complete large data by the 16-byte fifo
continuously to the guest app.

Is it rational? Or is this host -CPU-dependent?

Regards,
Huan

On 23 March 2017 at 11:35, Paolo Bonzini <address@hidden> wrote:

>
>
> On 23/03/2017 11:12, Jiahuan Zhang wrote:
> >
> >     It's Windows that doesn't support it (the Windows function name is
> >     WaitForSingleObject).
> >
> >
> > Hi, I have checked the Windows chardev implimentation in QEMU.
> > I learned from char-win-stdio.c to using thread and WaitForSingleObject
> > for interlocking.
> > char-win-stdio.c uses qemu_add_wait_object().
> > Char-pipe.c uses qemu_add_polling_cb().
> > I found all over qemu, only char-pipe uses qemu_add_polling_cb().
> > Does this mean that somebody has already looked into this issue,
> > and failed in using qemu_add_wait_object(),
> > and then he/she created qemu_add_polling_cb()?
>
> I don't know, but using threads sounds like a way to solve the bug, indeed.
>
> Thanks,
>
> Paolo
>


reply via email to

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