On November 3, 2021 2:51 PM, Gerd Hoffmann wrote:
> > +/**
> > +  Check if it is Tdx guest
> > +
> > +  @retval    TRUE   It is Tdx guest
> > +  @retval    FALSE  It is not Tdx guest
> > +**/
> > +BOOLEAN
> > +QemuFwCfgIsTdxGuest (
> 
> QemuFwCfgIsCC()
> 
> > +  return (CcWorkAreaHeader != NULL && CcWorkAreaHeader-
> >GuestType == GUEST_TYPE_INTEL_TDX);
> 
> GuestType != GUEST_TYPE_NON_ENCRYPTED
> 
> >      if (MemEncryptSevIsEnabled ()) {
> >        DEBUG ((DEBUG_INFO, "SEV: QemuFwCfg fallback to IO Port
> interface.\n"));
> > +    } else if (QemuFwCfgIsTdxGuest ()) {
> 
> if (QemuFwCfgIsCC()
> 
Hi, Gerd
I re-check the MemEncryptSevIsEnabled() and it doesn't simply check the 
GuestType. Instead it does more checking. 
See 
https://github.com/tianocore/edk2/blob/master/OvmfPkg/Library/BaseMemEncryptSevLib/PeiMemEncryptSevLibInternal.c#L34-L88

Brijesh, what's your thought about Gerd's suggestion?

Thanks 
Min


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


Reply via email to