2018-03-26 06:10:07 +00:00
|
|
|
# Virtio driver {#virtio}
|
2017-10-02 17:31:06 +00:00
|
|
|
|
|
|
|
# Introduction {#virtio_intro}
|
|
|
|
|
2018-03-26 06:10:07 +00:00
|
|
|
SPDK Virtio driver is a C library that allows communicating with Virtio devices.
|
|
|
|
It allows any SPDK application to become an initiator for (SPDK) vhost targets.
|
2017-10-02 17:31:06 +00:00
|
|
|
|
2018-03-26 06:10:07 +00:00
|
|
|
The driver supports two different usage models:
|
2017-10-02 17:31:06 +00:00
|
|
|
* PCI - This is the standard mode of operation when used in a guest virtual
|
2018-03-26 06:10:07 +00:00
|
|
|
machine, where QEMU has presented the virtio controller as a virtual PCI device.
|
|
|
|
* vhost-user - Can be used to connect to a vhost socket directly on the same host.
|
2017-10-02 17:31:06 +00:00
|
|
|
|
2018-01-30 12:53:45 +00:00
|
|
|
The driver, just like the SPDK @ref vhost, is using pollers instead of standard
|
|
|
|
interrupts to check for an I/O response. If used inside a VM, it bypasses interrupt
|
|
|
|
and context switching overhead of QEMU and guest kernel, significantly boosting
|
|
|
|
the overall I/O performance.
|
2017-10-02 17:31:06 +00:00
|
|
|
|
2018-03-26 06:10:07 +00:00
|
|
|
This Virtio library is currently used to implement two bdev modules:
|
2018-04-24 10:17:56 +00:00
|
|
|
@ref bdev_config_virtio_scsi and @ref bdev_config_virtio_blk.
|
|
|
|
These modules will export generic SPDK block devices usable by any SPDK application.
|