diff options
author | Min Xu <min.m.xu@intel.com> | 2022-05-31 22:31:16 +0800 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2022-06-02 09:10:00 +0000 |
commit | 54cd0d9b2f816fe519afffe2aa57cfbf13f56088 (patch) | |
tree | fd26695f64331545cea5263114844cdfe3ec34d6 | |
parent | 62044aa99bcf0a7b1581b24ad8e8f105e48fa15a (diff) | |
download | edk2-54cd0d9b2f816fe519afffe2aa57cfbf13f56088.tar.gz edk2-54cd0d9b2f816fe519afffe2aa57cfbf13f56088.tar.bz2 edk2-54cd0d9b2f816fe519afffe2aa57cfbf13f56088.zip |
OvmfPkg: Fix TDVMCALL error in ApRunLoop.nasm
According to GHCI Spec Table 2-1, in TDVMCALL R10 should be cleared
to 0 in input operands, and be checked for the return result.
https://cdrdv2.intel.com/v1/dl/getContent/726790
Cc: Erdem Aktas <erdemaktas@google.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: James Bottomley <jejb@linux.ibm.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Tom Lendacky <thomas.lendacky@amd.com>
Signed-off-by: Min Xu <min.m.xu@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
-rw-r--r-- | OvmfPkg/TdxDxe/X64/ApRunLoop.nasm | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/OvmfPkg/TdxDxe/X64/ApRunLoop.nasm b/OvmfPkg/TdxDxe/X64/ApRunLoop.nasm index 52fb3b4944..0bef89c485 100644 --- a/OvmfPkg/TdxDxe/X64/ApRunLoop.nasm +++ b/OvmfPkg/TdxDxe/X64/ApRunLoop.nasm @@ -42,10 +42,11 @@ AsmRelocateApMailBoxLoopStart: mov rax, TDVMCALL
mov rcx, TDVMCALL_EXPOSE_REGS_MASK
+ xor r10, r10
mov r11, EXIT_REASON_CPUID
mov r12, 0xb
tdcall
- test rax, rax
+ test r10, r10
jnz Panic
mov r8, r15
|