Re: [PATCH v6 04/11] x86: define IA32_FEATUE_CONTROL.SGX_LC

2017-11-30 Thread Jarkko Sakkinen
On Thu, Nov 30, 2017 at 04:05:45PM +1300, Kai Huang wrote: > On Wed, 2017-11-29 at 17:38 +0200, Jarkko Sakkinen wrote: > > On Wed, Nov 29, 2017 at 12:21:41AM +0200, Jarkko Sakkinen wrote: > > > On Tue, Nov 28, 2017 at 02:00:03PM -0800, Sean Christopherson > > > wrote: > > > > What about

Re: [PATCH v6 04/11] x86: define IA32_FEATUE_CONTROL.SGX_LC

2017-11-30 Thread Jarkko Sakkinen
On Thu, Nov 30, 2017 at 04:05:45PM +1300, Kai Huang wrote: > On Wed, 2017-11-29 at 17:38 +0200, Jarkko Sakkinen wrote: > > On Wed, Nov 29, 2017 at 12:21:41AM +0200, Jarkko Sakkinen wrote: > > > On Tue, Nov 28, 2017 at 02:00:03PM -0800, Sean Christopherson > > > wrote: > > > > What about

Re: [PATCH v6 04/11] x86: define IA32_FEATUE_CONTROL.SGX_LC

2017-11-29 Thread Kai Huang
On Wed, 2017-11-29 at 17:38 +0200, Jarkko Sakkinen wrote: > On Wed, Nov 29, 2017 at 12:21:41AM +0200, Jarkko Sakkinen wrote: > > On Tue, Nov 28, 2017 at 02:00:03PM -0800, Sean Christopherson > > wrote: > > > What about SGX_LC_ENABLE? The title in the MSR section of the > > > SDM is > > > "SGX

Re: [PATCH v6 04/11] x86: define IA32_FEATUE_CONTROL.SGX_LC

2017-11-29 Thread Kai Huang
On Wed, 2017-11-29 at 17:38 +0200, Jarkko Sakkinen wrote: > On Wed, Nov 29, 2017 at 12:21:41AM +0200, Jarkko Sakkinen wrote: > > On Tue, Nov 28, 2017 at 02:00:03PM -0800, Sean Christopherson > > wrote: > > > What about SGX_LC_ENABLE? The title in the MSR section of the > > > SDM is > > > "SGX

Re: [PATCH v6 04/11] x86: define IA32_FEATUE_CONTROL.SGX_LC

2017-11-29 Thread Jarkko Sakkinen
On Wed, Nov 29, 2017 at 12:21:41AM +0200, Jarkko Sakkinen wrote: > On Tue, Nov 28, 2017 at 02:00:03PM -0800, Sean Christopherson wrote: > > What about SGX_LC_ENABLE?  The title in the MSR section of the SDM is > > "SGX Launch Control Enable", and it's more consistent with the other > > bits

Re: [PATCH v6 04/11] x86: define IA32_FEATUE_CONTROL.SGX_LC

2017-11-29 Thread Jarkko Sakkinen
On Wed, Nov 29, 2017 at 12:21:41AM +0200, Jarkko Sakkinen wrote: > On Tue, Nov 28, 2017 at 02:00:03PM -0800, Sean Christopherson wrote: > > What about SGX_LC_ENABLE?  The title in the MSR section of the SDM is > > "SGX Launch Control Enable", and it's more consistent with the other > > bits

Re: [PATCH v6 04/11] x86: define IA32_FEATUE_CONTROL.SGX_LC

2017-11-28 Thread Jarkko Sakkinen
On Tue, Nov 28, 2017 at 02:00:03PM -0800, Sean Christopherson wrote: > What about SGX_LC_ENABLE?  The title in the MSR section of the SDM is > "SGX Launch Control Enable", and it's more consistent with the other > bits defined in feature control.  I'd also prefer that name for the > actual #define

Re: [PATCH v6 04/11] x86: define IA32_FEATUE_CONTROL.SGX_LC

2017-11-28 Thread Jarkko Sakkinen
On Tue, Nov 28, 2017 at 02:00:03PM -0800, Sean Christopherson wrote: > What about SGX_LC_ENABLE?  The title in the MSR section of the SDM is > "SGX Launch Control Enable", and it's more consistent with the other > bits defined in feature control.  I'd also prefer that name for the > actual #define

Re: [PATCH v6 04/11] x86: define IA32_FEATUE_CONTROL.SGX_LC

