firecracker-microvm / firecracker

Secure and fast microVMs for serverless computing.
http://firecracker-microvm.io
Apache License 2.0
26.22k stars 1.82k forks source link

[vmm] refactor vmm builder code to separate the architecture dependent code in their own modules #4411

Open wearyzen opened 9 months ago

wearyzen commented 9 months ago

Description

The vmm crate hosts most of the modules that implement the Firecracker functionality. Moreover, at its "top-level", mainly lib.rs and builder.rs includes the logic for creating the Vmm the object that describes a Firecracker microVM. The logic for creating Vmm objects is divided between lib.rs and builder.rs. Moreover, this functionality includes a lot of architecture specific code that has been gathered along the years to a code-base the logic of which is hard to follow "sometimes".

Action Items

A nice way to refactor this (and hopefully make it less painful to follow), would be to isolate the logic for building the Vmm in its own module and isolate the architecture specific code in their own sub-modules, one for each architecture.

Acceptance criteria

  1. Do the refactoring. Focus only on the logic related with the building the Vmm object
  2. Ensure that we didn't break something along the way (all the tests are still passing after the refactor).
andr3wy commented 7 months ago

Hi everyone,

We're a group at UT Austin and we're interested in picking this issue up. Do you have any estimates for how long this will take?