qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] Windows Pipe


From: Jiahuan Zhang
Subject: Re: [Qemu-devel] Windows Pipe
Date: Wed, 1 Mar 2017 16:12:06 +0100

What I have done is two things.

1. I create a NamedPipeClient.exe to open the pipe and write a string into
it. QEMU indicates the string is recieved from the pipe.

2. I create another NamedPipeClient.exe to open the pipe and read the data
in the pipe. In qemu, I run a test.bin as kernel with versatilepb.
 test.bin assigns a string to UART0, which is redirected to the pipe.
(test.bin has been verified by -serial stdio.) The test result is: pipe is
opened by NamedPipeClient.exe, but nothing on the pipe to read.

the NamedPipeClient.exe is created by visual studio.

On 1 March 2017 at 15:58, Marc-André Lureau <address@hidden>
wrote:

> Hi
>
> On Wed, Mar 1, 2017 at 6:42 PM Jiahuan Zhang <address@hidden>
> wrote:
>
>> Hi,
>>
>> I agree with you about win_chr_poll(). But what I wonder is how to write
>> data into the pipe for the host to get. I see "writeFile()" in
>> "win_chr_write()", but have no idea how to use it. Or I have to write
>> something for this writing. In this case, I don't know what the right
>> buffer pointer for WriteFile() is.
>>
>> Any clue is greatly appreciated!
>>
>>
> According to the documentation, it "creates a single duplex pipe at
> \\.pipe\path", you'll have to open and write to it from a different
> application. I don't know if there are console applications that can open
> pipe you can use, you'll have to do some research or write one!
>
>
> On 1 March 2017 at 15:25, Marc-André Lureau <address@hidden>
>> wrote:
>>
>> Hi
>>
>> On Wed, Mar 1, 2017 at 5:16 PM Jiahuan Zhang <address@hidden>
>> wrote:
>>
>> Dear QEMU developers,
>>
>> I want the host-guest communication for QEMU. I want to achieve
>> it via serial port redirection to a pipe. My host is windows and guest is
>> Linux. QEMU is in version 2.8.50
>>
>> I looked into char-pipe.c and char-win.c, and find that the current QEMU
>> only supports reading data on the pipe from host to guest for Windows.
>> See *win_chr_pipe_init
>> () *in char-pipe.c
>>
>> Is it true?
>>
>>
>> Not exactly, for some reason, the win-chr-pipe uses a poll,
>> win_chr_poll() that read from the pipe and write to the frontend (the vm
>> serial).  I haven't tested the windows pipe implementation, only the
>> console one, but it looks like it should work. Hopefully someone using qemu
>> on windows can help you.
>>
>>
>> I don't know how to use *win_chr_write() *in char-win.c.
>> Can you please present an example?
>>
>> best regards,
>> Jiahuan
>>
>> --
>> Marc-André Lureau
>>
>>
>> --
> Marc-André Lureau
>


reply via email to

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