[intel-sgx-kernel-dev,RFC,06/10] x86: add SGX launch control definition to cpufeature
diff mbox

Message ID 20170901173002.8442-7-jarkko.sakkinen@linux.intel.com
State New
Headers show

Commit Message

Jarkko Sakkinen Sept. 1, 2017, 5:29 p.m. UTC
Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
---
 arch/x86/include/asm/cpufeatures.h | 1 +
 1 file changed, 1 insertion(+)

Comments

Kai Huang Sept. 3, 2017, 9:38 p.m. UTC | #1
I think you can combine this with patch 2 (X86_FEATURE_SGX definition).
You can also remove my name in patch 2. It's just a simple definition.

Thanks,
-Kai

On Fri, 2017-09-01 at 20:29 +0300, Jarkko Sakkinen wrote:
> Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
> ---
>  arch/x86/include/asm/cpufeatures.h | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/arch/x86/include/asm/cpufeatures.h
> b/arch/x86/include/asm/cpufeatures.h
> index e470dfeb2fd4..a785ef8869f0 100644
> --- a/arch/x86/include/asm/cpufeatures.h
> +++ b/arch/x86/include/asm/cpufeatures.h
> @@ -296,6 +296,7 @@
>  #define X86_FEATURE_AVX512_VPOPCNTDQ (16*32+14) /* POPCNT for
> vectors of DW/QW */
>  #define X86_FEATURE_LA57	(16*32+16) /* 5-level page tables */
>  #define X86_FEATURE_RDPID	(16*32+22) /* RDPID instruction */
> +#define X86_FEATURE_SGX_LC	(16*32+30) /* supports SGX launch
> configuration */
>  
>  /* AMD-defined CPU features, CPUID level 0x80000007 (ebx), word 17
> */
>  #define X86_FEATURE_OVERFLOW_RECOV (17*32+0) /* MCA overflow
> recovery support */
Jarkko Sakkinen Sept. 4, 2017, 4:47 p.m. UTC | #2
On Mon, Sep 04, 2017 at 09:38:44AM +1200, Kai Huang wrote:
> I think you can combine this with patch 2 (X86_FEATURE_SGX definition).
> You can also remove my name in patch 2. It's just a simple definition.
> 
> Thanks,
> -Kai

Well, it's an indepedent logical block of code and the driver patch is
already huge. And it lives in a different subtree. For these reasons it
makes sense to keep it as an independent commit.

/Jarkko

> 
> On Fri, 2017-09-01 at 20:29 +0300, Jarkko Sakkinen wrote:
> > Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
> > ---
> >  arch/x86/include/asm/cpufeatures.h | 1 +
> >  1 file changed, 1 insertion(+)
> > 
> > diff --git a/arch/x86/include/asm/cpufeatures.h
> > b/arch/x86/include/asm/cpufeatures.h
> > index e470dfeb2fd4..a785ef8869f0 100644
> > --- a/arch/x86/include/asm/cpufeatures.h
> > +++ b/arch/x86/include/asm/cpufeatures.h
> > @@ -296,6 +296,7 @@
> >  #define X86_FEATURE_AVX512_VPOPCNTDQ (16*32+14) /* POPCNT for
> > vectors of DW/QW */
> >  #define X86_FEATURE_LA57	(16*32+16) /* 5-level page tables */
> >  #define X86_FEATURE_RDPID	(16*32+22) /* RDPID instruction */
> > +#define X86_FEATURE_SGX_LC	(16*32+30) /* supports SGX launch
> > configuration */
> >  
> >  /* AMD-defined CPU features, CPUID level 0x80000007 (ebx), word 17
> > */
> >  #define X86_FEATURE_OVERFLOW_RECOV (17*32+0) /* MCA overflow
> > recovery support */

Patch
diff mbox

diff --git a/arch/x86/include/asm/cpufeatures.h b/arch/x86/include/asm/cpufeatures.h
index e470dfeb2fd4..a785ef8869f0 100644
--- a/arch/x86/include/asm/cpufeatures.h
+++ b/arch/x86/include/asm/cpufeatures.h
@@ -296,6 +296,7 @@ 
 #define X86_FEATURE_AVX512_VPOPCNTDQ (16*32+14) /* POPCNT for vectors of DW/QW */
 #define X86_FEATURE_LA57	(16*32+16) /* 5-level page tables */
 #define X86_FEATURE_RDPID	(16*32+22) /* RDPID instruction */
+#define X86_FEATURE_SGX_LC	(16*32+30) /* supports SGX launch configuration */
 
 /* AMD-defined CPU features, CPUID level 0x80000007 (ebx), word 17 */
 #define X86_FEATURE_OVERFLOW_RECOV (17*32+0) /* MCA overflow recovery support */