From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (NAM11-BN8-obe.outbound.protection.outlook.com [40.107.236.53]) by mx.groups.io with SMTP id smtpd.web10.2278.1616616481496866259 for ; Wed, 24 Mar 2021 13:08:02 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@amd.com header.s=selector1 header.b=NeoDkzps; 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.236.53, mailfrom: brijesh.singh@amd.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=EBK8cOYH0Igigj++w1DfhDuOijRGcKshqx35STB6duQWqY5ZqmQELHaPmaLe0DJyObiz/6Yxm6dWV41Yxn77UAD+QLPIf6ehjYsIAm9YDBQ0sLCheH20ErgKNerIjaJSQNXtmkXS87ePgKhBse1GyOHNjmcjd5KTOl8KWmBHa4o9+KmAHaKXWguugOLcQiRNfNRCnw/+EszGdxWKB7nOdTFKUlkmk6ieHDj0bu4sCkuFEP+DeSX1+wLmo8wQaBiVzAV2OzBv2tj1O4YARmeMu8eWGO+VVSq6CQWYjbneNjh7mLceJMLsmrQWaRZPtchEtkY6bAZwUUm1QkW4d/CbWQ== 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=wZvWPxLZ6X69wyx6D8FahWQKJrz8V9GsRDv5SW35y1c=; b=M22pjoKPUsIowVcpaYtyTB80SOExiNPImUGflLQecFNOcK7ImeLIy1XLskCPmtO9KZENPJgibEhzt3eC1yk08+ZQSAJg/KddLjAYWCQ/+ZF+GjrIUCTxpbIhy6XxCtwN4nVO+yJVZDcmDtS/JSWQIZWv4bZbi6qyFo44qY22cCT2hHXiYapYRZIFPDdSzsyqWXxJ5DxZH3Y88sBKjHg2oxBhcu4wxYMW3hHMTErih87hkjK09rdDgFoyrqPOk2t/F6TooW5mQN0/xmfSV+XD74SR4yJI9KpCAt1ACo/T6lwPlbJjQ2icbv+Qp/CnqF7J45FwpjFB8JGoo11kUtKlNg== 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=wZvWPxLZ6X69wyx6D8FahWQKJrz8V9GsRDv5SW35y1c=; b=NeoDkzpsyVYRpQAbIzl86XPnrKqFvG539L4+p/eC5DImpd7l8bLxf967luOBnSB8ZEFY0qXNO5jEpZ1+BUKzqS/18Ze9hTpZM8+L08+Y92DGWgUa+4BXt3Bl+rYPfoHMgPFkixr8fU1JYCQEkl1lKJMLXvaNKxLhdlLw8kzdaco= Authentication-Results: redhat.com; dkim=none (message not signed) header.d=none;redhat.com; dmarc=none action=none header.from=amd.com; Received: from SN6PR12MB2718.namprd12.prod.outlook.com (2603:10b6:805:6f::22) by SN6PR12MB2782.namprd12.prod.outlook.com (2603:10b6:805:73::19) 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 20:07:59 +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 20:07:59 +0000 Cc: brijesh.singh@amd.com, James Bottomley , Min Xu , Jiewen Yao , Tom Lendacky , Jordan Justen , Ard Biesheuvel , Laszlo Ersek Subject: Re: [RFC PATCH 18/19] OvmfPkg/MemEncryptSevLib: Validate the memory during set or clear enc attribute To: devel@edk2.groups.io References: <20210324153215.17971-1-brijesh.singh@amd.com> <20210324153215.17971-19-brijesh.singh@amd.com> From: "Brijesh Singh" Message-ID: <9e56dfd0-0114-9ce4-06bf-ca9c15685b72@amd.com> Date: Wed, 24 Mar 2021 15:07:56 -0500 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 In-Reply-To: <20210324153215.17971-19-brijesh.singh@amd.com> X-Originating-IP: [70.112.153.56] X-ClientProxiedBy: SA9PR11CA0027.namprd11.prod.outlook.com (2603:10b6:806:6e::32) 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 Brijeshs-MacBook-Pro.local (70.112.153.56) by SA9PR11CA0027.namprd11.prod.outlook.com (2603:10b6:806:6e::32) 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 20:07:58 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: b4697f14-4e08-455f-9ba1-08d8ef00858f X-MS-TrafficTypeDiagnostic: SN6PR12MB2782: 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: VqzhjdQU3hmJ0JILZQsaAdP+T62uPJBLKKiyobiEyecavDxcbcurfAvsbtEifwbt1uM1umnuEMcpdMyWitFJxyaZiF+0c37v+v3yFP6jWtlZbE/aEP0KpCrHA7YHJbA42KXM4HzlhtPq59beUGMih32JgNs3UMRnBsO7UhsRO6r5ouohBlDERXjMVL7H5lUKAbpH4OIx70jYJznBY48OvYboTRhyuaSy22DsURCCz29MUCTX4FDTegphd0bFlLoaAU/fG9HNCVhyerS+kH4X9lGVsct3ZNd8oyg6sFLOiiEWRgxTplNbPErJxU88via+xMANHF/dfAGzt/Cb1KxYyc3lwLXOfW9YA3Z856JOCNSMpZLQRWd4WbVCDhmulGQg8zAUXAJw7NZ60PFQufxf6tgakcr/UCbP3SPct2dauCyPopc9p+1zyLcbYYCmiu0pfWrVSC8fzsQvPRs0W2+r2ClcGjtg98/vOnP94cfLF/GT32TpqEutUkULpQ7poBELRnXrNuUH9y6qhRlZkO8ud21/LAvWswvkaB10RVWscv5vYU4gfbR0N5OtyvTMgHtPG6QO3YkT/iuu29zDrS8Jk0q5ntYF0W/n1xB5p33+KjPDiqUXsDV7UG8IN5h2G7OddWcGRDLKlQl5MvPZDbdYvs2DKpzJdKYLFxt6R2/rGhzJM08ODO8JoMXdmcFNPPvLnaEvhOe8oL3VUbngkE0uCVbDmsQKInJllgN3PXnJt4v1ydFHk/bjtNFIF5YuPGWowzcvqZw/hjU2J8V0odvDSKTpavMmoIzHUBNhZEgwLZBMoMfr5SFzQxKxDW2jJnAG 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)(39860400002)(366004)(346002)(396003)(376002)(136003)(15650500001)(8936002)(5660300002)(36756003)(66556008)(478600001)(83380400001)(44832011)(966005)(26005)(2906002)(31696002)(66476007)(6512007)(6506007)(53546011)(2616005)(31686004)(19627235002)(6486002)(54906003)(316002)(52116002)(16526019)(66946007)(4326008)(86362001)(956004)(6916009)(186003)(8676002)(38100700001)(43740500002)(45980500001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData: =?utf-8?B?WG9GQmtlQjVTL1FLUHBteitobENEQVB2anNWN1Q2QUlSNk1pQXdybGRhOEJq?= =?utf-8?B?aW4vWnJiU2FxMm5QZlJLZm5jb2R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ossTenant-AuthSource: SN6PR12MB2718.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Mar 2021 20:07:59.6082 (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: Dyrg6L/3/h56X+zkUZEMoG2TKmsJJriFXPSb0O5ZMV+vfjAORI6NM5a9C3uy0uf/NyJsaL/d/ABQAo/nLGY22w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR12MB2782 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Content-Language: en-US On 3/24/21 10:32 AM, Brijesh Singh wrote: > BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3275 > > The MemEncryptSev{Set,Clear}PageEncMask() functions are used to set or > clear the memory encryption attribute in the page table. When SEV-SNP is > active, we also need to validate or invalidate the pages and update the > RMP entry. > > Before clearing the encryption attribute we need to invalidate the memory, > and then make the page shared in the RMP entry. Similarly, after setting > the encryption attribute in the page table, we add the memory as private > in the RMP entry and validate it. > > 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 > --- > OvmfPkg/Library/BaseMemEncryptSevLib/DxeMemEncryptSevLib.inf | 3 ++ > OvmfPkg/Library/BaseMemEncryptSevLib/PeiMemEncryptSevLib.inf | 1 + > OvmfPkg/Library/BaseMemEncryptSevLib/X64/PeiDxeSnpSetPageState.c | 32 +++++++++++++++++ > OvmfPkg/Library/BaseMemEncryptSevLib/X64/PeiDxeVirtualMemory.c | 36 ++++++++++++++++++-- > OvmfPkg/Library/BaseMemEncryptSevLib/X64/SnpSetPageState.h | 27 +++++++++++++++ > 5 files changed, 97 insertions(+), 2 deletions(-) > > diff --git a/OvmfPkg/Library/BaseMemEncryptSevLib/DxeMemEncryptSevLib.inf b/OvmfPkg/Library/BaseMemEncryptSevLib/DxeMemEncryptSevLib.inf > index f2e162d680..fa8f7719a7 100644 > --- a/OvmfPkg/Library/BaseMemEncryptSevLib/DxeMemEncryptSevLib.inf > +++ b/OvmfPkg/Library/BaseMemEncryptSevLib/DxeMemEncryptSevLib.inf > @@ -36,6 +36,8 @@ > [Sources.X64] > X64/MemEncryptSevLib.c > X64/PeiDxeVirtualMemory.c > + X64/SnpPageStateChangeInternal.c > + X64/PeiDxeSnpSetPageState.c > X64/VirtualMemory.c > X64/VirtualMemory.h > > @@ -49,6 +51,7 @@ > DebugLib > MemoryAllocationLib > PcdLib > + VmgExitLib > > [FeaturePcd] > gUefiOvmfPkgTokenSpaceGuid.PcdSmmSmramRequire > diff --git a/OvmfPkg/Library/BaseMemEncryptSevLib/PeiMemEncryptSevLib.inf b/OvmfPkg/Library/BaseMemEncryptSevLib/PeiMemEncryptSevLib.inf > index cb9dd2bb21..d16ec44954 100644 > --- a/OvmfPkg/Library/BaseMemEncryptSevLib/PeiMemEncryptSevLib.inf > +++ b/OvmfPkg/Library/BaseMemEncryptSevLib/PeiMemEncryptSevLib.inf > @@ -37,6 +37,7 @@ > [Sources.X64] > X64/MemEncryptSevLib.c > X64/PeiDxeVirtualMemory.c > + X64/PeiDxeSnpSetPageState.c > X64/PeiSnpSystemRamValidate.c > X64/SnpPageStateTrack.c > X64/SnpPageStateChangeInternal.c > diff --git a/OvmfPkg/Library/BaseMemEncryptSevLib/X64/PeiDxeSnpSetPageState.c b/OvmfPkg/Library/BaseMemEncryptSevLib/X64/PeiDxeSnpSetPageState.c > new file mode 100644 > index 0000000000..0a3d58ac22 > --- /dev/null > +++ b/OvmfPkg/Library/BaseMemEncryptSevLib/X64/PeiDxeSnpSetPageState.c > @@ -0,0 +1,32 @@ > +/** @file > + > + SEV-SNP Page Validation functions. > + > + Copyright (c) 2020 - 2021, AMD Incorporated. All rights reserved.
> + > + SPDX-License-Identifier: BSD-2-Clause-Patent > + > +**/ > + > +#include > +#include > + > +#include "PeiSnpPageStateChange.h" There is one minor error in this hunk, Please ignore it during your reviews. I will fix it in next version. The include should be "../SnpPageStateChange.h" and not "PeiSnppageStateChange.h". > + > +VOID > +SnpSetMemoryPrivate ( > + IN PHYSICAL_ADDRESS PhysicalAddress, > + IN UINTN Length > + ) > +{ > + SetPageStateInternal (PhysicalAddress, EFI_SIZE_TO_PAGES (Length), SevSnpPagePrivate, FALSE); > +} > + > +VOID > +SnpSetMemoryShared ( > + IN PHYSICAL_ADDRESS PhysicalAddress, > + IN UINTN Length > + ) > +{ > + SetPageStateInternal (PhysicalAddress, EFI_SIZE_TO_PAGES (Length), SevSnpPageShared, FALSE); > +} > diff --git a/OvmfPkg/Library/BaseMemEncryptSevLib/X64/PeiDxeVirtualMemory.c b/OvmfPkg/Library/BaseMemEncryptSevLib/X64/PeiDxeVirtualMemory.c > index 33d9bafe9f..26d363d427 100644 > --- a/OvmfPkg/Library/BaseMemEncryptSevLib/X64/PeiDxeVirtualMemory.c > +++ b/OvmfPkg/Library/BaseMemEncryptSevLib/X64/PeiDxeVirtualMemory.c > @@ -17,6 +17,7 @@ > #include > > #include "VirtualMemory.h" > +#include "SnpSetPageState.h" > > STATIC BOOLEAN mAddressEncMaskChecked = FALSE; > STATIC UINT64 mAddressEncMask; > @@ -700,22 +701,34 @@ SetMemoryEncDec ( > UINT64 AddressEncMask; > BOOLEAN IsWpEnabled; > RETURN_STATUS Status; > + BOOLEAN NeedPageStateChange; > + PHYSICAL_ADDRESS OrigPhysicalAddress; > + UINTN OrigLength; > > // > // Set PageMapLevel4Entry to suppress incorrect compiler/analyzer warnings. > // > PageMapLevel4Entry = NULL; > > + // > + // When SEV-SNP is active, before clearing the encryption attribute from > + // the page table we also need to update the RMP entry for the memory > + // region to make the region shared. And after setting the encryption > + // attribute, the region must be made private in the RMP table. > + // > + NeedPageStateChange = MemEncryptSevSnpIsEnabled (); > + > DEBUG (( > DEBUG_VERBOSE, > - "%a:%a: Cr3Base=0x%Lx Physical=0x%Lx Length=0x%Lx Mode=%a CacheFlush=%u\n", > + "%a:%a: Cr3Base=0x%Lx Physical=0x%Lx Length=0x%Lx Mode=%a CacheFlush=%u Rmpupdate=%u\n", > gEfiCallerBaseName, > __FUNCTION__, > Cr3BaseAddress, > PhysicalAddress, > (UINT64)Length, > (Mode == SetCBit) ? "Encrypt" : "Decrypt", > - (UINT32)CacheFlush > + (UINT32)CacheFlush, > + (UINT32)NeedPageStateChange > )); > > // > @@ -749,6 +762,18 @@ SetMemoryEncDec ( > DisableReadOnlyPageWriteProtect (); > } > > + // > + // Make the RMP updates before clearing the encryption attribute in the page table. > + // > + if (NeedPageStateChange && (Mode == ClearCBit)) { > + SnpSetMemoryShared (PhysicalAddress, Length); > + } > + > + // > + // Save the values, we need it later during the Page state change. > + // > + OrigPhysicalAddress = PhysicalAddress; > + OrigLength = Length; > Status = EFI_SUCCESS; > > while (Length != 0) > @@ -923,6 +948,13 @@ SetMemoryEncDec ( > // > CpuFlushTlb(); > > + // > + // Make the RMP updates after setting the encryption attribute in the page table. > + // > + if (NeedPageStateChange && (Mode == SetCBit)) { > + SnpSetMemoryPrivate (OrigPhysicalAddress, OrigLength); > + } > + > Done: > // > // Restore page table write protection, if any. > diff --git a/OvmfPkg/Library/BaseMemEncryptSevLib/X64/SnpSetPageState.h b/OvmfPkg/Library/BaseMemEncryptSevLib/X64/SnpSetPageState.h > new file mode 100644 > index 0000000000..0b29bad612 > --- /dev/null > +++ b/OvmfPkg/Library/BaseMemEncryptSevLib/X64/SnpSetPageState.h > @@ -0,0 +1,27 @@ > +/** @file > + > + SEV-SNP Page Validation functions. > + > + Copyright (c) 2020 - 2021, AMD Incorporated. All rights reserved.
> + > + SPDX-License-Identifier: BSD-2-Clause-Patent > + > +**/ > + > +#ifndef PEI_DXE_SNP_PAGE_STATE_INTERNAL_H_ > +#define PEI_DXE_SNP_PAGE_STATE_INTERNAL_H_ > + > +#include "../SnpPageStateChange.h" > + > +VOID > +SnpSetMemoryPrivate ( > + IN PHYSICAL_ADDRESS PhysicalAddress, > + IN UINTN Length > + ); > + > +VOID > +SnpSetMemoryShared ( > + IN PHYSICAL_ADDRESS PhysicalAddress, > + IN UINTN Length > + ); > +#endif