Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp718150img; Wed, 20 Mar 2019 09:23:36 -0700 (PDT) X-Google-Smtp-Source: APXvYqwNQ0UFAdIOXAIymg3EpE2PO5D9EY6ZXAl/4/sLEjNsr5EtHi3D7fpHnTkIgOktnxYbCxBK X-Received: by 2002:a63:2c4c:: with SMTP id s73mr8282930pgs.113.1553099016808; Wed, 20 Mar 2019 09:23:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553099016; cv=none; d=google.com; s=arc-20160816; b=fJnfkTUV6CvVjx4UqPm75ZIN4drSrzqL3p9pgcyky5R4Kgy8ls/UqIDKLmW8FKgBfp Q/QG4eF/sSdwaQ6i4x9OmbrpAtEDrkc+GXZx0qJ5zpUhqL3KTEcdjEBI/JvzQHD2mvpS fi35YSrJsPYc44z1UHl70jbvnuzr/TqM3Y1jEIusCTSu6zHNNDU6VioJ8i4CIh9RiSZy XweNfEYhNVCbGYiR0wVGLZmQgIZ8W82BO9eQvkLbV7YvZKgz0gvWmLrsECy5NT1XBa73 G1D7LTZma0mtzvjv7riLN6OwKvj9JOUPMaMVINFR4TwtgrlrgrcqFWDT016y8dBqEbUC 8BHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=PGTWtY9K10vvzd+27Mr5KIY4wirR5CZs+OqM1I1B3ec=; b=y42VxrNhZYFPJEy7fLnTQ/oQqyryeA2P76UdN3NZ53OYQh1e+X0N+1uJ7eiFyTBplN oGjhDIt3r5v0odIxprVMLPUyFOygLYFfiGAXTk1VRb9SCitgT31mBz9iju4lIELhsOAB 6tJMFjascBnYrLwBxK490jvsZ+bBHl5QWNVNfv6XUTizG8LaaDi5s0iB1cvq+OCRVgXx z+GJF6pr4xnaf5emMwsargBj3WgM9Yfx0jiVZAGrzqlRTG+xquv+LZRTQSIkNnHc/EXw 7Zbp6NNGFR1sR8bF4xtMo4K864FHlwt6tqolPlQSIZyrWSYxODY7AlXHwB/tRGwTacdF 3F+w== 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 e18si1954977pfn.164.2019.03.20.09.23.21; Wed, 20 Mar 2019 09:23:36 -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 S1727585AbfCTQWN (ORCPT + 99 others); Wed, 20 Mar 2019 12:22:13 -0400 Received: from mga04.intel.com ([192.55.52.120]:65063 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726782AbfCTQWN (ORCPT ); Wed, 20 Mar 2019 12:22:13 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 20 Mar 2019 09:22:12 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,249,1549958400"; d="scan'208";a="135714684" Received: from sorenthe-mobl1.ger.corp.intel.com (HELO localhost) ([10.249.254.203]) by orsmga003.jf.intel.com with ESMTP; 20 Mar 2019 09:22:02 -0700 From: Jarkko Sakkinen To: linux-kernel@vger.kernel.org, x86@kernel.org, linux-sgx@vger.kernel.org Cc: akpm@linux-foundation.org, dave.hansen@intel.com, sean.j.christopherson@intel.com, nhorman@redhat.com, npmccallum@redhat.com, serge.ayoun@intel.com, shay.katz-zamir@intel.com, haitao.huang@intel.com, andriy.shevchenko@linux.intel.com, tglx@linutronix.de, kai.svahn@intel.com, bp@alien8.de, josh@joshtriplett.org, luto@kernel.org, kai.huang@intel.com, rientjes@google.com, Kai Huang , Jarkko Sakkinen Subject: [PATCH v19,RESEND 04/27] x86/cpufeatures: Add Intel-defined SGX_LC feature bit Date: Wed, 20 Mar 2019 18:20:56 +0200 Message-Id: <20190320162119.4469-5-jarkko.sakkinen@linux.intel.com> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20190320162119.4469-1-jarkko.sakkinen@linux.intel.com> References: <20190320162119.4469-1-jarkko.sakkinen@linux.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Kai Huang X86_FEATURE_SGX_LC reflects whether or not the CPU supports SGX Launch Control, i.e. enumerates the existence of IA32_FEATURE_CONTROL's SGX_LE_WR bit and the IA32_SGXLEPUBKEYHASH MSRs. Signed-off-by: Kai Huang 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 313c58c04b51..c5080842ecad 100644 --- a/arch/x86/include/asm/cpufeatures.h +++ b/arch/x86/include/asm/cpufeatures.h @@ -346,6 +346,7 @@ #define X86_FEATURE_CLDEMOTE (16*32+25) /* CLDEMOTE instruction */ #define X86_FEATURE_MOVDIRI (16*32+27) /* MOVDIRI instruction */ #define X86_FEATURE_MOVDIR64B (16*32+28) /* MOVDIR64B instruction */ +#define X86_FEATURE_SGX_LC (16*32+30) /* Software Guard Extensions Launch Control */ /* AMD-defined CPU features, CPUID level 0x80000007 (EBX), word 17 */ #define X86_FEATURE_OVERFLOW_RECOV (17*32+ 0) /* MCA overflow recovery support */ -- 2.19.1