ConfidentialComputingGuestAttr.h 1001 B

12345678910111213141516171819202122232425262728293031323334353637
  1. /** @file
  2. Definitions for Confidential Computing Guest Attributes
  3. Copyright (c) 2021 AMD Inc. All rights reserved.<BR>
  4. SPDX-License-Identifier: BSD-2-Clause-Patent
  5. **/
  6. #ifndef CONFIDENTIAL_COMPUTING_GUEST_ATTR_H_
  7. #define CONFIDENTIAL_COMPUTING_GUEST_ATTR_H_
  8. //
  9. // Confidential computing guest type
  10. //
  11. typedef enum {
  12. CcGuestTypeNonEncrypted = 0,
  13. CcGuestTypeAmdSev,
  14. CcGuestTypeIntelTdx,
  15. } CC_GUEST_TYPE;
  16. typedef enum {
  17. /* The guest is running with memory encryption disabled. */
  18. CCAttrNotEncrypted = 0,
  19. /* The guest is running with AMD SEV memory encryption enabled. */
  20. CCAttrAmdSev = 0x100,
  21. CCAttrAmdSevEs = 0x101,
  22. CCAttrAmdSevSnp = 0x102,
  23. /* The guest is running with Intel TDX memory encryption enabled. */
  24. CCAttrIntelTdx = 0x200,
  25. } CONFIDENTIAL_COMPUTING_GUEST_ATTR;
  26. #define CC_GUEST_IS_TDX(x) ((x) == CCAttrIntelTdx)
  27. #define CC_GUEST_IS_SEV(x) ((x) == CCAttrAmdSev || (x) == CCAttrAmdSevEs || (x) == CCAttrAmdSevSnp)
  28. #endif