public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH 0/2] SEV BaseMemEncryptLib cleanup
@ 2022-01-19 23:03 Brijesh Singh
  2022-01-19 23:03 ` [PATCH 1/2] OvmfPkg/ResetVector: cache the SEV status MSR value in workarea Brijesh Singh
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Brijesh Singh @ 2022-01-19 23:03 UTC (permalink / raw)
  To: devel
  Cc: James Bottomley, Min Xu, Jiewen Yao, Tom Lendacky, Jordan Justen,
	Ard Biesheuvel, Erdem Aktas, Michael Roth, Gerd Hoffmann,
	Brijesh Singh

This is the first of cleanup for SEV MemEncryptLib. The library uses
the CPUID followed by the MSR read to determine whether SEV is enabled.

Now that we have a workarea concept, the logic can be simplified to
store the msr status in workarea and use that to build PCDs and then
later simply use the PCDs instead of going through the CPUID and RDMSR.

The complete branch is available at
  https://github.com/codomania/edk2/tree/sev-workarea-cleanup

Brijesh Singh (2):
  OvmfPkg/ResetVector: cache the SEV status MSR value in workarea
  OvmfPkg/BaseMemEncryptLib: use the SEV_STATUS MSR value from workarea

 .../DxeMemEncryptSevLib.inf                   |   1 +
 .../PeiMemEncryptSevLib.inf                   |   1 +
 .../SecMemEncryptSevLib.inf                   |   1 +
 OvmfPkg/Include/WorkArea.h                    |  12 +-
 .../DxeMemEncryptSevLibInternal.c             | 142 ++++++++----------
 .../PeiMemEncryptSevLibInternal.c             | 139 ++++++-----------
 .../SecMemEncryptSevLibInternal.c             |  80 +++++-----
 OvmfPkg/Sec/AmdSev.c                          |   2 +-
 OvmfPkg/ResetVector/Ia32/AmdSev.asm           |  38 +++--
 OvmfPkg/ResetVector/Ia32/Flat32ToFlat64.asm   |   3 +-
 OvmfPkg/ResetVector/ResetVector.nasmb         |   3 +
 11 files changed, 189 insertions(+), 233 deletions(-)

-- 
2.25.1


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

end of thread, other threads:[~2022-01-25 22:09 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-01-19 23:03 [PATCH 0/2] SEV BaseMemEncryptLib cleanup Brijesh Singh
2022-01-19 23:03 ` [PATCH 1/2] OvmfPkg/ResetVector: cache the SEV status MSR value in workarea Brijesh Singh
2022-01-19 23:03 ` [PATCH 2/2] OvmfPkg/BaseMemEncryptLib: use the SEV_STATUS MSR value from workarea Brijesh Singh
2022-01-21  8:04 ` [PATCH 0/2] SEV BaseMemEncryptLib cleanup Gerd Hoffmann
2022-01-25 22:09   ` [edk2-devel] " Brijesh Singh

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