-
Notifications
You must be signed in to change notification settings - Fork 12
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
Adding tests to snphostok #39
Conversation
c12764a
to
8a53777
Compare
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.
Just one thought. I don't know that it is a stopper for me, but is worth the discussion.
Also, please make sure to rebase your branch :) |
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.
Great first PR!
I requested some changes regarding test readability and coding practices.
I also requested an enhancement on one of the tests that I forgot to mention earlier.
8a53777
to
22c1652
Compare
For something such as:
Are you referring to enabled in the kernel? The "parent" tests for CPU availability. |
The SME test is checking the MSR for cpu enablement. Do you want me to make that more clear in the result prompt? |
Just trying to understand the difference. So, although it can be supported on a certain CPU, it still must be enabled in the MSR (and all of this is completely separate from having kernel enablement of the same feature?) Anyway, yes I think
|
22c1652
to
e745bbd
Compare
@arvindskumar99 Looks like you still have some clippy and formatting issues. Please run: cargo clippy -- -D clippy::all and cargo fmt |
Signed-off-by: Arvind Kumar <arvinkum@amd.com>
c55f97f
to
52226c6
Compare
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.
LGTM
Quick Patch Signed-off-by: Larry Dewey <larry.dewey@amd.com>
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.
lgtm
Added the following tests to snphostok
SME enabled | Checks that SMEE features are enabled on host | Checks MSR 0xC0010010 bit 23 for enablement
SEV INIT STATE | Checks to see if SEV is init | Checks SEV_PLATFORM_STATUS IOCTL
SEV-ES INIT STATE | Check to see if SEV-ES is init | Check SEV_PLATFORM_STATUS IOCTL
SNP enabled in MSR | Check to see if SNP is enabled | Check MSR 0xC0010010 bit 23
System SEV firmware version | Check for SEV FW version | Use SEV_PLATFORM_STATUS IOCTL
SNP INIT | Check if SNP is init | Check SNP_PLATFORM_STATUS IOCTL
RMP INIT | Check if RMP is init | Check SNP_PLATFORM STATUS IOCTL
RMP table addresses | Get the ranges for RMP TABLE ADDRESS | Check MSR 0xC0010132 - 0xC0010133
Compare TCB versions | Make sure current TCB and reported TCB match | Check SNP_PLATFORM_STATUS IOCTLS