Commit 329c416d authored by Reinette Chatre's avatar Reinette Chatre Committed by Zhiquan Li
Browse files

x86/sgx: Make sgx_ipi_cb() available internally

mainline inclusion
from mainline-6.0-rc1
commit c7c6a8a6
category: feature
bugzilla: https://gitee.com/openeuler/intel-kernel/issues/I5USAM


CVE: NA

Intel-SIG: commit c7c6a8a6 x86/sgx: Make sgx_ipi_cb() available
internally.
Backport for SGX EDMM support.

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

The ETRACK function followed by an IPI to all CPUs within an enclave
is a common pattern with more frequent use in support of SGX2.

Make the (empty) IPI callback function available internally in
preparation for usage by SGX2.

Signed-off-by: default avatarReinette Chatre <reinette.chatre@intel.com>
Signed-off-by: default avatarDave Hansen <dave.hansen@linux.intel.com>
Reviewed-by: default avatarJarkko Sakkinen <jarkko@kernel.org>
Link: https://lkml.kernel.org/r/1179ed4a9c3c1c2abf49d51bfcf2c30b493181cc.1652137848.git.reinette.chatre@intel.com


Signed-off-by: default avatarZhiquan Li <zhiquan1.li@intel.com>
parent b4bf6840
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -174,7 +174,7 @@ static int __sgx_encl_ewb(struct sgx_epc_page *epc_page, void *va_slot,
	return ret;
	return ret;
}
}


static void sgx_ipi_cb(void *info)
void sgx_ipi_cb(void *info)
{
{
}
}


+2 −0
Original line number Original line Diff line number Diff line
@@ -90,6 +90,8 @@ void sgx_mark_page_reclaimable(struct sgx_epc_page *page);
int sgx_unmark_page_reclaimable(struct sgx_epc_page *page);
int sgx_unmark_page_reclaimable(struct sgx_epc_page *page);
struct sgx_epc_page *sgx_alloc_epc_page(void *owner, bool reclaim);
struct sgx_epc_page *sgx_alloc_epc_page(void *owner, bool reclaim);


void sgx_ipi_cb(void *info);

#ifdef CONFIG_X86_SGX_KVM
#ifdef CONFIG_X86_SGX_KVM
int __init sgx_vepc_init(void);
int __init sgx_vepc_init(void);
#else
#else