Cleaning up create_fdt
Changes
Adds fdt to guest memory at the location create_fdt is called not in create_fdt.
Removes unnecessary std::hash::BuildHasher parameterization.
...
Reason
@roypat we are not able to remove the GuestMemoryMmap parameter because we use it to create the memory node.
However, this updated code now writes the fdt to guest memory at the site of the caller utilizing the previously unused return value from create_fdt.
- separation of concerns
- simplify unit testing #4700
...
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
- [x] If a specific issue led to this PR, this PR closes the issue.
- [x] The description of changes is clear and encompassing.
- [x] Any required documentation changes (code and docs) are included in this PR.
- [x] API changes follow the Runbook for Firecracker API changes.
- [x] User-facing changes are mentioned in
CHANGELOG.md. - [x] All added/changed functionality is tested.
- [x] New
TODOs link to an issue. - [x] Commits meet contribution quality standards.
- [ ] This functionality cannot be added in
rust-vmm.
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 84.38%. Comparing base (
6d2bf72) to head (77eabb9). Report is 1 commits behind head on main.
Additional details and impacted files
@@ Coverage Diff @@
## main #4712 +/- ##
=======================================
Coverage 84.38% 84.38%
=======================================
Files 249 249
Lines 27494 27496 +2
=======================================
+ Hits 23201 23203 +2
Misses 4293 4293
| Flag | Coverage Δ | |
|---|---|---|
| 5.10-c5n.metal | 84.62% <ø> (+<0.01%) |
:arrow_up: |
| 5.10-m5n.metal | 84.60% <ø> (ø) |
|
| 5.10-m6a.metal | 83.89% <ø> (ø) |
|
| 5.10-m6g.metal | 80.95% <100.00%> (+<0.01%) |
:arrow_up: |
| 5.10-m6i.metal | 84.59% <ø> (-0.01%) |
:arrow_down: |
| 5.10-m7g.metal | 80.95% <100.00%> (+<0.01%) |
:arrow_up: |
| 6.1-c5n.metal | 84.62% <ø> (ø) |
|
| 6.1-m5n.metal | 84.60% <ø> (ø) |
|
| 6.1-m6a.metal | 83.89% <ø> (-0.01%) |
:arrow_down: |
| 6.1-m6g.metal | 80.95% <100.00%> (+<0.01%) |
:arrow_up: |
| 6.1-m6i.metal | 84.60% <ø> (ø) |
|
| 6.1-m7g.metal | 80.95% <100.00%> (+<0.01%) |
:arrow_up: |
Flags with carried forward coverage won't be shown. Click here to find out more.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
we are not able to remove the GuestMemoryMmap parameter because we use it to create the memory node.
ah, rip, I missed that. Oh well, this is still an improvement :D Could you have a look at fixing the compilation errors/warnings, though? :o
Hi @jackabald, did you have a chance to look at this again yet?
Hi @jackabald, are you still working on this?
hey @ShadowCurse , sorry haven't looked at this in a bit. I am having troubles finding why the build is failing. If you could take a look that would be great!
So the issue is in the absence of GuestAddress import in the src/vmm/src/arch/aarch64/fdt.rs. Basically you need to drop last commit that reverts addition of this import.
Also can you please rebase this PR on top of main and squash rest of your commits?
Hi @jackabald, I've gone ahead and fixed the small import issue, so we can go ahead with merging this. Thanks again for your contribution!