[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <caa2ae100494c4604d08d9459e6d3314be2dcf26.camel@intel.com>
Date: Tue, 19 Apr 2022 15:38:42 +1200
From: Kai Huang <kai.huang@...el.com>
To: Sathyanarayanan Kuppuswamy
<sathyanarayanan.kuppuswamy@...ux.intel.com>,
linux-kernel@...r.kernel.org, kvm@...r.kernel.org
Cc: seanjc@...gle.com, pbonzini@...hat.com, dave.hansen@...el.com,
len.brown@...el.com, tony.luck@...el.com,
rafael.j.wysocki@...el.com, reinette.chatre@...el.com,
dan.j.williams@...el.com, peterz@...radead.org, ak@...ux.intel.com,
kirill.shutemov@...ux.intel.com, isaku.yamahata@...el.com
Subject: Re: [PATCH v3 01/21] x86/virt/tdx: Detect SEAM
> > +
> > +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);
> > +}
>
Powered by blists - more mailing lists