From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-20.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 66AF9C433B4 for ; Wed, 7 Apr 2021 10:04:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 45829613A3 for ; Wed, 7 Apr 2021 10:04:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1350644AbhDGKE2 (ORCPT ); Wed, 7 Apr 2021 06:04:28 -0400 Received: from Galois.linutronix.de ([193.142.43.55]:35424 "EHLO galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1350514AbhDGKDm (ORCPT ); Wed, 7 Apr 2021 06:03:42 -0400 Date: Wed, 07 Apr 2021 10:03:31 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1617789812; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=IvPex6z3wgxYXIiiRD83DhHV7vLEXGd1sWTD5quMXws=; b=LGzUU09EP/cJkHtMdBX2wl6NKmjruBlzFGhlh3Udm6PpUtFwabBE2mlw4LKqYatPv4Weck LAkk3cqB137W4iFWZ4/3nQY39H3ehOt29njCDg+7ktgFrvXBBLhZNPrn6KXYC3S9WQS7VY 3EWKzrWu0ybKSCntXeOfHrbHZf+o+YfWkrjuwTvdYTZmbHf1jizr/24mESA8k8I721dDhi zwtvMO2sFoXhhHYXppt/GoY3shmQNASQ7Dz6x38R+90pIU/FlWoiIjC+7540eD7iul4SPI /SFxx+4AlymOT3pb6xd+Wi+QOg5ERgsYmpAL28kf7AzX3BuKYzpc0anBszl9EQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1617789812; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=IvPex6z3wgxYXIiiRD83DhHV7vLEXGd1sWTD5quMXws=; b=Ejhi9O5UjoX10aqj1VJkE+fUxF798yzCuXkivwJj6zOjguTjIRB+SdiCmCYMuhWMFeVcrL Kwv4kByBDaolqCAA== From: "tip-bot2 for Sean Christopherson" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: x86/sgx] x86/sgx: Move ENCLS leaf definitions to sgx.h Cc: Sean Christopherson , Kai Huang , Borislav Petkov , Jarkko Sakkinen , Dave Hansen , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <2e6cd7c5c1ced620cfcd292c3c6c382827fde6b2.1616136308.git.kai.huang@intel.com> References: <2e6cd7c5c1ced620cfcd292c3c6c382827fde6b2.1616136308.git.kai.huang@intel.com> MIME-Version: 1.0 Message-ID: <161778981177.29796.3134584985123205107.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The following commit has been merged into the x86/sgx branch of tip: Commit-ID: 9c55c78a73ce6e62a1d46ba6e4f242c23c29b812 Gitweb: https://git.kernel.org/tip/9c55c78a73ce6e62a1d46ba6e4f242c23c29b812 Author: Sean Christopherson AuthorDate: Fri, 19 Mar 2021 20:23:04 +13:00 Committer: Borislav Petkov CommitterDate: Tue, 06 Apr 2021 09:43:41 +02:00 x86/sgx: Move ENCLS leaf definitions to sgx.h Move the ENCLS leaf definitions to sgx.h so that they can be used by KVM. Signed-off-by: Sean Christopherson Signed-off-by: Kai Huang Signed-off-by: Borislav Petkov Acked-by: Jarkko Sakkinen Acked-by: Dave Hansen Link: https://lkml.kernel.org/r/2e6cd7c5c1ced620cfcd292c3c6c382827fde6b2.1616136308.git.kai.huang@intel.com --- arch/x86/include/asm/sgx.h | 15 +++++++++++++++ arch/x86/kernel/cpu/sgx/encls.h | 15 --------------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/arch/x86/include/asm/sgx.h b/arch/x86/include/asm/sgx.h index 14bb5f7..34f4423 100644 --- a/arch/x86/include/asm/sgx.h +++ b/arch/x86/include/asm/sgx.h @@ -27,6 +27,21 @@ /* The bitmask for the EPC section type. */ #define SGX_CPUID_EPC_MASK GENMASK(3, 0) +enum sgx_encls_function { + ECREATE = 0x00, + EADD = 0x01, + EINIT = 0x02, + EREMOVE = 0x03, + EDGBRD = 0x04, + EDGBWR = 0x05, + EEXTEND = 0x06, + ELDU = 0x08, + EBLOCK = 0x09, + EPA = 0x0A, + EWB = 0x0B, + ETRACK = 0x0C, +}; + /** * enum sgx_return_code - The return code type for ENCLS, ENCLU and ENCLV * %SGX_NOT_TRACKED: Previous ETRACK's shootdown sequence has not diff --git a/arch/x86/kernel/cpu/sgx/encls.h b/arch/x86/kernel/cpu/sgx/encls.h index 443188f..be5c496 100644 --- a/arch/x86/kernel/cpu/sgx/encls.h +++ b/arch/x86/kernel/cpu/sgx/encls.h @@ -11,21 +11,6 @@ #include #include "sgx.h" -enum sgx_encls_function { - ECREATE = 0x00, - EADD = 0x01, - EINIT = 0x02, - EREMOVE = 0x03, - EDGBRD = 0x04, - EDGBWR = 0x05, - EEXTEND = 0x06, - ELDU = 0x08, - EBLOCK = 0x09, - EPA = 0x0A, - EWB = 0x0B, - ETRACK = 0x0C, -}; - /** * ENCLS_FAULT_FLAG - flag signifying an ENCLS return code is a trapnr *