Skip to content

Commit a65dad3

Browse files
SashaMITcursoragent
andcommitted
docs(vz-backend): Phase 0 scope confirmation — FFI choice, coverage, pitfalls
Deliverable of Phase 0 in docs/vz-backend/PLAN.md. Desk-research only; no production code. Adheres to the Linux-untouched gate. The new PHASE_0_SCOPE.md answers all six gate-questions explicitly: A. FFI strategy: objc2-virtualization 0.3.2 (madsmtm; full coverage of every Vz class the runtime needs, Zlib/Apache-2.0/MIT license, 5340 dl/90d, part of the canonical objc2 ecosystem). Fallback: arcbox-vz 0.1.6. B. Vz feature-coverage table. Every device class elastos-crosvm uses has a Vz equivalent. Two real deltas surfaced: Vz exposes the kernel console only as virtio-console (guest sees /dev/hvc0, not ttyS0); Vz vsock has no public CID API (host connects via the per-VM VZVirtioSocketDevice). Both accommodate via cfg-gated additive code — no Linux behaviour change. C. Kernel-config audit. The shipped linux-amd64 vmlinux is 6.1.59 with VIRTIO_CONSOLE; expected to work on Vz with two boot-arg adjustments. linux-arm64 uses a host-kernel-copy strategy and has no content-addressed artifact today — Phase 2 prototypes with a known-good Ubuntu cloud arm64 kernel; Phase 6 ships its own. D. Tart + Lima study. 10 non-obvious pitfalls captured with file:line citations: disk caching mode (UTM #4840), persisted machine identifier, console=hvc0, multi-port virtio-console needs macOS 12+, no CID vsock API, initrd compression (LZ4 ok, zstd may fail), file-backed console rotation, vmnet NAT subnet conflict, async start + state delegate, Grand Central Dispatch queue per provider. E. Risk register delta applied to PLAN.md: one Medium→Low reclassify (vsock semantic delta — now bounded), three new rows (arm64 vmlinux artifact, initrd compression, vm_provider.rs AF_VSOCK adaptation). F. Honest unknowns: CONFIG_VIRTIO_VSOCKETS in our 6.1.59 kernel (almost certainly yes — runtime uses AF_VSOCK today), 6.1.59 + VZGenericPlatformConfiguration boot cleanliness, boot-latency target (target ≤ 3× Linux baseline). G. Recommendation: Go. Proceed to Phase 1. Appendix: 50-line feature-check binary deferred to Phase 1 day-1 per the 10/10 prompt (requires the build environment Phase 1 sets up). No code changes. No Linux behaviour change. PLAN.md update is a risk-register delta only. Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent bb47668 commit a65dad3

2 files changed

Lines changed: 305 additions & 1 deletion

File tree

0 commit comments

Comments
 (0)