public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH 1/1] OvmfPkg: Reserve the Ovmf work area as RT_DATA
@ 2022-08-22  2:23 Min Xu
  2022-08-22  8:51 ` Gerd Hoffmann
  2022-08-22 13:18 ` Lendacky, Thomas
  0 siblings, 2 replies; 12+ messages in thread
From: Min Xu @ 2022-08-22  2:23 UTC (permalink / raw)
  To: devel
  Cc: Min M Xu, Erdem Aktas, James Bottomley, Jiewen Yao, Gerd Hoffmann,
	Tom Lendacky

From: Min M Xu <min.m.xu@intel.com>

BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3974

Ovmf work-area (PcdOvmfWorkArea) was designed to store the Confidential
Computing guest information, including the CC guest type. This
information will be probed by CcProbeLib so that the CC guest type can
be determined in run-time. But the Ovmf work-area was reserved as
BT_Data so that it cannot be accessed after ExitBootService. Please see
the detailed analysis in BZ#3974.

RH also reports a similar bug. Please see:
https://bugzilla.redhat.com/show_bug.cgi?id=2114858

This patch reserves the work-area as RT_Data to fix this bug.

Cc: Erdem Aktas <erdemaktas@google.com>
Cc: James Bottomley <jejb@linux.ibm.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Tom Lendacky <thomas.lendacky@amd.com>
Signed-off-by: Min Xu <min.m.xu@intel.com>
---
 OvmfPkg/Library/PlatformInitLib/IntelTdx.c  | 2 +-
 OvmfPkg/Library/PlatformInitLib/MemDetect.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/OvmfPkg/Library/PlatformInitLib/IntelTdx.c b/OvmfPkg/Library/PlatformInitLib/IntelTdx.c
index c6d7c8bb6e0e..286f447fea03 100644
--- a/OvmfPkg/Library/PlatformInitLib/IntelTdx.c
+++ b/OvmfPkg/Library/PlatformInitLib/IntelTdx.c
@@ -557,7 +557,7 @@ PlatformTdxPublishRamRegions (
     BuildMemoryAllocationHob (
       (EFI_PHYSICAL_ADDRESS)(UINTN)FixedPcdGet32 (PcdOvmfWorkAreaBase),
       (UINT64)(UINTN)FixedPcdGet32 (PcdOvmfWorkAreaSize),
-      EfiBootServicesData
+      EfiRuntimeServicesData
       );
   }
 }
diff --git a/OvmfPkg/Library/PlatformInitLib/MemDetect.c b/OvmfPkg/Library/PlatformInitLib/MemDetect.c
index 942eaf89cfcf..83fc061fcbac 100644
--- a/OvmfPkg/Library/PlatformInitLib/MemDetect.c
+++ b/OvmfPkg/Library/PlatformInitLib/MemDetect.c
@@ -1022,7 +1022,7 @@ PlatformQemuInitializeRamForS3 (
       BuildMemoryAllocationHob (
         (EFI_PHYSICAL_ADDRESS)(UINTN)FixedPcdGet32 (PcdOvmfWorkAreaBase),
         (UINT64)(UINTN)FixedPcdGet32 (PcdOvmfWorkAreaSize),
-        PlatformInfoHob->S3Supported ? EfiACPIMemoryNVS : EfiBootServicesData
+        PlatformInfoHob->S3Supported ? EfiACPIMemoryNVS : EfiRuntimeServicesData
         );
     }
 
-- 
2.29.2.windows.2


^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2022-08-25  8:15 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-22  2:23 [PATCH 1/1] OvmfPkg: Reserve the Ovmf work area as RT_DATA Min Xu
2022-08-22  8:51 ` Gerd Hoffmann
2022-08-23  1:34   ` Min Xu
2022-08-23  7:37     ` Gerd Hoffmann
2022-08-23  8:40       ` Min Xu
2022-08-23 13:07         ` Lendacky, Thomas
2022-08-25  5:47           ` [edk2-devel] " Min Xu
2022-08-25  7:42             ` Gerd Hoffmann
2022-08-25  7:56               ` Min Xu
2022-08-25  8:15                 ` Gerd Hoffmann
2022-08-22 13:18 ` Lendacky, Thomas
2022-08-23  1:38   ` Min Xu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox