]> git.baikalelectronics.ru Git - kernel.git/commit
x86/sgx: Add wrapper for SGX2 EAUG function
authorReinette Chatre <reinette.chatre@intel.com>
Tue, 10 May 2022 18:08:40 +0000 (11:08 -0700)
committerDave Hansen <dave.hansen@linux.intel.com>
Thu, 7 Jul 2022 17:13:01 +0000 (10:13 -0700)
commitd041f329ddb80018fbd23081e1d195ca8dc041f4
treea46a4e77f30b757d4787f72963a1eccceaa20406
parent737e14099a1b15f0ae20e9a765bca42acb5ab434
x86/sgx: Add wrapper for SGX2 EAUG function

Add a wrapper for the EAUG ENCLS leaf function used to
add a page to an initialized enclave.

EAUG:
1) Stores all properties of the new enclave page in the SGX
   hardware's Enclave Page Cache Map (EPCM).
2) Sets the PENDING bit in the EPCM entry of the enclave page.
   This bit is cleared by the enclave by invoking ENCLU leaf
   function EACCEPT or EACCEPTCOPY.

Access from within the enclave to the new enclave page is not
possible until the PENDING bit is cleared.

Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org>
Link: https://lkml.kernel.org/r/97a46754fe4764e908651df63694fb760f783d6e.1652137848.git.reinette.chatre@intel.com
arch/x86/kernel/cpu/sgx/encls.h