[edk2-devel] [PATCH v8 9/9] OvmfPkg: Uses SmmSmramSaveStateLib library

Attar, AbdulLateef (Abdul Lateef) via groups.io AbdulLateef.Attar=amd.com at groups.io
Tue Apr 18 05:22:02 UTC 2023


[AMD Official Use Only - General]

Hi Ray,
                From open-source code I can see OVMF still implements SmmCpuFeaturesReadSaveStateRegister.
Hence, we can't directly use SmramSaveStateReadRegister in PiSmmCpuDxe driver,
until we implement the MmSaveStateLib for Ovmf.
I think it's better to keep the code as it is, so that we will not break any open-source or closed-source project.

Thanks
AbduL


From: Ni, Ray <ray.ni at intel.com>
Sent: 11 April 2023 18:19
To: Attar, AbdulLateef (Abdul Lateef) <AbdulLateef.Attar at amd.com>; devel at edk2.groups.io; kraxel at redhat.com
Cc: Grimes, Paul <Paul.Grimes at amd.com>; Kirkendall, Garrett <Garrett.Kirkendall at amd.com>; Chang, Abner <Abner.Chang at amd.com>; Dong, Eric <eric.dong at intel.com>; Kumar, Rahul R <rahul.r.kumar at intel.com>; Ard Biesheuvel <ardb+tianocore at kernel.org>; Yao, Jiewen <jiewen.yao at intel.com>; Justen, Jordan L <jordan.l.justen at intel.com>
Subject: Re: [edk2-devel] [PATCH v8 9/9] OvmfPkg: Uses SmmSmramSaveStateLib library


[AMD Official Use Only - General]

Caution: This message originated from an External Source. Use proper caution when opening attachments, clicking links, or responding.

yes

thanks,
ray
________________________________
From: Attar, AbdulLateef (Abdul Lateef) <AbdulLateef.Attar at amd.com<mailto:AbdulLateef.Attar at amd.com>>
Sent: Tuesday, April 11, 2023 7:17:03 PM
To: Ni, Ray <ray.ni at intel.com<mailto:ray.ni at intel.com>>; devel at edk2.groups.io<mailto:devel at edk2.groups.io> <devel at edk2.groups.io<mailto:devel at edk2.groups.io>>; kraxel at redhat.com<mailto:kraxel at redhat.com> <kraxel at redhat.com<mailto:kraxel at redhat.com>>
Cc: Grimes, Paul <Paul.Grimes at amd.com<mailto:Paul.Grimes at amd.com>>; Kirkendall, Garrett <Garrett.Kirkendall at amd.com<mailto:Garrett.Kirkendall at amd.com>>; Chang, Abner <Abner.Chang at amd.com<mailto:Abner.Chang at amd.com>>; Dong, Eric <eric.dong at intel.com<mailto:eric.dong at intel.com>>; Kumar, Rahul R <rahul.r.kumar at intel.com<mailto:rahul.r.kumar at intel.com>>; Ard Biesheuvel <ardb+tianocore at kernel.org<mailto:ardb+tianocore at kernel.org>>; Yao, Jiewen <jiewen.yao at intel.com<mailto:jiewen.yao at intel.com>>; Justen, Jordan L <jordan.l.justen at intel.com<mailto:jordan.l.justen at intel.com>>
Subject: RE: [edk2-devel] [PATCH v8 9/9] OvmfPkg: Uses SmmSmramSaveStateLib library

[AMD Official Use Only - General]

Hi Ray,
        You mean directly call the SmramSaveStateReadRegister instead of below code from edk2/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.c ?

  Status = SmmCpuFeaturesReadSaveStateRegister (CpuIndex, Register, Width, Buffer);
  if (Status == EFI_UNSUPPORTED) {
    Status = SmramSaveStateReadRegister (CpuIndex, Register, Width, Buffer);
  }

Thanks
AbduL

