X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=OvmfPkg%2FInclude%2FLibrary%2FMemEncryptSevLib.h;fp=OvmfPkg%2FInclude%2FLibrary%2FMemEncryptSevLib.h;h=99f15a7d12719a35d0effaf6764e5e4a2f038f47;hb=5667dc43d82396589d2fabd790e7f6a214386969;hp=ec470b8d036395b3e83ce33283228e62dde677f0;hpb=c330af0246ac9b1c37d17fc79881fc2dd96ec80c;p=mirror_edk2.git diff --git a/OvmfPkg/Include/Library/MemEncryptSevLib.h b/OvmfPkg/Include/Library/MemEncryptSevLib.h index ec470b8d03..99f15a7d12 100644 --- a/OvmfPkg/Include/Library/MemEncryptSevLib.h +++ b/OvmfPkg/Include/Library/MemEncryptSevLib.h @@ -13,6 +13,29 @@ #include +// +// Define the maximum number of #VCs allowed (e.g. the level of nesting +// that is allowed => 2 allows for 1 nested #VCs). I this value is changed, +// be sure to increase the size of +// gUefiOvmfPkgTokenSpaceGuid.PcdOvmfSecGhcbBackupSize +// in any FDF file using this PCD. +// +#define VMGEXIT_MAXIMUM_VC_COUNT 2 + +// +// Per-CPU data mapping structure +// Use UINT32 for cached indicators and compare to a specific value +// so that the hypervisor can't indicate a value is cached by just +// writing random data to that area. +// +typedef struct { + UINT32 Dr7Cached; + UINT64 Dr7; + + UINTN VcCount; + VOID *GhcbBackupPages; +} SEV_ES_PER_CPU_DATA; + // // Internal structure for holding SEV-ES information needed during SEC phase // and valid only during SEC phase and early PEI during platform