Skip to content
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

fix: remove subcommand trait on ok/commit #53

Merged
merged 1 commit into from
May 13, 2024

Conversation

tri-adam
Copy link
Contributor

Remove subcommand trait from Ok and Commit. This fixes the prior behaviour where the usage was printed rather than the expected functionality occurring.

With the fix:

$ sudo ./target/release/snphost ok
[ PASS ] - AMD CPU
[ PASS ]   - Microcode support
[ PASS ]   - Secure Memory Encryption (SME)
[ PASS ]     - SME: Enabled in MSR
[ PASS ]   - Secure Encrypted Virtualization (SEV)
[ PASS ]     - Encrypted State (SEV-ES)
[ PASS ]       - SEV-ES INIT: Enabled
[ PASS ]     - SEV INIT: SEV is INIT, but not currently running a guest
[ PASS ]     - Secure Nested Paging (SEV-SNP)
[ PASS ]       - VM Permission Levels
[ PASS ]         - Number of VMPLs: 4
[ PASS ]       - SNP: Enabled in MSR
[ PASS ]       - SEV Firmware Version: Sev firmware version: 1.55
[ PASS ]       - SNP INIT: SNP is INIT
[ PASS ]     - Physical address bit reduction: 5
[ PASS ]     - C-bit location: 51
[ PASS ]     - Number of encrypted guests supported simultaneously: 509
[ PASS ]     - Minimum ASID value for SEV-enabled, SEV-ES disabled guest: 100
[ PASS ]     - Reading /dev/sev: /dev/sev readable
[ PASS ]     - Writing /dev/sev: /dev/sev writable
[ PASS ]   - Page flush MSR: ENABLED
[ PASS ] - KVM supported: API version: 12
[ PASS ]   - SEV enabled in KVM: enabled
[ PASS ]   - SEV-ES enabled in KVM: enabled
[ PASS ]   - SEV-SNP enabled in KVM: enabled
[ PASS ] - Memlock resource limit: Soft: 33598480384 | Hard: 33598480384
[ PASS ] - RMP table addresses: Addresses: 367001600 - 1450180607
[ PASS ] - RMP INIT: RMP is INIT
[ PASS ] - Comparing TCB values: TCB versions match 

 Platform TCB version: 
TCB Version:
  Microcode:   211
  SNP:         21
  TEE:         0
  Boot Loader: 4
   
 Reported TCB version: 
TCB Version:
  Microcode:   211
  SNP:         21
  TEE:         0
  Boot Loader: 4

$ sudo ./target/release/snphost commit
$ echo $?
0

Fixes #52

@larrydewey larrydewey merged commit 233244c into virtee:main May 13, 2024
10 checks passed
@larrydewey
Copy link
Contributor

Thanks for your contribution!

@tri-adam tri-adam deleted the cmd-fix branch May 13, 2024 20:39
@tylerfanelli
Copy link
Member

@larrydewey do you know what caused this in the first place? I've never seen behavior like that from the tool. Maybe it was the migration to clap?

@larrydewey
Copy link
Contributor

@tylerfanelli Yes, this was an artifact from migrating to clap.

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.

ok and commit return usage
4 participants