On August 22, 2022 4:52 PM, Gerd Hoffmann wrote:
> On Mon, Aug 22, 2022 at 10:23:01AM +0800, Min Xu wrote:
> > From: Min M Xu <min.m...@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.
> 
> Seems to not be enough, I still see the page fault.
> Maybe EfiConvertPointer() is needed at runtime?
> 
Ah, I forget to reserve the work-area as RT_Data in below code:
      BuildMemoryAllocationHob (
        (EFI_PHYSICAL_ADDRESS)(UINTN)FixedPcdGet32 (PcdOvmfWorkAreaBase),
        (UINT64)(UINTN)FixedPcdGet32 (PcdOvmfWorkAreaSize),
        PlatformInfoHob->S3Supported ? EfiACPIMemoryNVS : 
EfiRuntimeServicesData  <-- ACPI_NVS is not accessible either in OS-Runtime.
        );
https://github.com/tianocore/edk2/blob/master/OvmfPkg/Library/PlatformInitLib/MemDetect.c#L1022-L1026

Gerd, do you think we can reserve Ovmf WorkArea as RT_Data even when S3 is 
supported?

Thanks
Min


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


Reply via email to