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 <erdemak...@google.com>
Cc: Gerd Hoffmann <kra...@redhat.com>
Cc: James Bottomley <j...@linux.ibm.com>
Cc: Jiewen Yao <jiewen....@intel.com>
Cc: Tom Lendacky <thomas.lenda...@amd.com>
Signed-off-by: Min Xu <min.m...@intel.com>
---
 OvmfPkg/TdxDxe/X64/ApRunLoop.nasm | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/OvmfPkg/TdxDxe/X64/ApRunLoop.nasm 
b/OvmfPkg/TdxDxe/X64/ApRunLoop.nasm
index 52fb3b4944bf..0bef89c48552 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
 
-- 
2.29.2.windows.2



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


Reply via email to