Abstract
This paper presents the first comprehensive implementation and design space exploration of the RISC-V Hypervisor extension for the open-source CVA6 core. By introducing targeted microarchitectural enhancements—specifically a G-Stage TLB and a unified L2 TLB—the researchers achieved a 12.5% average performance speedup with a negligible 0.78% increase in silicon area. This work provides a critical blueprint for efficient hardware virtualization in the RISC-V ecosystem.
Introduction
Virtualization is a cornerstone of modern computing, providing isolation and resource efficiency in everything from massive data centers to safety-critical embedded systems. While the RISC-V community ratified the Hypervisor extension (v1.0) in late 2021, physical silicon implementing these features remains scarce.
The primary challenge is performance overhead. Virtualization introduces "two-stage" address translation: the Guest OS translates virtual addresses to guest-physical addresses, and the Hypervisor then translates those to host-physical addresses. In a standard RISC-V setup (like Sv39), a single memory access could require up to 15 separate memory lookups to traverse these nested page tables. Without hardware "shortcuts," this creates a massive bottleneck that makes virtualization impractical for real-time or high-performance applications.
Architectural Implementation
The researchers re-engineered the CVA6 microarchitecture to handle virtualization efficiently, focusing on three main pillars:
- ISA Compliance: They implemented the full RISC-V Hypervisor extension, adding new privilege modes (HS, VS, VU) and the necessary Control and Status Registers (CSRs). They also included the Sstc extension, which allows guests to manage timers directly, reducing expensive traps to the hypervisor.
- Microarchitectural Enhancements: The core pipeline was modified to support speculative virtualization states and nested memory management.
- Design Space Exploration (DSE): The team evaluated 23 different hardware configurations on a Genesys 2 FPGA and performed post-layout simulations using a 22nm FDX process technology to find the optimal balance between performance, power, and area (PPA).
Microarchitectural Optimization
The study highlights two critical hardware components that mitigate the overhead of nested translation:
- G-Stage TLB (GTLB): A dedicated cache for the second stage of translation (guest-physical to host-physical). This allows the hardware Page Table Walker (PTW) to skip nested levels during a walk. The researchers found that even a small, 8-entry GTLB provides a massive return on investment.
- Unified L2 TLB: A larger, set-associative second-level cache for translations to reduce the frequency of expensive page table walks. The authors opted for a unified design to maximize hardware reuse.
Experimental Results
To evaluate the designs, the authors used the MiBench (Automotive subset) and San Diego Vision Benchmark suites, running on the open-source Bao hypervisor hosting a Linux Guest VM.
The study identified an optimal configuration: a CVA6 core with Sstc support and an 8-entry GTLB. This configuration achieved a speedup of up to 16% (12.5% on average) compared to a baseline virtualization-aware but non-optimized design. The silicon overhead for this gain was remarkably low: only a 0.78% increase in area and a 0.33% increase in power consumption in 22nm technology. Furthermore, the optimized designs showed up to a 16% improvement in relative energy efficiency, as the performance gains far outweighed the minor increase in power draw.
Conclusion and Future Work
While this work establishes a high-performance baseline for single-core RISC-V virtualization, several avenues for future research remain. In multi-core systems, inter-core interference at the cache and memory levels could introduce new bottlenecks. Additionally, a full system requires a hardware IOMMU (Input-Output Memory Management Unit) to handle DMA-capable devices securely. Future iterations could also explore advanced techniques like TLB coalescing to further reduce memory traffic during page table walks.
The entire project, including the modified CVA6 source code and the DSE framework, has been open-sourced to accelerate the adoption of secure, high-performance RISC-V virtualization.
Summary updated