Skip to content

Conversation

mingweishih
Copy link
Contributor

@mingweishih mingweishih commented Sep 4, 2025

This PR enables end-to-end testing of the attestation flow (the initialize_platform_security function) in the Rust unit test framework. The summary of the changes is:

  • Make changes that allows for enabling the test of initialize_platform_security against test GED.
  • Fix/improve the bug in the attestation module found by the tests
  • Improve the logging
  • Update the test igvm agent in the test GED to be more flexible on supporting different test scenarios.
  • Add basic test cases for initialize_platform_security. More can be added in the follow-up PRs.

Signed-off-by: Ming-Wei Shih <[email protected]>
x
Signed-off-by: Ming-Wei Shih <[email protected]>
Signed-off-by: Ming-Wei Shih <[email protected]>
Signed-off-by: Ming-Wei Shih <[email protected]>
@mingweishih mingweishih marked this pull request as ready for review September 4, 2025 23:43
@Copilot Copilot AI review requested due to automatic review settings September 4, 2025 23:43
@mingweishih mingweishih requested review from a team as code owners September 4, 2025 23:43
Copy link
Contributor

@Copilot Copilot AI left a comment

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 enables end-to-end testing of the attestation flow in the OpenVMM project by making comprehensive changes to the testing infrastructure and fixing issues discovered during testing. The changes focus on allowing thorough testing of the initialize_platform_security function against test GED (Guest Emulation Device) implementations.

Key changes include:

  • Refactored the test IGVM agent to support scripted responses for different test scenarios
  • Enhanced the guest emulation transport test utilities to support guest memory and IGVM agent scripting
  • Fixed error handling in the attestation module for hardware key protector operations
  • Added comprehensive unit tests for the attestation flow covering various scenarios

Reviewed Changes

Copilot reviewed 15 out of 16 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
vm/devices/storage/disk_get_vmgs/src/lib.rs Updated test calls to include new parameters for guest memory and IGVM agent script
vm/devices/get/guest_emulation_transport/src/lib.rs Added support for guest memory and IGVM agent script parameters in test utilities
vm/devices/get/guest_emulation_transport/Cargo.toml Added guestmem dependency and enabled test_utilities feature for guest_emulation_device
vm/devices/get/guest_emulation_device/src/test_utilities.rs Enhanced test utilities to support guest memory and IGVM agent script configuration
vm/devices/get/guest_emulation_device/src/test_igvm_agent.rs Complete refactor from state machine to script-based approach for more flexible testing
vm/devices/get/guest_emulation_device/src/lib.rs Updated to support new IGVM agent architecture and removed test config dependency
vm/devices/get/guest_emulation_device/Cargo.toml Added cfg-if dependency for conditional compilation
openhcl/underhill_core/src/worker.rs Refactored to separate TEE call creation from attestation type mapping
openhcl/underhill_attestation/src/vmgs.rs Fixed error handling for missing hardware key protector entries
openhcl/underhill_attestation/src/secure_key_release.rs Improved error handling and retry logic for secure key release
openhcl/underhill_attestation/src/lib.rs Enhanced error handling and added comprehensive test utilities and test cases
openhcl/underhill_attestation/src/hardware_key_sealing.rs Updated to use shared MockTeeCall implementation
openhcl/underhill_attestation/Cargo.toml Added test dependencies for comprehensive testing
openhcl/tee_call/src/lib.rs Added Debug trait to TeeType enum
openhcl/openhcl_attestation_protocol/src/igvm_attest/get.rs Added Default trait to AttestationVmConfig

Signed-off-by: Ming-Wei Shih <[email protected]>
Signed-off-by: Ming-Wei Shih <[email protected]>
Signed-off-by: Ming-Wei Shih <[email protected]>
Signed-off-by: Ming-Wei Shih <[email protected]>
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