You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
HV: pause/resume/snapshot dispatch is VZ-only (correctness defect) #251
Pause, resume, and snapshot operations dispatch to VZ-specific code regardless of which backend is actually running the VM. HV-backed VMs either call Virtualization.framework APIs (unsound — no VZ VM object exists) or error out opaquely.
Affected call sites in virt/arcbox-vmm/src/vmm/mod.rs
pause() at line 552 — unconditionally calls pause_darwin_vm().
resume() at line 581 — unconditionally calls resume_darwin_vm().
capture_snapshot_context() at line 686 — dispatches to capture_snapshot_darwin() (VZ framework call in darwin.rs).
restore_from_snapshot_data() at line 732 — dispatches to restore_snapshot_darwin() (VZ framework call).
Impact
Correctness defect on the default macOS backend. Any pause/resume flow (desktop suspend-on-close, snapshot save, live migration) is broken for HV-backed VMs.
Fix
Branch on self.resolved_backend (or equivalent backend tag) in each of the four entry points.
Implement HV-side equivalents:
Pause: hv_vcpus_exit() to stop vCPU threads, drain in-flight virtio work via worker join, record the pause timestamp.
Resume: re-enter vCPU loop; virtqueue state is already in guest memory and resumes naturally.
Snapshot: for M1, return Err(Unsupported) with a clear message so callers can degrade gracefully. Full HV snapshot is a larger project (guest RAM serialize, device state capture) and should be its own issue.
Add unit tests that exercise each entry point with an HV backend tag and assert the right path is taken.
Files
virt/arcbox-vmm/src/vmm/mod.rs:552, 581, 686, 732
virt/arcbox-vmm/src/vmm/darwin_hv/mod.rs (new pause/resume logic)
Acceptance
All four entry points dispatch on backend.
HV pause + resume works end-to-end with a booted Linux guest (smoke test: ping before, pause 5s, resume, ping still works).
HV snapshot returns a clear Unsupported error (or lands a separate implementation tracked elsewhere).
Activity
linear commentedon Apr 17, 2026
ABX-360