[Lguest] Communication between host and guest

Rusty Russell rusty at rustcorp.com.au
Mon May 27 15:25:38 EST 2013


Eviatar Khen <eviatarkhen at gmail.com> writes:
> Hi,
> The answer depends on the the type of communication that you need.
> Generally the Host-Guest are sharing data via the lguest_data structure.
> Also, the Guest could switch to the host via a hypercall with a return
> value set by the Host.
>
> If you need something more similar to streaming then virtio is your best
> choice. All other alternatives would probably be more complex.

A rough breakdown looks like this:
- lguest_data is good for the guest or host publishing small amounts of
  data, without notification when it changes.
- A new hcall is good for the guest sending data to the host.
- A new virtio device is good for more complex uses.

To make a new virtio device, just copy the existing ones.  A device
usually has some configuration space and one or more virtqueues, where
the guest published readable or writable buffers, and the host
reads/fills them.

Cheers,
Rusty.


More information about the Lguest mailing list