public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* SEV Live Migration Support in OVMF
@ 2020-04-17 20:26 Ashish Kalra
  2020-04-18  0:26 ` Ashish Kalra
  0 siblings, 1 reply; 2+ messages in thread
From: Ashish Kalra @ 2020-04-17 20:26 UTC (permalink / raw)
  To: devel; +Cc: brijesh.singh, Thomas.Lendacky


This is with reference to adding SEV Live migration support in OVMF,
which basically is adding a hypercall as part of the
MemEncryptSevClearPageEncMask() function. 

We unconditionally make a hypercall and if the hypercall succeeds 
then it can sets a new UEFI environment variable
"SevLiveMigrationEnabled" which indicates it supports the feature to the OS. 
OS can later query whether feature is supported by OVMF by checking for
this variable using the UEFI runtime services. 

I tried doing this by setting the UEFI variable if the hypercall 
succeeds using the UEFI runtime services SetVariable() function, but 
it looks like the UEFI runtime services table library is only 
available to DXE and UEFI module types.

As OVMF's BaseMemEncryptLib module (which is doing the hypercall and then 
setting the variable) is a PEIM module, hence, it cannot call the 
UEFI runtime services and the build fails.

Now i am returning the hypercall return status up the caller chain, i.e, all the way upto
MemEncryptSevClearPageEncMask() and then set the Uefi variable 
in the above function which is running in DXE environment, so i believe that should work.

Sharing the above on the development list for any feedback, comments or
suggestions on this support and our current approach for the same.

Thanks,
Ashish

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

end of thread, other threads:[~2020-04-18  0:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-04-17 20:26 SEV Live Migration Support in OVMF Ashish Kalra
2020-04-18  0:26 ` Ashish Kalra

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