Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Urs_M_
Beginner
167 Views

How expensive is an AEX?

Jump to solution

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
167 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
168 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

Urs_M_
Beginner
167 Views

Awesome, thank you very much!

Reply