On Fri, 2024-05-03 at 18:32 +0000, Edgecombe, Rick P wrote: > On Fri, 2024-05-03 at 12:26 +0000, Huang, Kai wrote: > > > > To resolve this once for all, extend the existing metadata reading code > > to provide a generic metadata read infrastructure which supports reading > > all 8/16/32/64 bits element sizes. > > I think the key point is that it is actually simpler to support all field types > then only 16 and 64. How about add below to the end of the changelog: The metadata field ID encodes the element size. The TDH.SYS.RD SEAMCALL always returns 64-bit metadata data regardless of the true element size of the metadata field. The current function to read 16-bit metadata fields checks the element size encoded in the field ID is indeed 16-bits. Change that function to just covert the data from the SEAMCALL to the size encoded in the metadata field ID to provide a function which supports all element sizes. It's actually simpler to support reading all element sizes in one function rather than providing two functions to read 16 and 64 bits elements respectively.