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.58]) by mx.groups.io with SMTP id smtpd.web11.24916.1637940109834001566 for ; Fri, 26 Nov 2021 07:21:50 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@amd.com header.s=selector1 header.b=Z0Ng9fVD; 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.58, mailfrom: brijesh.singh@amd.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YKqZYgR0E+LLyfkDCrV7S8Tddr/2Hvvsc9IOrXIyd5xI2NVW9D/FJhofB/iAVVfrv6smY4IbbmqZpCdy7awivDkwIQFgiFXFo5HrdQC7rEcraog3gRhegY42xfpXE4SHNsEZ+1lnb07cYCHZb6rqpFPejdp5MAAxZmr8S5D+c5q/jAkmgM/dpgcen6nssJzVXRgwMPCF1C/+c0thKddqGFgDtDD5sEHh4OBgoPRWAnZ24OELJA794Y35d5O/FhvgCIfGlJUug2+j97BTKT3TD0aTTNcMwmVkk5IhTKBCo5NjDB1Sx0YzN2DH7ikVJdG08np8DXcmodbHcG7AwDb79A== 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=6hYEhAvYyMf/nPAd5tejdWGu2QsVvWRX+fJwxXn1rbA=; b=EDOV4u01cqJm8PBBXaRo//cdXeax3GCIFKgv2kMDb7mbZFjDYEERSj0fYWJsWq29N2qQYw/wuuDv4LnA/T3MlYKct+It5vlIh2v2WZoLv39IMBdajSkYuNQe2eHq4JKORAk9dcHvMyvpiV/VVVR4BZeUObnAL6E/3mAjEz7SauzOzA2wap7710+RleNVJt9RBuR6dIWRZh2yqZFLsCSOT78IvroEA7D3MbxZQx26ZKQ53rEI2lNC3k0ZzfIbpPeFtuXmrGYmtL99EyxmKA2Mrm1Xb5GSAFrsWxdGoSMVLdzFAlUpmUkx0NR06NLC9K3E/qy7zTvP0O1xivpWfORZxg== 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=6hYEhAvYyMf/nPAd5tejdWGu2QsVvWRX+fJwxXn1rbA=; b=Z0Ng9fVDnySaxTfrd/Ssxy1Jk9nyP0YQfLZ6DeDClYLjVWAIqHR0H9KjBGsvsrFjd4/mY3hWc1DaGPvL2wd2Y8Fhifq5iDFNU/9IsAiUK1mOonFQMgygt9p6Qdg9NVTpq4oI8rXQXuI2Pzhhaa2J17CYxeLceXmjtKHuhbSxGGc= Authentication-Results: dkim=none (message not signed) header.d=none;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.4734.23; Fri, 26 Nov 2021 15:21:46 +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.4713.027; Fri, 26 Nov 2021 15:21:46 +0000 Message-ID: Date: Fri, 26 Nov 2021 09:21:43 -0600 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.3.2 Cc: brijesh.singh@amd.com, James Bottomley , Min Xu , Jiewen Yao , Tom Lendacky , Jordan Justen , Ard Biesheuvel , Erdem Aktas , Michael Roth , Gerd Hoffmann , Michael D Kinney , Liming Gao , Zhiguang Liu , Ray Ni , Rahul Kumar , Eric Dong Subject: Re: [PATCH v13 00/32] Add AMD Secure Nested Paging (SEV-SNP) support To: devel@edk2.groups.io References: <20211112173959.2505972-1-brijesh.singh@amd.com> From: "Brijesh Singh" In-Reply-To: <20211112173959.2505972-1-brijesh.singh@amd.com> X-ClientProxiedBy: SN6PR04CA0106.namprd04.prod.outlook.com (2603:10b6:805:f2::47) To SN6PR12MB2718.namprd12.prod.outlook.com (2603:10b6:805:6f::22) Return-Path: brijesh.singh@amd.com MIME-Version: 1.0 Received: from [192.168.1.4] (76.85.107.139) by SN6PR04CA0106.namprd04.prod.outlook.com (2603:10b6:805:f2::47) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4734.21 via Frontend Transport; Fri, 26 Nov 2021 15:21:45 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 0b40ddab-60c6-45db-7639-08d9b0f07568 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: E3noeuZAfJjIiExFK34w7o47Mji/dQ5EKrExaB2AvjRq/08jzwMKUtAAWgtsFE9uLTwYRN+uHEGyX1OIf27xEGy2VQM10w0+wgX9k7a6LKFgAUTGfeslVd3lRIQ0UMC72Z2vEbLQWE26sabn6A3XfeABMVQjLvSU5d2ob9bDMi5XqJKeYUI18Dg6wmSCq1/baxF28UGyGinU/mOSGwoOZD651FHzew8R96yiekvztZUPTzZh7Fm3FcSQaiVSk5QVtHC2LqRC6d/6KHmybnjxcSiZCotX6m1+K+H2ZAu98iq1bY4lzbUS6TqUg9Vajp9jQV78wBPvMhxqW5s0RRK6olB3enAG5ucKuRvI3wQKj5XLSokouI6C6lPp86riVR3e75EJuazTX3PnduWyb+iNju4hH+AZ9TdImCtUpFAzpFOdQpBcFTWdFHqbdb7AMX7r8xFDjl4srUJrxUmrN7IWDdzX0xwrRmZH826CQDNWerA7iuo/O8gRV55J8BuZ+qJFp3DeWzmgUzwx4JBm2yXCR+A8fkWDHBStI/WqVPVbrYUmWotHnZcETJGMVLq9G64okUxaANkdIU/PwpMW38VOAEbALUeOFlBj28lRbZ3/iD0Ak/PR/1It0LLBCetvaAl+eoCpeOE6kCJbPlrcxn+eWeaijH8X2RXKuCK5clkZGpsjbAAjpOUV5a6ZF1R9g+aiwbV4Wl2VT0z8P9+K2Rhju/Uu+s2bqf/3/pf9Zm52eihB63ck9ZPnkAMknLATgo/CZL3bM/b8SfDq/d8jFQTKIQKZslZok5tDsHT9pLdmfbWuVBHjjh6SmQ2HIOXOwuO2gNQ6Ao91VBHhAX/kqlwERek2u84U+Nd6ts9fTGRzpe4= 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)(316002)(16576012)(6916009)(36756003)(956004)(2616005)(4326008)(7416002)(5660300002)(30864003)(54906003)(83380400001)(19627235002)(508600001)(6486002)(31696002)(8676002)(8936002)(186003)(966005)(38100700002)(44832011)(26005)(66946007)(66556008)(66476007)(31686004)(2906002)(53546011)(86362001)(45980500001)(43740500002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?TXJ2VDV1YlZSMWFHQmlrSDN3Rm5OVmtZeDRUYU5GMmI3OUVPUFlEND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0xsRTZEbWlENkF6SExGbzc5SXVGRkNqRDlhTElBbFlJUzRh?= =?utf-8?B?MVVKK2x4L0RzczhBQnRHZkRTdFVmbnJYQzJtRkFDTU9qd3FUd2luMUN3c1ph?= =?utf-8?B?b3pXVTkwTEtuZnc3ZzU4QnByZjRHakx3NnhSazFlTndveitidzIwZmlXTXlw?= =?utf-8?B?MnVSRGIrN0lTNDZ0N00xQmJpN09kZjMxSUNITkJFQU9aVTB0Z3NjNE11VEhH?= =?utf-8?B?bDZEUDV3a0ZRNm1mNkYzbEpya1hiSXMxR2RzVHNpRm56TnUyREk5K1F4WTJO?= =?utf-8?B?KzFpVEdRZ3ZlRFQ3RzE2VzZOaVhzaVVhRG96Vys5Ky9ONmtxUXBjUSt3Vmxz?= =?utf-8?Q?D8V+xXzy5ZoEUQqeI5P2Eeo=3D?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0b40ddab-60c6-45db-7639-08d9b0f07568 X-MS-Exchange-CrossTenant-AuthSource: SN6PR12MB2718.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Nov 2021 15:21:46.0144 (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: cBWNPRakO6DjtNkczSFj9nWZAbkzp5m0QEYDWnQ8HX6Z9vUdgdGCff6oVhajwfg3vT+r5L/zav5M0b4hd3WJFQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN1PR12MB2448 Content-Language: en-US Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Hi Ray, Can you please ack the remaining patches so that it can be merged? thanks On 11/12/21 11:39 AM, Brijesh Singh wrote: > --------------------------------------------------------------------------- > Hi Ray, > > Thanks for your reviews and continuous support; I have updated a couple of patches > to address your comment. As I said in my previous reply, I will working on a > follow-up series to group some of those Sev specific variables in CpuData. > > I hope that is okay with you. > > thanks > ---------------------------------------------------------------------------- > > BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3275 > > SEV-SNP builds upon existing SEV and SEV-ES functionality while adding > new hardware-based memory protections. SEV-SNP adds strong memory integrity > protection to help prevent malicious hypervisor-based attacks like data > replay, memory re-mapping and more in order to create an isolated memory > encryption environment. > > This series provides the basic building blocks to support booting the SEV-SNP > VMs, it does not cover all the security enhancement introduced by the SEV-SNP > such as interrupt protection. > > Many of the integrity guarantees of SEV-SNP are enforced through a new > structure called the Reverse Map Table (RMP). Adding a new page to SEV-SNP > VM requires a 2-step process. First, the hypervisor assigns a page to the > guest using the new RMPUPDATE instruction. This transitions the page to > guest-invalid. Second, the guest validates the page using the new PVALIDATE > instruction. The SEV-SNP VMs can use the new "Page State Change Request NAE" > defined in the GHCB specification to ask hypervisor to add or remove page > from the RMP table. > > Each page assigned to the SEV-SNP VM can either be validated or unvalidated, > as indicated by the Validated flag in the page's RMP entry. There are two > approaches that can be taken for the page validation: Pre-validation and > Lazy Validation. > > Under pre-validation, the pages are validated prior to first use. And under > lazy validation, pages are validated when first accessed. An access to a > unvalidated page results in a #VC exception, at which time the exception > handler may validate the page. Lazy validation requires careful tracking of > the validated pages to avoid validating the same GPA more than once. The > recently introduced "Unaccepted" memory type can be used to communicate the > unvalidated memory ranges to the Guest OS. > > At this time we only support the pre-validation. OVMF detects all the available > system RAM in the PEI phase. When SEV-SNP is enabled, the memory is validated > before it is made available to the EDK2 core. > > Now that series contains all the basic support required to launch SEV-SNP > guest. We are still missing the Interrupt security feature provided by the > SNP. The feature will be added after the base support is accepted. > > Additional resources > --------------------- > SEV-SNP whitepaper > https://www.amd.com/system/files/TechDocs/SEV-SNP-strengthening-vm-isolation-with-integrity-protection-and-more.pdf > > APM 2: https://www.amd.com/system/files/TechDocs/24593.pdf (section 15.36) > > The complete source is available at > https://github.com/AMDESE/ovmf/tree/snp-v13 > > GHCB spec: > https://developer.amd.com/wp-content/resources/56421.pdf > > SEV-SNP firmware specification: > https://www.amd.com/system/files/TechDocs/56860.pdf > > Change since v12: > * MpLib: Add comment to clarify that SEV-SNP enabled implicitly means SEV and SEV-ES are active. > * MpLib: Move the extended topology initialization in AmdSev.c > > Change since v11: > * rebase to the latest > * fix the UefiCpuPkg PCD definition patch header. > > Change since v10: > * fix 'unresolved external symbol __allshl' link error when building I32 for VS2017. > > Changes since v9: > * Move CCAttrs Pcd define in MdePkg > * Add comment to indicate that allocating the identity map PT is temporary until we get lazy validation > > Changes since v8: > * drop the generic metadata and make it specific to SEV. > > Changes since v7: > * Move SEV specific changes in MpLib in AmdSev file > * Update the GHCB register function to not restore the GHCB MSR because > we were already in the MSR protocol mode. > * Drop the SNP name from PcdSnpSecPreValidate. > * Add new section for GHCB memory in the OVMF metadata. > > Change since v6: > * Drop the SNP boot block GUID and switch to using the Metadata guided structure > proposed by Min in TDX series. > * Exclude the GHCB page from the pre-validated region. It simplifies the reset > vector code where we do not need to unvalidate the GHCB page. > * Now that GHCB page is not validated so move the VMPL check from reset vector > code to the MemEncryptSevLib on the first page validation. > * Introduce the ConfidentialComputingGuestAttr PCD to communicate which > memory encryption is active so that MpInitLib can make use of it. > * Drop the SEVES specific PCD as the information can be communicated via > the ConfidentialComputingGuestAttr. > * Move the SNP specific AP creation function in AmdSev.c. > * Define the SNP Blob GUID in a new file. > > Change since v5: > * When possible use the CPUID value from CPUID page > * Move the SEV specific functions from SecMain.c in AmdSev.c > * Rebase to the latest code > * Add the review feedback from Yao. > > Change since v4: > * Use the correct MSR for the SEV_STATUS > * Add VMPL-0 check > > Change since v3: > * ResetVector: move all SEV specific code in AmdSev.asm and add macros to keep > the code readable. > * Drop extending the EsWorkArea to contain SNP specific state. > * Drop the GhcbGpa library and call the VmgExit directly to register GHCB GPA. > * Install the CC blob config table from AmdSevDxe instead of extending the > AmdSev/SecretsDxe for it. > * Add the separate PCDs for the SNP Secrets. > > Changes since v2: > * Add support for the AP creation. > * Use the module-scoping override to make AmdSevDxe use the IO port for PCI reads. > * Use the reserved memory type for CPUID and Secrets page. > * > Changes since v1: > * Drop the interval tree support to detect the pre-validated overlap region. > * Use an array to keep track of pre-validated regions. > * Add support to query the Hypervisor feature and verify that SNP feature is supported. > * Introduce MemEncryptSevClearMmioPageEncMask() to clear the C-bit from MMIO ranges. > * Pull the SevSecretDxe and SevSecretPei into OVMF package build. > * Extend the SevSecretDxe to expose confidential computing blob location through > EFI configuration table. > > Brijesh Singh (28): > OvmfPkg/SecMain: move SEV specific routines in AmdSev.c > UefiCpuPkg/MpInitLib: move SEV specific routines in AmdSev.c > OvmfPkg/ResetVector: move clearing GHCB in SecMain > OvmfPkg/ResetVector: introduce SEV metadata descriptor for VMM use > OvmfPkg: reserve SNP secrets page > OvmfPkg: reserve CPUID page > OvmfPkg/ResetVector: pre-validate the data pages used in SEC phase > OvmfPkg/MemEncryptSevLib: add MemEncryptSevSnpEnabled() > OvmfPkg/SecMain: register GHCB gpa for the SEV-SNP guest > OvmfPkg/PlatformPei: register GHCB gpa for the SEV-SNP guest > OvmfPkg/AmdSevDxe: do not use extended PCI config space > OvmfPkg/MemEncryptSevLib: add support to validate system RAM > OvmfPkg/MemEncryptSevLib: add function to check the VMPL0 > OvmfPkg/BaseMemEncryptSevLib: skip the pre-validated system RAM > OvmfPkg/MemEncryptSevLib: add support to validate > 4GB memory in PEI > phase > OvmfPkg/SecMain: validate the memory used for decompressing Fv > OvmfPkg/PlatformPei: validate the system RAM when SNP is active > MdePkg: Define ConfidentialComputingGuestAttr > OvmfPkg/PlatformPei: set PcdConfidentialComputingAttr when SEV is > active > UefiCpuPkg/MpInitLib: use PcdConfidentialComputingAttr to check SEV > status > UefiCpuPkg: add PcdGhcbHypervisorFeatures > OvmfPkg/PlatformPei: set the Hypervisor Features PCD > MdePkg/GHCB: increase the GHCB protocol max version > UefiCpuPkg/MpLib: add support to register GHCB GPA when SEV-SNP is > enabled > OvmfPkg/MemEncryptSevLib: change the page state in the RMP table > OvmfPkg/MemEncryptSevLib: skip page state change for Mmio address > OvmfPkg/PlatformPei: mark cpuid and secrets memory reserved in EFI map > OvmfPkg/AmdSev: expose the SNP reserved pages through configuration > table > > Michael Roth (3): > OvmfPkg/ResetVector: use SEV-SNP-validated CPUID values > OvmfPkg/VmgExitLib: use SEV-SNP-validated CPUID values > UefiCpuPkg/MpInitLib: use BSP to do extended topology check > > Tom Lendacky (1): > UefiCpuPkg/MpInitLib: Use SEV-SNP AP Creation NAE event to launch APs > > MdePkg/MdePkg.dec | 4 + > OvmfPkg/OvmfPkg.dec | 19 + > UefiCpuPkg/UefiCpuPkg.dec | 5 + > OvmfPkg/AmdSev/AmdSevX64.dsc | 8 +- > OvmfPkg/Bhyve/BhyveX64.dsc | 5 +- > OvmfPkg/OvmfPkgIa32.dsc | 4 + > OvmfPkg/OvmfPkgIa32X64.dsc | 9 +- > OvmfPkg/OvmfPkgX64.dsc | 8 +- > OvmfPkg/OvmfXen.dsc | 5 +- > OvmfPkg/OvmfPkgX64.fdf | 6 + > OvmfPkg/AmdSevDxe/AmdSevDxe.inf | 7 + > .../DxeMemEncryptSevLib.inf | 3 + > .../PeiMemEncryptSevLib.inf | 7 + > .../SecMemEncryptSevLib.inf | 3 + > OvmfPkg/Library/VmgExitLib/SecVmgExitLib.inf | 2 + > OvmfPkg/Library/VmgExitLib/VmgExitLib.inf | 3 + > OvmfPkg/PlatformPei/PlatformPei.inf | 7 + > OvmfPkg/ResetVector/ResetVector.inf | 5 + > OvmfPkg/Sec/SecMain.inf | 4 + > UefiCpuPkg/Library/MpInitLib/DxeMpInitLib.inf | 6 +- > UefiCpuPkg/Library/MpInitLib/PeiMpInitLib.inf | 6 +- > .../Include/ConfidentialComputingGuestAttr.h | 25 + > MdePkg/Include/Register/Amd/Ghcb.h | 2 +- > .../Guid/ConfidentialComputingSevSnpBlob.h | 33 ++ > OvmfPkg/Include/Library/MemEncryptSevLib.h | 26 + > .../X64/SnpPageStateChange.h | 36 ++ > .../BaseMemEncryptSevLib/X64/VirtualMemory.h | 24 + > OvmfPkg/PlatformPei/Platform.h | 5 + > OvmfPkg/Sec/AmdSev.h | 95 ++++ > UefiCpuPkg/Library/MpInitLib/MpLib.h | 103 ++++ > OvmfPkg/AmdSevDxe/AmdSevDxe.c | 23 + > .../DxeMemEncryptSevLibInternal.c | 27 ++ > .../Ia32/MemEncryptSevLib.c | 17 + > .../PeiMemEncryptSevLibInternal.c | 27 ++ > .../SecMemEncryptSevLibInternal.c | 19 + > .../X64/DxeSnpSystemRamValidate.c | 40 ++ > .../X64/PeiDxeVirtualMemory.c | 167 ++++++- > .../X64/PeiSnpSystemRamValidate.c | 127 +++++ > .../X64/SecSnpSystemRamValidate.c | 82 ++++ > .../X64/SnpPageStateChangeInternal.c | 294 ++++++++++++ > OvmfPkg/Library/VmgExitLib/VmgExitVcHandler.c | 444 ++++++++++++++++-- > OvmfPkg/PlatformPei/AmdSev.c | 231 +++++++++ > OvmfPkg/PlatformPei/MemDetect.c | 2 + > OvmfPkg/Sec/AmdSev.c | 298 ++++++++++++ > OvmfPkg/Sec/SecMain.c | 158 +------ > UefiCpuPkg/Library/MpInitLib/AmdSev.c | 260 ++++++++++ > UefiCpuPkg/Library/MpInitLib/DxeMpLib.c | 16 +- > UefiCpuPkg/Library/MpInitLib/Ia32/AmdSev.c | 70 +++ > UefiCpuPkg/Library/MpInitLib/MpLib.c | 347 +++++--------- > UefiCpuPkg/Library/MpInitLib/PeiMpLib.c | 4 +- > UefiCpuPkg/Library/MpInitLib/X64/AmdSev.c | 261 ++++++++++ > OvmfPkg/FvmainCompactScratchEnd.fdf.inc | 5 + > OvmfPkg/ResetVector/Ia16/ResetVectorVtf0.asm | 14 + > OvmfPkg/ResetVector/Ia32/AmdSev.asm | 86 +++- > OvmfPkg/ResetVector/ResetVector.nasmb | 18 + > OvmfPkg/ResetVector/X64/OvmfSevMetadata.asm | 74 +++ > UefiCpuPkg/Library/MpInitLib/MpEqu.inc | 2 + > UefiCpuPkg/Library/MpInitLib/X64/AmdSev.nasm | 200 ++++++++ > UefiCpuPkg/Library/MpInitLib/X64/MpFuncs.nasm | 100 +--- > 59 files changed, 3360 insertions(+), 528 deletions(-) > create mode 100644 MdePkg/Include/ConfidentialComputingGuestAttr.h > create mode 100644 OvmfPkg/Include/Guid/ConfidentialComputingSevSnpBlob.h > create mode 100644 OvmfPkg/Library/BaseMemEncryptSevLib/X64/SnpPageStateChange.h > create mode 100644 OvmfPkg/Sec/AmdSev.h > create mode 100644 OvmfPkg/Library/BaseMemEncryptSevLib/X64/DxeSnpSystemRamValidate.c > create mode 100644 OvmfPkg/Library/BaseMemEncryptSevLib/X64/PeiSnpSystemRamValidate.c > create mode 100644 OvmfPkg/Library/BaseMemEncryptSevLib/X64/SecSnpSystemRamValidate.c > create mode 100644 OvmfPkg/Library/BaseMemEncryptSevLib/X64/SnpPageStateChangeInternal.c > create mode 100644 OvmfPkg/Sec/AmdSev.c > create mode 100644 UefiCpuPkg/Library/MpInitLib/AmdSev.c > create mode 100644 UefiCpuPkg/Library/MpInitLib/Ia32/AmdSev.c > create mode 100644 UefiCpuPkg/Library/MpInitLib/X64/AmdSev.c > create mode 100644 OvmfPkg/ResetVector/X64/OvmfSevMetadata.asm > create mode 100644 UefiCpuPkg/Library/MpInitLib/X64/AmdSev.nasm >