Skip to content

feat(state): add reversible execution and memory generations - #121

Open
appcypher wants to merge 1 commit into
krunfrom
appcypher/reversible-execution-memory-state
Open

feat(state): add reversible execution and memory generations#121
appcypher wants to merge 1 commit into
krunfrom
appcypher/reversible-execution-memory-state

Conversation

@appcypher

Copy link
Copy Markdown
Member

TL;DR

Add reversible, generation-scoped execution control and full or incremental guest-memory state capture across KVM, HVF, and WHP.

Description

  • expose typed pause tokens that bind execution, memory access, and captured state to one pause generation
  • capture and restore versioned architecture-specific vCPU and VM execution envelopes
  • capture complete memory generations and retained-baseline deltas with explicit dirty-coverage confirmation and safe full fallback
  • freeze device memory access before final dirty capture so asynchronous device writes cannot escape the generation boundary
  • preserve sparse ranges and stream eager restore without requiring an in-memory copy of the guest address space
  • make pause and resume reversible across all supported hypervisor backends, with explicit stale-token and invalid-transition errors

Test Plan

  • cargo fmt --all -- --check
  • cargo test --locked --offline -p msb_krun -p msb_krun_vmm -p msb_krun_devices --lib (144 passed)
  • Live macOS ARM64/HVF: repeated pause/resume, full capture, retained-baseline incremental capture, restore, and event-driven running-state observation
  • Live Linux x86_64/KVM: repeated pause/resume, full capture, sparse dirty generation, restore, and invalid-transition rejection

Add generation-scoped pause and resume barriers with bounded execution-state
capture and restore for the qualified KVM, HVF, and WHP backends.

Introduce request-scoped memory access epochs that drain host virtio writers,
combine backend and host dirty coverage, and stream complete or retained-
baseline incremental memory generations with explicit publish and abandon
semantics.

Expose eager construction restore and an event-driven Running wait through
VmControl, including conservative transition publication and safe complete-
capture fallback when dirty coverage cannot be trusted.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant