Andrew Walbran | eca2600 | 2022-09-30 10:51:49 +0000 | [diff] [blame] | 1 | # VirtIO-drivers-rs |
| 2 | |
Andrew Walbran | 59e5cd8 | 2023-01-24 11:59:29 +0000 | [diff] [blame] | 3 | [](https://crates.io/crates/virtio-drivers) |
| 4 | [](https://docs.rs/virtio-drivers) |
Andrew Walbran | eca2600 | 2022-09-30 10:51:49 +0000 | [diff] [blame] | 5 | [](https://github.com/rcore-os/virtio-drivers/actions) |
| 6 | |
| 7 | VirtIO guest drivers in Rust. For **no_std** environment. |
| 8 | |
| 9 | ## Support status |
| 10 | |
| 11 | ### Device types |
| 12 | |
| 13 | | Device | Supported | |
| 14 | | ------- | --------- | |
| 15 | | Block | ✅ | |
| 16 | | Net | ✅ | |
| 17 | | GPU | ✅ | |
| 18 | | Input | ✅ | |
| 19 | | Console | ✅ | |
David Brazdil | e3ad14a | 2023-04-19 17:46:52 +0100 | [diff] [blame] | 20 | | Socket | ✅ | |
Andrew Walbran | eca2600 | 2022-09-30 10:51:49 +0000 | [diff] [blame] | 21 | | ... | ❌ | |
| 22 | |
| 23 | ### Transports |
| 24 | |
Andrew Walbran | f1cc9a6 | 2022-11-21 15:18:09 +0000 | [diff] [blame] | 25 | | Transport | Supported | | |
| 26 | | ----------- | --------- | ------------------------------------------------- | |
| 27 | | Legacy MMIO | ✅ | version 1 | |
| 28 | | MMIO | ✅ | version 2 | |
| 29 | | PCI | ✅ | Memory-mapped CAM only, e.g. aarch64 or PCIe ECAM | |
Andrew Walbran | eca2600 | 2022-09-30 10:51:49 +0000 | [diff] [blame] | 30 | |
| 31 | ### Device-independent features |
| 32 | |
| 33 | | Feature flag | Supported | | |
| 34 | | ---------------------------- | --------- | --------------------------------------- | |
| 35 | | `VIRTIO_F_INDIRECT_DESC` | ❌ | Indirect descriptors | |
| 36 | | `VIRTIO_F_EVENT_IDX` | ❌ | `avail_event` and `used_event` fields | |
| 37 | | `VIRTIO_F_VERSION_1` | TODO | VirtIO version 1 compliance | |
| 38 | | `VIRTIO_F_ACCESS_PLATFORM` | ❌ | Limited device access to memory | |
| 39 | | `VIRTIO_F_RING_PACKED` | ❌ | Packed virtqueue layout | |
| 40 | | `VIRTIO_F_IN_ORDER` | ❌ | Optimisations for in-order buffer usage | |
| 41 | | `VIRTIO_F_ORDER_PLATFORM` | ❌ | Platform ordering for memory access | |
| 42 | | `VIRTIO_F_SR_IOV` | ❌ | Single root I/O virtualization | |
| 43 | | `VIRTIO_F_NOTIFICATION_DATA` | ❌ | Extra data in device notifications | |
| 44 | |
| 45 | ## Examples & Tests |
| 46 | |
| 47 | - x86_64 (TODO) |
| 48 | |
Andrew Walbran | 0038e82 | 2023-01-06 14:01:10 +0000 | [diff] [blame] | 49 | ### [aarch64](./examples/aarch64) |
| 50 | |
| 51 | ```bash |
| 52 | cd examples/aarch64 |
| 53 | make qemu |
| 54 | ``` |
| 55 | |
| 56 | ### [RISCV](./examples/riscv) |
| 57 | |
| 58 | ```bash |
| 59 | cd examples/riscv |
| 60 | make qemu |
| 61 | ``` |
| 62 | |
| 63 | You will see device info & GUI Window in qemu. |
| 64 | |
| 65 | <img decoding="async" src="https://github.com/rcore-os/virtio-drivers/raw/master/examples/riscv/virtio-test-gpu.png" width="50%"> |