Integrate private copy-on-write mappings with guest memory backing
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 1.9k
- Forks
- 238
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 100
Description
Tracking issue: MicroVM support and private snapshot restore.
Motivation
Multiple VMs should be able to start from the same immutable RAM image while keeping
their writes private. A host mapping primitive alone is insufficient: guest memory
backing must consume it correctly and expose the accounting needed to understand
faults and private-memory behavior.
Proposed Scope
- Add private copy-on-write file views to
sparse_mmapon the supported hosts. - Integrate those views into
membacking, including ownership, lifetime, and fault
accounting. - Validate mapping offsets, lengths, alignment, and address arithmetic before
creating or exposing guest memory. - Keep the host primitive and its working memory-backing consumer in one PR.
- Define errors and capability limits without silently changing private mappings
into writable shared mappings.
Acceptance Criteria
- Two private views initially observe the file contents, but writes to one
view do not modify the file or the other view. - A guest-memory-backing test exercises the private mapping through its actual
consumer, not only the low-level mapping API. - Invalid ranges and mapping failures return errors without leaked mappings or
partially exposed guest memory. - Fault accounting follows the documented meaning and does not mix private and
shared mapping modes. - Supported Windows and Linux paths have focused coverage, with unsupported
combinations reported explicitly.
Dependencies
No feature prerequisites. Snapshot publication and restore will consume this
memory capability in a separate PR.
Non-Goals
This issue does not define a snapshot manifest, capture transaction, restore-memory
expansion policy, or lazy hypervisor registration.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the sparse_mmap and membacking components, then trace the existing host mapping consumer and supported Windows and Linux paths. Use the listed acceptance criteria to define completion: private views must isolate writes, validate ranges, clean up failures, and report fault accounting and unsupported combinations explicitly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- operating-systems
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100