From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mx.groups.io with SMTP id smtpd.web08.7049.1651901417463627919 for ; Fri, 06 May 2022 22:30:18 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=l22PT5Wx; spf=pass (domain: intel.com, ip: 134.134.136.20, mailfrom: ray.ni@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1651901417; x=1683437417; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=kdbH02egnDug7E85dceK8ZvoEePEbr7wtw1//KQPPAk=; b=l22PT5WxsZGGvg4FAN+3dX8XIr7eJIweAgTubd1luZIkp0pvO7FtcyQN 5AwofOcoQYx4OYSYXS76T+Aip2tBinLw44F4pC/5CTlzcWwSzg9DVTho1 OUkz/tDl5ipNQD4m9+BUiA2YeDZpgSeI4iS0BKKTUGjjZ9exTcyQJPPMF Li4gSmWv1NJGojzeQeyevjtBSk5/knRjAKEf/EHaFz0gPJQnWSyBGSZjj hTns3IpQXxvk33niWIMUktXHN65muuTDWG99WoQ9tf0ukUBqXuQRnGh8c 1TF9bXsj1QHct9DN+H9BT82m6nkgKy1N/9eC9xp8To4SZukw2BMe+G+dY w==; X-IronPort-AV: E=McAfee;i="6400,9594,10339"; a="256142279" X-IronPort-AV: E=Sophos;i="5.91,206,1647327600"; d="scan'208";a="256142279" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 May 2022 22:30:15 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.91,206,1647327600"; d="scan'208";a="518366980" Received: from fmsmsx603.amr.corp.intel.com ([10.18.126.83]) by orsmga003.jf.intel.com with ESMTP; 06 May 2022 22:30:15 -0700 Received: from fmsmsx612.amr.corp.intel.com (10.18.126.92) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27; Fri, 6 May 2022 22:30:15 -0700 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) by fmsmsx612.amr.corp.intel.com (10.18.126.92) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27 via Frontend Transport; Fri, 6 May 2022 22:30:15 -0700 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (104.47.57.173) by edgegateway.intel.com (192.55.55.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.27; Fri, 6 May 2022 22:30:14 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FUfQVVheMGwHQQmEo56fA/U7LNFs4Bk6S9a6mUCgQVhSWDlJTl+91ZH64IEY2eyszbI2vO8JBiJtxqFw3L3wJew2IaYRY/C1FOs6GnO2odCzdAiBBJQ57BPEh4GcGCB6bbF/JAPgfgOx6VqoSrBPcp/RojoEayg4XvOTJ6tKaQSJxSVXToYPPcM4wvvyTsSk3yVMDNgkl0NxVYxrTV0whpPbAxzuMZvfJcqNZpI5XDSh3db7PeuLbAKV1ClLFfDF/IlMVo0PlIKmG+e3cQ4M/vG8MsrF01vGnyFML1dKKNRK9LoPbVQPfW4VlzkjqUK1szymI7AmJKL1WotpbPH2Ug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=mUjqmlJx/YAijEmgco205U8XTk2QAR87RRgDzBrSQRI=; b=MEWc7p6OY3keJljjR9EKPcDB/Tl2X/DgWcyQ6cO1x1GY5yplAJyzcymaEKEAjpZzD6Bs02sq3vlPsxUuHiJxJ+6D1YTqvFeEM7D8nZl161rJYAX7iG5KIS8voFQuJAKZY1SAuG7scCv/3uc56sd2hzpaiYI1ikxTV+oRiKgaJ1WlDviobrxMoGZJ5B0pAPR4TXW2oJtzEn/0YqWtaDuhKR8LUuAEroH7aLRkddvI5hIDwgkDdijqktKf2AA1FcoWT90q+RVAqKuPTdQBPlK2iR/hqMOm+m/lOenQloxbnHv9N8yxn0z9T7yLkz/BNsG9NMBYnAOeeddJRF+XrGX1Hw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Received: from MWHPR11MB1631.namprd11.prod.outlook.com (2603:10b6:301:10::10) by DM6PR11MB3147.namprd11.prod.outlook.com (2603:10b6:5:64::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5227.20; Sat, 7 May 2022 05:30:13 +0000 Received: from MWHPR11MB1631.namprd11.prod.outlook.com ([fe80::2d8b:3e7f:83d7:1e56]) by MWHPR11MB1631.namprd11.prod.outlook.com ([fe80::2d8b:3e7f:83d7:1e56%8]) with mapi id 15.20.5206.028; Sat, 7 May 2022 05:30:13 +0000 From: "Ni, Ray" To: "Xu, Min M" , "devel@edk2.groups.io" CC: "Dong, Eric" , Brijesh Singh , "Aktas, Erdem" , James Bottomley , "Yao, Jiewen" , Tom Lendacky , Gerd Hoffmann Subject: Re: [PATCH V2 0/6] Support 2 CpuMpPei/CpuDxe in One image Thread-Topic: [PATCH V2 0/6] Support 2 CpuMpPei/CpuDxe in One image Thread-Index: AQHYYbLqIYqedbUIXEWYZljxG367N60S46CA Date: Sat, 7 May 2022 05:30:12 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: fddd0a6b-0fcb-4701-0c4b-08da2feaa8f5 x-ms-traffictypediagnostic: DM6PR11MB3147:EE_ x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-microsoft-antispam-prvs: x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: xiWSQoMYUnp/8yAU0/U2/R/BPMQCbiWn57JdI2BtQiJivg9MkBiOolNjo7LhNLyUz+mNreVSH21k+GSHR6puh8LYrOLtMCafa2brvIGcTL3klLHgLtWrgNl+wFH7neWP6nyvW12T6ho0IRYulCoON8tTr8rhaBG+HQI84hfGC/tAMTjt70n2fyLIQNcmUGprJA3vc1cKYkTxQOTkeip8xZR4p/oG1Oat35hLFdFQjrdmSZUq/XjhbgqgKBinOebBljtM8TIzIwHJxSjzhgjcVmYSkW/4v9lqvnGNjSBQzoujUu3EEWziCqmHL/Uq0FS4ri8i9pyJXP5QYxVoO69/iI3gRfFnINnUlpWiXU/ZWl4FOXdcLfgppJKux8wJflFm0ANNcS4dLdi62Or8Rmyd6HILkH5+ygaX/snxvw3jElU+MH/JoD4J6jAB15GeAGLcovDWqycjZ0+g9wCGAu1VQS1nEYLlo/G/J2Cm1jDUpyy+5oiymf04BBI0MNFLx6Hy89e8QRkqgMMtUaCpdT8tEQmn+v3ko9FO5alt2pqbZN2Y6lsTXl9rnOD/dePnzBT5Ij6nRN2CSH4CBroQM+PEcBuR6OnUYGDIrlgJi+NV0AZ2lJAMY+Fh9JEl6ShKUQOrI2z2Sk4Wg2SCNLCCPsy6Kh+JdQLZkoXzzVR7NAe3ccCj7DcyFUcP3YdtJHXoLdCAr4+DUKEGzty7KaMhzgFDC+0dqNaJ44jWCSeAWxZN3WBjhWSNaPXgmKEcfFTyAYNuL3z38bu4e9/xMv9xTZM8G0fuGb1cvbFNUzIEQXePnQRD9RY/L45uX8KDtuYOjLpojgyQujMKWLVUJTAxkfWBkw== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MWHPR11MB1631.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230001)(6029001)(366004)(86362001)(6506007)(71200400001)(966005)(5660300002)(52536014)(53546011)(508600001)(33656002)(26005)(9686003)(4326008)(7696005)(2906002)(122000001)(55016003)(82960400001)(8936002)(186003)(83380400001)(38070700005)(38100700002)(66946007)(316002)(66556008)(66476007)(8676002)(64756008)(76116006)(19627235002)(54906003)(110136005)(66446008);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?MKFBEkR4q5bcXD/j6jRzkYopVz6m/gvhAsU4NW9g5Z4ptee0oabbss4jHWUi?= =?us-ascii?Q?FQzAIXOMQt90IkkIXBjypEFz0niAJK2iGQp0SgcV8l0/eZ5tY/CuD1T5q++O?= =?us-ascii?Q?b8LrLRuwF+Vsc1eTfJ6jjWtMGf80cz/8bVBfGQZ6CxMcajXPdSCZ0khF+k5i?= =?us-ascii?Q?+4Qptkn2qWKX7RvbtdDgUTOtveIhrPCIIT85wshwxdYsiXvrtSqow887fr4y?= =?us-ascii?Q?o9uF9bHZ6yVmE39c3LIwf0id7Q2girusskRriJS0QBb3IOQakkRSLNcNQDAV?= =?us-ascii?Q?d6IPKlL9ZmO/lfw+5P/ZDJdABaWYRuD8PGoXQHlAd8YwGs6Ag1gR6PrVUBkT?= =?us-ascii?Q?iIxyzVlRs+wM20t/K5W6RTs/m3gG8UuNYNmfSUiZ24J3608kKKWo5lHJ3SmW?= =?us-ascii?Q?A0NpFWP7jS7g0rkVqaBQFR/iuzxR+uKADIPkvtkaAoOFzXE9eATS7hN1Ydh/?= =?us-ascii?Q?q7Kv5iEPtUVVMZagSvr1Sgd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A9yXmzutakEWLnhXp+0Lxjq66J/UlhPanmxIrg5WkixoaKRbk/DfQE9x/m?= =?us-ascii?Q?ZxsHxLYhcc+WQQ/eJPBLCUu+pGz9SabpcASsaSnueFJdMSWevvp1ootVq2Gt?= =?us-ascii?Q?H2zN6GBK3NOYr7xUqrcxoXD5HnnBbQxRkZPn8PQcFEim62jaGCf9fl4fILAI?= =?us-ascii?Q?F0HKOCtCvx2dpZDDPmDtOBfSVmD29lVd/Yk++Q1yquOFJQ+RX8f+sG9CJX5m?= =?us-ascii?Q?M5Yipc0sqCF+l4ELetEEiC09ufio5VhxB2SqGwUUSXmQ7t/Ydb1us6VJw4S8?= =?us-ascii?Q?OLuR6lF+ij9Cbu4BWlZwz4hiGZHe8p6f6p+6Y24Ij5gD8tS5?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MWHPR11MB1631.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: fddd0a6b-0fcb-4701-0c4b-08da2feaa8f5 X-MS-Exchange-CrossTenant-originalarrivaltime: 07 May 2022 05:30:12.9518 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: IcAfrNae+mySi/OJkKfgnjaJj6Ph5eZpZ2YQIw2XvnQBSB2cFoUnBn+0jT4C843k9DVP11C/4heArh5ZZpM+gg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR11MB3147 Return-Path: ray.ni@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Ray Ni > -----Original Message----- > From: Xu, Min M > Sent: Saturday, May 7, 2022 9:36 AM > To: devel@edk2.groups.io > Cc: Xu, Min M ; Dong, Eric ; Ni,= Ray ; Brijesh Singh > ; Aktas, Erdem ; James Bott= omley ; Yao, Jiewen > ; Tom Lendacky ; Gerd Hoff= mann > Subject: [PATCH V2 0/6] Support 2 CpuMpPei/CpuDxe in One image >=20 > BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3D3918 >=20 > Above BZ reports an issue that commit 88da06ca triggers ASSERT in some > scenario. This patch-set is to fix this issue. >=20 > As commit 88da06ca describes TDVF BSP and APs are simplied and it can > simply use MpInitLibUp instead of MpInitLib. To achieve this goal, we > include 2 CpuMpPei/CpuDxe drivers in OvmfPkgX64 and IntelTdxX64. This > is done by setting different FILE_GUID to these drivers (of the same > name). In the other hand, we import a set of MpInitLibDepLib. These > libs simply depend on the PPI/Protocols. While these PPI/Protocols are > installed according to the guest type. >=20 > This patch-set is a replacement of > https://edk2.groups.io/g/devel/message/89381. Please see the dicussion in > - https://edk2.groups.io/g/devel/message/89382 > - https://edk2.groups.io/g/devel/message/89455 > - https://edk2.groups.io/g/devel/message/89522 > - https://edk2.groups.io/g/devel/message/89535 >=20 > The code is at: https://github.com/mxu9/edk2/tree/Rework-MpInitLib.v2 >=20 > v2 changes: > - Remove the un-used FILE_GUID definitions. > - Delete un-used EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST in DispatchTable. > - Add more comments. >=20 > Cc: Eric Dong > Cc: Ray Ni > Cc: Brijesh Singh > Cc: Erdem Aktas > Cc: James Bottomley > Cc: Jiewen Yao > Cc: Tom Lendacky > Cc: Gerd Hoffmann > Signed-off-by: Min Xu >=20 > Min M Xu (4): > UefiCpuPkg: Revert "UefiCpuPkg: Enable Tdx support in MpInitLib" > OvmfPkg/Sec: Install MpInitLibDepLib PPIs in SecMain.c > OvmfPkg/TdxDxe: Install MpInitLibDepLib protocols > OvmfPkg: Enable 2 different CpuMpPei and CpuDxe drivers >=20 > Min Xu (2): > OvmfPkg: Add MpInitLibDepLib related PPI/Protocol definitions > OvmfPkg: Add MpInitLibDepLib >=20 > OvmfPkg/Include/Ppi/MpInitLibDep.h | 28 +++++ > .../Include/Protocol/MpInitLibDepProtocols.h | 28 +++++ > OvmfPkg/IntelTdx/IntelTdxX64.dsc | 30 ++++- > OvmfPkg/IntelTdx/IntelTdxX64.fdf | 3 + > .../MpInitLibDepLib/DxeMpInitLibMpDepLib.inf | 27 +++++ > .../MpInitLibDepLib/DxeMpInitLibUpDepLib.inf | 27 +++++ > .../Library/MpInitLibDepLib/MpInitLibDepLib.c | 23 ++++ > .../MpInitLibDepLib/PeiMpInitLibMpDepLib.inf | 27 +++++ > .../MpInitLibDepLib/PeiMpInitLibUpDepLib.inf | 27 +++++ > OvmfPkg/OvmfPkg.dec | 5 + > OvmfPkg/OvmfPkgX64.dsc | 55 ++++++++- > OvmfPkg/OvmfPkgX64.fdf | 4 + > OvmfPkg/Sec/SecMain.c | 34 +++++- > OvmfPkg/Sec/SecMain.inf | 2 + > OvmfPkg/TdxDxe/TdxDxe.c | 22 +++- > OvmfPkg/TdxDxe/TdxDxe.inf | 2 + > UefiCpuPkg/Library/MpInitLib/DxeMpInitLib.inf | 3 - > UefiCpuPkg/Library/MpInitLib/MpIntelTdx.h | 69 ------------ > UefiCpuPkg/Library/MpInitLib/MpLib.c | 63 +---------- > UefiCpuPkg/Library/MpInitLib/MpLibTdx.c | 106 ------------------ > UefiCpuPkg/Library/MpInitLib/MpLibTdxNull.c | 69 ------------ > UefiCpuPkg/Library/MpInitLib/PeiMpInitLib.inf | 3 - > 22 files changed, 343 insertions(+), 314 deletions(-) > create mode 100644 OvmfPkg/Include/Ppi/MpInitLibDep.h > create mode 100644 OvmfPkg/Include/Protocol/MpInitLibDepProtocols.h > create mode 100644 OvmfPkg/Library/MpInitLibDepLib/DxeMpInitLibMpDepLib.= inf > create mode 100644 OvmfPkg/Library/MpInitLibDepLib/DxeMpInitLibUpDepLib.= inf > create mode 100644 OvmfPkg/Library/MpInitLibDepLib/MpInitLibDepLib.c > create mode 100644 OvmfPkg/Library/MpInitLibDepLib/PeiMpInitLibMpDepLib.= inf > create mode 100644 OvmfPkg/Library/MpInitLibDepLib/PeiMpInitLibUpDepLib.= inf > delete mode 100644 UefiCpuPkg/Library/MpInitLib/MpIntelTdx.h > delete mode 100644 UefiCpuPkg/Library/MpInitLib/MpLibTdx.c > delete mode 100644 UefiCpuPkg/Library/MpInitLib/MpLibTdxNull.c >=20 > -- > 2.29.2.windows.2