[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1458061883.6393.359.camel@hpe.com>
Date: Tue, 15 Mar 2016 11:11:23 -0600
From: Toshi Kani <toshi.kani@....com>
To: Borislav Petkov <bp@...en8.de>
Cc: "Luis R. Rodriguez" <mcgrof@...nel.org>,
"mingo@...nel.org" <mingo@...nel.org>,
"hpa@...or.com" <hpa@...or.com>,
"tglx@...utronix.de" <tglx@...utronix.de>,
"jgross@...e.com" <jgross@...e.com>,
"paul.gortmaker@...driver.com" <paul.gortmaker@...driver.com>,
"x86@...nel.org" <x86@...nel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"xen-devel@...ts.xenproject.org" <xen-devel@...ts.xenproject.org>,
"boris.ostrovsky@...cle.com" <boris.ostrovsky@...cle.com>
Subject: Re: [PATCH 1/2] x86/mm/pat: Change pat_disable() to emulate PAT
table
On Tue, 2016-03-15 at 16:47 +0100, Borislav Petkov wrote:
> On Tue, Mar 15, 2016 at 09:43:15AM -0600, Toshi Kani wrote:
> > > Please use on init paths boot_cpu_has(X86_FEATURE_PAT) and on fast
> > > paths static_cpu_has(X86_FEATURE_PAT). No more of that cpu_has_XXX
> > > ugliness.
> >
> > 'cpu_has_pat' is defined as 'boot_cpu_has(X86_FEATURE_PAT)'. Do you
> > mean it should explicitly use 'boot_cpu_has(X86_FEATURE_PAT)'?
>
> No, read what I said.
>
> We use boot_cpu_has(<feature_bit>) on slow paths (i.e., init, bootup,
> etc), where speed is not that important. static_cpu_has(<feature_bit>)
> is an optimized version which should be used in hot paths.
Yes, I understand that part. Let me rephrase my question.
This PAT code is on init paths and speed is not that important. So, it
needs to use 'boot_cpu_has()' here. 'cpu_has_pat' is defined
as boot_cpu_has(X86_FEATURE_PAT), and hence it uses boot_cpu_has() already.
While cpu_has_pat is the same as boot_cpu_has(X86_FEATURE_PAT), cpu_has_XXX
should not be used. So, this code needs to be changed to use
boot_cpu_has(X86_FEATURE_PAT) directly.
Is this right?
Thanks,
-Toshi
Powered by blists - more mailing lists