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 81806740038 for ; Mon, 19 Feb 2024 02:34:48 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=r7pgu7kTrEW9+wLAnpldBm7eqUXSppoKOSguoU/EzDw=; 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=1708310087; v=1; b=rEeeq+cVZ11kggbT6jwZL2SZSxrthlUmJ3CKVkre30x/WA5yF1hJ0NpruLL2H/yAtMw/Wo7H jTRo7GBBtxmRHVuc1cLXt75zKLd7bqcPDTn0ycQalW0nwPYVIBfpewwk0hu+qOPek5LtO5gmcdX Yye6NTv+0TaSpwgu4Op9dm4k= X-Received: by 127.0.0.2 with SMTP id YDbhYY7687511xiGKlNUjL2i; Sun, 18 Feb 2024 18:34:47 -0800 X-Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.14]) by mx.groups.io with SMTP id smtpd.web10.33084.1708310086405364651 for ; Sun, 18 Feb 2024 18:34:46 -0800 X-IronPort-AV: E=McAfee;i="6600,9927,10988"; a="6177241" X-IronPort-AV: E=Sophos;i="6.06,170,1705392000"; d="scan'208";a="6177241" X-Received: from orviesa008.jf.intel.com ([10.64.159.148]) by orvoesa106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Feb 2024 18:34:45 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.06,170,1705392000"; d="scan'208";a="4752666" X-Received: from orsmsx602.amr.corp.intel.com ([10.22.229.15]) by orviesa008.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 18 Feb 2024 18:34:46 -0800 X-Received: from orsmsx611.amr.corp.intel.com (10.22.229.24) by ORSMSX602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Sun, 18 Feb 2024 18:34:45 -0800 X-Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX611.amr.corp.intel.com (10.22.229.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Sun, 18 Feb 2024 18:34:45 -0800 X-Received: from ORSEDG602.ED.cps.intel.com (10.7.248.7) by orsmsx610.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35 via Frontend Transport; Sun, 18 Feb 2024 18:34:45 -0800 X-Received: from NAM10-DM6-obe.outbound.protection.outlook.com (104.47.58.100) by edgegateway.intel.com (134.134.137.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Sun, 18 Feb 2024 18:34:44 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Sh/wr5i3TwzufYBGLDXphfx46559cyJbVEtRmpG81z6wLuBnomg298XiDgz/dyt4e4dQT9nly/zk7NRvB6yTJXqugSGGF8bEDvVIDNcDF7D7NHBebdu6S9fCX3cDnm101tLnfG2wuTFSalc2s6oPxnHrYG5fWCWsqnvtYT6rNW+v+lIq0940vimrscNe03FBnu7OlN73n+9Vlxy2bvCa7DwE3nlLmtiSAIl0fo2n+WvyFAPVOO0MOQLDnq5tcfbEPpyadGnqWEnEgDdw9z0GVZP0KcrwrKG58xyW/vAV0NDjVptTSefmlixrNMPD5ZbaGHgmBR8UxIsQRyaYjG1Ghw== 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=0jqA4QvSELd5A85mYaXx/Me3gWwQ/dLlkKHhi7mcny0=; b=Ib/RvW3BaJAo+eQRLQWZenkJSRFiD04ZbeDSvJI0TUEaEILEl/HPJVw1V2zQYTwu1dcICR+v1VzHAPW5cbrVePHi1PkM/E/PkxcOI0FjiJOq4ZVoULtNUMDh2EoIFFa3HzqNF013As0KGMogk+94+z8cjqiStjFvQ3LcLhkPKoc5nCDHZ169akkeHE6vUVH+gc1jVSmDUgrOx65KHWMt8DX+daN7berw8ncKSIljt8xcX11q1jSTMD2hIAWpaFG/dMUX1LgDa4gkmajYK/sDfO+Le97omhEPy6f+mr/eIkyIBf5wzp5eCdfNheyOXn9/j4lMWz34mQSYqCCQdanjNw== 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 PH7PR11MB7050.namprd11.prod.outlook.com (2603:10b6:510:20d::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7292.38; Mon, 19 Feb 2024 02:34:43 +0000 X-Received: from MN6PR11MB8244.namprd11.prod.outlook.com ([fe80::8985:d1bc:9df6:61cf]) by MN6PR11MB8244.namprd11.prod.outlook.com ([fe80::8985:d1bc:9df6:61cf%7]) with mapi id 15.20.7292.036; Mon, 19 Feb 2024 02:34:42 +0000 From: "Ni, Ray" To: Gerd Hoffmann , "devel@edk2.groups.io" CC: Oliver Steffen , Laszlo Ersek , "Kumar, Rahul R" Subject: Re: [edk2-devel] [PATCH 1/5] UefiCpuPkg/MpInitLib: Add ProcessorIndex argument to GetMpHandOffHob() Thread-Topic: [PATCH 1/5] UefiCpuPkg/MpInitLib: Add ProcessorIndex argument to GetMpHandOffHob() Thread-Index: AQHaX/HUOvBHfKVOKU6qyemGRb93RLEQ9fVQ Date: Mon, 19 Feb 2024 02:34:42 +0000 Message-ID: References: <20240215093149.251319-1-kraxel@redhat.com> <20240215093149.251319-2-kraxel@redhat.com> In-Reply-To: <20240215093149.251319-2-kraxel@redhat.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-traffictypediagnostic: MN6PR11MB8244:EE_|PH7PR11MB7050:EE_ x-ms-office365-filtering-correlation-id: 8ad12489-5cdb-45e9-d118-08dc30f35437 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam-message-info: MOFiBns/R93iKzsESPzlzPfnQbqjw6OgTTyC5GD75rJKyL8UUlI7WdkNAtZBzCnyob/IgVKX06grFU663D/cosp4pgfEwBeFbTQQNlWz6EnvLcWLSbyReLgiTwFqlJsZVgOSXq1KNdrDcmq6ZN+waVas9u40u8e7k8sTj1rc3sle/+mK3b+8Pec/+KiyYbyaFgPUgftygu5eQpUGrlfWTE45JwiI5o48PgHU6b1On3gKUQFSsTzZkd90je2LqNcZIN966Nl8GiNcXciLAJIXrcPgJoM/SRbjdIyWdQhz/iVlZ8HFVf6qDt4oVx9spHh5Yv4uyYA+U2V+0HrUFH0jm5dqBArW7qBhmy7DHcOZ2p7xqOfksYcJ0KXlZIQhqZ8BHWiCOu7tSrnK6MLo3jTf8/SwWAnxqElaPaSRZtqkXrC46a0QaAIwDWjPy0MYouHD00C1kg5TDanwzxI63vNzoTOLeHT9qisFKFqnLZVvs95Pr+lzzcKjVPd2jJz6TnRjNx9zAllynZAfBQOQEi0Oc9QhOVETMkGOinEKYrVd+U9UrzFjOonQL79FsPf7HZN3S0V3QjZYjw5CgNL+gyYQgQ53qaXyT64O+RXKYXiQJFExdbt3JLHFq2j5JdUHCHJC x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?sq6iwTWFyy3VftWrNDkHfnxWVUDAAXRSf+klvgzhWlXAIr7jSEirM1Fs3Agu?= =?us-ascii?Q?B5kDNvVSe+dZQccuZHZNrtM3mVWUo3Q7Ko1so/zhMArMCmTycTKVorpujDYR?= =?us-ascii?Q?FVwXCSpXQQa+yOkyjn1SFFeJnV12ERM+1aXCmZdLo1zlAsH4GCVj901fPmaW?= =?us-ascii?Q?slUG+hebfhstwrgn04gUJ3lXZ3hPgmX5JIYWQf1FrADZQBF4xCErkD76CiYZ?= =?us-ascii?Q?brRP4BvZu79hoH/dEZCT+lxfq/B7T96+tcKpLMaMOB8t0pOm2+aGkbXDUqLE?= =?us-ascii?Q?V8tJf0gW57TSmQOmkRiuhTL9nmpjap2J25hGARzT2ShCX9uDi8DqTbZ9Le4j?= =?us-ascii?Q?SadZmTwDIeap+oNN/Dm3bF0tf+rwpMBOj/0hqNYKwLc23VvMxM4APeBtOTkP?= =?us-ascii?Q?VE4peFl6mtecoyZFlpi5aEaCrX84Nqtpcx6UtiVTqxfUFCMmTFuLT9UowidC?= =?us-ascii?Q?Irdl87/zU+5h3N1ryNoRkPPoALRMygai9y8ZJ2TVORx4KumzlM3gBQBJQUHe?= =?us-ascii?Q?IzrqZ+dr8ADh+pEyISY4Y3Vrbe0zzAr7xEdFiv9YaPvjkW/3vcuggyPjNgDQ?= =?us-ascii?Q?j1GataRcDZVhal59/mLljh4LCrPlzD3g39gsGdhhuodPfyWEnbieueAPzX3T?= =?us-ascii?Q?A5puy3bG6HAoOtWbeT7nPs+iJFPz0MChRQp8+i2mG2Bj+Ct7JWUrSddQhatS?= =?us-ascii?Q?4Q6TvRnN2Q+TpSTJPUECAoHn4x7plf13/dxe9Pg1tk5rIFvDfCG0I4pKJ5HG?= =?us-ascii?Q?HipIXWzfHqOERpl29XLXwKNnznpDl/W1LlJ9DHwbCVpf9ogL6SQVeNBzv+R8?= =?us-ascii?Q?K+xesN+YRcIVjPJ9+Z8/+RSdRbrLJG/oHZQHl9lrf1JGRrLBIUv0JvOQsteL?= =?us-ascii?Q?sAkQ+UylUgDBDr7lAcTtAtpNL/O3sEvrpLlQniuOEMu0Z9gAY0egckc8kZkD?= =?us-ascii?Q?PFYjoIKBZT2qx44TCkg/Poov7VqLtppjdZOORTa2WDA0n3aL80wXtOnAWeci?= =?us-ascii?Q?T/+rEm1/qn4QrwuzDZrhff3Gmpzl6ThFqFy/5aef4PGC1XIJ3vyo9NwuxwFz?= =?us-ascii?Q?39NNXoZberfGEx4BSjnvWOi8rl8TFTHE/NSxHJCzwt9QcVmKYqMSxjFVSaaB?= =?us-ascii?Q?M2E7WP9LnMjmvDRGR5TNnONBeB66Z+rIgywLs0sFE+Va+LU4ylUFN+pSGnET?= =?us-ascii?Q?oa0MR+MGnp6f6hYPAZ83QM73fJCfQq2wIzZFJGl+2kDX/tayzuPN3yzE4KE2?= =?us-ascii?Q?5v/vccwv4due6JPsxDqhNMzvJXj7M4dtLLFSGczecraoAJoZC1IY9ik+vdDY?= =?us-ascii?Q?G5EUeUtHti41AhZCdAmnaE4T+TVGCgwrcy8pBntLV7hgl6w0F7LHONE4e9f2?= =?us-ascii?Q?afIoJWVSZN25oO2ax5UaXXfojFGHn557Q1N7vqAXYIagDOCOQ4QTdQYeUY+S?= =?us-ascii?Q?wpUdlR/Sz74A9I1exqWJWJw82gOg67xAQ1Ay0CvvQqwFEctdO7TIxen4XQsR?= =?us-ascii?Q?7x5HkowsvNejpZ2U2UwIoRNIGTiyabwZ/AKfzgg75O0pKi21odzKAVK65XGa?= =?us-ascii?Q?mXirNYO99AcKMI5C9h0=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: 8ad12489-5cdb-45e9-d118-08dc30f35437 X-MS-Exchange-CrossTenant-originalarrivaltime: 19 Feb 2024 02:34:42.7651 (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: S9VaFizGDnkwX26yJsbJ83+3osEmlALjd4sD+sPyYdN0PKx20n8LC9H0x6AcWipg5x0d9+4tsNZlt+KcaQ1zsw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR11MB7050 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: gan2mEq2Gft7ctDjo4C3fKrKx7686176AA= 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=rEeeq+cV; 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; arc=reject ("signature check failed: fail, {[1] = sig:microsoft.com:reject}") > EFI_HOB_GUID_TYPE *GuidHob; > MP_HAND_OFF *MpHandOff; >=20 > - MpHandOff =3D NULL; > - GuidHob =3D GetFirstGuidHob (&mMpHandOffGuid); > - if (GuidHob !=3D NULL) { > + for (GuidHob =3D GetFirstGuidHob (&mMpHandOffGuid); > + GuidHob !=3D NULL; > + GuidHob =3D GetNextGuidHob (&mMpHandOffGuid, GET_NEXT_HOB > (GuidHob))) > + { > MpHandOff =3D (MP_HAND_OFF *)GET_GUID_HOB_DATA (GuidHob); > + if (MpHandOff->ProcessorIndex =3D=3D ProcessorIndex) { > + return MpHandOff; > + } Gerd, The code is doing correctly but I have concerns about the performance impac= t. With the prototype GetMpHandOffHob(), callers call it multiple times to enu= merate all HOB instances. But every call is a HOB list enumeration from top of the HOB list which may= be slow in a platform that contains lots of HOB items and the MpHandOff HOB instances happen to b= e in the very bottom. How about add another parameter "HobStart" to GetMpHandOffHob()? So that on= ly the first call to GetMpHandOffHob() is a HOB list enumeration from top, latter calls start fr= om the next HOB of the previous found MpHandOff HOB instance. -=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 (#115576): https://edk2.groups.io/g/devel/message/115576 Mute This Topic: https://groups.io/mt/104369841/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-