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.4980.1688033346805069325 for ; Thu, 29 Jun 2023 03:09:07 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=egQdVtw1; 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=1688033346; x=1719569346; h=from:to:subject:date:message-id:mime-version: content-transfer-encoding; bh=YLbAN+QdeR4VSqSOwL9clyDk/8ivAGL43ppQTH4B180=; b=egQdVtw1dn14yd7dn0flY3fCn9OHBHnX1yTWaZrlxV/hzhTn2P8G4+O6 LntmdttDhRxsuxGsdX5Z2+5q4Dgjkvk+sAnvFIQkl0yhutzoB0INFW/Jr 8vrAV1zvw0H8SfS9xLJ7Q/TRsjazT3BIWWWAVKYb+D+Z6AML2yRzJT+Ge BO3mMOcg10C0k4IVpp88hb9nvAK25NQanlijwYlZ2Qb5s7cQaoYBYGPtq lb0PIc3OPC4Su2LOrv/U2BhT+1vtErt9jWAvspGW9H+NZEh2P+5/41jkC Rr6GY9X+4jgL30mpLUe5N4h6h9LT57oybpf7rvnDjSEeMfAVOoI+v/B8W A==; X-IronPort-AV: E=McAfee;i="6600,9927,10755"; a="364620199" X-IronPort-AV: E=Sophos;i="6.01,168,1684825200"; d="scan'208";a="364620199" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Jun 2023 03:09:06 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10755"; a="746974440" X-IronPort-AV: E=Sophos;i="6.01,168,1684825200"; d="scan'208";a="746974440" Received: from shwdeopenlab702.ccr.corp.intel.com ([10.239.55.158]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Jun 2023 03:09:05 -0700 From: "duntan" To: devel@edk2.groups.io Subject: [Patch V8 00/14] Subject: [Patch V8 00/14] Use CpuPageTableLib to create and update smm page table Date: Thu, 29 Jun 2023 18:08:46 +0800 Message-Id: <20230629100847.1132-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 V8 patch set: In 'OvmfPkg:Remove code that apply AddressEncMask to non-leaf entry', I refined the commit message and added comments in the code around the areas being changed to explain this code change. Only resend the changed patch in OvmfPkg. The patch set has 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 | 23 +++++++++++++++++++---- 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 | 793 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- UefiCpuPkg/PiSmmCpuDxeSmm/SmmProfile.c | 322 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- UefiCpuPkg/PiSmmCpuDxeSmm/X64/PageTbl.c | 229 ++++++++++++++++++++++++++++++++----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- UefiCpuPkg/PiSmmCpuDxeSmm/X64/SmmFuncsArch.c | 3 +-- UefiCpuPkg/PiSmmCpuDxeSmm/X64/SmmProfileArch.c | 20 ++++---------------- 14 files changed, 696 insertions(+), 1014 deletions(-) -- 2.31.1.windows.1