Hi Min,

On Mon, Nov 1, 2021 at 6:16 AM Min Xu <min.m...@intel.com> wrote:

>
> +VmTdExitHandleVe (
> +  IN OUT EFI_EXCEPTION_TYPE  *ExceptionType,
> +  IN OUT EFI_SYSTEM_CONTEXT  SystemContext
> +  )
> +{
> +  UINT64                    Status;
> +  TD_RETURN_DATA            ReturnData;
> +  EFI_SYSTEM_CONTEXT_X64    *Regs;
> +
> +  Regs = SystemContext.SystemContextX64;
> +  Status = TdCall (TDCALL_TDGETVEINFO, 0, 0, 0, &ReturnData);
> +  ASSERT (Status == 0);
> +  if (Status != 0) {
> +    DEBUG ((DEBUG_ERROR, "#VE happened. TDGETVEINFO failed with Status =
> 0x%llx\n", Status));
> +    TdVmCall (TDVMCALL_HALT, 0, 0, 0, 0, 0);
> +  }
>


What is the difference between TdVmCall (EXIT_REASON_HLT, 0, 0, 0, 0, 0) vs
TdVmCall (TDVMCALL_HALT, 0, 0, 0, 0, 0);
>From the VMM stand point both seems the same?


+
> +  switch (ReturnData.VeInfo.ExitReason) {
> +    case EXIT_REASON_CPUID:
> +    Status = CpuIdExit (Regs, &ReturnData.VeInfo);
> +    DEBUG ((DEBUG_VERBOSE ,
> +          "CPUID #VE happened, ExitReasion is %d, ExitQualification =
> 0x%x.\n",
> +          ReturnData.VeInfo.ExitReason,
> ReturnData.VeInfo.ExitQualification.Val
> +          ));
> +    break;
> +
> +    case EXIT_REASON_HLT:
> +    if (FixedPcdGetBool (PcdIgnoreVeHalt) == FALSE) {
> +      Status = TdVmCall (EXIT_REASON_HLT, 0, 0, 0, 0, 0);
> +    }
> +    break;
>
>


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#83798): https://edk2.groups.io/g/devel/message/83798
Mute This Topic: https://groups.io/mt/86739958/21656
Mute #ve:https://edk2.groups.io/g/devel/mutehashtag/ve
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Reply via email to