Skip to content
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

Cleaning up create_fdt #4712

Merged
merged 1 commit into from
Oct 9, 2024

Conversation

jackabald
Copy link
Contributor

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.

...

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

  • If a specific issue led to this PR, this PR closes the issue.
  • The description of changes is clear and encompassing.
  • Any required documentation changes (code and docs) are included in this
    PR.
  • API changes follow the Runbook for Firecracker API changes.
  • User-facing changes are mentioned in CHANGELOG.md.
  • All added/changed functionality is tested.
  • New TODOs link to an issue.
  • Commits meet
    contribution quality standards.

  • This functionality cannot be added in rust-vmm.

Copy link

codecov bot commented Jul 31, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

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%) ⬆️
5.10-m5n.metal 84.60% <ø> (ø)
5.10-m6a.metal 83.89% <ø> (ø)
5.10-m6g.metal 80.95% <100.00%> (+<0.01%) ⬆️
5.10-m6i.metal 84.59% <ø> (-0.01%) ⬇️
5.10-m7g.metal 80.95% <100.00%> (+<0.01%) ⬆️
6.1-c5n.metal 84.62% <ø> (ø)
6.1-m5n.metal 84.60% <ø> (ø)
6.1-m6a.metal 83.89% <ø> (-0.01%) ⬇️
6.1-m6g.metal 80.95% <100.00%> (+<0.01%) ⬆️
6.1-m6i.metal 84.60% <ø> (ø)
6.1-m7g.metal 80.95% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jackabald jackabald marked this pull request as draft July 31, 2024 06:44
@jackabald jackabald marked this pull request as ready for review July 31, 2024 17:35
@roypat
Copy link
Contributor

roypat commented Aug 2, 2024

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

@roypat roypat added the Status: Awaiting author Indicates that an issue or pull request requires author action label Aug 7, 2024
@roypat
Copy link
Contributor

roypat commented Aug 15, 2024

Hi @jackabald,
did you have a chance to look at this again yet?

@ShadowCurse
Copy link
Contributor

Hi @jackabald, are you still working on this?

@jackabald
Copy link
Contributor Author

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!

@ShadowCurse
Copy link
Contributor

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?

@roypat roypat force-pushed the fdt_guest_memory branch 2 times, most recently from 664c7c3 to fc6cfb3 Compare October 9, 2024 13:24
From: jackabald <[email protected]>

- removes writing to memory in create_fdt
- add functionality of writing to memory in configure_system
- uses previously unused return value of create_fdt to write fdt to
  memory

Signed-off-by: jackabald <[email protected]>
Signed-off-by: Patrick Roy <[email protected]>
@roypat
Copy link
Contributor

roypat commented Oct 9, 2024

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!

@roypat roypat added Status: Awaiting review Indicates that a pull request is ready to be reviewed and removed Status: Awaiting author Indicates that an issue or pull request requires author action labels Oct 9, 2024
@ShadowCurse ShadowCurse merged commit 36ecc4f into firecracker-microvm:main Oct 9, 2024
7 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Awaiting review Indicates that a pull request is ready to be reviewed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants