audk/MdePkg/Library/BaseLib/X64
Ceping Sun 68e37f4578 MdePkg/BaseLib: Update TdVmcall to always output the value in R11
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4572

According to section 3.2 of the [GHCI] spec, if the return status
of MapGPA is "TDG.VP.VMCALL_RETRY", TD must retry this operation
for the pages in the region starting at the GPA specified in R11.

Currently, TDVF has not handled the retry results and always clears
the R11 on unsuccessful return status. For this, the TdVmcall needs
to output the value of R11 on unsuccessful return status to handle
the retry results of MapGPA.

Reference:
[GHCI]: TDX Guest-Host-Communication Interface v1.0
https://cdrdv2.intel.com/v1/dl/getContent/726790

Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Erdem Aktas <erdemaktas@google.com>
Cc: James Bottomley <jejb@linux.ibm.com>
Cc: Min Xu <min.m.xu@intel.com>
Cc: Tom Lendacky <thomas.lendacky@amd.com>
Cc: Michael Roth <michael.roth@amd.com>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
Signed-off-by: Ceping Sun <cepingx.sun@intel.com>
2023-11-09 17:15:39 +00:00
..
CpuBreakpoint.c MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
CpuBreakpoint.nasm MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
CpuId.nasm MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
CpuIdEx.nasm MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
CpuPause.nasm MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
DisableCache.nasm MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
DisableInterrupts.nasm MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
DisablePaging64.nasm MdePkg: Replace Opcode with the corresponding instructions. 2022-03-01 01:45:47 +00:00
EnableCache.nasm MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
EnableDisableInterrupts.nasm MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
EnableInterrupts.nasm MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
FlushCacheLine.nasm MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
FxRestore.nasm MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
FxSave.nasm MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
GccInline.c MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
GccInlinePriv.c MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
Invd.nasm MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
Lfence.nasm MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
LongJump.nasm MdePkg: Replace Opcode with the corresponding instructions. 2022-03-01 01:45:47 +00:00
Monitor.nasm MdePkg: Replace Opcode with the corresponding instructions. 2022-03-01 01:45:47 +00:00
Mwait.nasm MdePkg: Replace Opcode with the corresponding instructions. 2022-03-01 01:45:47 +00:00
Non-existing.c MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
Pvalidate.nasm MdePkg/BaseLib: add support for PVALIDATE instruction 2021-05-29 12:15:21 +00:00
RdRand.nasm MdePkg: Replace Opcode with the corresponding instructions. 2022-03-01 01:45:47 +00:00
ReadCr0.nasm MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
ReadCr2.nasm MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
ReadCr3.nasm MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
ReadCr4.nasm MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
ReadCs.nasm MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
ReadDr0.nasm MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
ReadDr1.nasm MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
ReadDr2.nasm MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
ReadDr3.nasm MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
ReadDr4.nasm MdePkg: Replace Opcode with the corresponding instructions. 2022-03-01 01:45:47 +00:00
ReadDr5.nasm MdePkg: Replace Opcode with the corresponding instructions. 2022-03-01 01:45:47 +00:00
ReadDr6.nasm MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
ReadDr7.nasm MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
ReadDs.nasm MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
ReadEflags.nasm MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
ReadEs.nasm MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
ReadFs.nasm MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
ReadGdtr.nasm MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
ReadGs.nasm MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
ReadIdtr.nasm MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
ReadLdtr.nasm MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
ReadMm0.nasm MdePkg: Replace Opcode with the corresponding instructions. 2022-03-01 01:45:47 +00:00
ReadMm1.nasm MdePkg: Replace Opcode with the corresponding instructions. 2022-03-01 01:45:47 +00:00
ReadMm2.nasm MdePkg: Replace Opcode with the corresponding instructions. 2022-03-01 01:45:47 +00:00
ReadMm3.nasm MdePkg: Replace Opcode with the corresponding instructions. 2022-03-01 01:45:47 +00:00
ReadMm4.nasm MdePkg: Replace Opcode with the corresponding instructions. 2022-03-01 01:45:47 +00:00
ReadMm5.nasm MdePkg: Replace Opcode with the corresponding instructions. 2022-03-01 01:45:47 +00:00
ReadMm6.nasm MdePkg: Replace Opcode with the corresponding instructions. 2022-03-01 01:45:47 +00:00
ReadMm7.nasm MdePkg: Replace Opcode with the corresponding instructions. 2022-03-01 01:45:47 +00:00
ReadMsr64.c MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
ReadMsr64.nasm MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
ReadPmc.nasm MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
ReadSs.nasm MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
ReadTr.nasm MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
ReadTsc.nasm MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
RmpAdjust.nasm MdePkg/BaseLib: add support for RMPADJUST instruction 2021-05-29 12:15:21 +00:00
SetJump.nasm MdePkg: Replace Opcode with the corresponding instructions. 2022-03-01 01:45:47 +00:00
SwitchStack.nasm MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
TdCall.nasm MdePkg: Introduce basic Tdx functions in BaseLib 2022-04-02 08:15:12 +00:00
TdProbe.c MdePkg: Introduce basic Tdx functions in BaseLib 2022-04-02 08:15:12 +00:00
TdVmcall.nasm MdePkg/BaseLib: Update TdVmcall to always output the value in R11 2023-11-09 17:15:39 +00:00
Thunk16.nasm MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
VmgExit.nasm MdePkg/BaseLib: Add support for the VMGEXIT instruction 2020-08-16 16:45:42 +00:00
Wbinvd.nasm MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
WriteCr0.nasm MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
WriteCr2.nasm MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
WriteCr3.nasm MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
WriteCr4.nasm MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
WriteDr0.nasm MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
WriteDr1.nasm MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
WriteDr2.nasm MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
WriteDr3.nasm MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
WriteDr4.nasm MdePkg: Replace Opcode with the corresponding instructions. 2022-03-01 01:45:47 +00:00
WriteDr5.nasm MdePkg: Replace Opcode with the corresponding instructions. 2022-03-01 01:45:47 +00:00
WriteDr6.nasm MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
WriteDr7.nasm MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
WriteGdtr.nasm MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
WriteIdtr.nasm MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
WriteLdtr.nasm MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
WriteMm0.nasm MdePkg: Replace Opcode with the corresponding instructions. 2022-03-01 01:45:47 +00:00
WriteMm1.nasm MdePkg: Replace Opcode with the corresponding instructions. 2022-03-01 01:45:47 +00:00
WriteMm2.nasm MdePkg: Replace Opcode with the corresponding instructions. 2022-03-01 01:45:47 +00:00
WriteMm3.nasm MdePkg: Replace Opcode with the corresponding instructions. 2022-03-01 01:45:47 +00:00
WriteMm4.nasm MdePkg: Replace Opcode with the corresponding instructions. 2022-03-01 01:45:47 +00:00
WriteMm5.nasm MdePkg: Replace Opcode with the corresponding instructions. 2022-03-01 01:45:47 +00:00
WriteMm6.nasm MdePkg: Replace Opcode with the corresponding instructions. 2022-03-01 01:45:47 +00:00
WriteMm7.nasm MdePkg: Replace Opcode with the corresponding instructions. 2022-03-01 01:45:47 +00:00
WriteMsr64.c MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
WriteMsr64.nasm MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
WriteTr.nasm MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
XGetBv.nasm MdePkg/BaseLib: Add support for the XGETBV instruction 2020-08-16 16:45:42 +00:00
XSetBv.nasm MdePkg/BaseLib: Add support for the XSETBV instruction 2021-04-06 00:43:49 +00:00