Skip to content

fix(tee-simulator): generate ACPI event digests - #1056

Merged
kvinwang merged 2 commits into
nextfrom
fix/lite-tdx-acpi-generator
Aug 14, 2026
Merged

fix(tee-simulator): generate ACPI event digests#1056
kvinwang merged 2 commits into
nextfrom
fix/lite-tdx-acpi-generator

Conversation

@kvinwang

Copy link
Copy Markdown
Collaborator

Summary

  • generate the lite-TDX ACPI loader, RSDP, and tables digests from the configured VM measurement
  • patch the simulator CCEL before calculating RTMR values and publishing it to the guest
  • add a regression test that compares CCEL ACPI events with the generated digests

Why

The simulator combined the current vm_config with stale ACPI digests from its bundled CCEL fixture after #1053. This produced internally inconsistent simulated evidence that the verifier correctly rejected.

Testing

  • cargo fmt --manifest-path dstack/Cargo.toml --all --check
  • cargo test --manifest-path dstack/Cargo.toml -p dstack-tee-simulator
  • lite-TDX attestation Docker e2e (is_valid, quote, event log, OS image hash, and ACPI tables all verified)

Copilot AI lite review requested due to automatic review settings August 14, 2026 05:44

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes the TDX tee-simulator’s simulated evidence consistency by regenerating the ACPI-related RTMR0 digests from the configured VM measurement and patching the CCEL fixture accordingly before replaying RTMRs and emitting the CCEL to the guest.

Changes:

  • Add ccel_for_config() to patch the bundled CCEL fixture’s ACPI event digests to match expected_rtmr0_acpi_hashes() derived from vm_config.
  • Ensure RTMR replay/quote generation uses the patched CCEL when a measurement document is provided.
  • Add a regression test asserting the CCEL ACPI event digests match the generated expected digests.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread dstack/tee-simulator/src/tdx.rs
Comment thread dstack/tee-simulator/src/tdx.rs Outdated
@kvinwang
kvinwang merged commit 542d3d4 into next Aug 14, 2026
15 checks passed
@kvinwang
kvinwang deleted the fix/lite-tdx-acpi-generator branch August 14, 2026 10:26
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.

2 participants