\r
#include <Base.h>\r
\r
+//\r
+// Define the maximum number of #VCs allowed (e.g. the level of nesting\r
+// that is allowed => 2 allows for 1 nested #VCs). I this value is changed,\r
+// be sure to increase the size of\r
+// gUefiOvmfPkgTokenSpaceGuid.PcdOvmfSecGhcbBackupSize\r
+// in any FDF file using this PCD.\r
+//\r
+#define VMGEXIT_MAXIMUM_VC_COUNT 2\r
+\r
+//\r
+// Per-CPU data mapping structure\r
+// Use UINT32 for cached indicators and compare to a specific value\r
+// so that the hypervisor can't indicate a value is cached by just\r
+// writing random data to that area.\r
+//\r
+typedef struct {\r
+ UINT32 Dr7Cached;\r
+ UINT64 Dr7;\r
+\r
+ UINTN VcCount;\r
+ VOID *GhcbBackupPages;\r
+} SEV_ES_PER_CPU_DATA;\r
+\r
//\r
// Internal structure for holding SEV-ES information needed during SEC phase\r
// and valid only during SEC phase and early PEI during platform\r