background image

41-74 Vol. 3D

SGX INSTRUCTION REFERENCES

— All performance monitoring activity on the current thread is suppressed except for incrementing and firing 

of FIXED_CTR1 and FIXED_CTR2.

— PEBS is suppressed.
— AnyThread counting on other threads is demoted to MyThread mode and IA32_PERF_GLOBAL_STATUS[60] 

on that thread is set

— If the opt-out entry on a hardware thread results in suppression of any performance monitoring, then the 

processor sets IA32_PERF_GLOBAL_STATUS[60] and IA32_PERF_GLOBAL_STATUS[63].

Concurrency Restrictions

Operation

Temp Variables in EENTER Operational Flow

TMP_MODE64  ((IA32_EFER.LMA = 1) && (CS.L = 1));

(* Make sure DS is usable, expand up *)
IF (TMP_MODE64 = 0 and (DS not usable or ( ( DS[S] = 1) and (DS[bit 11] = 0) and DS[bit 10] = 1) ) ) )

THEN #GP(0); FI;

(* Check that CS, SS, DS, ES.base is 0 *)
IF (TMP_MODE64 = 0)

THEN 

IF(CS.base ≠ 0 or DS.base ≠ 0) #GP(0); FI;

Table 41-52.  Concurrency Restrictions of EENTER with Intel® SGX Instructions - 1of 2

Operation

EEXIT

EADD

EBLOCK

ECRE

ATE

EDBGRD/

WR

EENTER/

ERESUME

EEXTEND

EGETKEY

EINIT

ELDB/ELDU

EPA

Param Targ VA

SECS Targ SECS Targ SECS SECS

Targ SECS TCS SSA SECS Targ SECS Param SECS SECS Targ VA

SECS VA

EENTE

R

TCS

N

N

N

Y

N

N

N

SSA

U

Y

Y

U

U

SECS

Y

Y

N

Y

Y

Y

Y

Y

Y

Y

Y

Y

N

Y

Y

N

Y

Y

Y

Y

Table 41-53.  Concurrency Restrictions of EENTER with Intel® SGX Instructions - 2 of 2

Operation

EREMOVE

EREPORT

ETRA

CK

EWB

EAUG

EMODPE

EMODPR

EMODT

EACCEPT

EACCEPTCOPY

Param Targ SECS Param SECS SECS

SRC VA

SECS Targ SECS Targ SECI

NFO

Targ SECS Targ SECS Targ SECI

NFO

SECS Targ SRC SECI

NFO

EENTE

R

TCS

N

N

N

N

SSA

U

Y

U

Y

U

U

U

SECS

Y

Y

Y

Y

Y

Y

Y

Y

Y

Y

Y

Y

Y

Y

Y

Y

Y

Y

Y

Y

Y

Name

Type

Size (Bits)

Description

TMP_FSBASE

Effective Address

32/64

Proposed base address for FS segment.

TMP_GSBASE

Effective Address

32/64

Proposed base address for FS segment.

TMP_FSLIMIT

Effective Address

32/64

Highest legal address in proposed FS segment.

TMP_GSLIMIT

Effective Address

32/64

Highest legal address in proposed GS segment.

TMP_XSIZE

integer

64

Size of XSAVE area based on SECS.ATTRIBUTES.XFRM.

TMP_SSA_PAGE

Effective Address

32/64

Pointer used to iterate over the SSA pages in the current frame.

TMP_GPR

Effective Address

32/64

Address of the GPR area within the current SSA frame.