TianoCore EDK2 master
Loading...
Searching...
No Matches
ConfidentialComputingGuestAttr.h
Go to the documentation of this file.
1
9#ifndef CONFIDENTIAL_COMPUTING_GUEST_ATTR_H_
10#define CONFIDENTIAL_COMPUTING_GUEST_ATTR_H_
11
12//
13// Confidential computing guest type
14//
15typedef enum {
16 CcGuestTypeNonEncrypted = 0,
17 CcGuestTypeAmdSev,
18 CcGuestTypeIntelTdx,
19} CC_GUEST_TYPE;
20
21typedef enum {
22 /* The guest is running with memory encryption disabled. */
23 CCAttrNotEncrypted = 0,
24
25 /* The guest is running with AMD SEV memory encryption enabled. */
26 CCAttrAmdSev = 0x100,
27 CCAttrAmdSevEs = 0x101,
28 CCAttrAmdSevSnp = 0x102,
29
30 /* The guest is running with Intel TDX memory encryption enabled. */
31 CCAttrIntelTdx = 0x200,
32
33 CCAttrTypeMask = 0x000000000000ffff,
34
35 /* Features */
36
37 /* The AMD SEV-ES DebugVirtualization feature is enabled in SEV_STATUS */
38 CCAttrFeatureAmdSevEsDebugVirtualization = 0x0000000000010000,
39
40 CCAttrFeatureMask = 0xffffffffffff0000,
41} CONFIDENTIAL_COMPUTING_GUEST_ATTR;
42
43#define _CC_GUEST_IS_TDX(x) ((x) == CCAttrIntelTdx)
44#define CC_GUEST_IS_TDX(x) _CC_GUEST_IS_TDX((x) & CCAttrTypeMask)
45#define _CC_GUEST_IS_SEV(x) ((x) == CCAttrAmdSev || (x) == CCAttrAmdSevEs || (x) == CCAttrAmdSevSnp)
46#define CC_GUEST_IS_SEV(x) _CC_GUEST_IS_SEV((x) & CCAttrTypeMask)
47
48#endif