[edk2-devel] [PATCH V1 1/1] OvmfPkg/PlatformPei: Skip PlatformInitEmuVariableNvStore in SEV guest

Lendacky, Thomas via groups.io thomas.lendacky=amd.com at groups.io
Tue Apr 11 18:03:28 UTC 2023


On 4/11/23 05:04, Gerd Hoffmann wrote:
> On Fri, Apr 07, 2023 at 12:00:46PM -0500, Tom Lendacky wrote:
>>
>> Thanks for the quick turn-around, but that patch didn't work for me. I've
>> update the bugzilla.
> 
> Can you try the patch below?

That doesn't work either.

Specifying both OVMF_CODE.fd and OVMF_VARS.fd generates an ASSERT.
Specifying just OVMF_CODE.fd causes VMRUN failure (triple fault)
Specifying just OVMF.fd boots successfully

Thanks,
Tom

> 
> thanks,
>    Gerd
> 
>  From a9179864523d12c3dcc137f36f6ed1a2832ed22c Mon Sep 17 00:00:00 2001
> From: Gerd Hoffmann <kraxel at redhat.com>
> Date: Tue, 11 Apr 2023 11:12:37 +0200
> Subject: [PATCH 1/1] OvmfPkg: call ReserveEmuVariableNvStore after
>   AmdSevInitialize
> 
> Signed-off-by: Gerd Hoffmann <kraxel at redhat.com>
> ---
>   OvmfPkg/PlatformPei/Platform.c | 10 ++++++----
>   1 file changed, 6 insertions(+), 4 deletions(-)
> 
> diff --git a/OvmfPkg/PlatformPei/Platform.c b/OvmfPkg/PlatformPei/Platform.c
> index c56247e294f2..1e70c1920830 100644
> --- a/OvmfPkg/PlatformPei/Platform.c
> +++ b/OvmfPkg/PlatformPei/Platform.c
> @@ -378,10 +378,6 @@ InitializePlatform (
>     InitializeRamRegions (PlatformInfoHob);
>   
>     if (PlatformInfoHob->BootMode != BOOT_ON_S3_RESUME) {
> -    if (!PlatformInfoHob->SmmSmramRequire) {
> -      ReserveEmuVariableNvStore ();
> -    }
> -
>       PeiFvInitialization (PlatformInfoHob);
>       MemTypeInfoInitialization (PlatformInfoHob);
>       MemMapInitialization (PlatformInfoHob);
> @@ -390,6 +386,12 @@ InitializePlatform (
>   
>     InstallClearCacheCallback ();
>     AmdSevInitialize (PlatformInfoHob);
> +
> +  if ((PlatformInfoHob->BootMode != BOOT_ON_S3_RESUME) &&
> +      (!PlatformInfoHob->SmmSmramRequire)) {
> +    ReserveEmuVariableNvStore ();
> +  }
> +
>     if (PlatformInfoHob->HostBridgeDevId == 0xffff) {
>       MiscInitializationForMicrovm (PlatformInfoHob);
>     } else {


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#102848): https://edk2.groups.io/g/devel/message/102848
Mute This Topic: https://groups.io/mt/97922617/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-




More information about the edk2-devel-archive mailing list