Skip to content
This repository has been archived by the owner on Mar 7, 2021. It is now read-only.

Add a nifty virtio driver #260

Open
geofft opened this issue Aug 28, 2020 · 2 comments
Open

Add a nifty virtio driver #260

geofft opened this issue Aug 28, 2020 · 2 comments
Labels
enhancement New feature or request

Comments

@geofft
Copy link
Collaborator

geofft commented Aug 28, 2020

@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
Copy link
Collaborator Author

geofft commented Aug 28, 2020

A couple of options:

  • virtio-midi - it's a pretty simple protocol, it'll be fun, it won't be in anyone's way
  • Google has a virtio-based Android "Cuttlefish" platform for testing, running on crosvm, their maintainers might have more virtio things they'd like support for

@alex alex added the enhancement New feature or request label Aug 29, 2020
@stappersg
Copy link

Dropping other options

  • virtio-serial implements a serial port.
  • virtio-netrir network device re-implemented in Rust.

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:

  • modprobe virtio-netrir will be like inserting a PCI NIC.
  • rmmod virtio-nettrir will be like removing a PCI Network Interface Card.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants