[论文解读] DuVisor: a User-level Hypervisor Through Delegated Virtualization
DuVisor 引入了一种用户级虚拟机监视器,通过一种名为委托虚拟化扩展(DV-Ext)的新硬件扩展,消除了内核运行时对虚拟化的干预。通过将所有虚拟机管理任务——包括虚拟机退出、寄存器配置、二级页表和虚拟设备——委托给用户空间,DuVisor 在性能上相比 KVM 最高提升了 47.96%,同时显著缩小了攻击面。
Today's mainstream virtualization systems comprise of two cooperative components: a kernel-resident driver that accesses virtualization hardware and a user-level helper process that provides VM management and I/O virtualization. However, this virtualization architecture has intrinsic issues in both security (a large attack surface) and performance. While there is a long thread of work trying to minimize the kernel-resident driver by offloading functions to user mode, they face a fundamental tradeoff between security and performance: more offloading may reduce the kernel attack surface, yet increase the runtime ring crossings between the helper process and the driver, and thus more performance cost. This paper explores a new design called delegated virtualization, which completely separates the control plane (the kernel driver) from the data plane (the helper process) and thus eliminates the kernel driver from runtime intervention. The resulting user-level hypervisor, called DuVisor, can handle all VM operations without trapping into the kernel once the kernel driver has done the initialization. DuVisor retrofits existing hardware virtualization support with a new delegated virtualization extension to directly handle VM exits, configure virtualization registers, manage the stage-2 page table and virtual devices in user mode. We have implemented the hardware extension on an open-source RISC-V CPU and built a Rust-based hypervisor atop the hardware. Evaluation on FireSim shows that DuVisor outperforms KVM by up to 47.96\% in a variety of real-world applications and significantly reduces the attack surface.
研究动机与目标
- 为解决传统虚拟机监视器中根本性的安全-性能权衡问题,即减少内核组件会增加环间切换和性能开销。
- 消除内核驱动在虚拟化运行时的参与,减少可信计算基(TCB)和攻击面。
- 通过为现有硬件添加一种新型硬件扩展(DV-Ext),实现在用户空间中对完整虚拟化控制的改造。
- 证明用户级虚拟机监视器可以在不依赖内核模式组件进行虚拟机操作的前提下,实现高性能和强隔离性。
- 通过基于 RISC-V 的原型和 FireSim 评估,验证完全运行在用户空间的虚拟机监视器的可行性和性能优势。
提出的方法
- 设计并实现一种委托虚拟化扩展(DV-Ext),在对现有虚拟化硬件进行最小修改的前提下,启用用户模式对虚拟机退出和虚拟化状态的处理。
- 在开源 RISC-V 处理器上集成 DV-Ext,将硬件虚拟化接口直接暴露给用户空间。
- 开发基于 Rust 的用户级虚拟机监视器(DuVisor),在不陷入内核模式的情况下,管理所有虚拟机操作,包括二级页表管理、虚拟设备 I/O 和寄存器配置。
- 使用用户级中断和物理内存保护(PMP)机制,从用户空间安全地隔离和控制虚拟化资源。
- 通过消除虚拟机退出处理和资源管理中对内核的依赖,最大限度减少系统调用和世界切换。
- 重用现有硬件虚拟化功能(如 RISC-V SBI、二级页表转换),并扩展其功能以支持用户模式委托。
实验结果
研究问题
- RQ1能否构建一个完全基于用户空间的虚拟机监视器,在消除内核运行时参与的同时,保持高性能和强安全性?
- RQ2与传统驻留在内核的驱动相比,将虚拟化功能委托给用户空间对性能有何影响?
- RQ3需要哪些硬件扩展,才能安全高效地将虚拟机退出处理和虚拟化状态管理委托给用户空间?
- RQ4通过从运行时操作中移除内核驱动,虚拟机监视器的攻击面能减少到何种程度?
- RQ5用户级虚拟机监视器的性能是否能够达到甚至超过主流基于内核的虚拟机监视器(如 KVM)?
主要发现
- 在 FireSim 上的多种真实工作负载中,DuVisor 相比 KVM 最高提升了 47.96% 的性能,展现出显著的性能优势。
- 虚拟机监视器的攻击面被大幅缩减,因为内核驱动仅用于初始化和严重错误处理,而不再参与运行时操作。
- DuVisor 成功地在用户空间中完整处理所有虚拟机操作,包括虚拟机退出、寄存器配置、二级页表管理以及虚拟 I/O。
- 通过消除传统虚拟机监视器中因频繁调用内核而产生的昂贵环间切换和世界切换,系统实现了高性能。
- 硬件扩展(DV-Ext)具有最小侵入性,重用了现有虚拟化功能,同时实现了对用户模式的可信控制。
- 在开源 RISC-V 处理器上的原型实现,证实了委托虚拟化方法的可行性和实用性。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。