[MODERATED] Re: [PATCH v7 04/10] TAAv7 4

Pawan Gupta <[email protected]>
Newsgroups org.kernel.lore.historical-speck
Message-ID <[email protected]>
On Tue, Oct 22, 2019 at 06:51:12PM +0200, speck for Borislav Petkov wrote:
> > +static void __init taa_select_mitigation(void)
> > +{
> > +	u64 ia32_cap = x86_read_arch_cap_msr();
> 
> Do that MSR access...
> 
> > +
> > +	if (!boot_cpu_has_bug(X86_BUG_TAA)) {
> > +		taa_mitigation = TAA_MITIGATION_OFF;
> > +		return;
> > +	}
> 
> ... here.
> 

Is it okay to move x86_read_arch_cap_msr() further down just before its needed?

+       ia32_cap = x86_read_arch_cap_msr();
+
	if ((ia32_cap & ARCH_CAP_MDS_NO) &&
			!(ia32_cap & ARCH_CAP_TSX_CTRL_MSR))
		taa_mitigation = TAA_MITIGATION_UCODE_NEEDED;

Thanks,
Pawan
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.