From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mx.groups.io with SMTP id smtpd.web09.5284.1667517610553055782 for ; Thu, 03 Nov 2022 16:20:11 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=ZC+B91tY; spf=pass (domain: intel.com, ip: 134.134.136.24, mailfrom: min.m.xu@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1667517610; x=1699053610; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=NcZ+Rx8M/VawNd1yuRg+Q8tdivdTro3hSpfTZoFMImo=; b=ZC+B91tYFKFpo0DcGF5H3ok7mxaunpuiaMLyaTS1aD0d9oM4GA9pynF9 WHorE2+ZwcW5FTTO5Q8tYMqRwdPZeGY5ejRyng+vw2nEzP+IjTZvBhNdu mfR3mc0aHHLNakVdX6aB7RD19/S6B/lVMn7slLgcR4WfZUFCi6nQAjenG 0kAAPSE907UW2BEfYsf3JYOrEUkEkuIjM9cA2+zGeZgVULHOz5hwW47Nj OxliXnIdIH+msH5BOBxeAxV5/C9ic7RdZTuBkCPR9d4QXC/BeD20QV4Vm MM0MJ89dK8s7eXv1Xql2YBFDngqdJdosdeMGALpD8V7Av4jMBuT7GL5V0 A==; X-IronPort-AV: E=McAfee;i="6500,9779,10520"; a="310947235" X-IronPort-AV: E=Sophos;i="5.96,135,1665471600"; d="scan'208";a="310947235" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Nov 2022 16:20:09 -0700 X-IronPort-AV: E=McAfee;i="6500,9779,10520"; a="724131872" X-IronPort-AV: E=Sophos;i="5.96,135,1665471600"; d="scan'208";a="724131872" Received: from yananliu-mobl.ccr.corp.intel.com (HELO mxu9-mobl1.ccr.corp.intel.com) ([10.255.30.132]) by fmsmga003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Nov 2022 16:20:05 -0700 From: "Min Xu" To: devel@edk2.groups.io Cc: Min Xu , Eric Dong , Ray Ni , Brijesh Singh , Erdem Aktas , Gerd Hoffmann , James Bottomley , Jiewen Yao , Tom Lendacky , Guo Dong , Sean Rhodes , James Lu , Gua Guo , Michael D Kinney , Liming Gao Subject: [PATCH V2 0/9] Rename VmgExitLib to CcExitLib Date: Fri, 4 Nov 2022 07:19:46 +0800 Message-Id: <20221103231955.1365-1-min.m.xu@intel.com> X-Mailer: git-send-email 2.29.2.windows.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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-set creates CcExitLib which is a simple copy of VmgExitLib except some of the API names are renamed with a CcExitLib prefix. For example VmgExit is renamed as CcExitLibVmgExit. To make sure the build will not be broken by the renaming, this patch-set first creates CcExitLib (Patch #1/2). Then VmgExitLib is replaced by CcExitLib in UefiCpuPkg/UefiPayloadPkg/OvmfPkg (Patch #3/4/5/6). After that VmgExitLib is deleted (Patch #7/8). At last Maintainers.txt is updated (Patch #9). Code: https://github.com/mxu9/edk2/tree/CcExitLib.v2 v2 changes: - Patch #3 is added to import CcExitLib in OvmfPkg's *.dsc. This is to prevent the building from being broken in the following patches. Cc: Eric Dong Cc: Ray Ni Cc: Brijesh Singh Cc: Erdem Aktas Cc: Gerd Hoffmann Cc: James Bottomley Cc: Jiewen Yao Cc: Tom Lendacky Cc: Guo Dong Cc: Sean Rhodes Cc: James Lu Cc: Gua Guo Cc: Michael D Kinney Cc: Liming Gao Signed-off-by: Min Xu Min M Xu (9): UefiCpuPkg: Add CcExitLib OvmfPkg: Implement CcExitLib OvmfPkg: Add CcExitLib in *.dsc UefiCpuPkg: Use CcExitLib instead of VmgExitLib UefiPayloadPkg: Use CcExitLib instead of VmgExitLib OvmfPkg: Use CcExitLib instead of VmgExitLib OvmfPkg: Delete VmgExitLib UefiCpuPkg: Delete VmgExitLib Maintainers: Update the VmgExitLib to CcExitLib Maintainers.txt | 2 +- OvmfPkg/AmdSev/AmdSevX64.dsc | 4 +- OvmfPkg/Bhyve/BhyveX64.dsc | 2 +- OvmfPkg/CloudHv/CloudHvX64.dsc | 6 +- OvmfPkg/IntelTdx/IntelTdxX64.dsc | 4 +- .../DxeMemEncryptSevLib.inf | 2 +- .../PeiMemEncryptSevLib.inf | 2 +- .../SecMemEncryptSevLib.inf | 2 +- .../X64/SnpPageStateChangeInternal.c | 10 +- .../VmgExitLib.c => CcExitLib/CcExitLib.c} | 23 +-- .../CcExitLib.inf} | 19 +-- .../CcExitTd.h} | 6 +- .../CcExitVcHandler.c} | 133 +++++++++--------- .../CcExitVcHandler.h} | 10 +- .../CcExitVeHandler.c} | 8 +- .../PeiDxeCcExitVcHandler.c} | 12 +- .../SecCcExitLib.inf} | 16 +-- .../SecCcExitVcHandler.c} | 12 +- .../X64/TdVmcallCpuid.nasm | 4 +- OvmfPkg/Microvm/MicrovmX64.dsc | 4 +- OvmfPkg/OvmfPkgIa32.dsc | 4 +- OvmfPkg/OvmfPkgIa32X64.dsc | 4 +- OvmfPkg/OvmfPkgX64.dsc | 6 +- OvmfPkg/OvmfXen.dsc | 2 +- OvmfPkg/PlatformPei/AmdSev.c | 10 +- OvmfPkg/PlatformPei/PlatformPei.inf | 2 +- .../FvbServicesRuntimeDxe.inf | 2 +- .../QemuFlashDxe.c | 10 +- .../Library/{VmgExitLib.h => CcExitLib.h} | 29 ++-- .../CcExitLibNull.c} | 47 +++++-- .../CcExitLibNull.inf} | 14 +- .../Library/CcExitLibNull/CcExitLibNull.uni | 14 ++ .../DxeCpuExceptionHandlerLib.inf | 2 +- .../PeiCpuExceptionHandlerLib.inf | 2 +- .../PeiDxeSmmCpuException.c | 6 +- .../SecPeiCpuException.c | 6 +- .../SecPeiCpuExceptionHandlerLib.inf | 2 +- .../SmmCpuExceptionHandlerLib.inf | 2 +- .../Xcode5SecPeiCpuExceptionHandlerLib.inf | 2 +- UefiCpuPkg/Library/MpInitLib/AmdSev.c | 10 +- UefiCpuPkg/Library/MpInitLib/DxeMpInitLib.inf | 2 +- UefiCpuPkg/Library/MpInitLib/DxeMpLib.c | 8 +- UefiCpuPkg/Library/MpInitLib/MpLib.c | 2 +- UefiCpuPkg/Library/MpInitLib/PeiMpInitLib.inf | 2 +- UefiCpuPkg/Library/MpInitLib/X64/AmdSev.c | 10 +- .../Library/VmgExitLibNull/VmTdExitNull.c | 38 ----- .../Library/VmgExitLibNull/VmgExitLibNull.uni | 15 -- UefiCpuPkg/UefiCpuPkg.dec | 4 +- UefiCpuPkg/UefiCpuPkg.dsc | 4 +- UefiPayloadPkg/UefiPayloadPkg.dsc | 2 +- 50 files changed, 269 insertions(+), 275 deletions(-) rename OvmfPkg/Library/{VmgExitLib/VmgExitLib.c => CcExitLib/CcExitLib.c} (89%) rename OvmfPkg/Library/{VmgExitLib/VmgExitLib.inf => CcExitLib/CcExitLib.inf} (60%) rename OvmfPkg/Library/{VmgExitLib/VmTdExitHandler.h => CcExitLib/CcExitTd.h} (84%) rename OvmfPkg/Library/{VmgExitLib/VmgExitVcHandler.c => CcExitLib/CcExitVcHandler.c} (90%) rename OvmfPkg/Library/{VmgExitLib/VmgExitVcHandler.h => CcExitLib/CcExitVcHandler.h} (85%) rename OvmfPkg/Library/{VmgExitLib/VmTdExitVeHandler.c => CcExitLib/CcExitVeHandler.c} (94%) rename OvmfPkg/Library/{VmgExitLib/PeiDxeVmgExitVcHandler.c => CcExitLib/PeiDxeCcExitVcHandler.c} (87%) rename OvmfPkg/Library/{VmgExitLib/SecVmgExitLib.inf => CcExitLib/SecCcExitLib.inf} (73%) rename OvmfPkg/Library/{VmgExitLib/SecVmgExitVcHandler.c => CcExitLib/SecCcExitVcHandler.c} (88%) rename OvmfPkg/Library/{VmgExitLib => CcExitLib}/X64/TdVmcallCpuid.nasm (93%) rename UefiCpuPkg/Include/Library/{VmgExitLib.h => CcExitLib.h} (86%) rename UefiCpuPkg/Library/{VmgExitLibNull/VmgExitLibNull.c => CcExitLibNull/CcExitLibNull.c} (76%) rename UefiCpuPkg/Library/{VmgExitLibNull/VmgExitLibNull.inf => CcExitLibNull/CcExitLibNull.inf} (50%) create mode 100644 UefiCpuPkg/Library/CcExitLibNull/CcExitLibNull.uni delete mode 100644 UefiCpuPkg/Library/VmgExitLibNull/VmTdExitNull.c delete mode 100644 UefiCpuPkg/Library/VmgExitLibNull/VmgExitLibNull.uni -- 2.29.2.windows.2