sc
System Call
Provides the means by which a program can call upon the system to perform a service.
Details
The System Call instruction is used to invoke the hypervisor or ultravisor based on the LEV field. If LEV=1, the hypervisor is invoked. If LEV=2 and SMFCTRLE = 1, the ultravisor is invoked. If LEV=2 and SMFCTRLE = 0, the hypervisor is invoked but this should be considered a programming error.
Pseudocode Operation
if LEV=1 then
invoke hypervisor
else if LEV=2 and SMFCTRLE = 1 then
invoke ultravisor
else if LEV=2 and SMFCTRLE = 0 then
invoke hypervisor (considered a programming error)
SRR0 ← iea CIA + 4
SRR133:36 42:47 ← 0
SRR10:32 37:41 48:63 ← MSR0:32 37:41 48:63
MSR ← new_value (see below)
NIA ← 0x0000_0000_0000_0C00
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)