@@ -73,7 +73,7 @@ const (
7373 policyDebugBit = 19
7474 policySingleSocketBit = 20
7575
76- maxPlatformInfoBit = 1
76+ maxPlatformInfoBit = 4
7777
7878 signatureOffset = 0x2A0
7979 ecdsaRSsize = 72 // From the ECDSA-P384-SHA384 format in SEV SNP API specification.
@@ -186,6 +186,13 @@ type SnpPlatformInfo struct {
186186 // TSMEEnabled represents if the platform that produced the attestation report has transparent
187187 // secure memory encryption (TSME) enabled.
188188 TSMEEnabled bool
189+ // ECCEnabled indicates that the platform is using error correcting codes for memory.
190+ // Present when EccMemReporting feature bit is set.
191+ ECCEnabled bool
192+ // RAPLDisabled indicates that the RAPL is disabled.
193+ RAPLDisabled bool
194+ // CiphertextHidingDRAMEnabled indicates cypher text hiding is enabled for DRAM.
195+ CiphertextHidingDRAMEnabled bool
189196}
190197
191198// SnpPolicy represents the bitmask guest policy that governs the VM's behavior from launch.
@@ -244,8 +251,11 @@ func SnpPolicyToBytes(policy SnpPolicy) uint64 {
244251// unrecognized bits.
245252func ParseSnpPlatformInfo (platformInfo uint64 ) (SnpPlatformInfo , error ) {
246253 result := SnpPlatformInfo {
247- SMTEnabled : (platformInfo & (1 << 0 )) != 0 ,
248- TSMEEnabled : (platformInfo & (1 << 1 )) != 0 ,
254+ SMTEnabled : (platformInfo & (1 << 0 )) != 0 ,
255+ TSMEEnabled : (platformInfo & (1 << 1 )) != 0 ,
256+ ECCEnabled : (platformInfo & (1 << 2 )) != 0 ,
257+ RAPLDisabled : (platformInfo & (1 << 3 )) != 0 ,
258+ CiphertextHidingDRAMEnabled : (platformInfo & (1 << 4 )) != 0 ,
249259 }
250260 reserved := platformInfo & ^ uint64 ((1 << (maxPlatformInfoBit + 1 ))- 1 )
251261 if reserved != 0 {
0 commit comments