-----Original Message-----
From: Ni, Ray <ray.ni at intel.com<mailto:ray.ni at intel.com>>
Sent: 11 April 2023 15:40
To: devel at edk2.groups.io<mailto:devel at edk2.groups.io>; kraxel at redhat.com<mailto:kraxel at redhat.com>; Attar, AbdulLateef (Abdul Lateef) <AbdulLateef.Attar at amd.com<mailto:AbdulLateef.Attar at amd.com>>
Cc: Attar, AbdulLateef (Abdul Lateef) <AbdulLateef.Attar at amd.com<mailto:AbdulLateef.Attar at amd.com>>; Grimes, Paul <Paul.Grimes at amd.com<mailto:Paul.Grimes at amd.com>>; Kirkendall, Garrett <Garrett.Kirkendall at amd.com<mailto:Garrett.Kirkendall at amd.com>>; Chang, Abner <Abner.Chang at amd.com<mailto:Abner.Chang at amd.com>>; Dong, Eric <eric.dong at intel.com<mailto:eric.dong at intel.com>>; Kumar, Rahul R <rahul.r.kumar at intel.com<mailto:rahul.r.kumar at intel.com>>; Ard Biesheuvel <ardb+tianocore at kernel.org<mailto:ardb+tianocore at kernel.org>>; Yao, Jiewen <jiewen.yao at intel.com<mailto:jiewen.yao at intel.com>>; Justen, Jordan L <jordan.l.justen at intel.com<mailto:jordan.l.justen at intel.com>>
Subject: RE: [edk2-devel] [PATCH v8 9/9] OvmfPkg: Uses SmmSmramSaveStateLib library

Caution: This message originated from an External Source. Use proper caution when opening attachments, clicking links, or responding.


Gerd,
I am asking Abdul to directly call SaveStateLib from CpuSmm driver.
I don't think SmmCpuFeaturesLib should be in the middle of CpuSmm driver and SaveStateLib regarding the save state access.

Thanks,
Ray

> -----Original Message-----
> From: devel at edk2.groups.io<mailto:devel at edk2.groups.io> <devel at edk2.groups.io<mailto:devel at edk2.groups.io>> On Behalf Of Gerd
> Hoffmann
> Sent: Tuesday, April 11, 2023 5:43 PM
> To: Abdul Lateef Attar <abdattar at amd.com<mailto:abdattar at amd.com>>
> Cc: devel at edk2.groups.io<mailto:devel at edk2.groups.io>; Abdul Lateef Attar
> <AbdulLateef.Attar at amd.com<mailto:AbdulLateef.Attar at amd.com>>; Paul Grimes <paul.grimes at amd.com<mailto:paul.grimes at amd.com>>;
> Garrett Kirkendall <garrett.kirkendall at amd.com<mailto:garrett.kirkendall at amd.com>>; Abner Chang
> <abner.chang at amd.com<mailto:abner.chang at amd.com>>; Dong, Eric <eric.dong at intel.com<mailto:eric.dong at intel.com>>; Ni, Ray
> <ray.ni at intel.com<mailto:ray.ni at intel.com>>; Kumar, Rahul R <rahul.r.kumar at intel.com<mailto:rahul.r.kumar at intel.com>>; Ard
> Biesheuvel <ardb+tianocore at kernel.org<mailto:ardb+tianocore at kernel.org>>; Yao, Jiewen
> <jiewen.yao at intel.com<mailto:jiewen.yao at intel.com>>; Justen, Jordan L <jordan.l.justen at intel.com<mailto:jordan.l.justen at intel.com>>
> Subject: Re: [edk2-devel] [PATCH v8 9/9] OvmfPkg: Uses
> SmmSmramSaveStateLib library
>
> > Uses new SmmSmramSaveStateLib library, which fix the CI failure.
>
> What is the exact failure you are seeing?
>
> > +
> SmmSmramSaveStateLib|UefiCpuPkg/Library/SmmSmramSaveStateLib/Intel
> SmmSmramSaveStateLib.inf
>
> This should be the AMD version.  KVM uses the AMD smram state.
>
> Also: OvmfPkg/Library/SmmCpuFeaturesLib should be updated to use
> actually use the new SmmSmramSaveStateLib library, and once this has
> been done it should be possible to remove
> OvmfPkg/Include/Register/QemuSmramSaveStateMap.h
>
> take care,
>   Gerd
>
>
>
> 
>


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


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/edk2-devel-archive/attachments/20230418/1370239a/attachment-0001.htm>


More information about the edk2-devel-archive mailing list