Skip to content

Refactor vmm builder code to simplify logic that creates the microVM to boot #4547

Open
@bchalios

Description

@bchalios

Description

Currently, the logic to create a Vmm object is scattered across vmm/lib.rs and vmm.builder.rs files and it is quite convoluted and some times difficult to follow. Moreover, there is a lot of architecture specific code inserted in arbitrary places which further increases the un-readability.

Apart from the aesthetics and readability aspect, the state of the code makes it quite difficult to unit test. There are functions that take 7 arguments just to pass them (way) down the stack. That makes unit-testing very hard, since we often need to construct dummy versions of objects (like EventManager) even though they are not used in the part of the code we are trying to test.

Solution

Re-work the vmm construction code to simplify code paths and isolate architecture-specific code.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Priority: LowIndicates that an issue or pull request should be resolved behind issues or pull requests labelled `Status: WIPIndicates that an issue is currently being worked on or triaged

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions