Intel® Software Guard Extensions (Intel® SGX)
Use hardware-based isolation and memory encryption to provide more code protection in your solutions.

How expensive is an AEX?

Urs_M_
Beginner
409 Views

Hey guys,

I am wondering how expensive an asynchronous exit is compared to a normal context switch.

If I understand the documentation correctly, the enclave stores the CPU's registers to the sate save area (SSA). Due to some alignment requirements, the SSA should usually be the size of a single page (4096 bytes).

Intel SGX, however, allows larger SSAs (specified by SSAFRAMESIZE). What else is or can be stored in an SSA? If SSAFRAMESIZE can get large, an AEX might be rather expensive. How big is SSAFRAMESIZE usually?

Best, Urs

0 Kudos
1 Solution
Francisco_C_Intel
409 Views

https://github.com/01org/linux-sgx/blob/57cb162f126397facf049f4f0fbd293d56dd2e63/sdk/sign_tool/SignT...

has

#define SSA_NUM 2
#define SSA_FRAME_SIZE 1

And

https://github.com/01org/linux-sgx/blob/57cb162f126397facf049f4f0fbd293d56dd2e63/common/inc/internal...

has the following defined:

#define SSA_NUM_MIN 2
#define SSA_FRAME_SIZE_MIN 1
#define SSA_FRAME_SIZE_MAX 2

It appears the software is using 1 page for each SSA, two SSAs per TCS.

View solution in original post

2 Replies
Francisco_C_Intel
410 Views

https://github.com/01org/linux-sgx/blob/57cb162f126397facf049f4f0fbd293d56dd2e63/sdk/sign_tool/SignT...

has

#define SSA_NUM 2
#define SSA_FRAME_SIZE 1

And

https://github.com/01org/linux-sgx/blob/57cb162f126397facf049f4f0fbd293d56dd2e63/common/inc/internal...

has the following defined:

#define SSA_NUM_MIN 2
#define SSA_FRAME_SIZE_MIN 1
#define SSA_FRAME_SIZE_MAX 2

It appears the software is using 1 page for each SSA, two SSAs per TCS.

Urs_M_
Beginner
409 Views

Awesome, thank you very much!

Reply