OpenCloudOS-Kernel/tools/testing/selftests/sgx
Jarkko Sakkinen 572a0a647b selftests/sgx: Fix corrupted cpuid macro invocation
The SGX selftest fails to build on tip/x86/sgx:

	main.c: In function ‘get_total_epc_mem’:
	main.c:296:17: error: implicit declaration of function ‘__cpuid’ [-Werror=implicit-function-declaration]
	  296 |                 __cpuid(&eax, &ebx, &ecx, &edx);
	      |                 ^~~~~~~

Include cpuid.h and use __cpuid_count() macro in order to fix the
compilation issue.

[ dhansen: tweak commit message ]

Fixes: f0ff2447b8 ("selftests/sgx: Add a new kselftest: Unclobbered_vdso_oversubscribed")
Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org>
Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
Acked-by: Reinette Chatre <reinette.chatre@intel.com>
Link: https://lkml.kernel.org/r/20211204202355.23005-1-jarkko@kernel.org
Cc: Shuah Khan <shuah@kernel.org>
2021-12-17 08:52:33 -08:00
..
.gitignore
Makefile selftests/sgx: Fix a benign linker warning 2021-11-15 11:33:53 -08:00
call.S selftests/sgx: Rename 'eenter' and 'sgx_call_vdso' 2021-06-15 16:21:23 -06:00
defines.h selftests/sgx: Add test for multiple TCS entry 2021-11-15 11:34:16 -08:00
load.c selftests/sgx: Create a heap for the test enclave 2021-11-15 11:34:03 -08:00
main.c selftests/sgx: Fix corrupted cpuid macro invocation 2021-12-17 08:52:33 -08:00
main.h selftests/sgx: Create a heap for the test enclave 2021-11-15 11:34:03 -08:00
sign_key.S selftests/sgx: Use a statically generated 3072-bit RSA key 2020-11-18 18:26:00 +01:00
sign_key.pem selftests/sgx: Use a statically generated 3072-bit RSA key 2020-11-18 18:26:00 +01:00
sigstruct.c selftests/sgx: Make data measurement for an enclave segment optional 2021-11-15 11:34:01 -08:00
test_encl.c selftests/sgx: Add test for multiple TCS entry 2021-11-15 11:34:16 -08:00
test_encl.lds selftests/sgx: Refine the test enclave to have storage 2021-06-15 16:27:23 -06:00
test_encl_bootstrap.S selftests/sgx: Enable multiple thread support 2021-11-15 11:34:14 -08:00