From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mx.groups.io with SMTP id smtpd.web11.38065.1681289747865402854 for ; Wed, 12 Apr 2023 01:55:48 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=IQXG+VWk; spf=pass (domain: intel.com, ip: 192.55.52.43, 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=1681289747; x=1712825747; h=from:to:subject:date:message-id:mime-version: content-transfer-encoding; bh=sbP+8zy99ZVtYKyg1YceUxU8m2Gc47LXhaT9sCEa31c=; b=IQXG+VWkwYs+LP8o8hxVVjQyOYtaY+bii2NR1sUw6LvKlE3xjgwXdoqV lXOx6b6qkb6cW4uY1T75uCNobvql1yynHoPyJ1pKe3zlRnbuWCCr+lJeT cjpuPSZg8Edvevugtrn1FlT6GI+/QUlCNbLmzn5HzELDudlt1M3WMyGtn /+oB35R8Mo2fW4Rfr+S2FZu/K6773ppK1eKowTVdz5rn9ExWjedsOXtJv /lY4wuP+de9tfgHS6AmoI/+4PjOPCythfa9itniCC5JB0gBKWBk6kE5fa oR+/SqwFnjLjkM/OBo5Xt0mnVD53CW1+5YBiMFA6epLReDJiBFt4fyU+v A==; X-IronPort-AV: E=McAfee;i="6600,9927,10677"; a="430126711" X-IronPort-AV: E=Sophos;i="5.98,338,1673942400"; d="scan'208";a="430126711" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Apr 2023 01:55:46 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10677"; a="666262028" X-IronPort-AV: E=Sophos;i="5.98,338,1673942400"; d="scan'208";a="666262028" Received: from shwdeopenlab702.ccr.corp.intel.com ([10.239.55.92]) by orsmga006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Apr 2023 01:55:45 -0700 From: "duntan" To: devel@edk2.groups.io Subject: [Patch V2 0/8] Use CpuPageTableLib to create and update smm page table Date: Wed, 12 Apr 2023 16:53:35 +0800 Message-Id: <20230412085343.1077-1-dun.tan@intel.com> X-Mailer: git-send-email 2.31.1.windows.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit In V2 patch set: 1.In 'Refinement to code about updating smm page table', use QuickSort() in BaseLib instead or PerformQuickSort() in BaseSortLib. 2.Remove the patch to add BaseSortLib in DSC file. 3.Add a new patch to add CpuPageTableLib in UefiCpuPkg.dsc. 4.Add a temp patch to add CpuPageTableLib in OvmfPkg dsc files for test(A previous patch I sent before '[Patch V2 4/8] OvmfPkg: Add CpuPageTableLib required by DxeIpl in DSC file' contains all the changes in this patch) Dun Tan (8): OvmfPkg: Add CpuPageTableLib required by PiSmmCpuDxe UefiPayloadPkg: Add CpuPageTableLib required by PiSmmCpuDxe UefiCpuPkg: Use CpuPageTableLib to convert SMM paging attribute. UefiCpuPkg/PiSmmCpuDxeSmm: Avoid setting non-present range to RO/NX UefiCpuPkg: Extern mSmmShadowStackSize in PiSmmCpuDxeSmm.h UefiCpuPkg: Refinement to current smm page table generation code UefiCpuPkg: Refinement to code about updating smm page table UefiCpuPkg/PiSmmCpuDxeSmm: Remove unnecessary function OvmfPkg/CloudHv/CloudHvX64.dsc | 2 +- OvmfPkg/OvmfPkgIa32.dsc | 3 ++- OvmfPkg/OvmfPkgIa32X64.dsc | 2 +- OvmfPkg/OvmfPkgX64.dsc | 2 +- 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 | 8 ++++++-- UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.h | 97 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------------------------------------- UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.inf | 1 + UefiCpuPkg/PiSmmCpuDxeSmm/SmmCpuMemoryManagement.c | 629 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- UefiCpuPkg/PiSmmCpuDxeSmm/SmmProfile.c | 348 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- UefiCpuPkg/PiSmmCpuDxeSmm/X64/PageTbl.c | 229 ++++++++++++++++++++++++++++++------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- UefiCpuPkg/PiSmmCpuDxeSmm/X64/SmmFuncsArch.c | 3 +-- UefiCpuPkg/PiSmmCpuDxeSmm/X64/SmmProfileArch.c | 19 ++----------------- UefiPayloadPkg/UefiPayloadPkg.dsc | 2 +- 17 files changed, 510 insertions(+), 977 deletions(-) -- 2.39.1.windows.1