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

2023-04-18 Thread Attar, AbdulLateef (Abdul Lateef) via groups.io
[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 
Sent: 11 April 2023 18:19
To: Attar, AbdulLateef (Abdul Lateef) ; 
devel@edk2.groups.io; kra...@redhat.com
Cc: Grimes, Paul ; Kirkendall, Garrett 
; Chang, Abner ; Dong, Eric 
; Kumar, Rahul R ; Ard Biesheuvel 
; Yao, Jiewen ; Justen, Jordan 
L 
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) 
mailto:abdullateef.at...@amd.com>>
Sent: Tuesday, April 11, 2023 7:17:03 PM
To: Ni, Ray mailto:ray...@intel.com>>; 
devel@edk2.groups.io<mailto:devel@edk2.groups.io> 
mailto:devel@edk2.groups.io>>; 
kra...@redhat.com<mailto:kra...@redhat.com> 
mailto:kra...@redhat.com>>
Cc: Grimes, Paul mailto:paul.gri...@amd.com>>; Kirkendall, 
Garrett mailto:garrett.kirkend...@amd.com>>; Chang, 
Abner mailto:abner.ch...@amd.com>>; Dong, Eric 
mailto:eric.d...@intel.com>>; Kumar, Rahul R 
mailto:rahul.r.ku...@intel.com>>; Ard Biesheuvel 
mailto:ardb+tianoc...@kernel.org>>; Yao, Jiewen 
mailto:jiewen....@intel.com>>; Justen, Jordan L 
mailto:jordan.l.jus...@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 mailto:ray...@intel.com>>
Sent: 11 April 2023 15:40
To: devel@edk2.groups.io<mailto:devel@edk2.groups.io>; 
kra...@redhat.com<mailto:kra...@redhat.com>; Attar, AbdulLateef (Abdul Lateef) 
mailto:abdullateef.at...@amd.com>>
Cc: Attar, AbdulLateef (Abdul Lateef) 
mailto:abdullateef.at...@amd.com>>; Grimes, Paul 
mailto:paul.gri...@amd.com>>; Kirkendall, Garrett 
mailto:garrett.kirkend...@amd.com>>; Chang, Abner 
mailto:abner.ch...@amd.com>>; Dong, Eric 
mailto:eric.d...@intel.com>>; Kumar, Rahul R 
mailto:rahul.r.ku...@intel.com>>; Ard Biesheuvel 
mailto:ardb+tianoc...@kernel.org>>; Yao, Jiewen 
mailto:jiewen@intel.com>>; Justen, Jordan L 
mailto:jordan.l.jus...@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@edk2.groups.io<mailto:devel@edk2.groups.io> 
> mailto:devel@edk2.groups.io>> On Behalf Of Gerd
> Hoffmann
> Sent: Tuesday, April 11, 2023 5:43 PM
> To: Abdul Lateef Attar mailto:abdat...@amd.com>>
> Cc: devel@edk2.groups.io<mailto:devel@edk2.groups.io>; Abdul Lateef Attar
> mailto:abdullateef.at...@amd.com>>; Paul Grimes 
> mailto:paul.gri...@amd.com>>;
> Garrett Kirkendall 
> mailto:garrett.kirkend...@amd.com>>; Abner Chang
> mailto:abner.ch...@amd.com>>; Dong, Eric 
> mailto:eric.d...@intel.com>>; Ni, Ray
> mailto:ray...@intel.com>>; Kumar, Rahul R 
> mailto:rahul.r.ku...@intel.com>>; Ard
> Biesheuvel mailto:ardb+tianoc...@kernel.org>>; 
> Yao, Jiewen
> mailto:jiewen@intel.com>>; Justen, Jordan L 
> mailto:jordan.l.jus...@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 on

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

2023-04-17 Thread Gerd Hoffmann
On Tue, Apr 18, 2023 at 05:38:09AM +, Ni, Ray wrote:
> Abdul,
> What prevents you implementing the OVMF version MmSaveStateLib?

Moving the code to a OVMF-specific MmSaveStateLib should work in
any case.

> Or I assume OVMF is emulating AMD CPU, why AMD version MmSaveStateLib cannot 
> support OVMF?

I'd expect that to work.  kvm might not fully emulate every detail of
amd cpu smm mode, but it uses the amd smram register layout, which is
exactly what MmSaveStateLib implements ...

take care,
  Gerd



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




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

2023-04-17 Thread Ni, Ray
Abdul,
What prevents you implementing the OVMF version MmSaveStateLib?
Or I assume OVMF is emulating AMD CPU, why AMD version MmSaveStateLib cannot 
support OVMF?

Thanks,
Ray

From: Attar, AbdulLateef (Abdul Lateef) 
Sent: Tuesday, April 18, 2023 1:22 PM
To: Ni, Ray ; devel@edk2.groups.io; kra...@redhat.com
Cc: Grimes, Paul ; Kirkendall, Garrett 
; Chang, Abner ; Dong, Eric 
; Kumar, Rahul R ; Ard Biesheuvel 
; Yao, Jiewen ; Justen, Jordan 
L 
Subject: RE: [edk2-devel] [PATCH v8 9/9] OvmfPkg: Uses SmmSmramSaveStateLib 
library


