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

Encoding

Binary Layout
11010100
31:24
000
23:21
imm16
20:5
000
4:2
10
1:0
 
Format Exception
Opcode 0xD4000002
Extension System

Operands

  • imm
    ID

Related

Other forms of hvc

  • hvc Hypervisor Call (Thumb)
  • hvc Hypervisor Call (A32)

More in System

Reference

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);