This project is applicable on Intel x86 CPU architectures. It has been tested on Ubuntu 20.04 LTS.
The tested world switches include:
syscall
: ring 3 to ring 0hypercall
: VMX non-root to VMX rootSGX ecall
: ring3 to ring3 SGX modesmcall
: ring 0 to ring -2 (system management mode, SMM)
To enable particular test features, please read and modify the corresponding parameters in Include/user_define.h
:
- To enable x86-64
vmcall
(orhypercall
), you need to run this project in VMX non-root mode (using a guest VM); - To enable x86-64
smcall
(trap the CPU to SMM mode), please grant sudo priviledge; - To enable Intel SGX
ecall
andocall
, please make sure you have SGX driver and SDK/PSW installed.
To virtualize SGX-capable environments, use the following command:
qemu-sgx/x86_64-softmmu/qemu-system-x86_64 -m 1G -sgx epc=64MB -enable-kvm -cpu host -smp 2,sockets=1,cores=2 -machine kernel_irqchip=split
To test co-operation speedup for sgx threads as in HotCalls, you need at least 2 logical processors available.
- Context Switch Overhead:
syscall
,hypercall
,smcall
, andecall
/ocall
; malloc
andmemset
overhead in pure glibc, pure SGX SDK, and from outside to inside (EPC);- Synchronous in-enclave syscall and Asynchronous in-enclave syscall.