• 中国计算机学会会刊
  • 中国科技核心期刊
  • 中文核心期刊

J4 ›› 2015, Vol. 37 ›› Issue (05): 901-906.

• 论文 • 上一篇    下一篇

一种改进的GPU虚拟化实施方法

陈志佳,朱元昌,邸彦强,冯少冲   

  1. (军械工程学院电子与光学工程系,河北 石家庄 050003)
  • 收稿日期:2013-09-17 修回日期:2014-01-09 出版日期:2015-05-25 发布日期:2015-05-25
  • 基金资助:

    装备预研基金(9140A04030213JB3401)

An improved realization method for GPU virtualization          

CHEN Zhijia,ZHU Yuanchang,DI Yanqiang,FENG Shaochong   

  1. (Department of Electronic and Optics,Ordnance Engineering College,Shijiazhuang 050003,China)
  • Received:2013-09-17 Revised:2014-01-09 Online:2015-05-25 Published:2015-05-25

摘要:

当前虚拟桌面实施方法中,终端用户对3D图形处理能力越来越高的要求与虚拟机GPU处理能力之间的矛盾逐渐凸显。为解决上述问题,对GPU虚拟化的典型实施方法进行了研究。在对上述虚拟化技术进行分析的基础上,介绍了一种改进的基于设备独占法和API remoting法的虚拟化方案。利用Hypervisor创建两种模式的虚拟机,分别为一台父虚拟机(GVM)和多台子虚拟机(DVM)。GVM完全独占物理GPU,而DVM与物理GPU无直接交互关系。两种模式虚拟机共享GPU内存以及指令通道,DVM中的GPU调用指令传递至GVM,通过GVM对物理GPU进行快速调用,将调用结果返回到共享内存空间,进而呈现给用户。最后对改进的GPU虚拟化方法与典型虚拟化方法进行了对比与分析,总结了其中的优缺点,梳理了将来的研究重点。

关键词: GPU虚拟化;设备独占使用;API remoting;GVM;DVM

Abstract:

In recent desktop cloud scenarios,a serious problem is that the 3D graphic processing performance of user virtual machines can not satisfy users’increasingly high requirements. In this paper,the main realization modes of GPU virtualization are first researched and analyzed.Then based on the above analysis of virtualization methods,a kind of new virtualization scenario comprising of VMM passthrough and API remoting is proposed. We utilize Hypervisor to create two kinds of virtual machines:one root virtual machine,named GVM that monopolizes the GPU resources and several child virtual machines named DVMs that don’t interact with GPU directly.The GVM shares GPU memory and command channels with the DVMs.Thus GPU calls from the child virtual machines can be transported to the GVM.Subsequently the GVM calls physical GPU and transports the results to the DVMs. The typical virtualization methods are tested and the results prove that the method can effectively improve the 3D graphic process performance of user virtual machines.

Key words: GPU virtualization;VMM pass-through;API remoting;GVM;DVM