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 CC85A940F13 for ; Thu, 7 Dec 2023 01:25:48 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=l2Jr34ibFVXhYKqsy4eWWRvhdG0+PndfLkFE06Hl2OQ=; c=relaxed/simple; d=groups.io; h=ARC-Seal:ARC-Message-Signature:ARC-Authentication-Results:From:To:CC:Subject:Thread-Topic:Thread-Index:Date:Message-ID:References:In-Reply-To:Accept-Language:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Language:Content-Type:Content-Transfer-Encoding; s=20140610; t=1701912347; v=1; b=KhQpiG6gUzDTeF8ExEILg+L+S28IWsL4NN3t9hw0Sy3bZJdYGyBGRIq7/Vqm8n31ItOv7l2c EufPmHka1UdZKjggi66fBUMGHn/+eKb8Q2yen1VjYrf4mnsFrp80mFNjOkAmdwvto6ySMqiQHO+ MGegc5DEoVa5jtjqeTW7/a+M= X-Received: by 127.0.0.2 with SMTP id ZzEyYY7687511xeGd7uYCSud; Wed, 06 Dec 2023 17:25:47 -0800 X-Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.65]) by mx.groups.io with SMTP id smtpd.web10.73545.1701912346492731343 for ; Wed, 06 Dec 2023 17:25:46 -0800 X-IronPort-AV: E=McAfee;i="6600,9927,10916"; a="398036837" X-IronPort-AV: E=Sophos;i="6.04,256,1695711600"; d="scan'208";a="398036837" X-Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Dec 2023 17:25:38 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10916"; a="842037696" X-IronPort-AV: E=Sophos;i="6.04,256,1695711600"; d="scan'208";a="842037696" X-Received: from fmsmsx601.amr.corp.intel.com ([10.18.126.81]) by fmsmga004.fm.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 06 Dec 2023 17:25:38 -0800 X-Received: from fmsmsx612.amr.corp.intel.com (10.18.126.92) by fmsmsx601.amr.corp.intel.com (10.18.126.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Wed, 6 Dec 2023 17:25:37 -0800 X-Received: from fmsmsx603.amr.corp.intel.com (10.18.126.83) 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.2507.35; Wed, 6 Dec 2023 17:25:37 -0800 X-Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) 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.2507.35 via Frontend Transport; Wed, 6 Dec 2023 17:25:37 -0800 X-Received: from NAM12-BN8-obe.outbound.protection.outlook.com (104.47.55.169) 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.2507.35; Wed, 6 Dec 2023 17:25:36 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=eXEJLj3xZ5K5z2lmf5i4UJiUYuEL3iKRdiv5tIEji7oNcniOI1R543qcN2ZIq79Eo/02UJCvous2OoHc+fM4cX6BS7kqu/Cu6F14gIe4qYvrbZBRMtJYinOX5RuPu2syS4JhOTF358ylnxKPlvcOgAabC/xDr7lIk+t43mOm9QTDo/Qt1X53yMotYgVj1xYKedlttXRCyp8VFgFU7OeeGyIm6iczm/dnhBk/I2UO/4zdE46PGu+ILIUADpdjJ/NlrOyyqxtWOkeZNy/rdGVKRRXUP3FZ/YX3kGZfzqhncfckECUvu6SJem8iUmLJmT/cPxnSAtSxRonZqjJj2jV9Tg== 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=eA7JSsoH0KD4cK5AzxVR6kIaLEwHri4gr/51CfJHXAg=; b=P+ob7y23DoO39lYHOmj9bAvP3X5/J19GiDhC2vvn+H2gjGb/W0iuSrspKRLOpjN6qKbi2GclvgLaPu+eaQr+OLQqvm1YsbxnwaC1cHzbZbbzZdtTf+d/ud0awER1OJ8g6Toklanh/D3fB9FrVuIwieAhWkMUzmzZ6fAyh8405k1j7onRCrrFB62EkaJ7XiGo27srgRhTBHDGHxHs7om5G2G6U2K31qPJzkmuibhGMzAxmYidhnsaxoY1GzqFa4fKAayvDyx9WdbSKgLwHKj+cPrU7acdUenSPaEnoEE+6jKL0fZN/9ocJFTEGt5amJ4pOqLlGmp+BAb55vYz8ErC0w== 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 X-Received: from MN6PR11MB8244.namprd11.prod.outlook.com (2603:10b6:208:470::14) by SJ0PR11MB5168.namprd11.prod.outlook.com (2603:10b6:a03:2dc::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7068.25; Thu, 7 Dec 2023 01:25:29 +0000 X-Received: from MN6PR11MB8244.namprd11.prod.outlook.com ([fe80::b614:1f5e:8b0c:9858]) by MN6PR11MB8244.namprd11.prod.outlook.com ([fe80::b614:1f5e:8b0c:9858%4]) with mapi id 15.20.7046.034; Thu, 7 Dec 2023 01:25:29 +0000 From: "Ni, Ray" To: "Tan, Dun" , "devel@edk2.groups.io" CC: "Dong, Eric" , "Kumar, Rahul R" , Gerd Hoffmann Subject: Re: [edk2-devel] [PATCH 6/6] UefiCpuPkg: Avoid assuming only one smmbasehob Thread-Topic: [PATCH 6/6] UefiCpuPkg: Avoid assuming only one smmbasehob Thread-Index: AQHaJz7WWrojerSTqUuFdFtB2LzLs7CcCEsQgADwb3CAAA/b8A== Date: Thu, 7 Dec 2023 01:25:29 +0000 Message-ID: References: <20231205054900.926-1-dun.tan@intel.com> <20231205054900.926-7-dun.tan@intel.com> In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-traffictypediagnostic: MN6PR11MB8244:EE_|SJ0PR11MB5168:EE_ x-ms-office365-filtering-correlation-id: aa76ad5b-f7b6-4b0f-d4a0-08dbf6c36642 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam-message-info: 46TSzv3Zva5/dVztyxF8idy6lmcNq0tpfa4HY63LNf6E4uCp0qwOxpUX4h9BlR0fO6mWhBMdBSG8jJiuMVOsi1PNL9u0f1WqIOdl7j3yscUCZIeX8YeNXKUGAQ09S565kQ0gOq39NE4yJkOVn2+Vzb1MCVF0Hxk4Fj7bfsg3uwbVn8WBTa2h4DWvcVn2XQmZoYkul1SHcy/BsDeOjojAsOBsthdKr1mp3ZVPZUcAOpWKMjIigMvXjcjHIaLR04SK78G/Ly+Q5JGk7i4ekwY09cqxrB8tU6lzYu+dNLFHS/8qZZzJJWPIis3UKgcUB0ny8izzWVUJYeWfe93CcgPo5xMOoJ2o7txluhKvyEPSfy3kRVMcNGAoBwsvXnuk9Uv60RlAXPX4FhTxQkvRLC/mJVQTRM5a+2yrpKGnoBK33SXx9rMUYuxgTqdzZHMkzlJzceYYElCTIsZgINdf0X3Bnt1ZX5AfhoSfEHgO2KEpnJ2XBnahktdCUiPwVoNFnrVvI7PRdAHSvajvRUFCQTY2kOf4O198tqrT8F6mjIA18dfh2qoLyHPjtn3LWp658OdDqdDSTzoG96TP3wlqIieGQyWy8A4uuz/VE/XUt3pcpOWYi1ZsPpQdDTXrT3jXv18S x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?pRwv4w9urhwsQVu59zlbGQy8vNNax902BzYpwLgZ7VNcJzF47xslctVZzWxe?= =?us-ascii?Q?wR3zvluJzvIWi39affwg3dFkFuSVBQ44UHyCi61FNMIjO40IXI+VJzSndih1?= =?us-ascii?Q?sB0jS5huXytShsUvtMl7i0jShNOcu2Wi+KvK0SD4ZG2bkvugv1X4PcmLwKtR?= =?us-ascii?Q?REhMsPWMl67KpgP6BrYThOe+qb7zKea/8UwBcxTAF1iELUYQOxfzmWLdDwdD?= =?us-ascii?Q?3mrSE7kh3t0kCGiTSf+OHZIq9rGZ7rnCjWmTex2d9aZwSNNRwU0hV7W63A0X?= =?us-ascii?Q?WlwAxrJ3os9pDMzzMuYPSDQlSzIE+15mGGHFyD4QEyoL0vMJIbzGD0zpir9c?= =?us-ascii?Q?mSf1s5mQdVMwJlgyuEH2/8KwyNkK17Vtbhtag4ywfdW4BjsH3VCYrR4QyqJ5?= =?us-ascii?Q?yC49m4fpEjr3d55IF3163pQ7YLTijce8zgFQY6w720E9V6g44yNli8wKUiQT?= =?us-ascii?Q?scPcxeE98P/ibElblxGO/xYt813WdfyQJc7raOFhy+qscw+J6l8xYVU23iFM?= =?us-ascii?Q?rwnwCgpg94AdxilCgIZyUAobQNDdUFBLqPJgFSRpJ9lvksQmzbKcg+iOhluY?= =?us-ascii?Q?x548sIPXbYlLjT/cyjUFLyjxErdYbT6kziCFyJXVkIc3Yn7wlHLxQ031mx4m?= =?us-ascii?Q?/TaZr8dWFCi9ygQXsE1TaUNyScblSLcAn0WrgR96oXz4wcitoyjcS+ji56ei?= =?us-ascii?Q?m8oKPjPRCRSRuBCyjSQQzf4zVk5JGqPlHaNT/d0nKBmgV13X7KmY5FFqN0/2?= =?us-ascii?Q?uD4mlwodIMomCwDI3R6FI1fh7uwdZ9SZ8OmA15qh8+t440QPCnveZQ+Pn9SB?= =?us-ascii?Q?6oHtQ+FKszOUfN6XXanha7hgPnJjvbWmUHFVIhVRZUHlWilz5jrP5qhY8b7D?= =?us-ascii?Q?eqWZCrvhSy2l7T/dQkykuo7ZwW46F1+gGZqZGX4NWwES+L6k9OhIWSqHSIxr?= =?us-ascii?Q?rhXEYUXgswnjUjdBYRiEWR/nqgmLS8kQUQmwvqft8AyoZvoo3eROBeqZyaD6?= =?us-ascii?Q?c3DubjTvsjgzT8i1Ub3633eEVt7h5pqooHRQf18ReAxJx4+A3dPJcLEebZNh?= =?us-ascii?Q?dIuEy23k7s2QX85ssuo9/mQCRFeH9mmib0EQoo4Wc16001jI3ccwFg54ENvz?= =?us-ascii?Q?xvKNhBXEri15aKAi5XftYYXvmUU9HYBRHrx0ftedqZaywZ3nm+GPl1HbenDv?= =?us-ascii?Q?tIiJzQpnP/Hx+aEwP6NgMLQMdzianoYOh+diHDtoMmPsnzgKKxU3qPTtUUFG?= =?us-ascii?Q?6/jpsTaTRSekFLn04t6GSgKQMzmTb2GCKgYQUw+utRaR3DqKAoUNXgh5RnWx?= =?us-ascii?Q?IOrvGPoup2MIuMSEMmwQ5koNWrCyHla/ps2M38ukdjH08h5SLjdpEOl17Jfk?= =?us-ascii?Q?zk2SgOYf0CrHsbrRdlX3xLjA0B62LgQ19t3laAPslOgyfXTQGIeb8XQdGjvV?= =?us-ascii?Q?itxNqHPiut3IuY2Jy0QIjE69dvTJWfELMsXhbWPJtMdU1yEoW8JSd2egYVGS?= =?us-ascii?Q?A/Y/g2ATRyxngLQEHJcUZ0AFfN3ZAC0gcZqoFm+ObFDKn8UD0wXeG1yYrfRC?= =?us-ascii?Q?JL+qAO9hvxomb1SqLBU=3D?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MN6PR11MB8244.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: aa76ad5b-f7b6-4b0f-d4a0-08dbf6c36642 X-MS-Exchange-CrossTenant-originalarrivaltime: 07 Dec 2023 01:25:29.7527 (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: XY/QDxg5YiK4optXEO3+INS5GmmEdh3rMKGl0gQGd+9Ed6PTVcsx0gUXBAJPW1uvdNYsQRIGnOm4yFaC5WbNLQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR11MB5168 X-OriginatorOrg: 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,ray.ni@intel.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: pXorqAUUTuFbVywknINam6pRx7686176AA= Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=KhQpiG6g; 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 >=20 > 2. We could break the while-loop when NumberOfProcessors equals to the > value we retrieved from MpInfo2Hob. Right? > This can speed up the code when there are lots of HOBs after the last > SmmBaseHob instance. >=20 > Dun: If the code flow break before finding all potential SmmBaseHob insta= nce, > there may be more SmmBaseHob instance covering NumberOfProcessors > more than the expected value. The code is to catch this case. Do you thin= k we > should also catch this? When there are more instances than expected, we treat it as a failure. When number of instances is expected, we treat gap or overlap as a failure. We do not need to distinguish between the two kinds of failures. So, we could assume the number of instances is expected, then check if all = the found instances can cover all processors. If not, we treat it as a failure. >=20 > > + } > > + > > + ASSERT (NumberOfProcessors =3D=3D MaxNumberOfCpus); >=20 > 3. ASSERT may fail when HotPlug is TRUE? >=20 > Dun: If HotPlug, I think the SmBase count should be > PcdCpuMaxLogicalProcessorNumber instead of the NumberOfProcessors > extracted from MpInfo2Hob? You are right! -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#112149): https://edk2.groups.io/g/devel/message/112149 Mute This Topic: https://groups.io/mt/102987142/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/leave/12367111/7686176/19134562= 12/xyzzy [rebecca@openfw.io] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-