]> git.proxmox.com Git - mirror_edk2.git/blobdiff - UefiCpuPkg/Include/Library/VmgExitLib.h
UefiCpuPkg: Extend VmgExitLibNull to handle #VE exception
[mirror_edk2.git] / UefiCpuPkg / Include / Library / VmgExitLib.h
index ebda1c3d907c9028165f8a529ca7fd9edde9625e..f9f911099a7b135ad6d2efc862d385b03b79f33d 100644 (file)
@@ -15,6 +15,8 @@
 #include <Protocol/DebugSupport.h>\r
 #include <Register/Amd/Ghcb.h>\r
 \r
+#define VE_EXCEPTION  20\r
+\r
 /**\r
   Perform VMGEXIT.\r
 \r
@@ -142,4 +144,30 @@ VmgExitHandleVc (
   IN OUT EFI_SYSTEM_CONTEXT  SystemContext\r
   );\r
 \r
+/**\r
+  Handle a #VE exception.\r
+\r
+  Performs the necessary processing to handle a #VE exception.\r
+\r
+  The base library function returns an error equal to VE_EXCEPTION,\r
+  to be propagated to the standard exception handling stack.\r
+\r
+  @param[in, out]  ExceptionType  Pointer to an EFI_EXCEPTION_TYPE to be set\r
+                                  as value to use on error.\r
+  @param[in, out]  SystemContext  Pointer to EFI_SYSTEM_CONTEXT\r
+\r
+  @retval  EFI_SUCCESS            Exception handled\r
+  @retval  EFI_UNSUPPORTED        #VE not supported, (new) exception value to\r
+                                  propagate provided\r
+  @retval  EFI_PROTOCOL_ERROR     #VE handling failed, (new) exception value to\r
+                                  propagate provided\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+VmTdExitHandleVe (\r
+  IN OUT EFI_EXCEPTION_TYPE  *ExceptionType,\r
+  IN OUT EFI_SYSTEM_CONTEXT  SystemContext\r
+  );\r
+\r
 #endif\r