Skip to content

fix(migtd-hash): reconstruct IGVM CFV pages by GPA - #1026

Open
haitaohuang wants to merge 1 commit into
intel:mainfrom
haitaohuang:user/hhuang/fix-igvm-cfv-gpa-reconstruction
Open

fix(migtd-hash): reconstruct IGVM CFV pages by GPA#1026
haitaohuang wants to merge 1 commit into
intel:mainfrom
haitaohuang:user/hhuang/fix-igvm-cfv-gpa-reconstruction

Conversation

@haitaohuang

Copy link
Copy Markdown
Contributor

Problem

The legacy IGVM configuration-volume extractor counts populated CFV pages, copies that many payload pages from the serialized IGVM stream, and pads the remainder with zeroes. This assumes payloads are serialized contiguously in GPA order.

That assumption was previously hidden because generated IGVMs happened to use that layout. With sparse or reordered page payloads, enrolled policy and issuer-chain files can be shifted or omitted from the reconstructed CFV, causing offline RTMR1/RTMR2 and TDINFO measurements to differ from runtime memory.

Fix

Parse IGVM PageData directives and place each payload at its declared guest physical address relative to the CFV base. Preserve sparse gaps and reject pages that extend past the configuration-volume range.

This fix is independent of the proposed one-hash TCB mapping work and applies directly to the existing migtd-hash IGVM measurement path.

Validation

  • cargo test -p migtd-hash
  • cargo fmt -- --check
  • cargo check
  • Intel library build and test suite
  • All 32 firmware build combinations
  • All six tool-package builds
  • Cargo deny advisories, sources, and bans
  • All 14 Integration (Emulation Mode) scenarios

The legacy extractor counted populated CFV pages, copied that many payload pages from the serialized IGVM stream, and appended zero padding. After IGVM payload ordering became sparse, this shifted or omitted enrolled policy files and produced offline RTMR values that did not match runtime memory.

The issue was previously hidden because generated IGVMs happened to serialize populated CFV pages contiguously in GPA order. Place each PageData payload at its declared GPA, preserve gaps, and reject pages extending beyond the configuration volume.

Assisted-by: GitHub Copilot CLI:GPT-5.6 Sol
Signed-off-by: Haitao Huang <haitaohuang@microsoft.com>
@haitaohuang
haitaohuang force-pushed the user/hhuang/fix-igvm-cfv-gpa-reconstruction branch from 6b4730c to b46293e Compare September 2, 2026 19:58
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