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.61]) by mx.groups.io with SMTP id smtpd.web12.1426.1632163600302992824 for ; Mon, 20 Sep 2021 11:46:40 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="body hash did not verify" header.i=@amd.com header.s=selector1 header.b=QQBrXGR2; 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.61, mailfrom: brijesh.singh@amd.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CXTMI6JlQc2nZPGeLZQGJpd4bE76bRmtmdbpPTWgaC+A8+M2CrNZCrQgm87JdWrXW/z75q1frv7kUABLHgJVnHQ8e2OEzEp/J3hzuNHY8EqqfaJ0dMujvkwTitRS9otsDyeTK0vrRk2DWCx/FakD/sck84/8rDWJo3G76coN47HDa1ul6OUclVo2KUhD1HvjkBPE4MNZMKgddgPkvPe69PKWujhpO3b4PGEGmYEWDYQ4NJbfiRjoaKOaE3j6AikZ3ai5Qd8iWy+43rutMxMqZQ/vW7lggMGb9IsmkfaW02e+WqGwNjzWy4zOnoXUKxZiPGsOcFQIKketoTqTGuZr+Q== 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; bh=HY44Sh9NMsohzjDLbHm4LvZ8epz9mviz2PuMSBm0Vzc=; b=jf9LiWaG+wkLkrkeC4vQqM8wrmnB14xgtQ06vNq8rlvvN92KPl+iqT36jHKVKFHAeGPem/UY4UsiI520VQbeTDD/s2f3j1E98o38KAN+uCPKT4R6HdEA+rB86zA6fG1+2hBlxAw1nDZSvlZyBidZ+0W0w3DdPMgqFjzKVB40KZrSbrnXgYw+g4v2BAp+9xxZFifRzTar+oz+BEGASMsMUpZE8e2i9Y0flcgyd5KXLwAx2G8jdZvFTYZaxmicXGnPxgyUumySht2ywx19p0V2UzZ7BBzUHnIcxnFOXjfwlS2JUkh0BxguhD2D1MEXbn8gz9KwjLssmWBd92o6YYEFIQ== 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=HY44Sh9NMsohzjDLbHm4LvZ8epz9mviz2PuMSBm0Vzc=; b=QQBrXGR20YG50RcXehJIUjcY7efboT/r5WVU/xN83VfQAaY1OHUgIfI7d4Xc9iUWXkzRDPxJ/J3SDD5dAD4mqTEBK2WYoWifhfS2vZjYQ96nPsVLwSqK6QPLCe27K4zqZwaAUwX8Il4yK22H7LpBodjCcWIg0HOscMxCrePUVOQ= 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 SA0PR12MB4575.namprd12.prod.outlook.com (2603:10b6:806:73::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4523.14; Mon, 20 Sep 2021 18:46:38 +0000 Received: from SN6PR12MB2718.namprd12.prod.outlook.com ([fe80::78b7:7336:d363:9be3]) by SN6PR12MB2718.namprd12.prod.outlook.com ([fe80::78b7:7336:d363:9be3%6]) with mapi id 15.20.4523.018; Mon, 20 Sep 2021 18:46:38 +0000 From: "Brijesh Singh" To: devel@edk2.groups.io CC: James Bottomley , Min Xu , Jiewen Yao , Tom Lendacky , Jordan Justen , Ard Biesheuvel , Erdem Aktas , Michael Roth , Gerd Hoffmann , Brijesh Singh , Michael Roth , Ray Ni , Rahul Kumar , Eric Dong Subject: [PATCH v8 23/32] UefiCpuPkg: add PcdGhcbHypervisorFeatures Date: Mon, 20 Sep 2021 13:45:55 -0500 Message-ID: <20210920184604.31590-24-brijesh.singh@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210920184604.31590-1-brijesh.singh@amd.com> References: <20210920184604.31590-1-brijesh.singh@amd.com> X-ClientProxiedBy: SN4PR0201CA0034.namprd02.prod.outlook.com (2603:10b6:803:2e::20) To SN6PR12MB2718.namprd12.prod.outlook.com (2603:10b6:805:6f::22) Return-Path: brijesh.singh@amd.com MIME-Version: 1.0 Received: from sbrijesh-desktop.amd.com (165.204.77.1) by SN4PR0201CA0034.namprd02.prod.outlook.com (2603:10b6:803:2e::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4523.14 via Frontend Transport; Mon, 20 Sep 2021 18:46:37 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 4cfa30e7-e34d-45bf-d72c-08d97c66fa89 X-MS-TrafficTypeDiagnostic: SA0PR12MB4575: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:8882; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: If7qhO5YDlpNrDcJUOg+l8I3hURgITy9EbJoR+RydxSTDRdBBkfdNhho1pqUQz606CLnk0CB1RKwLBQoOKXMuGbTBRRZBkQ0iFDM9vL1ebPT19Y4TmcES+mecV2zJ92mJMxUqjB/4CHDGDUlD0PhQhQ41zistERRSHSRNv8Cc8oUF3kKI3lKEkp9qqSROOKLI13jm37KlO/Oi/fJafmkKHmk58KWoe6Ao8ULIcBDt+sHh9Izf1ooewo2SFmRd5B2RhzsEhafngt/DKMWB81UPKYxuiVvT5rnjXCO+cPgODO7ezS0WxDutAzIxSK7JQcCLHQ2KqCDqcsxI0UTIgKvrdOBzD4kwMqAOk9SZVNgiFszxm92vb/SKSXi1mb7mYvjqxsgqJERUm9lIxAvb//k/CbL3DDhxVJEZVUhXNiUpEj8Sd7/o8R/A5TbmOiptshltQVoa+NN59wi2BEJa0koML9WTiDnxhCzPPYw3YFVOh5gs6IK7C+4L2Jv8Fm206xx6Sfbs8FiorifbezQdNTIzU2KGczGy9Fe7gvwP8gFwCo5AtWgq+OfpzrjvBLmKzGyo/PUhAIrSs9/EAaIono3eGA8aTzflFmumqKQysXfje0V1nSv5vbwNC9wTqyZ/BUi5P9VUhp2oXapx51hoy9Im39fbWYS3x7oPoLzjtGdVxTvEDQ/bTR9xMme83j+mcIVlMDE/rMCgz8P37DsJVYV2e1t0lZaI34KiQ/uIbBgYiFnRA7SM+VfqXg6ZdIRjX4jC5hk1n6M+t+nKLvCGAw7+Vnbu8UILCFupKoXtnBTZUx4xq2cBlO+5/6dXpK0jffJ 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)(38350700002)(44832011)(5660300002)(36756003)(38100700002)(8936002)(66946007)(508600001)(6916009)(7696005)(52116002)(1076003)(6666004)(956004)(8676002)(186003)(54906003)(2616005)(7416002)(2906002)(6486002)(26005)(316002)(66556008)(66476007)(966005)(86362001)(4326008)(156123004);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?6KLqQdUvOXrbtBW9vh6eWpkkF5KgYZv4g8cnbKVzpOMku897bbb5mfNHQDTO?= =?us-ascii?Q?LjIWMbGMFs3wG5JpE+G9cECyCJW3jeMjPY9Ww3L8wgT96sYFIYAvNYKwa2qX?= =?us-ascii?Q?buOym8O0tNOqd5fCGrFf/BBrKdfLPn9J+3PIzy5Up2KQIhHgN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+vkwoCiDtPksM1zqd7u3oqYT46susGYUCbKWN4U00STR/V4C?= =?us-ascii?Q?LIAb3QtHTGNMqRerIlPtJ/udtFe5VNI56zYRv6wqKAQqrXmaGCE+mXG/8Zdz?= =?us-ascii?Q?WO4DIMmySaeBCu0mu88Aoz27SK7vgzC1+E4w2U647Q8Mlug9kMaDStaCT04Z?= =?us-ascii?Q?iqVLlv0Kim5EC8GotR+84pAeB8M1HfYzRWpYZPZDfxCrwqRLS4M9m8TW4bDs?= =?us-ascii?Q?o9X20MVC9JgEkuWv6kRQEGfiapBoXVnm3w6tPemhsi8aQPLuVU5Y8KZAT8fw?= =?us-ascii?Q?5W0CqIOYJ4+IPtgXgPLixrEP?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4cfa30e7-e34d-45bf-d72c-08d97c66fa89 X-MS-Exchange-CrossTenant-AuthSource: SN6PR12MB2718.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Sep 2021 18:46:38.2731 (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: A5juIu1TQ8X/7SsIj4Hhi8tqLb9/WkP+A6YkaOMq9kuRA598USic8Pjgew13/iGH458JTaWBGj7aU1Rzxj9dvQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA0PR12MB4575 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3D3275 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 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 9dbaa407c399..c979a0a90a0e 100644 --- a/UefiCpuPkg/UefiCpuPkg.dec +++ b/UefiCpuPkg/UefiCpuPkg.dec @@ -400,5 +400,10 @@ [PcdsDynamic, PcdsDynamicEx] # @Prompt Memory encryption attribute gUefiCpuPkgTokenSpaceGuid.PcdConfidentialComputingGuestAttr|0|UINT64|0x6= 0000017 =20 + ## This dynamic PCD contains the hypervisor features value obtained thro= ugh the GHCB HYPERVISOR + # features VMGEXIT defined in the version 2 of GHCB spec. + # @Prompt GHCB Hypervisor Features + gUefiCpuPkgTokenSpaceGuid.PcdGhcbHypervisorFeatures|0x0|UINT64|0x6000001= 8 + [UserExtensions.TianoCore."ExtraFiles"] UefiCpuPkgExtra.uni --=20 2.25.1