2017-11-28 Thread Jarkko Sakkinen
On Wed, Nov 29, 2017 at 12:03:23AM +0200, Jarkko Sakkinen wrote: > On Tue, Nov 28, 2017 at 01:44:50PM -0800, Sean Christopherson wrote: > > On Tue, 2017-11-28 at 23:40 +0200, Jarkko Sakkinen wrote: > > > On Tue, Nov 28, 2017 at 11:24:07PM +0200, Jarkko Sakkinen wrote: > > > > > > > > On Tue, Nov

Re: [PATCH v6 04/11] x86: define IA32_FEATUE_CONTROL.SGX_LC

2017-11-28 Thread Jarkko Sakkinen
On Wed, Nov 29, 2017 at 12:03:23AM +0200, Jarkko Sakkinen wrote: > On Tue, Nov 28, 2017 at 01:44:50PM -0800, Sean Christopherson wrote: > > On Tue, 2017-11-28 at 23:40 +0200, Jarkko Sakkinen wrote: > > > On Tue, Nov 28, 2017 at 11:24:07PM +0200, Jarkko Sakkinen wrote: > > > > > > > > On Tue, Nov

Re: [PATCH v6 04/11] x86: define IA32_FEATUE_CONTROL.SGX_LC

2017-11-28 Thread Sean Christopherson
On Tue, 2017-11-28 at 23:55 +0200, Jarkko Sakkinen wrote: > On Tue, Nov 28, 2017 at 01:33:14PM -0800, Sean Christopherson wrote: > > > > On Tue, 2017-11-28 at 23:24 +0200, Jarkko Sakkinen wrote: > > > > > > On Tue, Nov 28, 2017 at 10:53:24PM +0200, Jarkko Sakkinen wrote: > > > > > > > > > > >

Re: [PATCH v6 04/11] x86: define IA32_FEATUE_CONTROL.SGX_LC

2017-11-28 Thread Sean Christopherson
On Tue, 2017-11-28 at 23:55 +0200, Jarkko Sakkinen wrote: > On Tue, Nov 28, 2017 at 01:33:14PM -0800, Sean Christopherson wrote: > > > > On Tue, 2017-11-28 at 23:24 +0200, Jarkko Sakkinen wrote: > > > > > > On Tue, Nov 28, 2017 at 10:53:24PM +0200, Jarkko Sakkinen wrote: > > > > > > > > > > >

Re: [PATCH v6 04/11] x86: define IA32_FEATUE_CONTROL.SGX_LC

2017-11-28 Thread Jarkko Sakkinen
On Tue, Nov 28, 2017 at 01:44:50PM -0800, Sean Christopherson wrote: > On Tue, 2017-11-28 at 23:40 +0200, Jarkko Sakkinen wrote: > > On Tue, Nov 28, 2017 at 11:24:07PM +0200, Jarkko Sakkinen wrote: > > > > > > On Tue, Nov 28, 2017 at 10:53:24PM +0200, Jarkko Sakkinen wrote: > > > > > > > > > >

Re: [PATCH v6 04/11] x86: define IA32_FEATUE_CONTROL.SGX_LC

2017-11-28 Thread Jarkko Sakkinen
On Tue, Nov 28, 2017 at 01:44:50PM -0800, Sean Christopherson wrote: > On Tue, 2017-11-28 at 23:40 +0200, Jarkko Sakkinen wrote: > > On Tue, Nov 28, 2017 at 11:24:07PM +0200, Jarkko Sakkinen wrote: > > > > > > On Tue, Nov 28, 2017 at 10:53:24PM +0200, Jarkko Sakkinen wrote: > > > > > > > > > >

Re: [PATCH v6 04/11] x86: define IA32_FEATUE_CONTROL.SGX_LC

2017-11-28 Thread Jarkko Sakkinen
On Tue, Nov 28, 2017 at 01:33:14PM -0800, Sean Christopherson wrote: > On Tue, 2017-11-28 at 23:24 +0200, Jarkko Sakkinen wrote: > > On Tue, Nov 28, 2017 at 10:53:24PM +0200, Jarkko Sakkinen wrote: > > > > > > > > > > > So, maybe something like this? > > > > > > > >     After SGX is

Re: [PATCH v6 04/11] x86: define IA32_FEATUE_CONTROL.SGX_LC

2017-11-28 Thread Jarkko Sakkinen
On Tue, Nov 28, 2017 at 01:33:14PM -0800, Sean Christopherson wrote: > On Tue, 2017-11-28 at 23:24 +0200, Jarkko Sakkinen wrote: > > On Tue, Nov 28, 2017 at 10:53:24PM +0200, Jarkko Sakkinen wrote: > > > > > > > > > > > So, maybe something like this? > > > > > > > >     After SGX is

