<div dir="ltr">so using virtio is it possible to get a bidirectional<div>stream like connection from host kernel to guest kernel?</div><div><br></div><div>I was thinking of setting up communication like this:</div><div><br>

</div><div>1. virtio driver to send data in to guest kernel from host kernel.</div><div>2. hypercall to return result of data request from guest kernel to host kernel.</div><div><br></div><div>-Earlence</div></div><div class="gmail_extra">

<br><br><div class="gmail_quote">On Mon, May 27, 2013 at 1:25 AM, Rusty Russell <span dir="ltr"><<a href="mailto:rusty@rustcorp.com.au" target="_blank">rusty@rustcorp.com.au</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div class="im">Eviatar Khen <<a href="mailto:eviatarkhen@gmail.com">eviatarkhen@gmail.com</a>> writes:<br>
> Hi,<br>
> The answer depends on the the type of communication that you need.<br>
> Generally the Host-Guest are sharing data via the lguest_data structure.<br>
> Also, the Guest could switch to the host via a hypercall with a return<br>
> value set by the Host.<br>
><br>
> If you need something more similar to streaming then virtio is your best<br>
> choice. All other alternatives would probably be more complex.<br>
<br>
</div>A rough breakdown looks like this:<br>
- lguest_data is good for the guest or host publishing small amounts of<br>
  data, without notification when it changes.<br>
- A new hcall is good for the guest sending data to the host.<br>
- A new virtio device is good for more complex uses.<br>
<br>
To make a new virtio device, just copy the existing ones.  A device<br>
usually has some configuration space and one or more virtqueues, where<br>
the guest published readable or writable buffers, and the host<br>
reads/fills them.<br>
<br>
Cheers,<br>
Rusty.<br>
</blockquote></div><br></div>