From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (NAM12-MW2-obe.outbound.protection.outlook.com [40.107.244.50]) by mx.groups.io with SMTP id smtpd.web10.25328.1635119072269967409 for ; Sun, 24 Oct 2021 16:44:32 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@amd.com header.s=selector1 header.b=AqM29Cyh; 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.244.50, mailfrom: brijesh.singh@amd.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VTc5oqSyGSOtHRMOCbRsQ1eeSHYhu6GZxTBcZnSWhJHRPYO/GBLbU31KVdo0cpQRr7T1tYb+P5KaAKbeg1dqiALXb/KWlxtJaLcs8BNQFsQthOaFvn8fvo7nx8ElRGcXHpEta7XvJKPD1IN1l4UUiyuEMDODLhw/41t2I/woffzTZ0+J9bzPwHEZUl1gxKXVhy+18xxL+GvCQIcLKwbnkd49moCcU2IVpLRakthvinILmY/FIsi5ZRUyo6rMHkLLk750KTqV3rRg/nItGIanbcYd9/3/eqfFuBJUlHWjf2rx/Uqp6vGXZYWLmGk12p7OcPVHEayqV5kbnOti48YXmQ== 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=HhtirJPlcBO0TzXIEXfzonrKIAFXOqwvwLoSIX9aPpU=; b=eIR4Qups7UBTpIYK7H5r+ImEQbWPUkZy+vzp0gEOPoSbsockbpJVgP8l9bw+TIdLbr0AQAE74PZTjQC7g487cUeL5KzAEsMCywI2znIU3JYOSneGz0aEnH9W4HFzXmDRsvg8FgXcgvNHACduNZikE6j1pURu04Uy8aGe6r3tu+VjYw20NRw/KrEM4sh+6/kX0S5aXbiVKflg7MzwdVz7rFXFxN8CPHfNidpqpywJxG8PoDtP4S8X2vDN1rTLtH+JC6nYMkZYkuYgd6je6YEf5mH20kgFA3PQTyrEbqdTefxvBgw15lNr6Q3DNMlXvpEsJWYBljSUUZ8q78hymyzjDw== 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=HhtirJPlcBO0TzXIEXfzonrKIAFXOqwvwLoSIX9aPpU=; b=AqM29CyhgPkkAEp7C3VfKuT24Ux6QAuOiXM3BMKLeW1Z5dDFG04OrbdZJaxqytiFfoiq7HrftWErD7fVF2dePOScreKiNsHBU/DjOSpu7Co5k+uRb6Pi6G+cXOsZkMK51pAwOtwYRAj7UtoFiYxe3z2OuUWB+X9dltRmJ0k8tfI= Authentication-Results: edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=none action=none header.from=amd.com; Received: from SN6PR12MB2718.namprd12.prod.outlook.com (2603:10b6:805:6f::22) by SN6PR12MB2784.namprd12.prod.outlook.com (2603:10b6:805:68::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4628.20; Sun, 24 Oct 2021 23:44:30 +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.4628.020; Sun, 24 Oct 2021 23:44:30 +0000 Message-ID: Date: Sun, 24 Oct 2021 18:44:23 -0500 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.2.1 Cc: brijesh.singh@amd.com, James Bottomley , Min Xu , Jiewen Yao , Tom Lendacky , Jordan Justen , Ard Biesheuvel , Erdem Aktas , Michael Roth , Gerd Hoffmann , Ray Ni , Rahul Kumar , Eric Dong Subject: Re: [edk2-devel] [PATCH v11 23/32] UefiCpuPkg: add PcdGhcbHypervisorFeatures To: devel@edk2.groups.io References: <20211023041349.1263726-1-brijesh.singh@amd.com> <16B08DB7BBA673AC.26581@groups.io> From: "Brijesh Singh" In-Reply-To: <16B08DB7BBA673AC.26581@groups.io> X-ClientProxiedBy: BN8PR15CA0002.namprd15.prod.outlook.com (2603:10b6:408:c0::15) To SN6PR12MB2718.namprd12.prod.outlook.com (2603:10b6:805:6f::22) Return-Path: brijesh.singh@amd.com MIME-Version: 1.0 Received: from [172.31.5.42] (165.204.84.11) by BN8PR15CA0002.namprd15.prod.outlook.com (2603:10b6:408:c0::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4628.18 via Frontend Transport; Sun, 24 Oct 2021 23:44:27 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 3be4473a-580b-43db-bae2-08d99748392f X-MS-TrafficTypeDiagnostic: SN6PR12MB2784: 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: AjcNGwpA1FHbGNwromxVzylJwnZS4D0mjbtABsiiR+yBtPZ7avI6e3xALsb8X6E7M4ZN6YSXmMZG062fhbrtw1Dk56QrmQJdqph4ffvIxyt7/eOMy7oSmGlfcau3WiYDl4n9/yftwFJabi1LgjwYBSCQWcX6o2nKkrY2eOJ+CXMm9MUA+J0MM9Z+TF0ynGMESnagCrFXbKbVk2JuydAI1GMBeNhnN01VaiKTttyZOl97BrDIvY6Sp5S/tMKap3zI9lX+iuGMh8tLch55GE7/6Oc+tPo1MYIrbE0SEh/hsWpPjTmMYQ5JywaCSLADHWrDFm3eFc2oEEQx2M0cgjeJeGPFDatHIVWocNCXZZcT326JMpQ5UDcZlGbw3UZZG4G13rKn4EweLk4E65vemKOOHPfQ0rIcmhD/Y0ESKXJNJ+zu6tdPIVsq9rIuJ26od+MKv4lMDz6zL4V7PPixPgzw/zu2noPHlhCvVUbKBZ64DvB4uP4mltUrXcFtrW0+9+41chIlkKW6L8yn5xMfCEgY2xUgiQudu/uQrKRaDInaxNcTkP9SFTC1kefYHxhIpz3EGDplnk/uvO3pgUvHX2UzYebe+q5wWnMzamQw/6LGTRcHsqmecroGLaQBeDwKdlVT9OzJK5QhzpqoVtOKaeAayI63eJUeiZrt7Crm4Y2hWusDsW8wN0HnOQLBXW7McFKip6zA30hvqD+ign+L6gqL8pRndPgkdtCExf2XUqMqvz116XE2JTIaWn5MTK58xIfq8Ooh5YdRGWbFPbydQIVwWcFNQfUhy8pS6TsHoBD+ARMaf6xGaxnEWMEg/k16u1qvgswe0Jv/ZJiWJynrO4JHdOJKCoJNuCSSSo4GueKCji4= 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:(4636009)(366004)(2616005)(8676002)(8936002)(5660300002)(7416002)(6486002)(16576012)(2906002)(4326008)(54906003)(508600001)(956004)(186003)(66556008)(53546011)(44832011)(66946007)(36756003)(66476007)(966005)(26005)(31696002)(38100700002)(316002)(6666004)(31686004)(86362001)(6916009)(156123004)(45980500001)(43740500002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?QWcwWnJkMzFDQ3VERmZTMHMrZ2UrR1Jac1FkUlBPYm5naDBGMGNmbWY5M2py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YdXYya1IyY1lLTEh4Yzl1SXN5bUVIUW5jRXA0bWtUanpJeFlzZ3NR?= =?utf-8?B?cU1kbHMzRUgrUUZRSmlQbHpDRDJ5M1lYVlpNTDAra1ZpSnB0cnppU0NibmNm?= =?utf-8?B?Qyt0NE16Q0k2WEVDME91TnplWVJPd2pLR05xckgxKy92d1d2a01tMEwrVFU0?= =?utf-8?B?dkZ6Q2hOYjhWZnkyZzhIRk1rclR3c29QTHFDK3lBaWR1RkdwSVU1SytrV00x?= =?utf-8?B?bjBPd3JWckExaUZNb3NkV1hudGdWY3MxV2szWnNxRlZUZWcrcjRqS0o2NjFt?= =?utf-8?B?VU8zcHQxQmhaMnZCQlhBZ1hTNWxKdDY4WGVDb0lvOTdEWXI5Ym00bjkxcW9o?= =?utf-8?Q?xfgWAFjymR/tWhDFegFRRwI=3D?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3be4473a-580b-43db-bae2-08d99748392f X-MS-Exchange-CrossTenant-AuthSource: SN6PR12MB2718.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Oct 2021 23:44:30.3903 (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: nUnblQQR5dstdYRWvr9UgergsC97QRa1e48E0y4MrnhO5Lhs6sbLtSm+9cX1kPU+MRnbdpgD4Luo47kIvYJMWw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR12MB2784 Content-Language: en-US Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Hi Ray and Rahul, Any comment on this patch ? If you are okay with the approach then can I get Ack or R-b ? -Brijesh On 10/22/21 11:13 PM, Brijesh Singh via groups.io wrote: > BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3275 > > Version 2 of the GHCB specification added a new VMGEXIT that the guest > could use for querying the hypervisor features. One of the immediate > users for it will be an AP creation code. When SEV-SNP is enabled, the > guest can use the newly added AP_CREATE VMGEXIT to create the APs. > > The MpInitLib will check the hypervisor feature, and if AP_CREATE is > available, it will use it. > > See GHCB spec version 2 for more details on the VMGEXIT. > > Cc: Michael Roth > Cc: Ray Ni > Cc: Rahul Kumar > Cc: Eric Dong > Cc: James Bottomley > Cc: Min Xu > Cc: Jiewen Yao > Cc: Tom Lendacky > Cc: Jordan Justen > Cc: Ard Biesheuvel > Cc: Erdem Aktas > Cc: Gerd Hoffmann > Acked-by: Gerd Hoffmann > Signed-off-by: Brijesh Singh > --- > UefiCpuPkg/UefiCpuPkg.dec | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/UefiCpuPkg/UefiCpuPkg.dec b/UefiCpuPkg/UefiCpuPkg.dec > index 62acb291f309..7de66fde674c 100644 > --- a/UefiCpuPkg/UefiCpuPkg.dec > +++ b/UefiCpuPkg/UefiCpuPkg.dec > @@ -396,5 +396,10 @@ [PcdsDynamic, PcdsDynamicEx] > # @Prompt SEV-ES Status > gUefiCpuPkgTokenSpaceGuid.PcdSevEsIsEnabled|FALSE|BOOLEAN|0x60000016 > > + ## This dynamic PCD contains the hypervisor features value obtained through the GHCB HYPERVISOR > + # features VMGEXIT defined in the version 2 of GHCB spec. > + # @Prompt GHCB Hypervisor Features > + gUefiCpuPkgTokenSpaceGuid.PcdGhcbHypervisorFeatures|0x0|UINT64|0x60000018 > + > [UserExtensions.TianoCore."ExtraFiles"] > UefiCpuPkgExtra.uni