hvc
Hypervisor Call
HVC #<imm>
Generates a Hypervisor Call exception to EL2.
Pseudocode Operation
exception ← HypervisorCall
ESR_ELx.ISS ← imm16
Branch to EL2 exception handler
Example
HVC #16
Reference
View in Arm A64 ISA Reference ↗
Arm A64 ISA
Instruction Forms
| Encoding | Instruction | ISA | Bit pattern | ||
|---|---|---|---|---|---|
| 0xD4000002 | HVC #<imm> | A64 | 11010100 | 000 | imm16 | 000 | 10 |
Description
Hypervisor Call causes an exception to EL2. Software executing at EL1 can use this instruction to call the hypervisor to request a service. The HVC instruction is UNDEFINED: On executing an HVC instruction, the PE records the exception as a Hypervisor Call exception in ESR_ELx, using the EC value 0x16, and the value of the immediate argument.
Operation
if !HaveEL(EL2) || PSTATE.EL == EL0 || (PSTATE.EL == EL1 && !EL2Enabled()) then
UNDEFINED;
bits(1) hvc_enable = if HaveEL(EL3) then SCR_EL3.HCE else NOT(HCR_EL2.HCD);
if hvc_enable == '0' then
UNDEFINED;
else
AArch64.CallHypervisor(imm16);