Re: [PATCH 5/5] x86/virt/tdx: Export global metadata read infrastructure

From: Edgecombe, Rick P
Date: Thu May 02 2024 - 20:21:36 EST


On Sat, 2024-03-02 at 00:20 +1300, Kai Huang wrote:
> KVM will need to read a bunch of non-TDMR related metadata to create and
> run TDX guests.  Export the metadata read infrastructure for KVM to use.
>
> Specifically, export two helpers:
>
> 1) The helper which reads multiple metadata fields to a buffer of a
>    structure based on the "field ID -> structure member" mapping table.
>
> 2) The low level helper which just reads a given field ID.
>
Could 2 be a static inline in a helper, and then only have one export?