├── .github └── workflows │ └── main.yml ├── .gitignore ├── Cargo.toml ├── LICENSE ├── README.md ├── examples ├── aarch64 │ ├── .cargo │ │ └── config.toml │ ├── Cargo.toml │ ├── Makefile │ ├── build.rs │ ├── crosvm.ld │ ├── qemu.ld │ ├── rust-toolchain.toml │ └── src │ │ ├── exceptions.rs │ │ ├── hal.rs │ │ ├── logger.rs │ │ ├── main.rs │ │ └── uart8250.rs ├── hexagon │ ├── .cargo │ │ └── config.toml │ ├── Cargo.toml │ ├── Makefile │ ├── README.md │ ├── build.rs │ ├── linker32.ld │ └── src │ │ ├── hal.rs │ │ ├── hex_sys.rs │ │ ├── logger.rs │ │ ├── main.rs │ │ └── startup.S ├── riscv │ ├── .cargo │ │ └── config.toml │ ├── Cargo.toml │ ├── Makefile │ ├── linker32.ld │ ├── linker64.ld │ ├── music_44100Hz_u8_stereo.raw │ ├── rust-toolchain.toml │ ├── src │ │ ├── main.rs │ │ ├── tcp.rs │ │ └── virtio_impl.rs │ └── virtio-test-gpu.png ├── vsock_server │ ├── Cargo.toml │ ├── README.md │ └── src │ │ └── main.rs └── x86_64 │ ├── .cargo │ └── config.toml │ ├── Cargo.toml │ ├── Makefile │ ├── linker.ld │ ├── rust-toolchain.toml │ └── src │ ├── boot.rs │ ├── hal.rs │ ├── heap.rs │ ├── logger.rs │ ├── main.rs │ ├── multiboot.S │ ├── tcp.rs │ └── trap.rs ├── rust-toolchain.toml └── src ├── config.rs ├── device ├── blk.rs ├── common.rs ├── console.rs ├── console │ └── embedded_io.rs ├── gpu.rs ├── input.rs ├── mod.rs ├── net │ ├── dev.rs │ ├── dev_raw.rs │ ├── mod.rs │ └── net_buf.rs ├── rng.rs ├── socket │ ├── connectionmanager.rs │ ├── error.rs │ ├── mod.rs │ ├── protocol.rs │ └── vsock.rs ├── sound.rs └── sound │ └── fake.rs ├── embedded_io.rs ├── hal.rs ├── hal └── fake.rs ├── lib.rs ├── queue.rs ├── queue └── owning.rs └── transport ├── fake.rs ├── mmio.rs ├── mod.rs ├── pci.rs ├── pci └── bus.rs ├── some.rs ├── x86_64.rs └── x86_64 ├── cam.rs └── hypercalls.rs /.github/workflows/main.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rcore-os/virtio-drivers/HEAD/.github/workflows/main.yml -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | target/ 2 | Cargo.lock 3 | .vscode/ 4 | -------------------------------------------------------------------------------- /Cargo.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rcore-os/virtio-drivers/HEAD/Cargo.toml -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rcore-os/virtio-drivers/HEAD/LICENSE -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rcore-os/virtio-drivers/HEAD/README.md -------------------------------------------------------------------------------- /examples/aarch64/.cargo/config.toml: -------------------------------------------------------------------------------- 1 | [build] 2 | target = "aarch64-unknown-none" 3 | -------------------------------------------------------------------------------- /examples/aarch64/Cargo.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rcore-os/virtio-drivers/HEAD/examples/aarch64/Cargo.toml -------------------------------------------------------------------------------- /examples/aarch64/Makefile: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rcore-os/virtio-drivers/HEAD/examples/aarch64/Makefile -------------------------------------------------------------------------------- /examples/aarch64/build.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rcore-os/virtio-drivers/HEAD/examples/aarch64/build.rs -------------------------------------------------------------------------------- /examples/aarch64/crosvm.ld: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rcore-os/virtio-drivers/HEAD/examples/aarch64/crosvm.ld -------------------------------------------------------------------------------- /examples/aarch64/qemu.ld: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rcore-os/virtio-drivers/HEAD/examples/aarch64/qemu.ld -------------------------------------------------------------------------------- /examples/aarch64/rust-toolchain.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rcore-os/virtio-drivers/HEAD/examples/aarch64/rust-toolchain.toml -------------------------------------------------------------------------------- /examples/aarch64/src/exceptions.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rcore-os/virtio-drivers/HEAD/examples/aarch64/src/exceptions.rs -------------------------------------------------------------------------------- /examples/aarch64/src/hal.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rcore-os/virtio-drivers/HEAD/examples/aarch64/src/hal.rs -------------------------------------------------------------------------------- /examples/aarch64/src/logger.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rcore-os/virtio-drivers/HEAD/examples/aarch64/src/logger.rs -------------------------------------------------------------------------------- /examples/aarch64/src/main.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rcore-os/virtio-drivers/HEAD/examples/aarch64/src/main.rs -------------------------------------------------------------------------------- /examples/aarch64/src/uart8250.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rcore-os/virtio-drivers/HEAD/examples/aarch64/src/uart8250.rs -------------------------------------------------------------------------------- /examples/hexagon/.cargo/config.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rcore-os/virtio-drivers/HEAD/examples/hexagon/.cargo/config.toml -------------------------------------------------------------------------------- /examples/hexagon/Cargo.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rcore-os/virtio-drivers/HEAD/examples/hexagon/Cargo.toml -------------------------------------------------------------------------------- /examples/hexagon/Makefile: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rcore-os/virtio-drivers/HEAD/examples/hexagon/Makefile -------------------------------------------------------------------------------- /examples/hexagon/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rcore-os/virtio-drivers/HEAD/examples/hexagon/README.md -------------------------------------------------------------------------------- /examples/hexagon/build.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rcore-os/virtio-drivers/HEAD/examples/hexagon/build.rs -------------------------------------------------------------------------------- /examples/hexagon/linker32.ld: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rcore-os/virtio-drivers/HEAD/examples/hexagon/linker32.ld -------------------------------------------------------------------------------- /examples/hexagon/src/hal.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rcore-os/virtio-drivers/HEAD/examples/hexagon/src/hal.rs -------------------------------------------------------------------------------- /examples/hexagon/src/hex_sys.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rcore-os/virtio-drivers/HEAD/examples/hexagon/src/hex_sys.rs -------------------------------------------------------------------------------- /examples/hexagon/src/logger.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rcore-os/virtio-drivers/HEAD/examples/hexagon/src/logger.rs -------------------------------------------------------------------------------- /examples/hexagon/src/main.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rcore-os/virtio-drivers/HEAD/examples/hexagon/src/main.rs -------------------------------------------------------------------------------- /examples/hexagon/src/startup.S: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rcore-os/virtio-drivers/HEAD/examples/hexagon/src/startup.S -------------------------------------------------------------------------------- /examples/riscv/.cargo/config.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rcore-os/virtio-drivers/HEAD/examples/riscv/.cargo/config.toml -------------------------------------------------------------------------------- /examples/riscv/Cargo.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rcore-os/virtio-drivers/HEAD/examples/riscv/Cargo.toml -------------------------------------------------------------------------------- /examples/riscv/Makefile: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rcore-os/virtio-drivers/HEAD/examples/riscv/Makefile -------------------------------------------------------------------------------- /examples/riscv/linker32.ld: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rcore-os/virtio-drivers/HEAD/examples/riscv/linker32.ld -------------------------------------------------------------------------------- /examples/riscv/linker64.ld: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rcore-os/virtio-drivers/HEAD/examples/riscv/linker64.ld -------------------------------------------------------------------------------- /examples/riscv/music_44100Hz_u8_stereo.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rcore-os/virtio-drivers/HEAD/examples/riscv/music_44100Hz_u8_stereo.raw -------------------------------------------------------------------------------- /examples/riscv/rust-toolchain.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rcore-os/virtio-drivers/HEAD/examples/riscv/rust-toolchain.toml -------------------------------------------------------------------------------- /examples/riscv/src/main.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rcore-os/virtio-drivers/HEAD/examples/riscv/src/main.rs -------------------------------------------------------------------------------- /examples/riscv/src/tcp.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rcore-os/virtio-drivers/HEAD/examples/riscv/src/tcp.rs -------------------------------------------------------------------------------- /examples/riscv/src/virtio_impl.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rcore-os/virtio-drivers/HEAD/examples/riscv/src/virtio_impl.rs -------------------------------------------------------------------------------- /examples/riscv/virtio-test-gpu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rcore-os/virtio-drivers/HEAD/examples/riscv/virtio-test-gpu.png -------------------------------------------------------------------------------- /examples/vsock_server/Cargo.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rcore-os/virtio-drivers/HEAD/examples/vsock_server/Cargo.toml -------------------------------------------------------------------------------- /examples/vsock_server/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rcore-os/virtio-drivers/HEAD/examples/vsock_server/README.md -------------------------------------------------------------------------------- /examples/vsock_server/src/main.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rcore-os/virtio-drivers/HEAD/examples/vsock_server/src/main.rs -------------------------------------------------------------------------------- /examples/x86_64/.cargo/config.toml: -------------------------------------------------------------------------------- 1 | [build] 2 | target = "x86_64-unknown-none" 3 | -------------------------------------------------------------------------------- /examples/x86_64/Cargo.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rcore-os/virtio-drivers/HEAD/examples/x86_64/Cargo.toml -------------------------------------------------------------------------------- /examples/x86_64/Makefile: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rcore-os/virtio-drivers/HEAD/examples/x86_64/Makefile -------------------------------------------------------------------------------- /examples/x86_64/linker.ld: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rcore-os/virtio-drivers/HEAD/examples/x86_64/linker.ld -------------------------------------------------------------------------------- /examples/x86_64/rust-toolchain.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rcore-os/virtio-drivers/HEAD/examples/x86_64/rust-toolchain.toml -------------------------------------------------------------------------------- /examples/x86_64/src/boot.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rcore-os/virtio-drivers/HEAD/examples/x86_64/src/boot.rs -------------------------------------------------------------------------------- /examples/x86_64/src/hal.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rcore-os/virtio-drivers/HEAD/examples/x86_64/src/hal.rs -------------------------------------------------------------------------------- /examples/x86_64/src/heap.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rcore-os/virtio-drivers/HEAD/examples/x86_64/src/heap.rs -------------------------------------------------------------------------------- /examples/x86_64/src/logger.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rcore-os/virtio-drivers/HEAD/examples/x86_64/src/logger.rs -------------------------------------------------------------------------------- /examples/x86_64/src/main.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rcore-os/virtio-drivers/HEAD/examples/x86_64/src/main.rs -------------------------------------------------------------------------------- /examples/x86_64/src/multiboot.S: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rcore-os/virtio-drivers/HEAD/examples/x86_64/src/multiboot.S -------------------------------------------------------------------------------- /examples/x86_64/src/tcp.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rcore-os/virtio-drivers/HEAD/examples/x86_64/src/tcp.rs -------------------------------------------------------------------------------- /examples/x86_64/src/trap.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rcore-os/virtio-drivers/HEAD/examples/x86_64/src/trap.rs -------------------------------------------------------------------------------- /rust-toolchain.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rcore-os/virtio-drivers/HEAD/rust-toolchain.toml -------------------------------------------------------------------------------- /src/config.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rcore-os/virtio-drivers/HEAD/src/config.rs -------------------------------------------------------------------------------- /src/device/blk.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rcore-os/virtio-drivers/HEAD/src/device/blk.rs -------------------------------------------------------------------------------- /src/device/common.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rcore-os/virtio-drivers/HEAD/src/device/common.rs -------------------------------------------------------------------------------- /src/device/console.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rcore-os/virtio-drivers/HEAD/src/device/console.rs -------------------------------------------------------------------------------- /src/device/console/embedded_io.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rcore-os/virtio-drivers/HEAD/src/device/console/embedded_io.rs -------------------------------------------------------------------------------- /src/device/gpu.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rcore-os/virtio-drivers/HEAD/src/device/gpu.rs -------------------------------------------------------------------------------- /src/device/input.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rcore-os/virtio-drivers/HEAD/src/device/input.rs -------------------------------------------------------------------------------- /src/device/mod.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rcore-os/virtio-drivers/HEAD/src/device/mod.rs -------------------------------------------------------------------------------- /src/device/net/dev.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rcore-os/virtio-drivers/HEAD/src/device/net/dev.rs -------------------------------------------------------------------------------- /src/device/net/dev_raw.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rcore-os/virtio-drivers/HEAD/src/device/net/dev_raw.rs -------------------------------------------------------------------------------- /src/device/net/mod.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rcore-os/virtio-drivers/HEAD/src/device/net/mod.rs -------------------------------------------------------------------------------- /src/device/net/net_buf.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rcore-os/virtio-drivers/HEAD/src/device/net/net_buf.rs -------------------------------------------------------------------------------- /src/device/rng.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rcore-os/virtio-drivers/HEAD/src/device/rng.rs -------------------------------------------------------------------------------- /src/device/socket/connectionmanager.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rcore-os/virtio-drivers/HEAD/src/device/socket/connectionmanager.rs -------------------------------------------------------------------------------- /src/device/socket/error.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rcore-os/virtio-drivers/HEAD/src/device/socket/error.rs -------------------------------------------------------------------------------- /src/device/socket/mod.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rcore-os/virtio-drivers/HEAD/src/device/socket/mod.rs -------------------------------------------------------------------------------- /src/device/socket/protocol.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rcore-os/virtio-drivers/HEAD/src/device/socket/protocol.rs -------------------------------------------------------------------------------- /src/device/socket/vsock.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rcore-os/virtio-drivers/HEAD/src/device/socket/vsock.rs -------------------------------------------------------------------------------- /src/device/sound.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rcore-os/virtio-drivers/HEAD/src/device/sound.rs -------------------------------------------------------------------------------- /src/device/sound/fake.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rcore-os/virtio-drivers/HEAD/src/device/sound/fake.rs -------------------------------------------------------------------------------- /src/embedded_io.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rcore-os/virtio-drivers/HEAD/src/embedded_io.rs -------------------------------------------------------------------------------- /src/hal.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rcore-os/virtio-drivers/HEAD/src/hal.rs -------------------------------------------------------------------------------- /src/hal/fake.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rcore-os/virtio-drivers/HEAD/src/hal/fake.rs -------------------------------------------------------------------------------- /src/lib.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rcore-os/virtio-drivers/HEAD/src/lib.rs -------------------------------------------------------------------------------- /src/queue.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rcore-os/virtio-drivers/HEAD/src/queue.rs -------------------------------------------------------------------------------- /src/queue/owning.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rcore-os/virtio-drivers/HEAD/src/queue/owning.rs -------------------------------------------------------------------------------- /src/transport/fake.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rcore-os/virtio-drivers/HEAD/src/transport/fake.rs -------------------------------------------------------------------------------- /src/transport/mmio.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rcore-os/virtio-drivers/HEAD/src/transport/mmio.rs -------------------------------------------------------------------------------- /src/transport/mod.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rcore-os/virtio-drivers/HEAD/src/transport/mod.rs -------------------------------------------------------------------------------- /src/transport/pci.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rcore-os/virtio-drivers/HEAD/src/transport/pci.rs -------------------------------------------------------------------------------- /src/transport/pci/bus.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rcore-os/virtio-drivers/HEAD/src/transport/pci/bus.rs -------------------------------------------------------------------------------- /src/transport/some.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rcore-os/virtio-drivers/HEAD/src/transport/some.rs -------------------------------------------------------------------------------- /src/transport/x86_64.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rcore-os/virtio-drivers/HEAD/src/transport/x86_64.rs -------------------------------------------------------------------------------- /src/transport/x86_64/cam.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rcore-os/virtio-drivers/HEAD/src/transport/x86_64/cam.rs -------------------------------------------------------------------------------- /src/transport/x86_64/hypercalls.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rcore-os/virtio-drivers/HEAD/src/transport/x86_64/hypercalls.rs --------------------------------------------------------------------------------