Received: by 2002:a4a:301c:0:0:0:0:0 with SMTP id q28-v6csp902142oof; Tue, 25 Sep 2018 06:13:08 -0700 (PDT) X-Google-Smtp-Source: ACcGV61TDAUkOkf1MIJlNGmTYs82HajI6WuXeW/ONjeZwFa2aW6cjKxv6yvj7InT31a8xxspw6cp X-Received: by 2002:a63:e505:: with SMTP id r5-v6mr1094848pgh.170.1537881188632; Tue, 25 Sep 2018 06:13:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537881188; cv=none; d=google.com; s=arc-20160816; b=zVitHTwGc7RpmAsk7UYbCdX7L2uOjxUKoj2fesj0s3qnjpxnYm64QRkk4fOtPvb43w Dbq8+DMMhLcEFbJCVox+Wst1QeCok6NgRZMTb96q/KE3kXxJ6wJdCu4cw0XniR6/HshX M4qwGBWx41RaGL6SaPO1jjilOPt8DJ7ac9wb0YAn0thPpQyVxgvM51+fMDsVTIapI9r4 aKKgTxqtY+F2vw1FnQjP/heFeEmd+TdkteW/WO6lYxpJjOpqBaLQrEm1U3pbO2SlROBf rva/CwYnuMM4h64n7w0fqexe1FkF4MqoqFW2YO4rKDsLCdfAKW3UdRqtr5lD2/TC75Li VafA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=jY0gZuf5zxsHtt/5hracHtmPF5kBgIoqmmJVorygr0s=; b=iP+XiDAnxATwId5KVnSYJy/+HmPT/hhLzlEBC488tQu5+ga9QHWMW6eQvSuDa419q9 nPU4i/8dLiYMei79z1qx+4hnuQFZHTMf1sX0Ff3i5EnmJsMrzLgF3xk5yWbEx5L5aMJR bEbVCZO0xHNNJBRMuSuVK92oiBX1GZAXt7Bq7W4Q8L/hSk1hgka4gPkI2FzpmxQHo1mz cDb3D8251zOwEVm2J79kMq6s8C85UdWx2ddRIyHq2wfQwvLtoKR/pCij/Olzz/8E2P5q Z277eSMcY0Y1WMb3QtkSRs+1ytpUUzoG3nwH+RRF2p4/Wetkunlpk9CA5+41iyCfnwWf SGpw== 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 g9-v6si2338753plo.23.2018.09.25.06.12.52; Tue, 25 Sep 2018 06:13:08 -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 S1729165AbeIYTTs (ORCPT + 99 others); Tue, 25 Sep 2018 15:19:48 -0400 Received: from mga14.intel.com ([192.55.52.115]:53064 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729091AbeIYTTr (ORCPT ); Tue, 25 Sep 2018 15:19:47 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 25 Sep 2018 06:12:16 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,302,1534834800"; d="scan'208";a="93546694" Received: from thomasvo-mobl2.ger.corp.intel.com (HELO localhost) ([10.252.53.212]) by orsmga001.jf.intel.com with ESMTP; 25 Sep 2018 06:09:43 -0700 From: Jarkko Sakkinen To: x86@kernel.org, platform-driver-x86@vger.kernel.org Cc: dave.hansen@intel.com, sean.j.christopherson@intel.com, nhorman@redhat.com, npmccallum@redhat.com, serge.ayoun@intel.com, shay.katz-zamir@intel.com, linux-sgx@vger.kernel.org, andriy.shevchenko@linux.intel.com, Kai Huang , Jarkko Sakkinen , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , Konrad Rzeszutek Wilk , David Woodhouse , linux-kernel@vger.kernel.org (open list:X86 ARCHITECTURE (32-BIT AND 64-BIT)) Subject: [PATCH v14 03/19] x86/cpufeature: Add SGX and SGX_LC CPU features Date: Tue, 25 Sep 2018 16:06:40 +0300 Message-Id: <20180925130845.9962-4-jarkko.sakkinen@linux.intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180925130845.9962-1-jarkko.sakkinen@linux.intel.com> References: <20180925130845.9962-1-jarkko.sakkinen@linux.intel.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Kai Huang Add X86_FEATURE_SGX and X86_FEATURE_SGX_LC that define the bits determining whether the CPU supports SGX and user launch configuration i.e. using a custom root key rather the Intel proprietary key for enclave signing. Signed-off-by: Kai Huang Signed-off-by: Jarkko Sakkinen --- arch/x86/include/asm/cpufeatures.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/x86/include/asm/cpufeatures.h b/arch/x86/include/asm/cpufeatures.h index 89a048c2faec..7bb647f57d42 100644 --- a/arch/x86/include/asm/cpufeatures.h +++ b/arch/x86/include/asm/cpufeatures.h @@ -236,6 +236,7 @@ /* Intel-defined CPU features, CPUID level 0x00000007:0 (EBX), word 9 */ #define X86_FEATURE_FSGSBASE ( 9*32+ 0) /* RDFSBASE, WRFSBASE, RDGSBASE, WRGSBASE instructions*/ #define X86_FEATURE_TSC_ADJUST ( 9*32+ 1) /* TSC adjustment MSR 0x3B */ +#define X86_FEATURE_SGX ( 9*32+ 2) /* Software Guard Extensions */ #define X86_FEATURE_BMI1 ( 9*32+ 3) /* 1st group bit manipulation extensions */ #define X86_FEATURE_HLE ( 9*32+ 4) /* Hardware Lock Elision */ #define X86_FEATURE_AVX2 ( 9*32+ 5) /* AVX2 instructions */ @@ -331,6 +332,7 @@ #define X86_FEATURE_LA57 (16*32+16) /* 5-level page tables */ #define X86_FEATURE_RDPID (16*32+22) /* RDPID instruction */ #define X86_FEATURE_CLDEMOTE (16*32+25) /* CLDEMOTE 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 */ -- 2.17.1