Virtio infrastructure
This patch implements the basic infrastructure for virtio devices. These
devices are exposed to the guest as real PCI devices. The PCI vendor/device
IDs have been donated by Qumranet and the subsystem IDs are used to distinguish
the virtio device itself.
Virtio provides an abstraction for performing guest=>host and host=>guest
communications. It also provides a standard ring queue interface and discovery
mechanism. Finally, virtio provides a simple mechanism for passing
configuration between host and guest.
In this virtio implementation, we provide these things via normal PCI
operations. The Linux kernel support for this virtio device is pending in
Rusty's virtio patch queue[1]. They should be submitted once the merge window
opens again.
Some future TODOs are to use endian/alignment safe routines when accessing the
virtqueue so that mixed mode host/guests are supported.
[1] http://ozlabs.org/~rusty/kernel/hg
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Dor Laor <dor.laor@qumranet.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>