microsoft / microsoft/openvmm

Support lazy WHP GPA registration for eligible restored memory

Open
#4,447 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
1.9k
Forks
238
Avg merge
1d 15h
Merged PRs (30d)
100

Description

Tracking issue: MicroVM support and private snapshot restore.

Motivation

Eagerly registering all restored guest-physical memory with WHP can place work on
the startup path before the guest accesses those ranges. Deferring registration
for eligible memory may reduce initial restore cost, but it must preserve mapping
permissions, private-memory isolation, and correct first-access behavior.

Proposed Scope

  • Define which restored GPA ranges are eligible for deferred WHP registration.
  • Register eligible ranges on demand through the supported memory-access path,
    handling concurrent or repeated accesses consistently.
  • Preserve permissions, backing lifetimes, and private copy-on-write semantics.
  • Keep ineligible ranges on the eager path and provide a correct non-lazy mode.
  • Handle registration failures and VM teardown without stale mappings or partially
    published registration state.
  • Measure registration and first-touch work separately from overall restore time.

Acceptance Criteria

  • Eager and lazy modes expose equivalent guest memory contents, permissions,
    and isolation for supported configurations.
  • Tests cover first access, repeated access, concurrent VP access, and teardown
    of both touched and untouched eligible ranges.
  • Ineligible memory uses the documented eager path; unsupported configurations
    do not silently lose mappings or access protections.
  • Registration failure produces a bounded error and releases affected state
    without continuing guest execution with an invalid mapping.
  • WHP VMM tests exercise restored and expanded private memory with lazy mode
    enabled and disabled.
  • Measurements distinguish lower initial latency from work deferred to guest
    execution; other hypervisor backends retain their behavior.

Dependencies

Non-Goals

This is an optional WHP optimization, not a prerequisite for functional private
restore, a general demand-paging service, or a change to other backends.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with 00-microvm.md and dependency issue 4446 to understand the restore-memory range and target contract. Then locate the WHP VMM restored-memory path and its tests; done means lazy and eager modes meet every listed acceptance criterion without changing other hypervisor backends.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
operating-systems
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
32/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.