From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (NAM10-BN7-obe.outbound.protection.outlook.com [40.107.92.66]) by mx.groups.io with SMTP id smtpd.web08.119.1652195610573291127 for ; Tue, 10 May 2022 08:13:31 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="body hash did not verify" header.i=@amd.com header.s=selector1 header.b=r81mpQna; spf=permerror, err=parse error for token &{10 18 %{i}._ip.%{h}._ehlo.%{d}._spf.vali.email}: invalid domain name (domain: amd.com, ip: 40.107.92.66, mailfrom: thomas.lendacky@amd.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DvUcIArX/5KhUXWusFXryw7SnvpjYfVpLUbGo2hYWSZ3ek8U1QUPfKF/q9Swk90sUP3SuJ4/m3ZLO8NEujdPSmq4AjlSkyo/N3PNMsNVg3uIboI4VmoxIsOoXM5hBnd1myfc07ASfgmJtAEpzG+xMSq7BcxoqYqWOg+kjXC9z5U0GmRniYtanpTdk4gPGyiPGO7x4zBS90JYpD/ovuSb+DzpbEFNc+1rTwt2deXfNawnEMwrQnt+wJxqGivwzNJVsUj7f+YJ6Ez4LV/cZ0vpRZivvNEpWY5P/H6kkcLbMIbmmZiWzTIbljLwxhjWtmthrbE7/vjF8szVxCHM7s/LOQ== 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=MtpKWZtJQLL90PQP8ruGMtk63ARRxjA3HHr0wWTKjM4=; b=jGgDieAV3ckMaH3fWbM47ZBGMOz83odRjM7qCrErBmul738BvVvh/1yMiEPot+dcCUhHKLLI4jSoJeozGk6UXsnEryyTdrie/n5gUFcxf1htpwPJPjqhnIx7ET8TpdpUIIwKgI+U2/FnLHibX/OKYnHagTI7fU72fHqstmCPxI6/sffUWePKyPHG6bl3A5wsW81A6IJB1LW+nHkiorlOJKnVdBoCtndkUfnJ5W5ZOYU/7NLUqlrEt6ffs6uaBDsNAhVYPYNdK0baNSdRa9+V2NeTm0Z+aN+f/SHI8zI2yS+hOr8mRENDinHK3Fv4hVjR1sVK3UmdyeBO3NC/0iuLyw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=MtpKWZtJQLL90PQP8ruGMtk63ARRxjA3HHr0wWTKjM4=; b=r81mpQna4UfB+n+Oci6oC+A0qKFZhAqyTBWWFXT1pvr2covlqllE83cxRbEw1gq3Rv9SAFbuAfbPSZY5OLk1lLVffIJ+4HXMNSUGi3SrKwZmXtNo08uZnVX90JsQefTeBq3aoa5/6lfZ/83mL7nOcr8Ttlf1wiu7v0C2hnJuPik= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from DM4PR12MB5229.namprd12.prod.outlook.com (2603:10b6:5:398::12) by BN6PR12MB1297.namprd12.prod.outlook.com (2603:10b6:404:14::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5227.23; Tue, 10 May 2022 15:13:28 +0000 Received: from DM4PR12MB5229.namprd12.prod.outlook.com ([fe80::db8:5b23:acf0:6f9a]) by DM4PR12MB5229.namprd12.prod.outlook.com ([fe80::db8:5b23:acf0:6f9a%4]) with mapi id 15.20.5227.023; Tue, 10 May 2022 15:13:28 +0000 Message-ID: Date: Tue, 10 May 2022 10:13:26 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Subject: Re: [edk2-devel] [PATCH 0/4] Refactor MpInitLib From: "Lendacky, Thomas" To: "Ni, Ray" , "devel@edk2.groups.io" References: <20220507151313.115-1-ray.ni@intel.com> <8580deda-b931-7c4f-d40a-c0230d3b8ef7@amd.com> In-Reply-To: <8580deda-b931-7c4f-d40a-c0230d3b8ef7@amd.com> X-ClientProxiedBy: SA9PR03CA0005.namprd03.prod.outlook.com (2603:10b6:806:20::10) To DM4PR12MB5229.namprd12.prod.outlook.com (2603:10b6:5:398::12) Return-Path: Thomas.Lendacky@amd.com MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 188673c7-901c-4067-d4d1-08da3297a2f8 X-MS-TrafficTypeDiagnostic: BN6PR12MB1297:EE_ 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: mxchotxArqwQop1xegmk33w4y1aoaCPUMPgAmvKCgieUZ9GQNiyS3p0T8wZU1ZsdAOpg9/aJ47dVkq3ndf/6Op7ujzW8yKYNy8vLQVkGxMyog6VA+8Da/TSxgRDVbKWtQ3pJKNjDRbTQbL1qjg2wz31EmJQ551/vD5ETV7Avyhj5HoHOYBNrle4ZtXo0ATQjPWbV8lEVA0/lyxEj+Nm+Wxd1Byl7i7RH8XfqMHX7XlT1bS1jCzz7O/jC2I544vMWzO4G8yEjLBBB/bfJqTnd9NtkrnjZeaFc5BcpDCesa4vyXyrb7WR4zKbq/R48PIxZIKiCcewxjf+ULXEPZrmEOEpnf/JGLpWDCBatI0A4dCiQbduUHRFbg/I9tt8L4lFZS5MgvOIPpzfLXx3/0h5sDly/UgPJKq4agpa4YlABdGgxPQVdRAAluBsAgZK1BvL8MXki4A8O5zrNAM3Z601nmyN8cPMWB2iCMLQa6zu8ioMHRY0ypkJu7LtOogDP/7vw9wvSzRPUbBks6SLvGFoiwtBO88Y9edTC+SK731FU5EYlexFJwyGLGXPUTWraRfVOJTIJ45eyAAl+Ym55TgQ8zcmqIvi3mI56y5Yev2B+n/et0Aa4ySwauNdqrcCLlrMD2f6BrNIgH6dtY88VdxSB2xTJnXBZWUXi4e+NsJo8klulP52MAuUmXvidAKXV2gDqf6ZCEihatKykSMFt+B7xKvrtwtlQcVD38NtJi8IGa3Dq2IKjAcHTAgtN3AE9H8EuwHdmLkCQv82PXBL/hulybmvRcf6hM+ITBp4m7mA/4mJE4+XzlnkDz3UdYVblResg X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM4PR12MB5229.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230001)(6029001)(4636009)(366004)(19627235002)(38100700002)(31686004)(6506007)(53546011)(5660300002)(26005)(6512007)(36756003)(8936002)(186003)(2906002)(83380400001)(508600001)(6486002)(966005)(110136005)(86362001)(316002)(2616005)(8676002)(31696002)(66556008)(66946007)(66476007)(43740500002)(45980500001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?x3Ppd4F/bZ2vhmomsmEX84+QeP8nSmzL78PZWx9verA1BFxtzZqwq+hG6jt4?= =?us-ascii?Q?8psxBjuGcYiT9Xlr6wx6HbLoAYeIDI1A4tv1r4r1pNoptF6Y6DFpPpK5e3Eh?= =?us-ascii?Q?xzrs/PzceG1vTCwxA697n6HtnRD5D/TKROnP2uhf1lFYWj/gW+NNxM/nA4q4?= =?us-ascii?Q?NM1PmCH9KfD0qCB2YM+vARJDZGofCMYfxakUiW269b8U5HjRcJk7vcjytPTH?= =?us-ascii?Q?Vkc4tL80wubeF/Mp6tRM8M2+2DoMgxeBAAz3IPmso9obaglUbJWnmN2M1zlm?= =?us-ascii?Q?S6wqhiUMmsQPk0g480ZqrwMorMwVybyCDQ8rOlqOQMMwgCiwzX7J1yUzx24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06xdJZv7kHTf/pBUXFLD5nK1ECUMe3z?= =?us-ascii?Q?9yGMJlXaNvIOIIRY2tvUvmvNR0OOcgO4G3to2UFpU6KEB96T8KhNKJyz77jl?= =?us-ascii?Q?JbJJlG6JiR3iQPgS9nbq9Gih3clGbi9FNCiyPTPCEklg2LkoJEpgi1qZjsO0?= =?us-ascii?Q?8bQ56GmBZiQ5WdUz6th6dpdHx6WT4KLdbrCmuhTFo0Ln/GFxR6TyYqTlmdS2?= =?us-ascii?Q?i/ZrgbQXQGs+mXNiYtHVAqsB8KVNcdwS2N9jGvuS8uA9CeU0SRgVUCaLPFXQ?= =?us-ascii?Q?e65efnenn+MBLUWd1ROEuYj80DxVS9YyGovye4dUbySNfiaCnDta1BHWCV1u?= =?us-ascii?Q?DKVFMMGaCUulLjDyJXZAKA/i9fdWDxdog07tJf4pBXdm0SPQtxQ1Pb1sYTlK?= =?us-ascii?Q?zV3VqMELVlEP/6UvN2SPMTX8SYD5aOUOtmkABhPTmgrM7vHLTENJyrSgTG34?= =?us-ascii?Q?a4m+uprSyqRFrQPjppa9TSxAQvhFEugZGDxhlSAb/YZ6iUOZXkSkGunJwBXu?= =?us-ascii?Q?Rd+x4yBuPg=3D=3D?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 188673c7-901c-4067-d4d1-08da3297a2f8 X-MS-Exchange-CrossTenant-AuthSource: DM4PR12MB5229.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 May 2022 15:13:28.3432 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: rOFHtlYwHajSHEUUmoxCLvnkGaZCpSfKdHndlW8E8dmZY3Ans6C2NeK/8daTzIp9SQvIghZLBuf97wfJki/Jtg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR12MB1297 Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable On 5/10/22 09:44, Tom Lendacky wrote: > On 5/9/22 18:16, Ni, Ray wrote: >> https://github.com/niruiyu/edk2/tree/refactormp> >=20 > Thanks for the tree, Ray. I was able to build and test against legacy, > SEV, SEV-ES and SEV-SNP guests and found everything worked well. >=20 > I did notice a regression in the tree, un-related to your patches, when > booting an SEV-SNP guest. The following message appears for each AP: >=20 > APIC: Stale IRR:=20 > 00000000,00000000,00000000,00000000,00000000,00000000,00000001,00000000= =20 > ISR: 00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000= 000 >=20 > So I'll start bisecting to see which commit introduced that. This was introduced in the debug hack I needed to boot multiple vCPUs=20 successfully (since Min's fix isn't in your tree, yet). I hadn't noticed this in Min's MpLib fix, but after investigating I do see= =20 it now. I'll follow up with Min. Thanks, Tom >=20 > Thanks, > Tom >=20 >> >> thanks, >> ray >> ------------------------------------------------------------------------= -- >> *From:* devel@edk2.groups.io on behalf of=20 >> Lendacky, Thomas via groups.io >> *Sent:* Tuesday, May 10, 2022 5:39:51 AM >> *To:* devel@edk2.groups.io ; Ni, Ray=20 >> >> *Subject:* Re: [edk2-devel] [PATCH 0/4] Refactor MpInitLib >> Hi Ray, >> >> Do you have a public git tree with these patches that I can use to test >> with? I'm having lots of problems pulling these patches out of my mail >> client and applying them. >> >> Thanks, >> Tom >> >> On 5/7/22 10:13, Ni, Ray via groups.io wrote: >>> >>> Ray Ni (4): >>> =C2=A0=C2=A0=C2=A0 MpInitLib: Allocate code buffer for PEI phase >>> =C2=A0=C2=A0=C2=A0 MpInitLib: remove unneeded global ASM_PFX >>> =C2=A0=C2=A0=C2=A0 MpInitLib: Put SEV logic in separate file >>> =C2=A0=C2=A0=C2=A0 MpInitLib: Only allocate below 1MB memory for 16bit = code >>> >>> =C2=A0=C2=A0 UefiCpuPkg/Library/MpInitLib/AmdSev.c=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0 |=C2=A0=C2=A0 6 +- >>> =C2=A0=C2=A0 UefiCpuPkg/Library/MpInitLib/DxeMpLib.c=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 |=C2=A0=C2=A0 2 +- >>> =C2=A0=C2=A0 .../Library/MpInitLib/Ia32/MpFuncs.nasm=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 |=C2=A0 11 +- >>> =C2=A0=C2=A0 UefiCpuPkg/Library/MpInitLib/MpEqu.inc=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 |=C2=A0=C2=A0 2 +- >>> =C2=A0=C2=A0 UefiCpuPkg/Library/MpInitLib/MpLib.c=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 |=C2=A0 99 +++++------ >>> =C2=A0=C2=A0 UefiCpuPkg/Library/MpInitLib/MpLib.h=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 |=C2=A0=C2=A0 2 +- >>> =C2=A0=C2=A0 UefiCpuPkg/Library/MpInitLib/PeiMpLib.c=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 |=C2=A0 15 +- >>> =C2=A0=C2=A0 UefiCpuPkg/Library/MpInitLib/X64/AmdSev.nasm=C2=A0 | 148 += +++++++++++++++ >>> =C2=A0=C2=A0 UefiCpuPkg/Library/MpInitLib/X64/MpFuncs.nasm | 167 +-----= ------------ >>> =C2=A0=C2=A0 9 files changed, 216 insertions(+), 236 deletions(-) >>> >> >> >>=20 >> >>