From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from NAM02-BN1-obe.outbound.protection.outlook.com (NAM02-BN1-obe.outbound.protection.outlook.com [40.107.212.48]) by mx.groups.io with SMTP id smtpd.web09.6109.1620863207073468706 for ; Wed, 12 May 2021 16:46:47 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="body hash did not verify" header.i=@amd.com header.s=selector1 header.b=Gt+bwTj/; 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.212.48, mailfrom: brijesh.singh@amd.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YJikbU768QpjF6XHLlct4nFzReshPOcH0ePJgWFMet57WajFL6g0QA0pKxj6+v2B/THGymN3OMIWWP8qeeRoQgFAZZdylBYprIq8qGwYSRARwDIKZgKJgFwzff8/J/Gif6tCMuAyo9CSFpLL1qdaaDplPdX1sbP/7BFJCKrTmCpG0hASPtQKvMkBY1RA24fWQysN582rdo7jZOAoawoLvg6cDwqvUbDphatccFgbLq9wq5i2QqA99c+XxPiZ6NURMKrFqUCerhCM8M8Q43QnW63xfDzdrAL8CJhegxNNfYEzVCnUpEt7XCRMHabO7I3H8PVD4VPo+At9pF5eFwQEtA== 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-SenderADCheck; bh=YvFeEJiRf8zD4eO5THDmrNW89ps9Brp4vvqhmB0KajQ=; b=bF8IEYAPClz3XwFbwpzD3GqBxcT250tUuNI/D+J97j2LKaDlF1sitkEV8xKnr9VY/UIC6tnEA+Gcz/6rRQrZz40GP8T9FlwBlAv0/o7k8tf+9U6/w0q7aad1dmoQ/yMAJnoCgwFnyIsuTxY65ayYOZOYF8F0eaZss6WVQdvd4VS4l2aXb9paNt4/vwYeIMmZUpRw3tgLUaaJTISk8mlm+6Le9yNtwgPVR7BmOjHhpEslfR6Qcn8ELqoDPlXoBWkBqB7avbRyk4Ub07/LOP63b5r1LNzMbSFQYS5R6J67M6KEIEupWPfbFc7mOgJtsWAjsjMb1SnG1ZYySxVxIrl+xw== 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=YvFeEJiRf8zD4eO5THDmrNW89ps9Brp4vvqhmB0KajQ=; b=Gt+bwTj/4ulEu7jHs/ISMLvoIP48S+q9BCtMJF0vFPvfaTwjMERd3s2ky5+lKR/cH6i15l2f6bKaKHPdI0PnlcqcPuzWApu7Rlrnc1iwO7k3m+x98ybaSqX/QOP21THVFyGRJ+Y4GHfr/Yo5hi+CVbAryjtotVFWBB0Tg5wR8kg= 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.4129.26; Wed, 12 May 2021 23:46:44 +0000 Received: from SN6PR12MB2718.namprd12.prod.outlook.com ([fe80::9898:5b48:a062:db94]) by SN6PR12MB2718.namprd12.prod.outlook.com ([fe80::9898:5b48:a062:db94%6]) with mapi id 15.20.4129.025; Wed, 12 May 2021 23:46:44 +0000 From: "Brijesh Singh" To: devel@edk2.groups.io CC: Brijesh Singh , James Bottomley , Min Xu , Jiewen Yao , Tom Lendacky , Jordan Justen , Ard Biesheuvel , Laszlo Ersek , Erdem Aktas , Michael D Kinney , Liming Gao , Zhiguang Liu Subject: [PATCH v2 04/13] MdePkg/Register/Amd: define GHCB macro for Register GPA structure Date: Wed, 12 May 2021 18:46:06 -0500 Message-ID: <20210512234615.1726-5-brijesh.singh@amd.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210512234615.1726-1-brijesh.singh@amd.com> References: <20210512234615.1726-1-brijesh.singh@amd.com> X-Originating-IP: [165.204.77.1] X-ClientProxiedBy: SA0PR13CA0003.namprd13.prod.outlook.com (2603:10b6:806:130::8) To SN6PR12MB2718.namprd12.prod.outlook.com (2603:10b6:805:6f::22) Return-Path: brijesh.singh@amd.com MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from sbrijesh-desktop.amd.com (165.204.77.1) by SA0PR13CA0003.namprd13.prod.outlook.com (2603:10b6:806:130::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4150.11 via Frontend Transport; Wed, 12 May 2021 23:46:41 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: e2c794b5-adc1-457e-0083-08d915a0318e X-MS-TrafficTypeDiagnostic: SA0PR12MB4575: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:5797; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: yjcXLtS+G5EZj3xcIQTcovliNSiZ1j29IYU0p/BRDrAOyy3JTU2lTWzt04+cBCAwj1ksKnoMZXhtW5yer5pnN/x0dfR3aumEDU/TtuKImG6pCyJp/uK9bzbMQ9jyz7Tl7+C7/I6GhyzM5aUS9AroXf+LoRvwdKxs/VeWhv//gvZYaKIUfT6Mp6IZnzj1PFgnzn+YaLDgz775ywFguUUff2LaC2snpY+mMVysycgwADObd6Phy552phys2ArDN23zbTzy0ck0V81QgepY9aqGXglPsjchE2KwiojcBbK9LYj48eb3X73GZOvA1Ga+A+6gdDtV4CjnjsSkfJjjNgiP/iozgLI+5dSZBuhbbFIX84myywf2np58mxXMxYjhw7vhH5i0CHy1N5+20WL5I6QFMJewOc9PYGYuCC6y+W5YtGojZUTWexRlieAa0bzuabJCfjYqOSeknhexJrzBrGpf8TlhLqQqLUV3i67PJ9fxllyeaO86eTSIomyxOXO3Pncc+zW71tqjNOuJnxJNaLKns2PXzoywH9Mp5HYJ99w0lIxYKuJfF9t4EYQC9Rc7igpjtpyveSIw4G+afDG1ePqo5rWO7kiCh+0NmRYTTPZoLYzcYqMS6RWpjH7Ci/8HtVS682v0ZdfcXMcnaFuWmvkxdfxbNPxjf6g/i4/FkIhSEkTPfvjJGr9xeybRRzy9uDjHs/xYwfongXTWDZgbWMZaLY9/fBs4yYgNzIPaCF7YFyQL6AznIv1SnhTUFHM+7CCO 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)(6666004)(44832011)(2906002)(26005)(186003)(83380400001)(36756003)(54906003)(19627235002)(1076003)(66946007)(5660300002)(2616005)(4326008)(16526019)(6916009)(7696005)(66476007)(52116002)(86362001)(8676002)(7416002)(966005)(66556008)(498600001)(8936002)(38350700002)(38100700002)(956004)(6486002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData: =?us-ascii?Q?FMdSKpvTeL6PXoodsiN8w+kvCV+DKI5KhoLyuxo2fJwZ+tIU+wsVQj7MYxOF?= =?us-ascii?Q?ydXiyYLKfZF3dxIttsKcBHGasVaaEHs8hnIJHThNwiwX4rwYpT6LVXJ36lK9?= =?us-ascii?Q?eIBAt8cmv5T/9H3WU9uUJi64Zrh8SKRKH15KmxTw34RmuOBe6YRugQnoGv/C?= =?us-ascii?Q?FNJbqHB2eGGJARHaEcH2sQ/1naL9umXVO5hNJPCWrD64BY5tZ+odZ3jutx6h?= =?us-ascii?Q?t+o299U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gQUM8bhPywMzElGsGn3tYAN?= =?us-ascii?Q?S/N3FPkvr17HqCVnKh/dKr2aaO2VcRP+uX+QmtKd/UEPmFoxO1v7g6NjoJXF?= =?us-ascii?Q?GdMQ9zzVMOt0aQ7ACCWmbUUSQmqssB004G2DybYDRyqGul54s9XnDt94OWyS?= =?us-ascii?Q?WY6lWbqNE7hxlBymw+lsMDpP3/LfXTs37P9DUIzLSHtVCb1LnrM7eeKcD+fw?= =?us-ascii?Q?If9BkTxk7BkCKCskBZLwEmO1?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: e2c794b5-adc1-457e-0083-08d915a0318e X-MS-Exchange-CrossTenant-AuthSource: SN6PR12MB2718.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 May 2021 23:46:42.1775 (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: gY6Zf8lATVgtZXAirrPinyIMFAPVsTdMgKImKoPYj4LnoxXoF/CLHi9hDo16THBmYgM1KUdNOZMMevh0MmDBoA== 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 An SEV-SNP guest is required to perform the GHCB GPA registration. See the GHCB specification for further details. Cc: James Bottomley Cc: Min Xu Cc: Jiewen Yao Cc: Tom Lendacky Cc: Jordan Justen Cc: Ard Biesheuvel Cc: Laszlo Ersek Cc: Erdem Aktas Cc: Michael D Kinney Cc: Liming Gao Cc: Zhiguang Liu Reviewed-by: Laszlo Ersek Reviewed-by: Liming Gao Signed-off-by: Brijesh Singh --- MdePkg/Include/Register/Amd/Fam17Msr.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/MdePkg/Include/Register/Amd/Fam17Msr.h b/MdePkg/Include/Regist= er/Amd/Fam17Msr.h index cdb8f588ccf8..542e4cdf4782 100644 --- a/MdePkg/Include/Register/Amd/Fam17Msr.h +++ b/MdePkg/Include/Register/Amd/Fam17Msr.h @@ -53,6 +53,11 @@ typedef union { UINT64 Features:52; } GhcbHypervisorFeatures; =20 + struct { + UINT64 Function:12; + UINT64 GuestFrameNumber:52; + } GhcbGpaRegister; + VOID *Ghcb; =20 UINT64 GhcbPhysicalAddress; @@ -62,6 +67,8 @@ typedef union { #define GHCB_INFO_SEV_INFO_GET 2 #define GHCB_INFO_CPUID_REQUEST 4 #define GHCB_INFO_CPUID_RESPONSE 5 +#define GHCB_INFO_GHCB_GPA_REGISTER_REQUEST 18 +#define GHCB_INFO_GHCB_GPA_REGISTER_RESPONSE 19 #define GHCB_HYPERVISOR_FEATURES_REQUEST 128 #define GHCB_HYPERVISOR_FEATURES_RESPONSE 129 #define GHCB_INFO_TERMINATE_REQUEST 256 --=20 2.17.1