Skip to content

Hypercall Reference ​

RVM employs paravirtualization to minimize time and memory overhead. It provides hypercalls for the sensitive privileged operations a guest needs: console output, virtual interrupt control, vector mapping, event channels, sleep and watchdog management.

HypercallNumberDescription
RVM_HYP_SPURIOUS0Spurious hypercall, ignored (the timer interrupt arrived before the request)
RVM_HYP_PUTCHAR1Print one character to the console
RVM_HYP_REBOOT2Reboot the current virtual machine
RVM_HYP_INT_ENA3Enable virtual machine interrupts
RVM_HYP_INT_DIS4Disable virtual machine interrupts
RVM_HYP_VCT_PHYS5Map a virtual vector of the virtual machine to a physical vector
RVM_HYP_VCT_EVT6Map a virtual vector of the virtual machine to an event channel
RVM_HYP_VCT_DEL7Delete a virtual vector mapping
RVM_HYP_VCT_LCK8Lockdown the virtual vector mappings of the virtual machine
RVM_HYP_VCT_WAIT9Sleep the virtual machine until a vector comes in
RVM_HYP_EVT_ADD10Add the send capability of an event source to the virtual machine
RVM_HYP_EVT_DEL11Delete the send capability of an event source from the virtual machine
RVM_HYP_EVT_SND12Send an event to an event channel
RVM_HYP_WDG_CLR13Start and feed the watchdog

Notes ​

  • Virtual vs. physical masking. CPSID/BASEPRI only mask physical interrupts and have no effect on virtual delivery. Guests must use RVM_HYP_INT_ENA/RVM_HYP_INT_DIS (or their C wrappers RVM_Virt_Int_Unmask()/RVM_Virt_Int_Mask()) to control virtual interrupt delivery.
  • Idle parking. The user manual (§4.4.3) requires a guest's idle thread to call RVM_HYP_VCT_WAIT (hypercall 9) repeatedly: it suspends the user thread and removes it from the run queue until the next virtual interrupt, stopping an idle guest from spinning the core. The hook is transparent — it resumes at the call site, changes no kernel state, and never blocks in the RTOS sense. Each guest wires it through its own official idle hook (vApplicationIdleHook, OS_AppIdleTaskHookPtr, rt_thread_idle_sethook, djy_set_idle_hook, klt_set_idle_hook).
  • Event channels. Hypercalls 5/6/10/11/12 build the inter-VM communication mechanism: virtual vectors map to event channels, and send capabilities are granted per virtual machine — see the user manual for the communication design.

An official work of EDI, released into the public domain.