Skip to content

nvx-rs: replace activation RPC delivery with an uncaptured VMM configuration region #544

Description

Parent: #535. Phase 8 (delivery refinement). Depends on the functional authenticated RPC path #542 and full mapped/networked template proof #543. Follow the proposed replaceable configuration region, but do not substitute region design work for a working restore. This issue also tracks the separate OpenVMM implementation and exact source pin: the existing command-line token alone does not allocate a region, exclude it from captured RAM or implement the payload contract.

Goal

Replace only the small activation payload's delivery with a bounded, versioned region populated by OpenVMM outside captured RAM on cold launch and platform restore. Keep the same validated semantic configuration, authenticated host/guest identities, runtime transports and bidirectional credit-based exec behavior proven in earlier phases. Do not put tenant settings, mapped host paths, or an active control session into the reusable snapshot.

Contract

  • Define immutable platform/header invariants and independently replaceable image-binding and per-sandbox sections: versions, lengths, generation/config identity, expected HostMap count (including zero), selected image role (distro for direct-image cold boot or the sole image0 for a template), guest network/DNS and proxy. The region cannot select another slot or change the captured slot topology. OpenVMM allocates and maps the bounded region outside captured RAM (including guest memory-map and memory.bin exclusion), fills/validates per-launch sections before vCPU resume and versions the template machine contract. Put the new region ABI in the immutable template compatibility key.
  • The host authenticates and validates the selected configuration, and OpenVMM validates and installs its region sections plus the VMM network policy before any restored vCPU executes. Only after resume can the guest check version, bounds, invariants and accepted identity before mounts/network/Ready; the host checks its echo before reporting Ready/allowing exec. Do not claim the guest consumed a section before any vCPU ran. A checksum detects corruption but is not authorization: preserve authenticated host control and enforce the VMM policy independently of guest cooperation.
  • Continue delivering nonempty potentially large HostMap tables in bounded ordered batches on the authenticated control channel; the region carries their expected count, not host-file contents. Public NVXC and other adapters keep their own application framing.
  • Retire the interim activation RPC only when both cold and restored new-profile launches use the region, have identical observable behavior, and report Ready with the selected identity. Unsupported region/version, stale generation, changed image/policy or partial application fails closed; explicitly supported old NVXC v1 bundles keep their pinned contract, with no silent downgrade.
  • Keep the region inaccessible to workloads. No device hotplug and no workload-after-exec snapshots are added.

Acceptance

  • Cold and restored boots with zero/one/many mappings and different image/network/proxy policies have the same outcomes as the prior RPC profile.
  • Tests cover bounds, unknown versions, truncated/mismatched sections, replayed identity/generation, an invalid image role or old four-slot contract, corruption, authentication failure, inaccessible-to-workload property and VMM enforcement before vCPU resume.
  • A real restored VM proves tenant settings and region pages do not reside in captured RAM/memory.bin, guest bounds and workload isolation hold, and an old snapshot does not silently accept the new region contract. Record and test the reviewed OpenVMM PR/source pin separately from the NVX adapter.
  • Compare source-matched RPC and region boot-to-Ready timings with identical resources; no latency improvement is claimed from a skipped map batch, guest step or policy check.

Activity

  1. ppenna commented on Oct 15, 2026

    @ppenna
    Contributor

    #529 replaced doc/design/ with the architecture guide and dropped the proposed designs, so this issue's link to the proposed replaceable configuration region now returns 404 on dev. The proposal is still available at the last dev commit before that change: Replaceable configuration region (Proposed).

    The architecture guide describes only the current design. For the configuration and control paths that the region would replace, see 2.1.2 Configuration Ownership and 4.4 Host-Guest Control Interface.

  2. esaurez commented on Oct 16, 2026

    @esaurez
    ContributorAuthor

    Scope change. Deliver platform-clone activation in the restore packet first, and build a configuration region only if measurements show that the packet is too costly:

    • A version-5 restore packet adds a flag and a length-prefixed, bounded activation record that the launcher supplies. OpenVMM treats the record as opaque bytes and seals it with the packet's other fields before the first restored vCPU runs. The record carries no secrets: secrets and nonempty HostMap tables stay on the authenticated control channel.
    • nvx-rs: prove cross-image platform restore with pre-ready activation RPC #542's activation RPC remains the first milestone, and the restore-packet record replaces it. This changes only the restore-side delivery; cold-boot delivery stays with nvx-rs: provide a standalone image-backed sandbox cold-start path #541.
    • A region is added only if the measurements below justify it, and then through an architecture-guide change.

    Where the guest reads the packet (from the #550 review). In #550, the guest decodes the restore packet in nvx::guest::time with RestorePacket::parse_header and parse_body, and repair_restore reads it under the port-B lock, four bytes per port exit. A record would be decoded there and returned to PID 1 by the library call that #539 tracks (comment), with no extra process or file. Its cost grows by one exit per four bytes (guide 3.1.1).

    • Agree an activation-delivery budget for the slowest backend.
    • Measure, source-matched and interleaved on KVM, MSHV and WHP, with p50 and p95:
    • Keep the restore packet if the expected record fits the budget on every backend. Build the region only if it does not, or if the record must outgrow the small records that the byte channel is meant for.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions