Skip to content

Commit

Permalink
mshv-bindings: Add new constants for SEV-SNP
Browse files Browse the repository at this point in the history
These constants represents the feature bitmap for the hypervisor
supported features.

Currently we only support two features and thus I have added only those
two constants.

The feature bitmap is documented in AMD's SEV-SNP GHCB handling manual.
https://www.amd.com/content/dam/amd/en/documents/epyc-technical-docs/specifications/56421.pdf
Please refer to Table 1 on page 13.

Signed-off-by: Jinank Jain <[email protected]>
  • Loading branch information
jinankjain authored and Jinank Jain committed Oct 18, 2023
1 parent 2cfe1a4 commit dfe33f0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions mshv-bindings/src/snp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ pub const GHCB_INFO_HYPERCALL_OUTPUT: u32 = 3842;
pub const GHCB_INFO_SPECIAL_DBGPRINT: u32 = 3843;
pub const GHCB_INFO_SHUTDOWN_REQUEST: u32 = 256;

pub const GHCB_HYP_FEATURE_SEV_SNP: u32 = 1 << 0;
pub const GHCB_HYP_FEATURE_SEV_SNP_AP_CREATION: u32 = 1 << 1;

#[repr(C, packed)]
#[derive(Copy, Clone)]
pub union svm_ghcb_msr {
Expand Down

0 comments on commit dfe33f0

Please sign in to comment.