fishinabarrel / linux-kernel-module-rust

Framework for writing Linux kernel modules in safe Rust
GNU General Public License v2.0
1.33k stars 119 forks source link

Add a nifty virtio driver #260

Open geofft opened 4 years ago

geofft commented 4 years ago

@joshtriplett proposes that the first driver we try to get into the upstream kernel should be some neat virtio thing, alongside an implementation in qemu (and maybe also one of the virtio hypervisors in Rust!). This would have the benefit of letting people play with it in a VM and also make it non-critical, so we can enable it in defconfig if you have Rust nightly installed and are on a compatible arch (in particular, we're neither duplicating nor replacing an existing driver).

Maybe there's some interesting channel we can virtualize - the concept of virtio-wayland was mentioned as inspiration.

geofft commented 4 years ago

A couple of options:

stappersg commented 3 years ago

Dropping other options

Thing to keep in mind is that the Rust kernel module in the QEMU guest also will need a matching counter part in the QEMU host.

From https://www.redhat.com/en/blog/virtio-devices-and-drivers-overview-headjack-and-phone do I understand that PCI card emulation is in play. That would mean that giving the QEMU guest a virtio-netrir network card wouldn't require building a QEMU host counterpart.

While writing down that, came this to mind: