Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

virtio-net: add virtio-net to lambdo #4

Open
5 tasks
lucido-simon opened this issue Dec 16, 2022 · 4 comments
Open
5 tasks

virtio-net: add virtio-net to lambdo #4

lucido-simon opened this issue Dec 16, 2022 · 4 comments

Comments

@lucido-simon
Copy link

lucido-simon commented Dec 16, 2022

This is the main tracking issue for all the sub-issues linked to adding a virtio-net support to lambdo.

As of right now, we have identified the following tasks :

  • Create a tap interface
  • Create a virtio-device that uses this interface
  • Allocate the necessary memory pages
  • Configure the VM to let the enlightened guest know about our device
  • Intercept VM-Exits that should be handled by our device

This is still an early proposal of the tasks to do. We need further exploring before truly having a grasp on what needs to be done. Please comment and discuss with us anything we missed or misunderstood, or if this does not look like a logical division of tasks.

@lucido-simon lucido-simon changed the title virtio-net: add virtio-net to lumper virtio-net: add virtio-net to lambdo Dec 16, 2022
@lucido-simon
Copy link
Author

Hey @sameo,

We had some trouble understanding what you meant by

One virtio-mmio based networking interface (rust-vmm virtio-net)

in your issue here.

Is there supposed to be a virtio-net crate or repository somewhere in the rust-vmm organization ? We can only find C bindings for virtio-net.
However, we found an implementation (based on the foundations that rust-vmm provides) in the cloud-hypervisor project. Should we base our implementation on theirs, as a first step ?

What is your take on this ? Thanks

@sameo
Copy link
Contributor

sameo commented Dec 16, 2022

@lucido-simon
Copy link
Author

@lucido-simon @nponsard See https://github.com/rust-vmm/vm-virtio

There is no net device implementation, only definition for devices. You want us to code the device ourselves?

@sameo
Copy link
Contributor

sameo commented Dec 19, 2022

@lucido-simon @nponsard See https://github.com/rust-vmm/vm-virtio

There is no net device implementation, only definition for devices. You want us to code the device ourselves?

There is a bindings crate, a virtio queue implementation and a virtio device crate for the common virtio functionalities, including full virtio-mmio support. So you have to implement virtio-net on top of this, unless you want to re-implement stuff from scratch.
Ideally, you could contribute the virtio-net implementation upstream.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants