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?

thanks,
  Gerd

>From a9179864523d12c3dcc137f36f6ed1a2832ed22c Mon Sep 17 00:00:00 2001
From: Gerd Hoffmann <kra...@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 <kra...@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 {
-- 
2.39.2



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#102822): https://edk2.groups.io/g/devel/message/102822
Mute This Topic: https://groups.io/mt/97922617/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Reply via email to