[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 mailto:ray...@intel.com>>
Sent: 11 April 2023 18:19
To: Attar, AbdulLateef (Abdul Lateef) 
mailto:abdullateef.at...@amd.com>>; 
devel@edk2.groups.io<mailto:devel@edk2.groups.io>; 
kra...@redhat.com<mailto:kra...@redhat.com>
Cc: Grimes, Paul mailto:paul.gri...@amd.com>>; Kirkendall, 
Garrett mailto:garrett.kirkend...@amd.com>>; Chang, 
Abner mailto:abner.ch...@amd.com>>; Dong, Eric 
mailto:eric.d...@intel.com>>; Kumar, Rahul R 
mailto:rahul.r.ku...@intel.com>>; Ard Biesheuvel 
mailto:ardb+tianoc...@kernel.org>>; Yao, Jiewen 
mailto:jiewen@intel.com>>; Justen, Jordan L 
mailto:jordan.l.jus...@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) 
mailto:abdullateef.at...@amd.com>>
Sent: Tuesday, April 11, 2023 7:17:03 PM
To: Ni, Ray mailto:ray...@intel.com>>; 
devel@edk2.groups.io<mailto:devel@edk2.groups.io> 
mailto:devel@edk2.groups.io>>; 
kra...@redhat.com<mailto:kra...@redhat.com> 
mailto:kra...@redhat.com>>
Cc: Grimes, Paul mailto:paul.gri...@amd.com>>; Kirkendall, 
Garrett mailto:garrett.kirkend...@amd.com>>; Chang, 
Abner mailto:abner.ch...@amd.com>>; Dong, Eric 
mailto:eric.d...@intel.com>>; Kumar, Rahul R 
mailto:rahul.r.ku...@intel.com>>; Ard Biesheuvel 
mailto:ardb+tianoc...@kernel.org>>; Yao, Jiewen 
mailto:jiewen....@intel.com>>; Justen, Jordan L 
mailto:jordan.l.jus...@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 mailto:ray...@intel.com>>
Sent: 11 April 2023 15:40
To: devel@edk2.groups.io<mailto:devel@edk2.groups.io>; 
kra...@redhat.com<mailto:kra...@redhat.com>; Attar, AbdulLateef (Abdul Lateef) 
mailto:abdullateef.at...@amd.com>>
Cc: Attar, AbdulLateef (Abdul Lateef) 
mailto:abdullateef.at...@amd.com>>; Grimes, Paul 
mailto:paul.gri...@amd.com>>; Kirkendall, Garrett 
mailto:garrett.kirkend...@amd.com>>; Chang, Abner 
mailto:abner.ch...@amd.com>>; Dong, Eric 
mailto:eric.d...@intel.com>>; Kumar, Rahul R 
mailto:rahul.r.ku...@intel.com>>; Ard Biesheuvel 
mailto:ardb+tianoc...@kernel.org>>; Yao, Jiewen 
mailto:jiewen@intel.com>>; Justen, Jordan L 
mailto:jordan.l.jus...@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@edk2.groups.io<mailto:devel@edk2.groups.io> 
> mailto:devel@edk2.groups.io>> On Behalf Of Gerd
> Hoffmann
> Sent: Tuesday, April 11, 2023 5:43 PM
> To: Abdul Lateef Attar mailto:abdat...@amd.com>>
> Cc: devel@edk2.groups.io<mailto:devel@edk2.groups.io>; Abdul Lateef Attar
> mailto:abdullateef.at...@amd.com>>; Paul Grimes 
> mailto:paul.gri...@amd.com>>;
> Garrett Kirkendall 
> mailto:garret

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

2023-04-12 Thread Attar, AbdulLateef (Abdul Lateef) via groups.io
[AMD Official Use Only - General]

Hi Gerd,
I think CI was failing with the message " SmmSmramSaveStateLib library 
not found", I didn't preserve the CI log.
Thanks
Abdul