Re: [PATCH v6 04/11] x86: define IA32_FEATUE_CONTROL.SGX_LC

2017-11-28 Thread Sean Christopherson
On Tue, 2017-11-28 at 23:40 +0200, Jarkko Sakkinen wrote: > On Tue, Nov 28, 2017 at 11:24:07PM +0200, Jarkko Sakkinen wrote: > > > > On Tue, Nov 28, 2017 at 10:53:24PM +0200, Jarkko Sakkinen wrote: > > > > > > > > > > > So, maybe something like this? > > > > > > > >     After SGX is

Re: [PATCH v6 04/11] x86: define IA32_FEATUE_CONTROL.SGX_LC

2017-11-28 Thread Sean Christopherson
On Tue, 2017-11-28 at 23:40 +0200, Jarkko Sakkinen wrote: > On Tue, Nov 28, 2017 at 11:24:07PM +0200, Jarkko Sakkinen wrote: > > > > On Tue, Nov 28, 2017 at 10:53:24PM +0200, Jarkko Sakkinen wrote: > > > > > > > > > > > So, maybe something like this? > > > > > > > >     After SGX is

Re: [PATCH v6 04/11] x86: define IA32_FEATUE_CONTROL.SGX_LC

2017-11-28 Thread Jarkko Sakkinen
On Tue, Nov 28, 2017 at 11:24:07PM +0200, Jarkko Sakkinen wrote: > On Tue, Nov 28, 2017 at 10:53:24PM +0200, Jarkko Sakkinen wrote: > > > So, maybe something like this? > > > > > >     After SGX is activated[1] the IA32_SGXLEPUBKEYHASHn MSRs are writable > > >     if and only if SGX_LC is set in

Re: [PATCH v6 04/11] x86: define IA32_FEATUE_CONTROL.SGX_LC

2017-11-28 Thread Jarkko Sakkinen
On Tue, Nov 28, 2017 at 11:24:07PM +0200, Jarkko Sakkinen wrote: > On Tue, Nov 28, 2017 at 10:53:24PM +0200, Jarkko Sakkinen wrote: > > > So, maybe something like this? > > > > > >     After SGX is activated[1] the IA32_SGXLEPUBKEYHASHn MSRs are writable > > >     if and only if SGX_LC is set in

Re: [PATCH v6 04/11] x86: define IA32_FEATUE_CONTROL.SGX_LC

2017-11-28 Thread Sean Christopherson
On Tue, 2017-11-28 at 23:24 +0200, Jarkko Sakkinen wrote: > On Tue, Nov 28, 2017 at 10:53:24PM +0200, Jarkko Sakkinen wrote: > > > > > > > > So, maybe something like this? > > > > > >     After SGX is activated[1] the IA32_SGXLEPUBKEYHASHn MSRs are writable > > >     if and only if SGX_LC is

Re: [PATCH v6 04/11] x86: define IA32_FEATUE_CONTROL.SGX_LC

2017-11-28 Thread Sean Christopherson
On Tue, 2017-11-28 at 23:24 +0200, Jarkko Sakkinen wrote: > On Tue, Nov 28, 2017 at 10:53:24PM +0200, Jarkko Sakkinen wrote: > > > > > > > > So, maybe something like this? > > > > > >     After SGX is activated[1] the IA32_SGXLEPUBKEYHASHn MSRs are writable > > >     if and only if SGX_LC is

Re: [PATCH v6 04/11] x86: define IA32_FEATUE_CONTROL.SGX_LC

2017-11-28 Thread Jarkko Sakkinen
On Tue, Nov 28, 2017 at 10:53:24PM +0200, Jarkko Sakkinen wrote: > > So, maybe something like this? > > > >     After SGX is activated[1] the IA32_SGXLEPUBKEYHASHn MSRs are writable > >     if and only if SGX_LC is set in the IA32_FEATURE_CONTROL MSR and the > >     IA32_FEATURE_CONTROL MSR is

Re: [PATCH v6 04/11] x86: define IA32_FEATUE_CONTROL.SGX_LC

2017-11-28 Thread Jarkko Sakkinen
On Tue, Nov 28, 2017 at 10:53:24PM +0200, Jarkko Sakkinen wrote: > > So, maybe something like this? > > > >     After SGX is activated[1] the IA32_SGXLEPUBKEYHASHn MSRs are writable > >     if and only if SGX_LC is set in the IA32_FEATURE_CONTROL MSR and the > >     IA32_FEATURE_CONTROL MSR is

