arXiv:2609.09833cs.OSSep 2026

Manuscript Offprint

arXiv:2609.09833

Violet: Enabling Full Virtualization for M-mode RTOS on RISC-V

Taro Kito, Ryosuke Yamamoto, Keisuke Horii, Hiroki Masuda, Koichi Mouri

This work has been submitted to the IEEE for possible publication. Copyright may be transferred without notice, after which this version may no longer be accessible.

Violet: Enabling Full Virtualization for M-mode RTOS on RISC-V

Taro Kito¹, Ryosuke Yamamoto², Keisuke Horii², Hiroki Masuda², and Koichi Mouri¹

¹Ritsumeikan University, Ibaraki, Osaka 567-8570, Japan (e-mail: tkito@asl.cs.ritsumei.ac.jp, mouri@asl.cs.ritsumei.ac.jp)

²Information Technology R&D Center, Mitsubishi Electric Corporation, Kamakura, Kanagawa 247-8501, Japan (e-mail: Yamamoto.Ryosuke@ce.MitsubishiElectric.co.jp, Horii.keisuke@bc.MitsubishiElectric.co.jp, Masuda.Hiroki@dc.MitsubishiElectric.co.jp)

Corresponding author: Taro Kito (e-mail: tkito@asl.cs.ritsumei.ac.jp)

Abstract

In embedded systems, complex configurations may be required, such as the simultaneous execution of a real-time operating system (RTOS) and a general-purpose operating system (GPOS), or the operation of multiple RTOS instances. Embedded system hypervisors have been studied and developed to meet these requirements for architectures like ARM and x86. RISC-V is experiencing growing adoption in embedded systems and faces similar needs. However, RISC-V's virtualization support targets only U-mode (where applications run) and S-mode (where general-purpose OSs run) as virtualization levels. The M-mode, where RTOSs like FreeRTOS or Zephyr run, is excluded from virtualization. This means that, similar to architectures like ARM, running an RTOS on a Virtual Machine (VM) using methods based on virtualization support features is impossible. Therefore, this paper proposes the Violet hypervisor. Violet combines RISC-V's virtualization features with software-based emulation, enabling the execution of unmodified M-mode RTOSs. Evaluation verified the validity of the M-mode emulation functionality using RISC-V architecture tests. Furthermore, this was implemented on the SiFive HiFive Premier P550 hardware, demonstrating that existing RTOSs can run on Violet's VM and that coexistence with GPOSs like Linux is also possible. The performance evaluation also quantified the overhead introduced by M-mode emulation on M-mode CSR accesses, timer interrupt latency, and context switching.

Keywords: RISC-V, Hypervisor, Virtualization, Embedded System