-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Builder refactor #5112
Builder refactor #5112
Conversation
3ff3112
to
10d1896
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #5112 +/- ##
==========================================
- Coverage 83.19% 83.06% -0.14%
==========================================
Files 249 250 +1
Lines 26885 26888 +3
==========================================
- Hits 22368 22334 -34
- Misses 4517 4554 +37
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
2bad363
to
8eb3cf9
Compare
8eb3cf9
to
218274c
Compare
Initrd code was spread across multiple modules, move common part of it into one and make freestanding `load_initrd_*` functions into methods for the `InitrdConfig` struct. Also change `initrd_load_addr` method to return an option instead of an error to remove extra error nesting. Signed-off-by: Egor Lazarchuk <[email protected]>
Move `load_kernel` arch specific functions into arch module per architecture. Make the function to accept the kernel `File` instead of the `BootConfig`. Signed-off-by: Egor Lazarchuk <[email protected]>
218274c
to
fe5a859
Compare
fe5a859
to
902337e
Compare
Split `configure_system_for_boot` into 2 arch specific functions and move it into arch module. Signed-off-by: Egor Lazarchuk <[email protected]>
Some places were accessing `guest_memory` directly while others were using getter. Remove getter to make accesses consistent. Signed-off-by: Egor Lazarchuk <[email protected]>
902337e
to
40d1287
Compare
Move manual creation of `CpuConfiguration` from `configure_system_for_boot` into `CpuConfiguration::new`. Signed-off-by: Egor Lazarchuk <[email protected]>
On aarch64 `apply_template` cannot fail, so no reason for `Result` return type. Signed-off-by: Egor Lazarchuk <[email protected]>
There is no reason to have these functions separately, so merge them. Signed-off-by: Egor Lazarchuk <[email protected]>
This is a dead code, so remove it. Signed-off-by: Egor Lazarchuk <[email protected]>
Add `align_up` and `align_down` functions to stop reimplementing them in place all over the codebase. Signed-off-by: Egor Lazarchuk <[email protected]>
Remove `map_err` calls by adding `#[from]` to error variants. Signed-off-by: Egor Lazarchuk <[email protected]>
40d1287
to
2c42f84
Compare
thanks for indulging me with all those |
Changes
This is another attempt at fixing #4547.
builder.rs
intoarch
modules.arch
modules.Reason
Less arch specific mess in the codebase.
Fixes: #4411
Previous attempt was: #4910
License Acceptance
By submitting this pull request, I confirm that my contribution is made under
the terms of the Apache 2.0 license. For more information on following Developer
Certificate of Origin and signing off your commits, please check
CONTRIBUTING.md
.PR Checklist
tools/devtool checkstyle
to verify that the PR passes theautomated style checks.
how they are solving the problem in a clear and encompassing way.
in the PR.
CHANGELOG.md
.Runbook for Firecracker API changes.
integration tests.
TODO
.rust-vmm
.