8ba392687b
OvmfPkg: Update code to be more C11 compliant by using __func__
...
__FUNCTION__ is a pre-standard extension that gcc and Visual C++ among
others support, while __func__ was standardized in C99.
Since it's more standard, replace __FUNCTION__ with __func__ throughout
OvmfPkg.
Signed-off-by: Rebecca Cran <rebecca@bsdio.com >
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com >
Reviewed-by: Ard Biesheuvel <ardb@kernel.org >
Reviewed-by: Sunil V L <sunilvl@ventanamicro.com >
2023-04-10 14:19:57 +00:00
998ebe5ca0
OvmfPkg/CcExitLib: Initialize Status in IoExit
...
Status should be initialized otherwise it may return unexpected value.
Cc: Erdem Aktas <erdemaktas@google.com >
Cc: James Bottomley <jejb@linux.ibm.com >
Cc: Jiewen Yao <jiewen.yao@intel.com >
Cc: Gerd Hoffmann <kraxel@redhat.com >
Cc: Tom Lendacky <thomas.lendacky@amd.com >
Cc: Michael Roth <michael.roth@amd.com >
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com >
Signed-off-by: Min Xu <min.m.xu@intel.com >
2023-01-18 05:54:59 +00:00
e05132aaa0
OvmfPkg/CcExitLib: Refactor TDX MmioExit
...
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4169
The previous TDX MmioExit doesn't handle the Mmio instructions correctly
in some scenarios. This patch refactors the implementation to fix the
issues.
Cc: Erdem Aktas <erdemaktas@google.com >
Cc: James Bottomley <jejb@linux.ibm.com >
Cc: Jiewen Yao <jiewen.yao@intel.com >
Cc: Gerd Hoffmann <kraxel@redhat.com >
Cc: Tom Lendacky <thomas.lendacky@amd.com >
Cc: Ryan Afranji <afranji@google.com >
Reported-by: Ryan Afranji <afranji@google.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 >
2023-01-18 03:47:31 +00:00
127e2c5315
OvmfPkg: Add INVD case in #VE handler
...
According to the Intel GHCI specification document section 2.4.1, the
goal for instructions that do not have a corresponding TDCALL is for the
handler to treat the instruction as a NOP.
INVD does not have a corresponding TDCALL. This patch makes the #VE
handler treat INVD as a NOP.
Signed-off-by: Ryan Afranji <afranji@google.com >
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com >
2022-12-09 07:08:50 +00:00
765ba5bf05
OvmfPkg/UefiCpuPkg: Add CcExit prefix to the APIs of CcExitLib
...
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4123
APIs which are defined in CcExitLib.h are added with the CcExit prefix.
This is to make the APIs' name more meaningful.
This change impacts OvmfPkg/UefiCpuPkg.
Cc: Eric Dong <eric.dong@intel.com >
Cc: Ray Ni <ray.ni@intel.com >
Cc: Brijesh Singh <brijesh.singh@amd.com >
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 >
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com >
Reviewed-by: Ray Ni <ray.ni@intel.com >
Signed-off-by: Min Xu <min.m.xu@intel.com >
2022-11-14 04:55:34 +00:00
a89f558d3c
OvmfPkg/UefiCpuPkg/UefiPayloadPkg: Rename VmgExitLib to CcExitLib
...
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4123
VmgExitLib once was designed to provide interfaces to support #VC handler
and issue VMGEXIT instruction. After TDVF (enable TDX feature in OVMF) is
introduced, this library is updated to support #VE as well. Now the name
of VmgExitLib cannot reflect what the lib does.
This patch renames VmgExitLib to CcExitLib (Cc means Confidential
Computing). This is a simple renaming and there is no logic changes.
After renaming all the VmgExitLib related codes are updated with
CcExitLib. These changes are in OvmfPkg/UefiCpuPkg/UefiPayloadPkg.
Cc: Guo Dong <guo.dong@intel.com >
Cc: Sean Rhodes <sean@starlabs.systems >
Cc: James Lu <james.lu@intel.com >
Cc: Gua Guo <gua.guo@intel.com >
Cc: Eric Dong <eric.dong@intel.com >
Cc: Ray Ni <ray.ni@intel.com >
Cc: Brijesh Singh <brijesh.singh@amd.com >
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 >
Reviewed-by: James Lu <james.lu@intel.com >
Reviewed-by: Gua Guo <gua.guo@intel.com >
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com >
Reviewed-by: Ray Ni <ray.ni@intel.com >
Signed-off-by: Min Xu <min.m.xu@intel.com >
2022-11-14 04:55:34 +00:00