PcdConfidentialComputingGuestAttr so far only contained an SEV mode bit but there are more other features which do not translate to levels such as DebugSwap or SecureTsc.
This adds the features mask and the DebugSwap feature bit to a PCD. Signed-off-by: Alexey Kardashevskiy <a...@amd.com> --- MdePkg/Include/ConfidentialComputingGuestAttr.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/MdePkg/Include/ConfidentialComputingGuestAttr.h b/MdePkg/Include/ConfidentialComputingGuestAttr.h index 44e6df800207..1fd09a51ea52 100644 --- a/MdePkg/Include/ConfidentialComputingGuestAttr.h +++ b/MdePkg/Include/ConfidentialComputingGuestAttr.h @@ -26,12 +26,15 @@ typedef enum { CCAttrAmdSev = 0x100, CCAttrAmdSevEs = 0x101, CCAttrAmdSevSnp = 0x102, + CCAttrAmdSevFeatureMask = 0xffff0000, + CCAttrAmdSevFeatureDebugSwap = 0x00010000, /* The guest is running with Intel TDX memory encryption enabled. */ CCAttrIntelTdx = 0x200, } CONFIDENTIAL_COMPUTING_GUEST_ATTR; #define CC_GUEST_IS_TDX(x) ((x) == CCAttrIntelTdx) -#define CC_GUEST_IS_SEV(x) ((x) == CCAttrAmdSev || (x) == CCAttrAmdSevEs || (x) == CCAttrAmdSevSnp) +#define _CC_GUEST_IS_SEV(x) ((x) == CCAttrAmdSev || (x) == CCAttrAmdSevEs || (x) == CCAttrAmdSevSnp) +#define CC_GUEST_IS_SEV(x) _CC_GUEST_IS_SEV((x) & ~CCAttrAmdSevFeatureMask) #endif -- 2.38.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#96814): https://edk2.groups.io/g/devel/message/96814 Mute This Topic: https://groups.io/mt/95376324/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-