VirtIO is made for device abstraction of hypervisors to reduce the number of accesses on register, interrupts and context switches.
The hypervisor is also name a host – the process which represents the VM – and the virtualized OS a guest. From a logical perspective VirtIO consists of a virtio-device and a virtio-driver. Common each OS can can distinguished between kernel-space and user-space. The passing from user-space to kernel-space and vise-versa is also called context-switch. Different distributions of virtio-device and virtio-driver are feasible:
Flavor A | Flavor B | Flavor C | |
Guest-User-Space | |||
Guest-Kernel-Space | virtio-driver | virtio-driver | virtio-driver |
Host-User-Space | virtio-device | ||
Host-Kernel-Space | virtio-device | ||
Physical Hardware | virtio-device |
A common and well fitting interexchange mechanism is the usage of “shared memory”, because VirtIO base on the exchange of memory buffers. Generic enough to provide many kinds of devices.
Each virtio-device consists of so called VQs. A VQ is “virtual queue” of SG (aka buffers). The approach of queueing is known as AsyncIO.
By this conceptual simplicity, VirtIO is a well fitting approach for Inter-SoC communication as well as inter (hypervisor) partition communication.