image/svg+xmlSETSSBSY—Mark Shadow Stack BusyInstruction Operand EncodingDescriptionThe SETSSBSY instruction verifies the presence of a non-busy supervisor shadow stack token at the address in the IA32_PL0_SSP MSR and marks it busy. Following successful execution of the instruction, the SSP is set to the value of the IA32_PL0_SSP MSR.OperationIF (CR4.CET = 0)THEN #UD; FI;IF (IA32_S_CET.SH_STK_EN = 0)THEN #UD; FI;IF CPL > 0THEN GP(0); FI;SSP_LA = IA32_PL0_SSPIf SSP_LA not aligned to 8 bytesTHEN #GP(0); FI;expected_token_value = SSP_LA (* busy bit must not be set *)new_token_value = SSP_LA | BUSY_BIT(* set busy bit; bit position 0 *)IF shadow_stack_lock_cmpxchg8B(SSP_LA, new_token_value, expected_token_value) != expected_token_valueTHEN #CP(SETSSBSY); FI;SSP = SSP_LAFlags AffectedNone.C/C++ Compiler Intrinsic EquivalentSETSSBSYvoid _setssbsy(void);Protected Mode Exceptions#UDIf the LOCK prefix is used.If CR4.CET = 0.IF IA32_S_CET.SH_STK_EN = 0.#GP(0)If IA32_PL0_SSP not aligned to 8 bytes.If CPL is not 0.#CP(setssbsy)If busy bit in token is set.If in 32-bit or compatibility mode, and the address in token is not below 4G.#PF(fault-code)If a page fault occurs.Opcode/InstructionOp/ En64/32 bit Mode SupportCPUID Feature FlagDescriptionF3 0F 01 E8SETSSBSYZOV/VCET_SSSet busy flag in supervisor shadow stack token reference by IA32_PL0_SSP.Op/EnOperand 1Operand 2Operand 3Operand 4ZONANANANA

image/svg+xmlReal-Address Mode Exceptions#UDThe SETSSBSY instruction is not recognized in real-address mode. Virtual-8086 Mode Exceptions#UDThe SETSSBSY instruction is not recognized in virtual-8086 mode. Compatibility Mode ExceptionsSame as protected mode exceptions.64-Bit Mode ExceptionsSame as protected mode exceptions.

This UNOFFICIAL reference was generated from the official Intel® 64 and IA-32 Architectures Software Developer’s Manual by a dumb script. There is no guarantee that some parts aren't mangled or broken and is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.