Re: [PATCH v6 04/11] x86: define IA32_FEATUE_CONTROL.SGX_LC

2017-11-28 Thread Jarkko Sakkinen
On Tue, Nov 28, 2017 at 10:28:03AM -0800, Sean Christopherson wrote: > On Tue, 2017-11-28 at 09:16 -0800, Sean Christopherson wrote: > > On Sat, 2017-11-25 at 21:29 +0200, Jarkko Sakkinen wrote: > > > > > > When IA32_FEATURE_CONTROL.SGX_LC identifies that the root key for > > > enclave signatures

Re: [PATCH v6 04/11] x86: define IA32_FEATUE_CONTROL.SGX_LC

2017-11-28 Thread Jarkko Sakkinen
On Tue, Nov 28, 2017 at 10:28:03AM -0800, Sean Christopherson wrote: > On Tue, 2017-11-28 at 09:16 -0800, Sean Christopherson wrote: > > On Sat, 2017-11-25 at 21:29 +0200, Jarkko Sakkinen wrote: > > > > > > When IA32_FEATURE_CONTROL.SGX_LC identifies that the root key for > > > enclave signatures

Re: [PATCH v6 04/11] x86: define IA32_FEATUE_CONTROL.SGX_LC

2017-11-28 Thread Jarkko Sakkinen
On Tue, Nov 28, 2017 at 09:16:11AM -0800, Sean Christopherson wrote: > On Sat, 2017-11-25 at 21:29 +0200, Jarkko Sakkinen wrote: > > When IA32_FEATURE_CONTROL.SGX_LC identifies that the root key for > > enclave signatures can be configured either by the OS or pre-boot > > firmware. > > > > If

Re: [PATCH v6 04/11] x86: define IA32_FEATUE_CONTROL.SGX_LC

2017-11-28 Thread Jarkko Sakkinen
On Tue, Nov 28, 2017 at 09:16:11AM -0800, Sean Christopherson wrote: > On Sat, 2017-11-25 at 21:29 +0200, Jarkko Sakkinen wrote: > > When IA32_FEATURE_CONTROL.SGX_LC identifies that the root key for > > enclave signatures can be configured either by the OS or pre-boot > > firmware. > > > > If

Re: [PATCH v6 04/11] x86: define IA32_FEATUE_CONTROL.SGX_LC

2017-11-28 Thread Sean Christopherson
On Tue, 2017-11-28 at 09:16 -0800, Sean Christopherson wrote: > On Sat, 2017-11-25 at 21:29 +0200, Jarkko Sakkinen wrote: > > > > When IA32_FEATURE_CONTROL.SGX_LC identifies that the root key for > > enclave signatures can be configured either by the OS or pre-boot > > firmware. > > > > If this

Re: [PATCH v6 04/11] x86: define IA32_FEATUE_CONTROL.SGX_LC

2017-11-28 Thread Sean Christopherson
On Tue, 2017-11-28 at 09:16 -0800, Sean Christopherson wrote: > On Sat, 2017-11-25 at 21:29 +0200, Jarkko Sakkinen wrote: > > > > When IA32_FEATURE_CONTROL.SGX_LC identifies that the root key for > > enclave signatures can be configured either by the OS or pre-boot > > firmware. > > > > If this

Re: [PATCH v6 04/11] x86: define IA32_FEATUE_CONTROL.SGX_LC

2017-11-28 Thread Sean Christopherson
On Sat, 2017-11-25 at 21:29 +0200, Jarkko Sakkinen wrote: > When IA32_FEATURE_CONTROL.SGX_LC identifies that the root key for > enclave signatures can be configured either by the OS or pre-boot > firmware. > > If this the case, IA32_SGXLEPUBKEYHASHn MSRs (0 < n < 4) can be used > to > set the

Re: [PATCH v6 04/11] x86: define IA32_FEATUE_CONTROL.SGX_LC

2017-11-28 Thread Sean Christopherson
On Sat, 2017-11-25 at 21:29 +0200, Jarkko Sakkinen wrote: > When IA32_FEATURE_CONTROL.SGX_LC identifies that the root key for > enclave signatures can be configured either by the OS or pre-boot > firmware. > > If this the case, IA32_SGXLEPUBKEYHASHn MSRs (0 < n < 4) can be used > to > set the