-Original Message-
From: Gerd Hoffmann 
Sent: 11 April 2023 15:13
To: Attar, AbdulLateef (Abdul Lateef) 
Cc: devel@edk2.groups.io; Attar, AbdulLateef (Abdul Lateef) 
; Grimes, Paul ; Kirkendall, 
Garrett ; Chang, Abner ; Eric 
Dong ; Ray Ni ; Rahul Kumar 
; Ard Biesheuvel ; Jiewen 
Yao ; Jordan Justen 
Subject: Re: [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.


> Uses new SmmSmramSaveStateLib library, which fix the CI failure.

What is the exact failure you are seeing?

> +
> + SmmSmramSaveStateLib|UefiCpuPkg/Library/SmmSmramSaveStateLib/IntelSm
> + mSmramSaveStateLib.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 (#102904): https://edk2.groups.io/g/devel/message/102904
Mute This Topic: https://groups.io/mt/98172964/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




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

2023-04-12 Thread Attar, AbdulLateef (Abdul Lateef) via groups.io
[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 
Sent: 11 April 2023 15:40
To: devel@edk2.groups.io; kra...@redhat.com; Attar, AbdulLateef (Abdul Lateef) 

Cc: Attar, AbdulLateef (Abdul Lateef) ; Grimes, Paul 
; Kirkendall, Garrett ; Chang, 
Abner ; Dong, Eric ; Kumar, Rahul R 
; Ard Biesheuvel ; Yao, 
Jiewen ; Justen, Jordan L 
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@edk2.groups.io  On Behalf Of Gerd
> Hoffmann
> Sent: Tuesday, April 11, 2023 5:43 PM
> To: Abdul Lateef Attar 
> Cc: devel@edk2.groups.io; Abdul Lateef Attar
> ; Paul Grimes ;
> Garrett Kirkendall ; Abner Chang
> ; Dong, Eric ; Ni, Ray
> ; Kumar, Rahul R ; Ard
> Biesheuvel ; Yao, Jiewen
> ; Justen, Jordan L 
> 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 (#102905): https://edk2.groups.io/g/devel/message/102905
Mute This Topic: https://groups.io/mt/98172964/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




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

2023-04-11 Thread Ni, Ray
yes

thanks,
ray

From: Attar, AbdulLateef (Abdul Lateef) 
Sent: Tuesday, April 11, 2023 7:17:03 PM
To: Ni, Ray ; devel@edk2.groups.io ; 
kra...@redhat.com 
Cc: Grimes, Paul ; Kirkendall, Garrett 
; Chang, Abner ; Dong, Eric 
; Kumar, Rahul R ; Ard Biesheuvel 
; Yao, Jiewen ; Justen, Jordan 
L 
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 
Sent: 11 April 2023 15:40
To: devel@edk2.groups.io; kra...@redhat.com; Attar, AbdulLateef (Abdul Lateef) 

Cc: Attar, AbdulLateef (Abdul Lateef) ; Grimes, Paul 
; Kirkendall, Garrett ; Chang, 
Abner ; Dong, Eric ; Kumar, Rahul R 
; Ard Biesheuvel ; Yao, 
Jiewen ; Justen, Jordan L 
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@edk2.groups.io  On Behalf Of Gerd
> Hoffmann
> Sent: Tuesday, April 11, 2023 5:43 PM
> To: Abdul Lateef Attar 
> Cc: devel@edk2.groups.io; Abdul Lateef Attar
> ; Paul Grimes ;
> Garrett Kirkendall ; Abner Chang
> ; Dong, Eric ; Ni, Ray
> ; Kumar, Rahul R ; Ard
> Biesheuvel ; Yao, Jiewen
> ; Justen, Jordan L 
> 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 (#102829): https://edk2.groups.io/g/devel/message/102829
Mute This Topic: https://groups.io/mt/98172964/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: 
https://edk2.groups.io/g/devel/leave/9847357/21656/1706620634/xyzzy 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




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

2023-04-11 Thread Gerd Hoffmann
On Tue, Apr 11, 2023 at 10:09:59AM +, Ni, Ray wrote:
> 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.

Yes, sure.  The SmmCpuFeatures{Read,Write}SaveStateRegister() functions
in OvmfPkg/Library/SmmCpuFeaturesLib can be removed in favor of the AMD
version of SmmSmramSaveStateLib.

There are a few more places in OvmfPkg/Library/SmmCpuFeaturesLib which
access the state, for example the functions handling CPU hutplug.  They
use QEMU_SMRAM_SAVE_STATE_MAP today, which should be identical to the
AMD version, so once we have the AMD version merged into the tree ovmf
can just use that instead of its own copy.

take care,
  Gerd



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




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

2023-04-11 Thread Ni, Ray
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@edk2.groups.io  On Behalf Of Gerd
> Hoffmann
> Sent: Tuesday, April 11, 2023 5:43 PM
> To: Abdul Lateef Attar 
> Cc: devel@edk2.groups.io; Abdul Lateef Attar
> ; Paul Grimes ;
> Garrett Kirkendall ; Abner Chang
> ; Dong, Eric ; Ni, Ray
> ; Kumar, Rahul R ; Ard
> Biesheuvel ; Yao, Jiewen
> ; Justen, Jordan L 
> 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 (#102823): https://edk2.groups.io/g/devel/message/102823
Mute This Topic: https://groups.io/mt/98172964/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: 
https://edk2.groups.io/g/devel/leave/9847357/21656/1706620634/xyzzy 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




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

2023-04-11 Thread Gerd Hoffmann
> Uses new SmmSmramSaveStateLib library,
> which fix the CI failure.

What is the exact failure you are seeing?

> +  
> SmmSmramSaveStateLib|UefiCpuPkg/Library/SmmSmramSaveStateLib/IntelSmmSmramSaveStateLib.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 (#102819): https://edk2.groups.io/g/devel/message/102819
Mute This Topic: https://groups.io/mt/98172964/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-