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

refactor: simplify get_msr_chunks #4649

Merged
merged 1 commit into from
Jul 2, 2024

Conversation

ShadowCurse
Copy link
Contributor

Changes

Move logic to create single msr chunk into separate function. Also use iterators for msr indexes to remove some unneeded allocations.

Reason

Minor simplification and removal of unneeded allocations.

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.

@ShadowCurse ShadowCurse force-pushed the get_msr_update branch 2 times, most recently from 7bb3170 to 0524244 Compare June 20, 2024 15:48
Copy link

codecov bot commented Jun 20, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 82.08%. Comparing base (6d6caf4) to head (36d709c).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4649   +/-   ##
=======================================
  Coverage   82.08%   82.08%           
=======================================
  Files         255      255           
  Lines       31257    31267   +10     
=======================================
+ Hits        25656    25666   +10     
  Misses       5601     5601           
Flag Coverage Δ
4.14-c5n.metal 79.58% <100.00%> (+<0.01%) ⬆️
4.14-m5n.metal 79.56% <100.00%> (+<0.01%) ⬆️
4.14-m6a.metal 78.78% <100.00%> (+<0.01%) ⬆️
4.14-m6g.metal 76.60% <ø> (ø)
4.14-m6i.metal 79.55% <100.00%> (+<0.01%) ⬆️
4.14-m7g.metal 76.60% <ø> (ø)
5.10-c5n.metal 82.09% <100.00%> (+<0.01%) ⬆️
5.10-m5n.metal 82.08% <100.00%> (+<0.01%) ⬆️
5.10-m6a.metal 81.38% <100.00%> (-0.01%) ⬇️
5.10-m6g.metal 79.37% <ø> (ø)
5.10-m6i.metal 82.08% <100.00%> (+<0.01%) ⬆️
5.10-m7g.metal 79.37% <ø> (ø)
6.1-c5n.metal 82.09% <100.00%> (+<0.01%) ⬆️
6.1-m5n.metal 82.08% <100.00%> (+<0.01%) ⬆️
6.1-m6a.metal 81.38% <100.00%> (-0.01%) ⬇️
6.1-m6g.metal 79.36% <ø> (-0.01%) ⬇️
6.1-m6i.metal 82.07% <100.00%> (+<0.01%) ⬆️
6.1-m7g.metal 79.36% <ø> (-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.

@ShadowCurse ShadowCurse self-assigned this Jun 20, 2024
@ShadowCurse ShadowCurse added the Status: Awaiting review Indicates that a pull request is ready to be reviewed label Jun 20, 2024
@ShadowCurse ShadowCurse force-pushed the get_msr_update branch 2 times, most recently from 32c3828 to 50630ea Compare June 24, 2024 12:56
@ShadowCurse ShadowCurse force-pushed the get_msr_update branch 2 times, most recently from 99806e5 to aea2b6b Compare June 25, 2024 20:25
src/vmm/src/vstate/vcpu/x86_64.rs Show resolved Hide resolved
src/vmm/src/vstate/vcpu/x86_64.rs Outdated Show resolved Hide resolved
@ShadowCurse ShadowCurse force-pushed the get_msr_update branch 2 times, most recently from 4e0605d to 54a910e Compare July 2, 2024 09:03
Move logic to create single msr chunk into separate function.
Also use iterators for msr indexes to remove some unneeded
allocations.

Signed-off-by: Egor Lazarchuk <[email protected]>
@ShadowCurse ShadowCurse merged commit f03d083 into firecracker-microvm:main Jul 2, 2024
7 checks passed
@ShadowCurse ShadowCurse deleted the get_msr_update branch July 2, 2024 12:44
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.

None yet

3 participants