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

fix: power off vcpus only during startup #4567

Merged
merged 1 commit into from
Apr 26, 2024

Conversation

ShadowCurse
Copy link
Contributor

Changes

Do not power off vcpus during snapshot restore.

Reason

Vcpus should be in power off state during kernel boot, but during snapshot restore we do not need to power them off even thought kvm does not complain.

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 added Status: Awaiting review Indicates that a pull request is ready to be reviewed Type: Fix Indicates a fix to existing code labels Apr 19, 2024
@ShadowCurse ShadowCurse self-assigned this Apr 19, 2024
Copy link

codecov bot commented Apr 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 82.13%. Comparing base (8859726) to head (274a659).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4567      +/-   ##
==========================================
- Coverage   82.14%   82.13%   -0.01%     
==========================================
  Files         255      255              
  Lines       31278    31274       -4     
==========================================
- Hits        25692    25688       -4     
  Misses       5586     5586              
Flag Coverage Δ
4.14-c5n.metal 79.63% <ø> (ø)
4.14-c7g.metal ?
4.14-m5n.metal 79.62% <ø> (-0.01%) ⬇️
4.14-m6a.metal 78.84% <ø> (+<0.01%) ⬆️
4.14-m6g.metal 76.69% <100.00%> (-0.01%) ⬇️
4.14-m6i.metal 79.62% <ø> (ø)
4.14-m7g.metal 76.69% <100.00%> (?)
5.10-c5n.metal 82.15% <ø> (?)
5.10-m5n.metal 82.13% <ø> (?)
5.10-m6a.metal 81.44% <ø> (?)
5.10-m6g.metal 79.46% <100.00%> (?)
5.10-m6i.metal 82.13% <ø> (?)
5.10-m7g.metal 79.46% <100.00%> (?)
6.1-c5n.metal 82.14% <ø> (-0.01%) ⬇️
6.1-m5n.metal 82.14% <ø> (ø)
6.1-m6a.metal 81.45% <ø> (+<0.01%) ⬆️
6.1-m6g.metal 79.46% <100.00%> (+<0.01%) ⬆️
6.1-m6i.metal 82.13% <ø> (+<0.01%) ⬆️
6.1-m7g.metal 79.46% <100.00%> (?)

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 force-pushed the vcpu_power branch 5 times, most recently from f48b03c to 7b1e567 Compare April 23, 2024 15:48
bchalios
bchalios previously approved these changes Apr 25, 2024
Vcpus should be in power off state during kernel boot,
but during snapshot restore we do not need to power them off
even thought kvm does not complain. To do this we stop applying
the `KVM_ARM_VCPU_POWER_OFF` to the `kvi` during restore.
Also if we need to store `kvi` in the state, do this before adding
`KVM_ARM_VCPU_POWER_OFF` to it, so that during restore `kvi`
will not have `KVM_ARM_VCPU_POWER_OFF` set.

Signed-off-by: Egor Lazarchuk <yegorlz@amazon.co.uk>
@ShadowCurse ShadowCurse merged commit 59e6520 into firecracker-microvm:main Apr 26, 2024
7 checks passed
@ShadowCurse ShadowCurse deleted the vcpu_power branch April 26, 2024 13:51
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 Type: Fix Indicates a fix to existing code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants