Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp1047198imm; Wed, 4 Jul 2018 10:28:17 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcMJCP13rdDgoZzoYbwMVDEvLBlOgLFHoy5KfrxzkUJBRoHWbmcHU9CYfMBVMFNkNOV01/8 X-Received: by 2002:a62:8a83:: with SMTP id o3-v6mr3119991pfk.12.1530725297269; Wed, 04 Jul 2018 10:28:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530725297; cv=none; d=google.com; s=arc-20160816; b=ysiseDTqIDMoqOaVZaXeFV6s3b9nZxoisN4ZGOSrqG37PoxB+gLI5afKK6ztcQUaeS U3S0zQxb9qMXutL6R2QC/+AMEU8WvCDCmMGoyD1NqeUknXH9vmMmNWZY13bFtGE9Mcmc O7zGUvrCh+i8EEUYIx/TftQppORYVKDpTsL6H/LeySjVH/0Yt2lZXIg8rNpT/DyFltZ1 k1vOfc5+2qZhqH38Tbyv5Gj2fhpYjS5s6n4QpVqquGNIAIM4vfdzAepfnvhl/xqwG+Eg bUAsYnrZq1zX1D0lWfipDfoxHwCnRSh9tmzxoG8U2i5Gcy7Avf2VyRL9uyloL2nDrwle B9UA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:organization:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=53UT18vqOX7E3fK8YLiJ+LEDMOiuB+B4zJnTNmkfHGY=; b=zKbQeQMdClaqD/gEXTpSAlgNzzhUJw4Rm6PpqMVZmCzOxbivs+mURY6cFwoo6YOpA7 YiHjei5Ihr+fvDfMpnGPDP/mU2ufI2hPdcSNaCNbSfPfP51SrdVC0I609N1N3z7vpwSK rocam8uZsYZRCeFAFOmngvHSUgjDvqktARVrJLZ8UWS8U66AYKPByZ/7sEcJ0eNHbuUI 8oyqlu8nbdx+TXFk9gU3hxX0A4x8bzX5evAPpcBjraNSMahlhrJFm9LDkfKJcBm3eEMC xebdGq9RbOxqwBgYfWbsfRhraUC8Dsdu4H2a2/4DVH4F0cz6otpbF+hlfStg1XhT5Zz9 8/1A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t8-v6si4158439pfi.221.2018.07.04.10.28.02; Wed, 04 Jul 2018 10:28:17 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753120AbeGDR0l (ORCPT + 99 others); Wed, 4 Jul 2018 13:26:41 -0400 Received: from mga12.intel.com ([192.55.52.136]:54235 "EHLO mga12.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752197AbeGDR0j (ORCPT ); Wed, 4 Jul 2018 13:26:39 -0400 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 04 Jul 2018 10:26:38 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,306,1526367600"; d="scan'208";a="72262352" Received: from saamir-mobl.ger.corp.intel.com (HELO localhost) ([10.252.34.242]) by orsmga002.jf.intel.com with ESMTP; 04 Jul 2018 10:26:31 -0700 Date: Wed, 4 Jul 2018 20:26:29 +0300 From: Jarkko Sakkinen To: Thomas Gleixner Cc: x86@kernel.org, platform-driver-x86@vger.kernel.org, dave.hansen@intel.com, sean.j.christopherson@intel.com, nhorman@redhat.com, npmccallum@redhat.com, linux-sgx@vger.kernel.org, Ingo Molnar , "H. Peter Anvin" , Tom Lendacky , Borislav Petkov , Konrad Rzeszutek Wilk , Greg Kroah-Hartman , Janakarajan Natarajan , David Woodhouse , "open list:X86 ARCHITECTURE (32-BIT AND 64-BIT)" Subject: Re: [PATCH v12 03/13] x86/sgx: add SGX definitions to msr-index.h Message-ID: <20180704172629.GF6724@linux.intel.com> References: <20180703182118.15024-1-jarkko.sakkinen@linux.intel.com> <20180703182118.15024-4-jarkko.sakkinen@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jul 03, 2018 at 08:51:23PM +0200, Thomas Gleixner wrote: > On Tue, 3 Jul 2018, Jarkko Sakkinen wrote: > > x86/msr: Add .... > > > From: Sean Christopherson > > > > ENCLS and ENCLU are usable if and only if SGX_ENABLE is set and After > > SGX is activated the IA32_SGXLEPUBKEYHASHn MSRs are writable if > > SGX_LC_WR is set and the feature control is locked. > > > > SGX related bits in IA32_FEATURE_CONTROL cannot be set before SGX is > > activated by the pre-boot firmware. SGX activation is triggered by > > setting bit 0 in the MSR 0x7a. Until SGX is activated, the LE hash MSRs > > are writable to allow pre-boot firmware to lock down the LE root key > > with a non-Intel value. > > > > Signed-off-by: Sean Christopherson > > Co-developed-by: Haim Cohen > > Lacks SOB > > > --- > > arch/x86/include/asm/msr-index.h | 8 ++++++++ > > 1 file changed, 8 insertions(+) > > > > diff --git a/arch/x86/include/asm/msr-index.h b/arch/x86/include/asm/msr-index.h > > index fda2114197b3..a7355fb7344f 100644 > > --- a/arch/x86/include/asm/msr-index.h > > +++ b/arch/x86/include/asm/msr-index.h > > @@ -479,6 +479,8 @@ > > #define FEATURE_CONTROL_LOCKED (1<<0) > > #define FEATURE_CONTROL_VMXON_ENABLED_INSIDE_SMX (1<<1) > > #define FEATURE_CONTROL_VMXON_ENABLED_OUTSIDE_SMX (1<<2) > > +#define FEATURE_CONTROL_SGX_ENABLE (1<<18) > > Tabs not spaces please. checkpatch.pl would have told you > > > +#define FEATURE_CONTROL_SGX_LE_WR (1<<17) > > Thanks, > > tglx Thanks, will refine! /Jarkko