From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 1536380347 for ; Tue, 7 Mar 2017 09:08:51 -0800 (PST) Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 968ABC04B927; Tue, 7 Mar 2017 17:08:51 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-116-184.phx2.redhat.com [10.3.116.184]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id v27H8naO012414; Tue, 7 Mar 2017 12:08:50 -0500 To: Brijesh Singh , jordan.l.justen@intel.com, edk2-devel@ml01.01.org References: <148884284887.29188.7643544710695103939.stgit@brijesh-build-machine> <148884286883.29188.10103467162152106751.stgit@brijesh-build-machine> Cc: Thomas.Lendacky@amd.com, leo.duran@amd.com, brijesh.sing@amd.com From: Laszlo Ersek Message-ID: <9193d837-6a78-b1c4-42c0-427fbc1f2364@redhat.com> Date: Tue, 7 Mar 2017 18:08:48 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.1 MIME-Version: 1.0 In-Reply-To: <148884286883.29188.10103467162152106751.stgit@brijesh-build-machine> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Tue, 07 Mar 2017 17:08:51 +0000 (UTC) Subject: Re: [RFC PATCH v1 3/5] OvmfPkg/PlatformPei: Initialize SEV support X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Mar 2017 17:08:51 -0000 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit On 03/07/17 00:27, Brijesh Singh wrote: > Initialize Secure Encrypted Virtualization (SEV) support. > > Signed-off-by: Brijesh Singh > --- > OvmfPkg/PlatformPei/Platform.c | 6 ++++++ > OvmfPkg/PlatformPei/PlatformPei.inf | 1 + > 2 files changed, 7 insertions(+) > > diff --git a/OvmfPkg/PlatformPei/Platform.c b/OvmfPkg/PlatformPei/Platform.c > index 0be8672..a948037 100644 > --- a/OvmfPkg/PlatformPei/Platform.c > +++ b/OvmfPkg/PlatformPei/Platform.c > @@ -33,6 +33,7 @@ > #include > #include > #include > +#include > #include > #include > #include > @@ -669,5 +670,10 @@ InitializePlatform ( > MiscInitialization (); > InstallFeatureControlCallback (); > > + // > + // Initialize SEV support > + // > + MemcryptSevInitialize (); > + This will be called on both the normal boot path and the S3 resume boot path. (Similarly to InstallFeatureControlCallback() above.) IIRC, you did modify S3Resume2Pei to consider the PCD (and at that time we discussed that setting the PCD here, in PlatformPei, would be sufficiently early even for S3 resume). Thus, can you please confirm (in the commit message) whether this works with S3 resume? > return EFI_SUCCESS; > } > diff --git a/OvmfPkg/PlatformPei/PlatformPei.inf b/OvmfPkg/PlatformPei/PlatformPei.inf > index fbaed31..f85b208 100644 > --- a/OvmfPkg/PlatformPei/PlatformPei.inf > +++ b/OvmfPkg/PlatformPei/PlatformPei.inf > @@ -60,6 +60,7 @@ > QemuFwCfgLib > MtrrLib > PcdLib > + MemcryptSevLib As noted before, I suggest to replace this new libclass (introduction and dependency) simply with a new file here. Thanks! Laszlo > > [Pcd] > gUefiOvmfPkgTokenSpaceGuid.PcdOvmfPeiMemFvBase >