提交 42e4ea55 编写于 作者: S Sean Christopherson 提交者: Zhiquan Li

x86/sgx: Move ENCLS leaf definitions to sgx.h

mainline inclusion
from mainline-5.13
commit 9c55c78a
category: feature
bugzilla: https://gitee.com/openeuler/intel-kernel/issues/I5EZEK
CVE: NA

Intel-SIG: commit 9c55c78a x86/sgx: Move ENCLS leaf definitions to sgx.h.
Backport for SGX virtualization support

--------------------------------

Move the ENCLS leaf definitions to sgx.h so that they can be used by
KVM.
Signed-off-by: NSean Christopherson <sean.j.christopherson@intel.com>
Signed-off-by: NKai Huang <kai.huang@intel.com>
Signed-off-by: NBorislav Petkov <bp@suse.de>
Acked-by: NJarkko Sakkinen <jarkko@kernel.org>
Acked-by: NDave Hansen <dave.hansen@intel.com>
Link: https://lkml.kernel.org/r/2e6cd7c5c1ced620cfcd292c3c6c382827fde6b2.1616136308.git.kai.huang@intel.comSigned-off-by: NFan Du <fan.du@intel.com>
Signed-off-by: NZhiquan Li <zhiquan1.li@intel.com>
上级 90ec4287
...@@ -27,6 +27,21 @@ ...@@ -27,6 +27,21 @@
/* The bitmask for the EPC section type. */ /* The bitmask for the EPC section type. */
#define SGX_CPUID_EPC_MASK GENMASK(3, 0) #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 * enum sgx_return_code - The return code type for ENCLS, ENCLU and ENCLV
* %SGX_NOT_TRACKED: Previous ETRACK's shootdown sequence has not * %SGX_NOT_TRACKED: Previous ETRACK's shootdown sequence has not
......
...@@ -11,21 +11,6 @@ ...@@ -11,21 +11,6 @@
#include <asm/traps.h> #include <asm/traps.h>
#include "sgx.h" #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 * ENCLS_FAULT_FLAG - flag signifying an ENCLS return code is a trapnr
* *
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册