From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (NAM12-DM6-obe.outbound.protection.outlook.com [40.107.243.70]) by mx.groups.io with SMTP id smtpd.web11.16412.1636727130665555691 for ; Fri, 12 Nov 2021 06:25:31 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@amd.com header.s=selector1 header.b=G1SHrmCC; 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.243.70, mailfrom: brijesh.singh@amd.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UnPp/J2cRk2v+3O4C5Os81fpGjdsLCAywsqx20jINrmzgLHXp2kOzjlLDLjMHRbLXH20kvRKByg1qaEY9m+JW9Mco5C1O4eDku5sxJxtR26fzJpHmfgwGgCMVin862DgZWqn7HOMw+rMLHLyLVBIJPMsa/NqDTi+CncnYZm2xqq37KajNi+rJBO7sDKykPXR/EVD2J6iGMsYIEd1mh/OpkHZQ08FjRPUoM6k7651jSvpKSwZAqFAKUSz5Vo6JB0J6psUvvD8xah4fTlxv8n+DHGrV4Sl7f2dQWbuZKmITRxnedhwm4052CdkvO+T0qt3WsFR2gO/fSIsqwGA+ysstw== 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=lhE+fDSeg/8qEYdye8479F5imAQy1OOnKjJLXQdCLCQ=; b=UGghLSj+uU428FitwDikIKMX0cAqa7hDKTtIAEiEQrcC+mVuHGFlDGgc6muUsZJCCr0TYihRRH3vdpLGNZJgI05TFygjVkV4NSXVKUm6KzUOETdlwsTjubgzdlaXOObNyqmBup0DqS+3GcDnoLiT8ixFzy9iZ0aGXTK1CuthKzV+9MMo2yfauZaXWcJtPr2+wm0Wq0+uiUz5szuZJxYV1OF9y0mAMDXWTycv3Xl9EtFt73zwrkcNyPDOp/NwmhUg3VoDHzYuI/c6tJVkjpbbT09yGCZe+JTeeyXPSBNQDI64jo599zHmvPQa9V1yfYcnWF0UL9UlIfRGFezLJ00YaQ== 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=lhE+fDSeg/8qEYdye8479F5imAQy1OOnKjJLXQdCLCQ=; b=G1SHrmCCj3wnFPdQ/gt0/p0t3A5PGlyArLb6LeBoOkOure69ZEigmdGeCGLoxslZLFN7YLNRcP4l5jQiwtCawq3Nnw44o27leeFveHIvdNkCy5hV+j1wH6sKC+nhQXqffKpCy2fJrSTeZQ8qcpuEL4HUiSOQpaGJZwUNibXYMg0= Authentication-Results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=amd.com; Received: from SN6PR12MB2718.namprd12.prod.outlook.com (2603:10b6:805:6f::22) by SN1PR12MB2448.namprd12.prod.outlook.com (2603:10b6:802:28::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4669.13; Fri, 12 Nov 2021 14:25:26 +0000 Received: from SN6PR12MB2718.namprd12.prod.outlook.com ([fe80::e4da:b3ea:a3ec:761c]) by SN6PR12MB2718.namprd12.prod.outlook.com ([fe80::e4da:b3ea:a3ec:761c%7]) with mapi id 15.20.4669.020; Fri, 12 Nov 2021 14:25:26 +0000 Cc: brijesh.singh@amd.com, James Bottomley , "Xu, Min M" , "Yao, Jiewen" , Tom Lendacky , "Justen, Jordan L" , Ard Biesheuvel , Erdem Aktas , Michael Roth , Gerd Hoffmann , "Kinney, Michael D" , Liming Gao , "Liu, Zhiguang" , "Kumar, Rahul1" , "Dong, Eric" Subject: Re: [edk2-devel] [PATCH v12 32/32] UefiCpuPkg/MpInitLib: Use SEV-SNP AP Creation NAE event to launch APs To: "Ni, Ray" , "devel@edk2.groups.io" References: <20211110221457.2397234-1-brijesh.singh@amd.com> <20211110221457.2397234-33-brijesh.singh@amd.com> From: "Brijesh Singh" Message-ID: <7f75f87c-7869-b1de-d2cd-ccd6395eb375@amd.com> Date: Fri, 12 Nov 2021 08:25:22 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 In-Reply-To: X-ClientProxiedBy: MN2PR20CA0025.namprd20.prod.outlook.com (2603:10b6:208:e8::38) To SN6PR12MB2718.namprd12.prod.outlook.com (2603:10b6:805:6f::22) Return-Path: brijesh.singh@amd.com MIME-Version: 1.0 Received: from [10.236.30.107] (165.204.77.1) by MN2PR20CA0025.namprd20.prod.outlook.com (2603:10b6:208:e8::38) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4690.15 via Frontend Transport; Fri, 12 Nov 2021 14:25:24 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 3bc1373e-d4c9-42b8-93fe-08d9a5e8450f X-MS-TrafficTypeDiagnostic: SN1PR12MB2448: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:9508; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ZAzpTKVjgDVlyPl3gydhul+ZaPXaQhrun7M76RtVeW/HYKXhDiyXa+JUescAnoFliR/WEQe1GhO0sbiIaWDLyT0LR2RncOJhoNpj+Pllx90TnRBgfoawWdm3fgTp3Sa7RbXr09w0TPhoe7AteRyn/g9j0fH1JTPyDg4sbcjm3tl3rKsFvYtrDThwRDAnNaWMV3+zLPAtb/BRlAcoxKxxNP8G3cbJ/lYPJiBI9Xswl8SH7YTkIxKfQpJOy6dUNv4j1YcUx4659vfeLF6siToFup7WJ4CqGc+XnyKV79JHrLnS0DOeEKKcNWmWciG9jVjDxoy63jv7B0LUTVaB1GzBQRlViN6l4o1GFBnnPnMziCilmDzNG+zBbr/WolxL7pmTjyQ4CxL9PhFcC+aYryELmIGULRcnzeQgV+mnIVRfhNDWmXWzVpTUhpzAUyMjujf3XO73dk89GiJpADAMD9fOXaPsq0Ox01QbpPPzxaseMtXNnxTeKPQTAUBR5hCr3pJjbsQQ7KyRmeVfAC20UU6CF+sNf7ltdR2dWy6ukkkG3krQL9iTR9B2D1Pt6y8U15a66X356VDun753w+rQnSNEDs4Fnj2qB7ZH2gbreFptY5LEzLycxVEMJD5oNYG8MrMOHwJsfxQo6Ssr9232L6i57h4iM08sH4w3auEiimPg2dSfwekPk3vCgEVXXa3OyyWLJRJ4tmgPS3kofscJ51J1z91iGcQ1Ex+V6nSi8dGZ6ahq2Zhy6G8RekO+IN6gPhaH X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SN6PR12MB2718.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(6029001)(4636009)(366004)(508600001)(31686004)(8936002)(86362001)(956004)(110136005)(53546011)(38100700002)(66556008)(2616005)(66476007)(16576012)(54906003)(36756003)(316002)(186003)(66946007)(2906002)(5660300002)(7416002)(31696002)(4326008)(6486002)(44832011)(8676002)(26005)(45980500001)(43740500002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?bzdMTlBiWndRVDZtRWdLOE9BYWg1UmJHLzhJajUyK3l2dzlBclZIN1ZxZVJn?= =?utf-8?B?WER4cU9iQm9NcWI4SzdtNS9Vd29kS1V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GVDTURkUGlH?= =?utf-8?B?NW56ek5zVVhXU0d1WlFzUFZidGs3ZVZJbmFjeHVSRklGckp6dWZSVUdGajA3?= =?utf-8?B?RHVaME9XbGdvQ2RJZmNMQitrOXJzUDloSTRHY0VnZSs4K1NPcWYvTVFVTy9j?= =?utf-8?B?a0JrY0t6WEg4eDF1L0xzV29mQlZYeW85STM2M2lpdlJENVdmZjVteUZ4Sytk?= =?utf-8?B?NGdDdUpXTkJlYXRqNzg5WXJZV25iV3VMcm9XYWRxcThveUVLQmJIWkhrSGc2?= =?utf-8?B?RGUyUkdOZ24yemJ2OWVuWU80dWg4bFZTbFFFN3NLQWFFQXN1a0hpbi9rSDBy?= =?utf-8?Q?Z6HtuEvpmVKFA4LbAro0uvU=3D?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3bc1373e-d4c9-42b8-93fe-08d9a5e8450f X-MS-Exchange-CrossTenant-AuthSource: SN6PR12MB2718.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Nov 2021 14:25:26.0899 (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: jGq+XQVzCfjEx3ERcosMnbMh+AB5X4mV9tGTFPngbitntg71m2AMWNumVZDUIyh6gqBfZ/1SMRV7Hr/MJlckwQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN1PR12MB2448 Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit On 11/11/21 8:09 PM, Ni, Ray wrote: > Acked-by: Ray Ni thanks! > > 3 comments: > > 1. It seems to me that the latest SevSnp doesn't need much special handling in AP waking up flow. > Is there a plan to drop the old SevEs so that the MpInitLib logic can have a chance to be back to normal? The EPYC3 family supports SEV, SEV-ES and SEV-SNP. The EPYC2 family supports SEV and SEV-ES. The EPYC1 family supports SEV. So, as you can depending on the user platform/configuration, they may boot the VM using the SEV-ES. We may have to keep it around for sometime and see how it goes. > >> [Sources.IA32] >> + Ia32/AmdSev.c >> Ia32/MpFuncs.nasm >> >> [Sources.X64] >> + X64/AmdSev.c >> X64/MpFuncs.nasm > > 2. I am not sure if it's a good idea that "THREE" files share the same name. Any objections from others? > >> @@ -1056,9 +1057,12 @@ AllocateResetVector ( >> ); >> // >> // The AP reset stack is only used by SEV-ES guests. Do not allocate it >> - // if SEV-ES is not enabled. >> + // if SEV-ES is not enabled. An SEV-SNP guest is also considered >> + // an SEV-ES guest, but uses a different method of AP startup, eliminating >> + // the need for the allocation. >> // >> - if (ConfidentialComputingGuestHas (CCAttrAmdSevEs)) { >> + if (ConfidentialComputingGuestHas (CCAttrAmdSevEs) && >> + !ConfidentialComputingGuestHas (CCAttrAmdSevSnp)) { > > 3. Can you use "CpuMpData->UseSevEsAPMethod" in above if check? > > > >