virtio-drivers
virtio-drivers copied to clipboard
VirtIO guest drivers in Rust.
Would it be possible to implement an async version of the driver?
Hi, first of all, thanks for the great bindings. I am having problems redrawing the frame buffer periodically using a timer. The first succeeds, but all further draw calls fail...
https://github.com/walksanatora/oc2kernel/blob/master/src/main.rs#L119-L136 is the virtio code but yet it always returns with a IO error you can see my qemu args in run.sh
If `VIRTIO_F_RING_RESET` is negotiated then PCI transport queues can be reset with [`queue_reset`](https://docs.oasis-open.org/virtio/virtio/v1.2/cs01/virtio-v1.2-cs01.html#x1-1140004:~:text=the%20virtqueue%20number.-,queue_reset,-The%20driver%20uses).
I suspect that this crate currently assumes little-endian byte order in a bunch of places, and will break on big-endian architectures. We should go through and make the endianness explicit...
I'm using the `PciTransport` on a Rust unikernel. 2047MiB copies work without issue, but any greater and I get an `IoError`.
This lets clients write code that works for a VirtIO device with either transport without generics. Dynamic dispatch isn't possible because `Transport` isn't object-safe.
考虑我们有这样的结构,它主要实现了这样的功能: 1. 发送读请求,将 `waker` 保存,让出 CPU。 2. 中断到来,根据 token 取出 `waker`,唤醒 Future。 3. 完成读取。 这套方案存在两个问题: 1. 在非理想情况下,Future 可能被其他事件取消(信号/进程终止等),此时后续的 `complete_read_blocks` 不会被执行,因此需要驱动支持直接取消一个 token,而不需要完成数据复制工作。(不能创建一个新的 buffer 放到全局区,把 complete 操作移到 `handle_irq` 处,因为这会导致额外的复制开销。) 2. `peek_used` 方法只会取出一个待处理的...