sc
System Call
Provides the means by which a program can call upon the system to perform a service.
Details
Triggers a system call, transferring control to the operating system (LEV=0) or hypervisor (LEV=1). The instruction is privileged; attempting to execute it in user mode or with an invalid LEV value may cause an exception. The LEV field indicates the target privilege level for the service request.
Pseudocode Operation
if LEV = 0 then
SyscallOS()
else if LEV = 1 then
SyscallHypervisor()
else
raise exception
Programming Note
Executing this instruction with LEV=1 or LEV=2 is the only way that executing an instruction can cause a transition from non-hypervisor state to hypervisor state on the thread that executed the instruction. Executing this instruction with LEV=2 when SMFCTRLE=1 is the only way that executing an instruction can cause a transition from non-ultravisor state to ultravisor state on the thread that executed the instruction. In correct use, this instruction is used to 'call up' one privilege level (application program calls operating system, operating system calls hypervisor, hypervisor calls ultravisor). However, it is possible for a program to call up more than one level (e.g., for an application program to call the hypervisor). An attempt to call up more than one level should be considered a programming error.
Extended Mnemonics
| Extended Mnemonic | Equivalent Instruction |
|---|---|
Example
Encoding
Operands
-
LEV
Level (0=OS, 1=Hypervisor)