Hi, > +UINT64 mTdSharedPageMask = 0; > +UINT32 mTdMaxVCpuNum = 0; > +UINT32 mTdVCpuNum = 0;
> +UINT64 > +EFIAPI > +TdSharedPageMask ( > + VOID > + ) > +{ > + UINT64 Status; > + UINT8 Gpaw; > + TD_RETURN_DATA TdReturnData; > + > + if (mTdSharedPageMask != 0) { > + return mTdSharedPageMask; > + } Small possible optimization: you can cache the whole TD_RETURN_DATA struct instead of the three extracted values, then ... > + Status = TdCall (TDCALL_TDINFO, 0, 0, 0, &TdReturnData); > + ASSERT (Status == TDX_EXIT_REASON_SUCCESS); ... you need a single TDCALL_TDINFO call only. > + tdcall > + > + ; Panic if TDCALL reports failure. > + test rax, rax > + jnz .no_return_data > +.panic: > + ud2 Comment doesn't match code. jnz .panic ? take care, Gerd -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#83135): https://edk2.groups.io/g/devel/message/83135 Mute This Topic: https://groups.io/mt/86739959/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-