On Sat, 2024-03-02 at 00:20 +1300, Kai Huang wrote: > +#define TD_SYSINFO_MAP_TDMR_INFO(_field_id, _member) \ > + TD_SYSINFO_MAP(_field_id, struct tdx_tdmr_sysinfo, _member) > > static int get_tdx_tdmr_sysinfo(struct tdx_tdmr_sysinfo *tdmr_sysinfo) > { > /* Map TD_SYSINFO fields into 'struct tdx_tdmr_sysinfo': */ > const struct field_mapping fields[] = { > - TD_SYSINFO_MAP(MAX_TDMRS, max_tdmrs), > - TD_SYSINFO_MAP(MAX_RESERVED_PER_TDMR, max_reserved_per_tdmr), > - TD_SYSINFO_MAP(PAMT_4K_ENTRY_SIZE, > pamt_entry_size[TDX_PS_4K]), > - TD_SYSINFO_MAP(PAMT_2M_ENTRY_SIZE, > pamt_entry_size[TDX_PS_2M]), > - TD_SYSINFO_MAP(PAMT_1G_ENTRY_SIZE, > pamt_entry_size[TDX_PS_1G]), > + TD_SYSINFO_MAP_TDMR_INFO(MAX_TDMRS, max_tdmrs), > + TD_SYSINFO_MAP_TDMR_INFO(MAX_RESERVED_PER_TDMR, > max_reserved_per_tdmr), > + TD_SYSINFO_MAP_TDMR_INFO(PAMT_4K_ENTRY_SIZE, > pamt_entry_size[TDX_PS_4K]), > + TD_SYSINFO_MAP_TDMR_INFO(PAMT_2M_ENTRY_SIZE, > pamt_entry_size[TDX_PS_2M]), > + TD_SYSINFO_MAP_TDMR_INFO(PAMT_1G_ENTRY_SIZE, > pamt_entry_size[TDX_PS_1G]), The creation of TD_SYSINFO_MAP_TDMR_INFO part is not strictly needed, but makes sense in the context of the signature change in read_sys_metadata_field16(). It might be worth justifying it in the log.