From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (NAM11-CO1-obe.outbound.protection.outlook.com []) by mx.groups.io with SMTP id smtpd.web12.25.1616599950939575559 for ; Wed, 24 Mar 2021 08:32:33 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@amd.com header.s=selector1 header.b=bdnxGdZu; spf=permerror, err=parse error for token &{10 18 %{i}._ip.%{h}._ehlo.%{d}._spf.vali.email}: invalid domain name (domain: amd.com, ip: , mailfrom: brijesh.singh@amd.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=aLoh52Ubf77ZUTLUTkp/HWE3O/1mm/ERT3yEaMzsAE2ukFEpCIszLEhu1p2U38jz0hBTeEGUuBGq88qs7XMcRBn4dEuu24drNNBbUDca8qPQacFzN+hL/Gya7ZXw3BA7sb6c/MJ2mvf8Az5ndHSwGoG502xV6l0SJjWFYHQ2E9qWRZyo4VS7PwcrhpJqXGUWYs8mdtEqUxm9Dven2+/uG10ncDqvlMAQOg++CfVknSBOhW6zpSZRkRhfDcgGdxMdoQkk15plDnlhlps1UJ1gpZwqOLjLYH+tQkVhTRQgTPPuTzRpr/1gYCmxtE2iQDsfKLFn7yBGzen0wk3/p7gtew== 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=L6UjXOYdIXDzy0BUeeOdeThuFw5EhOsdfFSBriT31O0=; b=gM3/lZUCjPGgI6B7PKzCKUfHKNEC7lNokNVKaTF7r+lkHRcPRo4Aw9yfTN991bDPfOHlbUA5O4aaGdvw+Y1/cIJ7nCyA5gZ21sTbtY1uZPUlhyh5sj8Pu4XywgiyTN1QkfQmwYNNzthXTj3Q5hoWaWJunTlVYV4OBuruZXaA7BrJwKM5mn3B+RaVdwLaMd4rUImAnNdiYwI+i4VDhpcw/98HEyaXMrGwChEyOvv275fCx1h2EJtEi8acON3RRccFUdBejnVgZ1C+faphh3h6dL0rCyGBzr8n8FBnchgFFSbpUnvqRU8wLxOIV85dDanxz++AZLWJWozKwpuwQ5PT1g== 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=L6UjXOYdIXDzy0BUeeOdeThuFw5EhOsdfFSBriT31O0=; b=bdnxGdZu3i5HeUnrjD7pa7x+Kw4mBNH8pnNLwAb4vgB+y9yqbVLbcfbcj8cl2D7MTFtm2Sz+ajeqQtuvJtXwkQmBO0Ryy6ejc/6KjMRqve5mamhuJTf1QMKMCWhNgJyHJBUuv44CS5uDZ/YqNH2bqXu08q2P3x/CzQsXKwaJhmU= 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 SN1PR12MB2541.namprd12.prod.outlook.com (2603:10b6:802:24::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3955.18; Wed, 24 Mar 2021 15:32:31 +0000 Received: from SN6PR12MB2718.namprd12.prod.outlook.com ([fe80::30fb:2d6c:a0bf:2f1d]) by SN6PR12MB2718.namprd12.prod.outlook.com ([fe80::30fb:2d6c:a0bf:2f1d%3]) with mapi id 15.20.3955.027; Wed, 24 Mar 2021 15:32:31 +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 Subject: [RFC PATCH 05/19] MdePkg: Define the GHCB GPA structure Date: Wed, 24 Mar 2021 10:32:01 -0500 Message-Id: <20210324153215.17971-6-brijesh.singh@amd.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210324153215.17971-1-brijesh.singh@amd.com> References: <20210324153215.17971-1-brijesh.singh@amd.com> X-Originating-IP: [165.204.77.1] X-ClientProxiedBy: SA9PR11CA0006.namprd11.prod.outlook.com (2603:10b6:806:6e::11) 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 SA9PR11CA0006.namprd11.prod.outlook.com (2603:10b6:806:6e::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3955.18 via Frontend Transport; Wed, 24 Mar 2021 15:32:31 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: d32d879c-2c44-454e-c7c3-08d8eeda0a24 X-MS-TrafficTypeDiagnostic: SN1PR12MB2541: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:7691; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: J1DdaQgr3TDOWtvsqr+84nzHoE3eBCGxC+FcP37z5Y/ZYNQU+ATLQdkLvcUeonGRgXJXYDHic5XZ9FAXuZNQCs7moc10SWVRXEUibkeL5l0fUUxp1kfvX+nwRwKbkDI7Q9RLtbDqpB6ONMBhubGCP//tLRKgi3bfY3v3yRovUPcfD7xtgT3H4uHAk1ApSW6KdDF5zeVirCsR1pxNI1k2bebtjp/QATtboZEHrUh0Q2/epXjjcJLSUVuuI+Fk7GZWyqs6uZP5mFLBlc2MyZ1zPovc5K8qa0Bs6SXraNJEICeByg+0vKWNPT0KlzVPjt9atqJ1DdbQO9SnXdC+wpl2b5v1QUGdqIh4Vo8q8gGhH1Na5GZaTv+kj5puSQJaa12/LL8TCmmuwU+LwjJNZJ289PneVDva74aKKQCX6ZNMw+5J62HryNtnwf1Vvnvo3NGIkUqg1FYj0nkchAsK/nLa+MmyMi28fJrN7Tqi5/A8PXlVsXrFEr8EA3rNGyx75BRjVoSawJlKTl9BJec2BbXVM/C4ID+kclQaNxEExaz7vBCS4FQWyPRgbM0hHjawslbGs6j1P9wWjipHhjzLb7xXQStRRmaDtiOClWntU3shkkuTGuZDhxajxTTvPhL53KRuVGo/0T83jHBLwZrt/43GQpCDqmbp66Z7hhDxEOa4wCcSlEorr270zqNq0yJ9PX6zNLkgS+zWY1SfP4svn+XW9n4KutpVwAyWFCaDBZSYtHibKf795l7evNdpKysw13je 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)(136003)(376002)(396003)(39860400002)(346002)(36756003)(8676002)(316002)(52116002)(54906003)(7696005)(5660300002)(1076003)(66946007)(6916009)(8936002)(83380400001)(2906002)(86362001)(6666004)(6486002)(38100700001)(26005)(66556008)(478600001)(956004)(66476007)(2616005)(966005)(19627235002)(4326008)(44832011)(186003)(16526019);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData: =?us-ascii?Q?1wzPt3NX/wX5U7oeG6a1cru+KIdzcVasNkyn5+V4WuegqUO92r+yR5usOZqY?= =?us-ascii?Q?Hc7jsl2dmFprQwklg/5bo9RM/6dSRSRIn6oRm4UGRY544k7Gk44lr5LHtU3u?= =?us-ascii?Q?rbttyLQ2UvIX5W9WGAlVDihaVzmAE3ifL1LQLE4BLU4yuPSmKq5QMY83C5GO?= =?us-ascii?Q?oQgRK/l9zQYGV2CaxLDoHf+hIwYQU1jkQxhznurNNFaoktO+l8U+OgcFyyES?= =?us-ascii?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srLwE0lGNmBcnn?= =?us-ascii?Q?BmwB/rUuHggiShyzRdthPITEYs2f07v2cHL9frcER1odaFyfpeU5YDfvXrN7?= =?us-ascii?Q?+QcJkjSEojYTVA3/Fs/HaUpKrcrL+vbxj8LoZ2ERxFnLh8PdnUBW93dwIviT?= =?us-ascii?Q?c8GCjPefE5X4tE30wMeYM5T41dWtMcHLwE4cYY3Fq4EAWMiamQxNivoDG8aX?= =?us-ascii?Q?gyvtyta5tC4go71jOKn5yZAe?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: d32d879c-2c44-454e-c7c3-08d8eeda0a24 X-MS-Exchange-CrossTenant-AuthSource: SN6PR12MB2718.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Mar 2021 15:32:31.5038 (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: QM8HbkIyalBp+C7aamUExyZjtL/XbEM3HwktFdF6EK+tPLn5GEOorc47VJ/LBAB/BC9dX5KPZQ+8ZFwbdgELUg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN1PR12MB2541 Content-Type: text/plain BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3275 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 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/Register/Amd/Fam17Msr.h index 4d33bef220..c074e871a7 100644 --- a/MdePkg/Include/Register/Amd/Fam17Msr.h +++ b/MdePkg/Include/Register/Amd/Fam17Msr.h @@ -48,6 +48,11 @@ typedef union { UINT32 Reserved2:32; } GhcbTerminate; + struct { + UINT64 Function:12; + UINT64 GuestFrameNumber:52; + } GhcbGpaRegister; + VOID *Ghcb; UINT64 GhcbPhysicalAddress; @@ -58,6 +63,8 @@ typedef union { #define GHCB_INFO_CPUID_REQUEST 4 #define GHCB_INFO_CPUID_RESPONSE 5 #define GHCB_INFO_TERMINATE_REQUEST 256 +#define GHCB_INFO_GHCB_GPA_REGISTER_REQUEST 18 +#define GHCB_INFO_GHCB_GPA_REGISTER_RESPONSE 19 #define GHCB_TERMINATE_GHCB 0 #define GHCB_TERMINATE_GHCB_GENERAL 0 -- 2.17.1