public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH V1 0/2] Refactor TDX MmioExit
@ 2022-12-29  8:55 Min Xu
  2022-12-29  8:55 ` [PATCH V1 1/2] OvmfPkg/CcExitLib: Move common X86 instruction code to separate file Min Xu
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Min Xu @ 2022-12-29  8:55 UTC (permalink / raw)
  To: devel
  Cc: Min Xu, Erdem Aktas, James Bottomley, Jiewen Yao, Gerd Hoffmann,
	Tom Lendacky, Ryan Afranji

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-set refactors the implementation to fix the
issues.

Before the refactoring, common X86 instruction codes in CcExitVcHandler.c
are moved to separate files (CcInstruction.h / CcInstruction.c) so that
these codes can be re-used in TDX.

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>

Min M Xu (2):
  OvmfPkg/CcExitLib: Move common X86 instruction code to separate file
  OvmfPkg/CcExitLib: Refactor TDX MmioExit

 OvmfPkg/Library/CcExitLib/CcExitLib.inf     |   1 +
 OvmfPkg/Library/CcExitLib/CcExitVcHandler.c | 697 +++-----------------
 OvmfPkg/Library/CcExitLib/CcExitVeHandler.c | 498 +++++++++-----
 OvmfPkg/Library/CcExitLib/CcInstruction.c   | 454 +++++++++++++
 OvmfPkg/Library/CcExitLib/CcInstruction.h   | 197 ++++++
 OvmfPkg/Library/CcExitLib/SecCcExitLib.inf  |   1 +
 6 files changed, 1082 insertions(+), 766 deletions(-)
 create mode 100644 OvmfPkg/Library/CcExitLib/CcInstruction.c
 create mode 100644 OvmfPkg/Library/CcExitLib/CcInstruction.h

-- 
2.29.2.windows.2


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2023-01-09  1:19 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-29  8:55 [PATCH V1 0/2] Refactor TDX MmioExit Min Xu
2022-12-29  8:55 ` [PATCH V1 1/2] OvmfPkg/CcExitLib: Move common X86 instruction code to separate file Min Xu
2023-01-03 20:27   ` Lendacky, Thomas
2023-01-06  8:24   ` Yao, Jiewen
2022-12-29  8:55 ` [PATCH V1 2/2] OvmfPkg/CcExitLib: Refactor TDX MmioExit Min Xu
2023-01-06  8:51   ` Yao, Jiewen
2023-01-09  1:18     ` Min Xu
2022-12-29  9:00 ` [PATCH V1 0/2] " Min Xu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox