Re: [PATCH v17 06/23] x86/cpu/intel: Detect SGX support and update caps appropriately

2018-11-24 Thread Jarkko Sakkinen
On Wed, Nov 21, 2018 at 07:17:28PM +0100, Borislav Petkov wrote: > I see the build failure here has been pointed out already but lemme > repeat it out for another reason: > > It is very important that no patch we merge breaks bisectability - > please build every patch before sending: Yep, the

Re: [PATCH v17 06/23] x86/cpu/intel: Detect SGX support and update caps appropriately

2018-11-24 Thread Jarkko Sakkinen
On Wed, Nov 21, 2018 at 07:17:28PM +0100, Borislav Petkov wrote: > I see the build failure here has been pointed out already but lemme > repeat it out for another reason: > > It is very important that no patch we merge breaks bisectability - > please build every patch before sending: Yep, the

Re: [PATCH v17 06/23] x86/cpu/intel: Detect SGX support and update caps appropriately

2018-11-21 Thread Borislav Petkov
On Fri, Nov 16, 2018 at 03:01:13AM +0200, Jarkko Sakkinen wrote: > From: Sean Christopherson > > Similar to other large Intel features such as VMX and TXT, SGX must be > explicitly enabled in IA32_FEATURE_CONTROL MSR to be truly usable. > Clear all SGX related capabilities if SGX is not fully

Re: [PATCH v17 06/23] x86/cpu/intel: Detect SGX support and update caps appropriately

2018-11-21 Thread Borislav Petkov
On Fri, Nov 16, 2018 at 03:01:13AM +0200, Jarkko Sakkinen wrote: > From: Sean Christopherson > > Similar to other large Intel features such as VMX and TXT, SGX must be > explicitly enabled in IA32_FEATURE_CONTROL MSR to be truly usable. > Clear all SGX related capabilities if SGX is not fully

Re: [PATCH v17 06/23] x86/cpu/intel: Detect SGX support and update caps appropriately

2018-11-18 Thread Jarkko Sakkinen
On Fri, Nov 16, 2018 at 03:32:36PM -0800, Dave Hansen wrote: > On 11/15/18 5:01 PM, Jarkko Sakkinen wrote: > > +static void detect_sgx(struct cpuinfo_x86 *c) > > +{ > > + unsigned long long fc; > > + > > + rdmsrl(MSR_IA32_FEATURE_CONTROL, fc); > > + if (!(fc & FEATURE_CONTROL_LOCKED)) { > >

Re: [PATCH v17 06/23] x86/cpu/intel: Detect SGX support and update caps appropriately

2018-11-18 Thread Jarkko Sakkinen
On Fri, Nov 16, 2018 at 03:32:36PM -0800, Dave Hansen wrote: > On 11/15/18 5:01 PM, Jarkko Sakkinen wrote: > > +static void detect_sgx(struct cpuinfo_x86 *c) > > +{ > > + unsigned long long fc; > > + > > + rdmsrl(MSR_IA32_FEATURE_CONTROL, fc); > > + if (!(fc & FEATURE_CONTROL_LOCKED)) { > >

Re: [PATCH v17 06/23] x86/cpu/intel: Detect SGX support and update caps appropriately

2018-11-16 Thread Dave Hansen
On 11/15/18 5:01 PM, Jarkko Sakkinen wrote: > +static void detect_sgx(struct cpuinfo_x86 *c) > +{ > + unsigned long long fc; > + > + rdmsrl(MSR_IA32_FEATURE_CONTROL, fc); > + if (!(fc & FEATURE_CONTROL_LOCKED)) { > + pr_err_once("sgx: IA32_FEATURE_CONTROL MSR is not

Re: [PATCH v17 06/23] x86/cpu/intel: Detect SGX support and update caps appropriately

2018-11-16 Thread Dave Hansen
On 11/15/18 5:01 PM, Jarkko Sakkinen wrote: > +static void detect_sgx(struct cpuinfo_x86 *c) > +{ > + unsigned long long fc; > + > + rdmsrl(MSR_IA32_FEATURE_CONTROL, fc); > + if (!(fc & FEATURE_CONTROL_LOCKED)) { > + pr_err_once("sgx: IA32_FEATURE_CONTROL MSR is not

[PATCH v17 06/23] x86/cpu/intel: Detect SGX support and update caps appropriately

2018-11-15 Thread Jarkko Sakkinen
From: Sean Christopherson Similar to other large Intel features such as VMX and TXT, SGX must be explicitly enabled in IA32_FEATURE_CONTROL MSR to be truly usable. Clear all SGX related capabilities if SGX is not fully enabled in IA32_FEATURE_CONTROL or if the SGX1 instruction set isn't

[PATCH v17 06/23] x86/cpu/intel: Detect SGX support and update caps appropriately

2018-11-15 Thread Jarkko Sakkinen
From: Sean Christopherson Similar to other large Intel features such as VMX and TXT, SGX must be explicitly enabled in IA32_FEATURE_CONTROL MSR to be truly usable. Clear all SGX related capabilities if SGX is not fully enabled in IA32_FEATURE_CONTROL or if the SGX1 instruction set isn't