Lines Matching full:virtio

5 VirtIO Support
8 This document describes the information about U-Boot support for VirtIO [1]
11 What's VirtIO?
13 VirtIO is a virtualization standard for network and disk device drivers where
22 VirtIO can use various different buses, aka transports as described in the
23 spec. While VirtIO devices are commonly implemented as PCI devices on x86,
26 device. The memory mapped virtio device behaviour is based on the PCI device
31 The VirtIO spec defines a lots of VirtIO device types, however at present only
43 Note ARM and RISC-V targets are configured with VirtIO MMIO transport driver,
55 You can even create a QEMU ARM target with VirtIO devices showing up on both
61 VirtIO Drivers --->
63 [*] PCI driver for virtio devices
69 It is required that QEMU v2.5.0+ should be used to test U-Boot VirtIO support
75 VirtIO net and block devices on ARM.
79 -device virtio-net-device,netdev=net0 \
81 -device virtio-blk-device,drive=hd0
83 On x86, command is slightly different to create PCI VirtIO devices.
87 -device virtio-net-pci,netdev=net0 \
89 -device virtio-blk-pci,drive=hd0
92 parameters. It is also possible to specify both MMIO and PCI VirtIO devices.
93 For example, the following commnad creates 3 VirtIO devices, with 1 on MMIO
98 -device virtio-net-pci,netdev=net0 \
100 -device virtio-blk-device,drive=hd0 \
102 -device virtio-blk-pci,drive=hd1
104 By default QEMU creates VirtIO legacy devices by default. To create non-legacy
109 -device virtio-net-pci,netdev=net0,disable-legacy=true,disable-modern=false \
111 -device virtio-blk-pci,drive=hd0,disable-legacy=true,disable-modern=false
113 A 'virtio' command is provided in U-Boot shell.
115 => virtio
116 virtio - virtio block devices sub-system
119 virtio scan - initialize virtio bus
120 virtio info - show all available virtio block devices
121 virtio device [dev] - show or set current virtio block device
122 virtio part [dev] - print partition table of one or all virtio block devices
123 virtio read addr blk# cnt - read `cnt' blocks starting at block
125 virtio write addr blk# cnt - write `cnt' blocks starting at block
128 To probe all the VirtIO devices, type:
130 => virtio scan
134 => virtio info
135 Device 0: QEMU VirtIO Block Device
141 => ls virtio 0 /
168 There are 3 level of drivers in the VirtIO driver family.
171 | virtio device drivers |
173 | | virtio-net | | virtio-blk | |
177 | virtio transport drivers |
179 | | virtio-mmio | | virtio-pci | |
183 | virtio uclass driver |
186 The root one is the virtio uclass driver (virtio-uclass.c), which does lots of
188 virtio device is discovered in the transport driver's probe() method, and its
189 device ID is saved in the virtio uclass's private data of the transport device.
190 Then in the virtio uclass's post_probe() method, the real virtio device driver
194 virtio uclass driver help bring the virtio device driver online. They do things
196 for all virtio devices.
199 virtio device driver to call. These ops APIs's parameter is designed to remind
200 the caller to pass the correct 'struct udevice' id of the virtio device, eg:
204 So the parameter 'vdev' indicates the device should be the real virtio device.
221 At present only VirtIO network card (device ID 1) and block device (device
225 1. add new device ID in virtio.h
230 3. add new driver name string in virtio.h
231 #define VIRTIO_XXX_DRV_NAME "virtio-xxx"
252 [1] http://docs.oasis-open.org/virtio/virtio/v1.0/virtio-v1.0.pdf