mirror of
https://github.com/kvcache-ai/firecracker.git
synced 2026-11-05 01:17:43 +00:00
[PR #18] [MERGED] feat: add KVM pre-fault memory API #18
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
kvcache-ai/firecracker#18
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/kvcache-ai/firecracker/pull/18
Author: @Hygge-Gezelligheid
Created: 8/12/2026
Status: ✅ Merged
Merged: 8/20/2026
Merged by: @huang-jl
Base:
v1.15.1-patch← Head:agent/kvm-pre-fault-memory📝 Commits (4)
715f08ffeat: add KVM pre-fault memory APIb1d095erefactor: streamline pre-fault memory handlingbde1d09fix: reject hotpluggable pre-fault rangesd1319a6fix: gate pre-fault memory on KVM capability📊 Changes
13 files changed (+1241 additions, -4 deletions)
View changed files
📝
CHANGELOG.md(+5 -0)📝
resources/seccomp/aarch64-unknown-linux-musl.json(+31 -0)📝
resources/seccomp/x86_64-unknown-linux-musl.json(+31 -0)📝
src/firecracker/src/api_server/parsed_request.rs(+76 -0)📝
src/firecracker/src/api_server/request/mod.rs(+1 -0)➕
src/firecracker/src/api_server/request/prefault.rs(+14 -0)📝
src/firecracker/swagger/firecracker.yaml(+60 -0)📝
src/vmm/src/lib.rs(+81 -1)📝
src/vmm/src/rpc_interface.rs(+36 -1)📝
src/vmm/src/vstate/mod.rs(+2 -0)➕
src/vmm/src/vstate/prefault.rs(+602 -0)📝
src/vmm/src/vstate/vcpu.rs(+39 -2)📝
src/vmm/tests/integration_tests.rs(+263 -0)📄 Description
Changes
PUT /vm/pre-fault-memoryAPI accepting guest-physical address and length ranges.u64arithmetic, and full coverage by plugged KVM memory slots.KVM_PRE_FAULT_MEMORYconcurrently.KVM_CAP_PRE_FAULT_MEMORYon x86_64 and report aarch64 as unsupported.Reason
This provides the Firecracker-side pre-fault primitive needed by kvcache-ai/AgentENV#125. AgentENV can later use recorded working-set ranges to establish KVM mappings before resuming a snapshot-backed microVM.
The API does not change normal boot, resume, or snapshot behavior unless explicitly called.
Validation
./tools/devtool checkbuild --all: passed for x86_64 and aarch64../tools/devtool build --release: passed; static PIE release binary.git diff --check, seccomp JSON parsing, and Swagger YAML parsing passed../tools/devtool checkstyleis not fully green because this fork lacksorigin/mainfor gitlint and contains existing whole-repository Rust, Python, and Markdown style failures in unchanged files. The new files and changelog entry were formatted independently; unrelated baseline files were not modified.License Acceptance
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
PR Checklist
CONTRIBUTING.md.tools/devtool checkbuild --all.tools/devtool checkstylesuccessfully (documented baseline failures above).CHANGELOG.md.rust-vmmbecause it requires Firecracker API, lifecycle, vCPU coordination, and seccomp integration.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.