From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id 602BD7803D7 for ; Thu, 30 Nov 2023 06:31:48 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=uS5Gre8FiwiWYr6jax6feL8+2+RR163Etbou/BqGrnM=; c=relaxed/simple; d=groups.io; h=From:To:Cc:Subject:Date:Message-Id:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe; s=20140610; t=1701325907; v=1; b=vipBtOqgcHXxshfsLl2o1qJTI89CzllPoj9cxGStyiRnCnTHBA0pnC6opxVfNGx+JhFUGBuM UaxjjInhcJdViBtl7Cwu7x+7SL3YqxirLhoi883NvXyw5h6v6FwUl+B2szbgKMMGvPuBuzRtN22 yb31AIYqIrrupCSDS+qGSHEE= X-Received: by 127.0.0.2 with SMTP id xUzYYY7687511xmUoOS1kVDE; Wed, 29 Nov 2023 22:31:47 -0800 X-Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.8]) by mx.groups.io with SMTP id smtpd.web10.66761.1701325906495811111 for ; Wed, 29 Nov 2023 22:31:46 -0800 X-IronPort-AV: E=McAfee;i="6600,9927,10909"; a="6496100" X-IronPort-AV: E=Sophos;i="6.04,237,1695711600"; d="scan'208";a="6496100" X-Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmvoesa102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Nov 2023 22:31:46 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10909"; a="913091938" X-IronPort-AV: E=Sophos;i="6.04,237,1695711600"; d="scan'208";a="913091938" X-Received: from sh1gapp1009.ccr.corp.intel.com ([10.239.189.219]) by fmsmga001.fm.intel.com with ESMTP; 29 Nov 2023 22:31:42 -0800 From: "Wu, Jiaxin" To: devel@edk2.groups.io Cc: Laszlo Ersek , Eric Dong , Ray Ni , Zeng Star , Gerd Hoffmann , Rahul Kumar , Ard Biesheuvel , Jiewen Yao , Jordan Justen , Guo Dong , Sean Rhodes , James Lu , Gua Guo Subject: [edk2-devel] [PATCH v2 0/6] Refine SMM CPU Sync flow and abstract SmmCpuSyncLib Date: Thu, 30 Nov 2023 14:31:33 +0800 Message-Id: <20231130063139.7472-1-jiaxin.wu@intel.com> Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,jiaxin.wu@intel.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: 0TaJ5RZIaFPw2FWx0WenMWZTx7686176AA= X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=vipBtOqg; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=intel.com (policy=none); spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io The series patches are to refine SMM CPU Sync flow. After the refinement, SmmCpuSyncLib is abstracted for any user to provide different SMM CPU Sync implementation. Compared to V1, has following refinement & changes: 1. Remove below patch from this series patches: UefiCpuPkg/PiSmmCpuDxeSmm: Reduce times of BSP and AP Sync for SMM Exit Reason: Plan to separate that patch into another patch set. 2. Refine the patch according Laszlo & Ray's comments: a. Removed Change-Id in the patches b. Optimized the description to avoid the confusing. c. Fixed wrong function comment to make it correct and understandable. d. Use an incomplete structure type to aviod the VOID*. e. Corrected all functions params "in" & "out". f. Added lots of comments for the library to explain the operation & behavior. g. Fixed inconsistent return types from lib APIs. h. Use SafeIntLib for all calculations to prevent overflows. i. Remove the UefiCpuPkg/UefiCpuLibs.dsc.inc Cc: Laszlo Ersek Cc: Eric Dong Cc: Ray Ni Cc: Zeng Star Cc: Gerd Hoffmann Cc: Rahul Kumar Cc: Ard Biesheuvel Cc: Jiewen Yao Cc: Jordan Justen Cc: Guo Dong Cc: Sean Rhodes Cc: James Lu Cc: Gua Guo Signed-off-by: Jiaxin Wu Jiaxin Wu (6): UefiCpuPkg/PiSmmCpuDxeSmm: Optimize Semaphore Sync between BSP and AP UefiCpuPkg: Adds SmmCpuSyncLib library class UefiCpuPkg: Implements SmmCpuSyncLib library instance OvmfPkg: Specifies SmmCpuSyncLib instance UefiPayloadPkg: Specifies SmmCpuSyncLib instance UefiCpuPkg/PiSmmCpuDxeSmm: Consume SmmCpuSyncLib OvmfPkg/CloudHv/CloudHvX64.dsc | 2 + OvmfPkg/OvmfPkgIa32.dsc | 2 + OvmfPkg/OvmfPkgIa32X64.dsc | 2 + OvmfPkg/OvmfPkgX64.dsc | 1 + UefiCpuPkg/Include/Library/SmmCpuSyncLib.h | 278 +++++++++ UefiCpuPkg/Library/SmmCpuSyncLib/SmmCpuSyncLib.c | 690 +++++++++++++++++++++ UefiCpuPkg/Library/SmmCpuSyncLib/SmmCpuSyncLib.inf | 39 ++ UefiCpuPkg/PiSmmCpuDxeSmm/MpService.c | 275 ++++---- UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.h | 6 +- UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.inf | 1 + UefiCpuPkg/UefiCpuPkg.dec | 3 + UefiCpuPkg/UefiCpuPkg.dsc | 3 + UefiPayloadPkg/UefiPayloadPkg.dsc | 1 + 13 files changed, 1132 insertions(+), 171 deletions(-) create mode 100644 UefiCpuPkg/Include/Library/SmmCpuSyncLib.h create mode 100644 UefiCpuPkg/Library/SmmCpuSyncLib/SmmCpuSyncLib.c create mode 100644 UefiCpuPkg/Library/SmmCpuSyncLib/SmmCpuSyncLib.inf -- 2.16.2.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#111892): https://edk2.groups.io/g/devel/message/111892 Mute This Topic: https://groups.io/mt/102889290/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-