> > + > > +static void detect_seam(struct cpuinfo_x86 *c) > > +{ > > why not do this check directly in tdx_detect_cpu()? The second patch will detect TDX KeyID too. I suppose you are saying below is better? void tdx_detect_cpu(struct cpuinfo_x86 *c) { if (c == &boot_cpu_data) { detect_seam_bsp(c); detect_tdx_keyids_bsp(c); } else { detect_seam_ap(c); detect_tdx_keyids_ap(c); } } I personally don't see how above is better than the current way. Instead, I think having SEAM and TDX KeyID detection code in single function respectively is more flexible for future extension (if needed). > > > + if (c == &boot_cpu_data) > > + detect_seam_bsp(c); > > + else > > + detect_seam_ap(c); > > +} > > + > > +void tdx_detect_cpu(struct cpuinfo_x86 *c) > > +{ > > + detect_seam(c); > > +} >