Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[feature/virtio-mem] basic snapshot/restore + metrics #5406

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

Open
Manciukic wants to merge 6 commits into firecracker-microvm:feature/virtio-mem
base: feature/virtio-mem
Choose a base branch
Loading
from Manciukic:virtio-mem/snapshot-restore

Conversation

Copy link
Contributor

@Manciukic Manciukic commented Aug 26, 2025
edited
Loading

Changes

This PR implements basic snapshot restore functionality for virtio-mem device.

It also addresses a few nits from the previous PR.

And also adds basic metric support for the device.

Reason

Support snapshot/restore and metrics for this device.

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

  • I have read and understand CONTRIBUTING.md.
  • I have run tools/devtool checkbuild --all to verify that the PR passes
    build checks on all supported architectures.
  • I have run tools/devtool checkstyle to verify that the PR passes the
    automated style checks.
  • I have described what is done in these changes, why they are needed, and
    how they are solving the problem in a clear and encompassing way.
  • I have updated any relevant documentation (both in code and in the docs)
    in the PR.
  • I have mentioned all user-facing changes in CHANGELOG.md.
  • If a specific issue led to this PR, this PR closes the issue.
  • When making API changes, I have followed the
    Runbook for Firecracker API changes.
  • I have tested all new and changed functionalities in unit tests and/or
    integration tests.
  • I have linked an issue to every new TODO.

  • This functionality cannot be added in rust-vmm.

Avoid multiple conversions back and forth from MiB to bytes by just
storing as MiB.
Signed-off-by: Riccardo Mancini <mancio@amazon.com>
We should match the exact reason for the RuntimeError to ensure we're
failing for what we're expecting.
Signed-off-by: Riccardo Mancini <mancio@amazon.com>
It's better to be explicit on the conversion we're doing as u64 to usize
is always safe in our platforms.
Signed-off-by: Riccardo Mancini <mancio@amazon.com>
This type annotation is redoundant, so we can remove it.
Signed-off-by: Riccardo Mancini <mancio@amazon.com>
@Manciukic Manciukic force-pushed the virtio-mem/snapshot-restore branch from c77404f to c22249e Compare August 26, 2025 14:13
@Manciukic Manciukic changed the title (削除) [feature/virtio-mem] basic snapshot/restore (削除ここまで) (追記) [feature/virtio-mem] basic snapshot/restore + metrics (追記ここまで) Aug 26, 2025
Copy link

codecov bot commented Aug 26, 2025
edited
Loading

Codecov Report

❌ Patch coverage is 97.20280% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 83.18%. Comparing base (2798deb) to head (7c86819).

Files with missing lines Patch % Lines
src/vmm/src/devices/virtio/mem/device.rs 70.00% 3 Missing ⚠️
src/vmm/src/devices/virtio/mem/persist.rs 97.56% 1 Missing ⚠️
Additional details and impacted files
@@ Coverage Diff @@
## feature/virtio-mem #5406 +/- ##
======================================================
+ Coverage 83.12% 83.18% +0.06% 
======================================================
 Files 270 272 +2 
 Lines 30875 31009 +134 
======================================================
+ Hits 25666 25796 +130 
- Misses 5209 5213 +4 
Flag Coverage Δ
5.10-c5n.metal 83.24% <97.20%> (+0.06%) ⬆️
5.10-m5n.metal 83.24% <97.20%> (+0.06%) ⬆️
5.10-m6a.metal 82.55% <97.20%> (+0.06%) ⬆️
5.10-m6g.metal 79.95% <97.20%> (+0.08%) ⬆️
5.10-m6i.metal 83.23% <97.20%> (+0.06%) ⬆️
5.10-m7a.metal-48xl 82.54% <97.20%> (+0.06%) ⬆️
5.10-m7g.metal 79.95% <97.20%> (+0.08%) ⬆️
5.10-m7i.metal-24xl 83.20% <97.20%> (+0.06%) ⬆️
5.10-m7i.metal-48xl 83.20% <97.20%> (+0.06%) ⬆️
5.10-m8g.metal-24xl 79.94% <97.20%> (+0.08%) ⬆️
5.10-m8g.metal-48xl 79.94% <97.20%> (+0.08%) ⬆️
6.1-c5n.metal 83.28% <97.20%> (+0.06%) ⬆️
6.1-m5n.metal 83.28% <97.20%> (+0.06%) ⬆️
6.1-m6a.metal 82.60% <97.20%> (+0.07%) ⬆️
6.1-m6g.metal 79.95% <97.20%> (+0.08%) ⬆️
6.1-m6i.metal 83.27% <97.20%> (+0.06%) ⬆️
6.1-m7a.metal-48xl 82.59% <97.20%> (+0.06%) ⬆️
6.1-m7g.metal 79.95% <97.20%> (+0.08%) ⬆️
6.1-m7i.metal-24xl 83.29% <97.20%> (+0.06%) ⬆️
6.1-m7i.metal-48xl 83.29% <97.20%> (+0.06%) ⬆️
6.1-m8g.metal-24xl 79.94% <97.20%> (+0.08%) ⬆️
6.1-m8g.metal-48xl 79.94% <97.20%> (+0.08%) ⬆️

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.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Manciukic Manciukic force-pushed the virtio-mem/snapshot-restore branch from c22249e to 06d462e Compare August 26, 2025 14:22
Implements basic snapshot/restore functionality for the dummy virtio-mem
device.
Signed-off-by: Riccardo Mancini <mancio@amazon.com>
Wire support for virtio-mem metrics, adding a few basic metrics: queue
events, queue event fails, activation fails.
Signed-off-by: Riccardo Mancini <mancio@amazon.com>
@Manciukic Manciukic force-pushed the virtio-mem/snapshot-restore branch from 06d462e to 7c86819 Compare August 26, 2025 15:57
@Manciukic Manciukic marked this pull request as ready for review August 26, 2025 16:54
@Manciukic Manciukic added the Status: Awaiting review Indicates that a pull request is ready to be reviewed label Aug 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
Status: Awaiting review Indicates that a pull request is ready to be reviewed
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

1 participant

AltStyle によって変換されたページ (->オリジナル) /