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.web10.6507.1687843456505164051 for ; Mon, 26 Jun 2023 22:24:16 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=If5WQIcC; spf=pass (domain: intel.com, ip: 134.134.136.24, mailfrom: dun.tan@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1687843456; x=1719379456; h=from:to:subject:date:message-id:mime-version: content-transfer-encoding; bh=YS30cnm8NWYnOwK1xQVSvKD2O+/Irtez9vEz6Mw+re0=; b=If5WQIcCDE2Wv3lAN4wHHcnhLdhJp1GSWPDx/X9giRaSlRzZxQYnUtQb GLraPhqCDd2yEui6e1/OO1gvjzg6rXwJUwMnfE3+GSz6NYP5koMRpu9sF llo62U8KP8s0jZS11hVq5Ly8uREk0UYJl63v0v8K+qHKDXXE8IHP34OSp h164S6ME/D3CHN7GRJJP2Q8lu3gQhn3XWGvvBlV7g79b3C7f7LS7h48ES 4+QtGDTGU3IkUIN620bGMfXkfmZYc79SfmS/dliXNTAXRubWvYUb+fs00 7WOFwcniK4csMQSXUg09LIa5gfhuELWO2CcDupkI4tEmEouiGc/EXcugM g==; X-IronPort-AV: E=McAfee;i="6600,9927,10753"; a="364023931" X-IronPort-AV: E=Sophos;i="6.01,161,1684825200"; d="scan'208";a="364023931" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Jun 2023 22:24:16 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10753"; a="963033370" X-IronPort-AV: E=Sophos;i="6.01,161,1684825200"; d="scan'208";a="963033370" Received: from shwdeopenlab702.ccr.corp.intel.com ([10.239.55.158]) by fmsmga006-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Jun 2023 22:24:14 -0700 From: "duntan" To: devel@edk2.groups.io Subject: [Patch V7 00/14] Use CpuPageTableLib to create and update smm page table Date: Tue, 27 Jun 2023 13:23:39 +0800 Message-Id: <20230627052340.1663-1-dun.tan@intel.com> X-Mailer: git-send-email 2.31.1.windows.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit In the V7 patch set: In 'OvmfPkg:Remove code that apply AddressEncMask to non-leaf entry', remove the code to apply AddressEncMask to PageMapLevel4Entry in InternalMemEncryptSevCreateIdentityMap1G() function. Only resend the patch in OvmfPkg for review. Other patches in the patch set have been reviewed-by. Dun Tan (14): OvmfPkg:Remove code that apply AddressEncMask to non-leaf entry MdeModulePkg: Remove other attribute protection in UnsetGuardPage UefiCpuPkg: Use CpuPageTableLib to convert SMM paging attribute. UefiCpuPkg: Add DEBUG_CODE for special case when clear RP UefiCpuPkg/PiSmmCpuDxeSmm: Avoid setting non-present range to RO/NX UefiCpuPkg/PiSmmCpuDxeSmm: Add 2 function to disable/enable CR0.WP UefiCpuPkg/PiSmmCpuDxeSmm: Clear CR0.WP before modify page table UefiCpuPkg: Extern mSmmShadowStackSize in PiSmmCpuDxeSmm.h UefiCpuPkg: Add GenSmmPageTable() to create smm page table UefiCpuPkg: Use GenSmmPageTable() to create Smm S3 page table UefiCpuPkg: Sort mSmmCpuSmramRanges in FindSmramInfo UefiCpuPkg: Sort mProtectionMemRange when ReadyToLock UefiCpuPkg: Refinement to smm runtime InitPaging() code UefiCpuPkg/PiSmmCpuDxeSmm: Remove unnecessary function MdeModulePkg/Core/PiSmmCore/HeapGuard.c | 16 +++++++++++++++- OvmfPkg/Library/BaseMemEncryptSevLib/X64/PeiDxeVirtualMemory.c | 8 ++++---- UefiCpuPkg/PiSmmCpuDxeSmm/Ia32/PageTbl.c | 5 +++-- UefiCpuPkg/PiSmmCpuDxeSmm/Ia32/SmmFuncsArch.c | 3 +-- UefiCpuPkg/PiSmmCpuDxeSmm/Ia32/SmmProfileArch.c | 2 +- UefiCpuPkg/PiSmmCpuDxeSmm/MpService.c | 132 ------------------------------------------------------------------------------------------------------------------------------------ UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.c | 40 ++++++++++++++++++++++++++++++++++++++-- UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.h | 121 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------------------------------- UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.inf | 1 + UefiCpuPkg/PiSmmCpuDxeSmm/SmmCpuMemoryManagement.c | 795 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- UefiCpuPkg/PiSmmCpuDxeSmm/SmmProfile.c | 324 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- UefiCpuPkg/PiSmmCpuDxeSmm/X64/PageTbl.c | 229 ++++++++++++++++++++++++++++++++----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- UefiCpuPkg/PiSmmCpuDxeSmm/X64/SmmFuncsArch.c | 3 +-- UefiCpuPkg/PiSmmCpuDxeSmm/X64/SmmProfileArch.c | 20 ++++---------------- 14 files changed, 683 insertions(+), 1016 deletions(-) -- 2.31.1.windows.1