Intel® Software Guard Extensions (Intel® SGX)
Discussion board focused on hardware-based isolation and memory encryption to provide extended code protection in solutions.

How expensive is an AEX?

Urs_M_
Beginner
890 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
890 Views

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

has

#define SSA_NUM 2
#define SSA_FRAME_SIZE 1

And

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

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

0 Kudos
2 Replies
Francisco_C_Intel
891 Views

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

has

#define SSA_NUM 2
#define SSA_FRAME_SIZE 1

And

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

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.

0 Kudos
Urs_M_
Beginner
890 Views

Awesome, thank you very much!

0 Kudos
Reply