From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753516AbdK1RU2 (ORCPT ); Tue, 28 Nov 2017 12:20:28 -0500 Received: from mga14.intel.com ([192.55.52.115]:4389 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752471AbdK1RU0 (ORCPT ); Tue, 28 Nov 2017 12:20:26 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.44,468,1505804400"; d="scan'208";a="181598062" Message-ID: <1511889371.9392.58.camel@intel.com> Subject: Re: [PATCH v6 04/11] x86: define IA32_FEATUE_CONTROL.SGX_LC From: Sean Christopherson To: Jarkko Sakkinen , platform-driver-x86@vger.kernel.org, x86@kernel.org Cc: linux-kernel@vger.kernel.org, Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , Borislav Petkov , Janakarajan Natarajan , Paolo Bonzini , "Kirill A. Shutemov" , Kyle Huey , Vikas Shivappa , Piotr Luc , Grzegorz Andrejczuk Date: Tue, 28 Nov 2017 09:16:11 -0800 In-Reply-To: <20171125193132.24321-5-jarkko.sakkinen@linux.intel.com> References: <20171125193132.24321-1-jarkko.sakkinen@linux.intel.com> <20171125193132.24321-5-jarkko.sakkinen@linux.intel.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.18.5.2-0ubuntu3.2 Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 SHA256 of the root key. IA32_FEATURE_CONTROL bit 17 controls > whether the MSRs are writable by the OS. The pre-boot firmware can > decided whether to  set this bit before setting > IA32_FEATURE_CONTROL.LOCK. The commit message (feature control bit) doesn't match the patch (CPUID bit). > > Signed-off-by: Jarkko Sakkinen > --- >  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 31a7d1c0f204..43130f3c18a1 100644 > --- a/arch/x86/include/asm/cpufeatures.h > +++ b/arch/x86/include/asm/cpufeatures.h > @@ -298,6 +298,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 */