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

Clean up create_fdt #4707

Closed

Conversation

jackabald
Copy link
Contributor

Changes

removed std::Hash::HashBuilder
removed guest writing to guest memory in create_fdt
updated calls to create_fdt
...

Reason

#4700
I'm unsure how to run the fdt.rs tests. I also am not sure if this is exactly what you mean by letting callers write to guest memory. If you could please steer me in the right direction and help me test my code that would be amazing.

Thank you.
...

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.

  • [x ] This functionality cannot be added in rust-vmm.

@roypat
Copy link
Contributor

roypat commented Jul 29, 2024

I'm unsure how to run the fdt.rs tests. I also am not sure if this is exactly what you mean by letting callers write to guest memory. If you could please steer me in the right direction and help me test my code that would be amazing.

I meant that the call to guest_mem.write_slice(fdt_final.as_slice(), fdt_address)?; should happen inside configure_system instead of create_fdt (as configure system is the only caller of create_fdt outside of test code). Then, create_fdt will not need a GuestMemoryMmap parameter at all, too.

For testing, you can rely on our CI if you don't have an ARM machine lying around. For compile-testing and linting, you can use cargo [check|clippy] --target aarch64-unknown-linux-gnu after you've installed the correct target (i think rustup target add aarch64-unknown-linux-gnu should be the command). You can also run the style checks locally with ./tools/devtool checkstyle.

@roypat roypat added the Status: Awaiting author Indicates that an issue or pull request requires author action label Jul 29, 2024
@roypat roypat linked an issue Jul 29, 2024 that may be closed by this pull request
@jackabald jackabald marked this pull request as ready for review July 29, 2024 15:54
@jackabald jackabald closed this Jul 29, 2024
@jackabald
Copy link
Contributor Author

@roypat
Thank you for the help!
I've closed this pull request and will open a new one with updates once I have it completed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Awaiting author Indicates that an issue or pull request requires author action
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Clean up create_fdt function in src/vmm/src/arch/aarch64/fdt.rs
2 participants