-
Notifications
You must be signed in to change notification settings - Fork 138
feat(opentmk): opentmk framework with first testcase #1210
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
feat: opentmk init feat: opentmk init feat: opentmk init feat: opentmk init feat: opentmk init feat: opentmk init feat: init 1 feat: init 2 feat: init 1 feat: opentmk feat: opentmk init 3 feat: opentmk init 4 feat: opentmk init 4
c3f74c0
to
056bf7d
Compare
edition.workspace = true | ||
rust-version.workspace = true | ||
|
||
[dependencies] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: sort and switch to dotted syntax for crates that don't need features. Also move all crates to be workspaced.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@smalis-msft There is one issue where I want to use the serde package with default features off as I want to use a no_std env. Should I disable the feature in workspace?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, you'll have to.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apologies if I'm repeating something I said in the previous review, there's a lot of code here and it's been a little while.
Also, you'll need to run cargo xtask fmt
and have it succeed on this code before it can be merged.
That all said, this is shaping up really really nicely. Please don't let the large number of comments discourage you, I'm really happy with how this is shaping up.
|
||
[[package]] | ||
name = "spin" | ||
version = "0.10.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we unify on the same version of spin that lazy_static is pulling in, so we only have the one?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will work on versioning and package related changes as I resolve the merge conflicts.
There was a problem hiding this 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 introduces the OpenTMK (Open Testing and Measurement Kit) framework, a Rust-based test harness for hypervisor functionality testing within UEFI environments. The framework provides comprehensive testing capabilities for VTL (Virtual Trust Level) operations, virtual processor management, memory protections, and TPM interactions.
Key changes:
- Complete OpenTMK framework implementation with platform abstraction layer
- New nostd_spin_channel crate for no_std communication
- Comprehensive test suite covering hypervisor operations and security scenarios
Reviewed Changes
Copilot reviewed 43 out of 46 changed files in this pull request and generated 12 comments.
Show a summary per file
File | Description |
---|---|
support/nostd_spin_channel/ | New no_std channel implementation for inter-VP communication |
opentmk/src/ | Core OpenTMK framework with platform traits and hypervisor context |
opentmk/src/tests/ | Test suite for VTL operations, memory protection, and TPM functionality |
opentmk/src/arch/ | Architecture-specific implementations for x86_64 and aarch64 |
Cargo.toml | Workspace configuration updates to include new crates |
Comments suppressed due to low confidence (1)
opentmk/src/tests/hyperv/hv_processor.rs:1
- Inconsistency in the assertion: the code checks that vp_count equals 4 but the error message says it 'should be 8'. Either the expected value or the message is incorrect.
use hvdef::Vtl;
@@ -29,6 +29,7 @@ HYPERCALL_PAGE: | |||
/// input/output pages are not being concurrently used elsewhere. For fast | |||
/// hypercalls, the caller must ensure that there are no output words so that | |||
/// there is no register corruption. | |||
#[inline(never)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right. I need to remove this.
@@ -0,0 +1,4 @@ | |||
imports_granularity = "Item" # Expands `use foo::{bar, baz};` into separate `use` lines |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will need to go away, although if these options are stabilized they could move to our root rustfmt.toml.
OpenTMK framework for testing guest-based scenarios with a HCL.