From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by mx.groups.io with SMTP id smtpd.web10.8361.1648454666018743073 for ; Mon, 28 Mar 2022 01:04:26 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=VwrYFvx4; spf=pass (domain: intel.com, ip: 192.55.52.151, mailfrom: min.m.xu@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1648454666; x=1679990666; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=KWXf6ypYcqjX3sGk+ziWxAgnwzXxrceaUxUum1M/BvE=; b=VwrYFvx4wX/4LgRpr3wijPRMFvvtZt+h9jEcdwJEPm75mHOZQZ4kIgED VErlv52LdQ1+wd0C6gzSEGJNZizEP3QhPfN3FTA6dKjUb4ONyvIFM0hRD qziwaQ//I2HJHwbaHHG2oz43xUdlQZ0Q1PhfOKeLA8kOGnwM5PXBTqCzm bkGRSkzfOkzWMFNd16y6szjlvXFaJKonFLZ0IyM1VgiMf1qMudzzKP0yH UZmOnZlhtQ6OBW/lSkBq/TfDe91xY9+HIKKk/n7QUoRa38kBcj24mmJKu XCJ047ZIKPCMakpLJEz5sOVIwznmuvyo6nWUJvYXxzwf3rreXpFuD86a8 Q==; X-IronPort-AV: E=McAfee;i="6200,9189,10299"; a="239537307" X-IronPort-AV: E=Sophos;i="5.90,216,1643702400"; d="scan'208";a="239537307" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Mar 2022 01:04:10 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.90,216,1643702400"; d="scan'208";a="719014534" Received: from fmsmsx602.amr.corp.intel.com ([10.18.126.82]) by orsmga005.jf.intel.com with ESMTP; 28 Mar 2022 01:04:09 -0700 Received: from fmsmsx602.amr.corp.intel.com (10.18.126.82) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27; Mon, 28 Mar 2022 01:04:09 -0700 Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27 via Frontend Transport; Mon, 28 Mar 2022 01:04:09 -0700 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (104.47.56.168) by edgegateway.intel.com (192.55.55.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.21; Mon, 28 Mar 2022 01:04:09 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KATJxZ+QN9UVQpz4mq+H4qx7w2exI8PZHGogOMNx9syW+FRduEntWY1WPhiJG4Hwnl1SLddkG5S3ROo+CFiInh8fKCY6VQstNPL0XUX1zIr1KemojmtqipEiY9mQLVYIHPjcgU6n63gJQxFZrQMpvfdYUEOz9jC+2mCL1gl+ooVvEOIeCIMHJi11/BmirqN3LcBuyTCOhxunjWsGRHSr+sEWSrWUa/Txz22p6ZrFA34AjyVa8RK4eu53tX0R4o8ibT7wcxx8dBtCWoR6aNBh+t8HBgJywFBu15Usz/r4vEDnc+8Y92Sn0KTK39V25xs79gk7R4ORyTqBNeRsSwbDXw== 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=d8WqoisfgsnoJMp9mv5ceWGnAt/LcTgoojuEqAB8jxI=; b=PG7IXkszAZoTYygfsL6rG11X/wr+xACpmVwSf838DQm/vhyQq8y0uDi7Dmr742/VIAPUPE6hQ8EccrTln9KXl4LY9+16QyqUPrMYiIxYMSQUDqNmQ8qzEykp8LFc1xcQof+rV4a+glSuxXKAUvUOJvJUh2v3MHmbiGn/DqIq84Q4w4pim7MfcONY/qP2lyvL75AR0bltkSovrGSd8bSLlfTOSyJS7ozuGRs1+JofivIOAOQuXH3Id/ncA1bgu1ooORRw7XQ4sXFch76Gjr+jKPHHXXLJx4HHNKLd+7ofS9YNFFcub9FeN0eL+eirpvNxKhm1hhi5atYeqe0yeFwzng== 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 PH0PR11MB5064.namprd11.prod.outlook.com (2603:10b6:510:3b::15) by SA0PR11MB4589.namprd11.prod.outlook.com (2603:10b6:806:9a::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5102.16; Mon, 28 Mar 2022 08:04:07 +0000 Received: from PH0PR11MB5064.namprd11.prod.outlook.com ([fe80::ece5:6170:a99a:480a]) by PH0PR11MB5064.namprd11.prod.outlook.com ([fe80::ece5:6170:a99a:480a%6]) with mapi id 15.20.5102.022; Mon, 28 Mar 2022 08:04:07 +0000 From: "Min Xu" To: "Ni, Ray" , "devel@edk2.groups.io" CC: Brijesh Singh , "Aktas, Erdem" , James Bottomley , "Yao, Jiewen" , Tom Lendacky , "Dong, Eric" , "Kumar, Rahul1" , "Gerd Hoffmann" Subject: Re: [PATCH V10 14/47] UefiCpuPkg: Enable Tdx support in MpInitLib Thread-Topic: [PATCH V10 14/47] UefiCpuPkg: Enable Tdx support in MpInitLib Thread-Index: AQHYPxO9snCmgqzYE0OwJaMKGiELNKzUBccAgABwhvA= Date: Mon, 28 Mar 2022 08:04:07 +0000 Message-ID: References: <20220324001033.1169-1-min.m.xu@intel.com> <20220324001033.1169-15-min.m.xu@intel.com> In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-reaction: no-action dlp-version: 11.6.401.20 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: 317ac0e8-4ca9-4948-a73e-08da109188a4 x-ms-traffictypediagnostic: SA0PR11MB4589: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: 1KVSU2obbvfFVRafNMUs8XKl9sSkWghunrsjB0pndpjzrzfPg7nSinZoAYUuzpZuO/aC3BBAJyO3lAw/dIMdelF4+FslSgoGlJkDdLs9luJPU2tBXWHKidmJ6FqsXvejV9V9r1Nwr6LxC24ZdW+wcBkgDaD/b6V/BV9Rhml86ml8coturEeQVZCX1iWUcqOUxnzjBFLwaLi1+DA1xXRcYKCpdr7bIcelhJVrDh3aXW0Rd4Odvznw07EQql27W6gFtN2pE34og86+i9d4h47WMTDp5UevROk1j6FG1Wdeq/dRgRjRku7n7zZQjgNd4p9mRue/P5d2anH1YBKH9bVZSLcg6UDBeT1+s/z/civKkhcUrqxeZ++JqCl2qhPPBgdon8Bc2S3+lLLyMTdBscJD9hP9Jk8dDWSuZY3N6bRNCYYlqUJgJ/U9GJasmapSVf84M17CEHVYfL2oM2dWqan61leGRcPb+UQ5HKviK8JgXpybgMfdGY6zlFPJLtJfuS4oC4PWO+7H80mJlazUgjSxPvQ9HUu+m8dgcdPfXT/9vFnq0fmYjDQhSecslKannJXl4IgWFXPEwJSiwAPtACM6ATBc2T6zejO2MoFuR7HEJ6xnkMoUDnZ5AvkEJjwnDV5qZnVxzQYfQBxbOdoQFpTbp8SS5C1jwYi+tfiZY+B8waBaA5Htqnh3fsNQgdC/sNwijBlZYaZwPawiHaFXTKJ39Q== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PH0PR11MB5064.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230001)(6029001)(366004)(4326008)(66476007)(64756008)(8676002)(66446008)(86362001)(66946007)(66556008)(76116006)(316002)(38100700002)(33656002)(54906003)(38070700005)(110136005)(122000001)(82960400001)(6506007)(5660300002)(7696005)(83380400001)(55016003)(4744005)(186003)(9686003)(2906002)(508600001)(71200400001)(52536014)(8936002)(26005);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?r7YNqsKNgEkrAovOvIEVldeb9+X77h7bi3luA1kF+miyabrr1PF+9mUlHe37?= =?us-ascii?Q?Z0moWWxAJahY8hVdw+oD6wrZ1Ve42BJcBOXgSl2XX40SNzmO7mQ3ZqYtCJou?= =?us-ascii?Q?uGsUrmnKZlaFGWLLwhoD+S/YMWrZNKXhkPJJzkUvNbSyg3VcG8IIM68cnHsR?= =?us-ascii?Q?yAoDzt0rUmhcaD7/fqJWk+sf/amdh4Hwa+z+OiBMLrs/bH40GWPVvD08DeIu?= =?us-ascii?Q?EQ9AuFM2OQWfLHAXSHMLT5uN9MAuntS7HaQU1TUq5OCUP/LebQWFaUJF741n?= =?us-ascii?Q?Ty3u7jo6B0lG8PCPpngfE/31bUWOckmhON0uAWGAZbvqUPYNjS4LQkWLHYw6?= =?us-ascii?Q?qJ37T6Avy1Bxdys+74p10lKFb/1ma3EghQqNTYiN8jJNciOJe0Oj9unfSLCg?= =?us-ascii?Q?gLgh2Du1+4kMKfDyHBm/sQIorYh6BRHQuOha/c+suUTv0eLnIeO3EEqAu6xH?= =?us-ascii?Q?Rc7XaFoCYcKQAq87yUeD9nzKVz9mBhV6cGzhLAQC1nHZ+vVfu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pjlPUF7J59Ne8AuLRz4MBdeFXvI9azfR0CCLISN4oyDwUk/RWP?= =?us-ascii?Q?ihITtT8br79sDZ2MsypoigkS2fSZiKJgGNm+mNnpixqiZfvRv5S5oxEC4X31?= =?us-ascii?Q?RY7FB6vBgGGWHy+Fa/V/ZlgrlMEY+9oPHa6t53ANSolxuSWQQufMsHFe+NTh?= =?us-ascii?Q?yEv59P/B89xvSm94KJ1Wra9ZFgfjNto9+pc5s/6MaB9EkKrzoGaSqq+DUaTU?= =?us-ascii?Q?9TLMavvyyB1zES4JdGm8/2X9taCK0MqCI92OEDz78tFvv9DBDPFQf9KWYXPf?= =?us-ascii?Q?9sD8Ua/sjp84Nt9Sf/btuN1sgawzIcudwZJ0GKQdaT2g5EBpSClPmyPSpxDf?= =?us-ascii?Q?YyjaTILftQ=3D=3D?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: PH0PR11MB5064.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 317ac0e8-4ca9-4948-a73e-08da109188a4 X-MS-Exchange-CrossTenant-originalarrivaltime: 28 Mar 2022 08:04:07.3578 (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: YLzLiiRJv7gVMIOB1eHlIPH1UGKH/hZkxDBon+GryIk2oOubmcm24JMsXbwrKNyxQ0Pwc4/1G5RYKng0fXCrYw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA0PR11MB4589 Return-Path: min.m.xu@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable On March 28, 2022 9:20 AM, Ni Ray wrote: > All look good! 3 minor comments: > 1. DxeMpLib.c may not need to include MpIntelTdx.h 2. You may use "ASSERT > (!ExcludeBsp)" in below code. Otherwise, it may confuse reader that when > ExcludeBsp is TRUE, SUCCESS is returned when ProcessorCount is 1 which is= not > right. >=20 > if (CC_GUEST_IS_TDX (PcdGet64 (PcdConfidentialComputingGuestAttr))) { > if (!ExcludeBsp) { > // > // Start BSP. > // > Procedure (ProcedureArgument); > } >=20 > return EFI_SUCCESS; > } >=20 > 3. TdxMpInitLibGetProcessorInfo may not need to call > GetProcessorLocationByApicId. You can directly set Package/Core/Thread to= 0. >=20 Thanks Ray for the comments. They'll be updated in the next version. Min