RE: [PATCH v7 03/10] x86, mpx: add macro cpu_has_mpx

2014-07-23 Thread Ren, Qiaowei
On 2014-07-24, Hansen, Dave wrote: > On 07/23/2014 05:56 PM, Ren, Qiaowei wrote: >> On 2014-07-24, Hansen, Dave wrote: >>> On 07/22/2014 07:35 PM, Ren, Qiaowei wrote: The checking about MPX feature should be as follow: if (pcntxt_mask & XSTATE_EAGER) {

Re: [PATCH v7 03/10] x86, mpx: add macro cpu_has_mpx

2014-07-23 Thread Dave Hansen
On 07/23/2014 05:56 PM, Ren, Qiaowei wrote: > On 2014-07-24, Hansen, Dave wrote: >> On 07/22/2014 07:35 PM, Ren, Qiaowei wrote: >>> The checking about MPX feature should be as follow: >>> >>> if (pcntxt_mask & XSTATE_EAGER) { >>> if (eagerfpu == DISABLE) { >>>

RE: [PATCH v7 03/10] x86, mpx: add macro cpu_has_mpx

2014-07-23 Thread Ren, Qiaowei
On 2014-07-24, Hansen, Dave wrote: > On 07/22/2014 07:35 PM, Ren, Qiaowei wrote: >> The checking about MPX feature should be as follow: >> >> if (pcntxt_mask & XSTATE_EAGER) { >> if (eagerfpu == DISABLE) { >> pr_err("eagerfpu not present, disabling

Re: [PATCH v7 03/10] x86, mpx: add macro cpu_has_mpx

2014-07-23 Thread Dave Hansen
On 07/22/2014 07:35 PM, Ren, Qiaowei wrote: > The checking about MPX feature should be as follow: > > if (pcntxt_mask & XSTATE_EAGER) { > if (eagerfpu == DISABLE) { > pr_err("eagerfpu not present, disabling some xstate > features: 0x%llx\n", >

RE: [PATCH v7 03/10] x86, mpx: add macro cpu_has_mpx

2014-07-22 Thread Ren, Qiaowei
On 2014-07-23, Hansen, Dave wrote: > On 07/20/2014 10:38 PM, Qiaowei Ren wrote: >> +#ifdef CONFIG_X86_INTEL_MPX >> +#define cpu_has_mpx boot_cpu_has(X86_FEATURE_MPX) #else #define >> +cpu_has_mpx 0 #endif /* CONFIG_X86_INTEL_MPX */ > > Is this enough checking? Looking at the extension reference

Re: [PATCH v7 03/10] x86, mpx: add macro cpu_has_mpx

2014-07-22 Thread Dave Hansen
On 07/20/2014 10:38 PM, Qiaowei Ren wrote: > +#ifdef CONFIG_X86_INTEL_MPX > +#define cpu_has_mpx boot_cpu_has(X86_FEATURE_MPX) > +#else > +#define cpu_has_mpx 0 > +#endif /* CONFIG_X86_INTEL_MPX */ Is this enough checking? Looking at the extension reference, it says: > 9.3.3 > Enabling of Intel

[PATCH v7 03/10] x86, mpx: add macro cpu_has_mpx

2014-07-20 Thread Qiaowei Ren
In order to do performance optimization, this patch adds macro cpu_has_mpx which will directly return 0 when MPX is not supported by kernel. Community gave a lot of comments on this macro cpu_has_mpx in previous version. Dave will introduce a patchset about disabled features to fix it later. In t