Skip to content

[v1.14] Expose memory mapping & dirty pages; Make memfile dump optional#8

Draft
bchalios wants to merge 4 commits intofirecracker-v1.14from
firecracker-v1.14-direct-mem
Draft

[v1.14] Expose memory mapping & dirty pages; Make memfile dump optional#8
bchalios wants to merge 4 commits intofirecracker-v1.14from
firecracker-v1.14-direct-mem

Conversation

@bchalios
Copy link

@bchalios bchalios commented Feb 5, 2026

WIP

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.

Babis Chalios added 2 commits February 5, 2026 11:04
Add a few APIs to get information about guest memory:

* An endpoint for guest memory mappings (guest physical to host
  virtual).
* An endpoint for resident and empty pages.
* An endpoint for dirty pages.

Signed-off-by: Babis Chalios <babis.chalios@e2b.dev>
There are cases where a user might want to snapshot the memoyr of a VM
externally. In these cases, we can ask Firecracker to avoid serializing
the memory file to disk when we create a snapshot.

Signed-off-by: Babis Chalios <babis.chalios@e2b.dev>
@bchalios bchalios marked this pull request as draft February 5, 2026 19:16
@ValentaTomas ValentaTomas added the wontfix This will not be worked on label Feb 5, 2026
Implement API /memory/mappings which returns the memory mappings of
guest physical to host virtual memory.

Signed-off-by: Babis Chalios <babis.chalios@e2b.dev>
@bchalios bchalios force-pushed the firecracker-v1.14-direct-mem branch from 88151c3 to 89538bc Compare February 5, 2026 20:20
Implement API /memory which returns two bitmaps: resident and empty.
`resident` tracks whether a guest page is in the resident set and `empty`
tracks whether it's actually all 0s.

Both bitmaps are structures as vectors of u64, so their length is:
total_number_of_pages.div_ceil(64).

Pages are ordered in the order of pages as reported by/memory/mappings.

Signed-off-by: Babis Chalios <babis.chalios@e2b.dev>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

wontfix This will not be worked on

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants