Skip to content

Conversation

@ValentaTomas
Copy link
Member

@ValentaTomas ValentaTomas commented Nov 15, 2025

To gain more control over memfile handling during snapshotting, we modify the snapshot logic to optionally skip dumping the memfile.

Also, we add info about the memory regions when requesting instance info, so we can copy the memory directly.

This is fully compatible with FC v1.10.

This PR is for viewing code changes only and won't be merged.


Note

Adds GET /memory and /memory/mappings APIs for resident/empty page bitmaps and region mappings, and makes snapshot memory dump optional via mem_file_path.

  • API:
    • Add GET /memory and GET /memory/mappings endpoints, parsing, and responses returning MemoryResponse (resident/empty bitmaps) and MemoryMappingsResponse.
    • Extend InstanceInfo with optional memory_regions; wire responses in ParsedRequest::convert_to_response.
    • Update Swagger (firecracker.yaml) with new paths and definitions.
  • VMM/VM:
    • Introduce GuestMemoryRegionMapping and methods to gather mappings and memory info using mincore and zero-page detection; validate uniform page size.
    • Make snapshot memfile optional: CreateSnapshotParams.mem_file_path: Option<PathBuf> and dump memory only when provided.
  • Security/Seccomp:
    • Allow mincore syscall in seccomp profiles (x86_64, aarch64).
  • Tests:
    • Add unit/integration tests for new endpoints (pre-boot unsupported, post-boot success) and snapshot changes; include a non-CI memory benchmark.
  • Tooling:
    • Add build/upload scripts, Makefile targets, .tool-versions; update .gitignore to include .env.

Written by Cursor Bugbot for commit 6c05dd5. This will update automatically on new commits. Configure here.

@ValentaTomas ValentaTomas added the wontfix This will not be worked on label Nov 15, 2025
@ValentaTomas ValentaTomas changed the title [v1.10] Expose memory mapping; Add optional memfile dump [v1.10] Expose memory mapping; Make memfile dump optional Nov 15, 2025
@ValentaTomas
Copy link
Member Author

We might also make the snapfile optional/return it as content instead.

@e2b-dev e2b-dev deleted a comment from cursor bot Dec 22, 2025
@jakubno
Copy link
Member

jakubno commented Dec 22, 2025

bugbot run

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.

3 participants