You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As of today, the stage2 and svsm targets are two binary targets of the same crate and share most of their code through a common lib.rs. This has various downsides:
stage2 is unnecessarily bloated.
We can't have stage2 or svsm-specific APIs in the shared code.
publicly exposing all modules in lib.rs hides a lot of dead-code warnings.
Instead, we should split the code into at least three crates, one for the stage2 target, one for the svsm target, and one for shared code.
There was some discussion on this in one of the meetings.
The text was updated successfully, but these errors were encountered:
I worked on this for a while, but unfortunately, I won't be able to finish my work 1. You can find my work-in-progress code here.
In the hopes that maybe someone else will be able to pick this up and finish it, here's what I did so far:
I started with one commit that copies all code from the svsm directories into a new stage2 directory. The goal behind this was to make it easy to update when rebasing without missing any new changes. Following this, there are a couple commits that fix build errors introduced by just doing a raw copy in the first commit.
Those first couple of commits don't build, but everything after that starting with Freax13@0dbd970 should build and pass the tests. There have been a few instances where some commits broke tests after a rebase, so I'd recommend keeping this structure until everything's done.
Most of the the remaining commits simply remove dead code, but some of them also rewrite existing code e.g. there's a commit replacing the very complex heap allocator and its SVSM-specific features with a simple bump allocator in stage2.
Footnotes
Previously, my employer was paying me to work on the COCONUT SVSM project, but I started a new position at a new employer last week and my new role doesn't involve SVSM development. ↩
As of today, the stage2 and svsm targets are two binary targets of the same crate and share most of their code through a common lib.rs. This has various downsides:
Instead, we should split the code into at least three crates, one for the stage2 target, one for the svsm target, and one for shared code.
There was some discussion on this in one of the meetings.
The text was updated successfully, but these errors were encountered: