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.
| Hypercall | Number | Description |
|---|---|---|
| RVM_HYP_SPURIOUS | 0 | Spurious hypercall, ignored (the timer interrupt arrived before the request) |
| RVM_HYP_PUTCHAR | 1 | Print one character to the console |
| RVM_HYP_REBOOT | 2 | Reboot the current virtual machine |
| RVM_HYP_INT_ENA | 3 | Enable virtual machine interrupts |
| RVM_HYP_INT_DIS | 4 | Disable virtual machine interrupts |
| RVM_HYP_VCT_PHYS | 5 | Map a virtual vector of the virtual machine to a physical vector |
| RVM_HYP_VCT_EVT | 6 | Map a virtual vector of the virtual machine to an event channel |
| RVM_HYP_VCT_DEL | 7 | Delete a virtual vector mapping |
| RVM_HYP_VCT_LCK | 8 | Lockdown the virtual vector mappings of the virtual machine |
| RVM_HYP_VCT_WAIT | 9 | Sleep the virtual machine until a vector comes in |
| RVM_HYP_EVT_ADD | 10 | Add the send capability of an event source to the virtual machine |
| RVM_HYP_EVT_DEL | 11 | Delete the send capability of an event source from the virtual machine |
| RVM_HYP_EVT_SND | 12 | Send an event to an event channel |
| RVM_HYP_WDG_CLR | 13 | Start and feed the watchdog |
Notes
- Virtual vs. physical masking.
CPSID/BASEPRIonly mask physical interrupts and have no effect on virtual delivery. Guests must useRVM_HYP_INT_ENA/RVM_HYP_INT_DIS(or their C wrappersRVM_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.
