On April 7, 2021 9:23 PM, Laszlo wrote: > > On 04/07/21 02:21, Xu, Min M wrote: > > > Intel TDX also has metadata which is consumed by QEMU. We put the > > metadata in a single file (TdxMetadata.asm) and put it at the end of > ResetVectorVtf0. > > Then a pointer is placed in a known location in ResetVector.nasm. In > > this way QEMU can easily read the Metadata by the pointer. > > ------------------------------------------------------------------ > > ALIGN 8 > > ; > > ; TDX Virtual Firmware injects metadata in VTF0. > > ; The address of the metadata is injected in this location > > (0xffffffe8) ; > > DD (OVMF_IMAGE_SIZE_IN_KB * 1024 - (fourGigabytes - > TdxMetadataGuid - 16)) > > ; > > ; The VTF signature > > ; > > ; VTF-0 means that the VTF (Volume Top File) code does not require ; > > any fixups. > > ; > > vtfSignature: > > DB 'V', 'T', 'F', 0 > > ------------------------------------------------------------------ > > > > The space in ResetVector is very precious and we all want a known > > location so that QEMU can find the metadata easily. Putting the > > metadata in a single file give the developers more flexible (They can > > put anything they want). So I think a pointer (point to a metadata > > file) in a known location maybe a better solution. > > Assuming a QEMU version has been released that looks for the chain of GUID- > ed structs already, then I think such a change would break compatibility with > that QEMU version. Agree. The existing GUIDed structs should be kept. Otherwise the QEMU version Which has been released would be broken.
> > If we definitely need a separate spot to include more information in the > flash, > for QEMU's parsing, then please introduce a new GUIDed structure, which > contains nothing but a pointer to that spot. I suggest if new information is to be added in the flash in the future, then we'd better pack the information in a separate spot and place a pointer to that spot in a known location. Intel TDX has metadata too. I believe AMD SEV will add more information in the future. Even ARM may has its metadata. So putting the metadata in separate spot is more friendly and flexible. Since it is a pointer in a known location, for example, 0xffffffe0, then do we still need a GUIDed structure? > > Thanks > Laszlo -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#73808): https://edk2.groups.io/g/devel/message/73808 Mute This Topic: https://groups.io/mt/81584577/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-