透過您的圖書館登入
IP:3.21.34.0
  • 學位論文

KVM-ARM之處理器虛擬化設計與最佳化

Processor virtualization and optimization for KVM-ARM

指導教授 : 鍾葉青

摘要


隨著科技的進步,虛擬化技術已經有機會應用在嵌入式裝置上,可以提供嵌入式裝置更安全的執行環境,並且可以同時運行多種不同的作業系統於一台裝置上,為使用者提供更多應用,因此嵌入式虛擬化將是未來嵌入式系統的一大趨勢。KVM是一個開放原始碼的系統虛擬化軟體,已經支援x86,PowerPC等架構,但尚未支持ARM 處理器,因此本研究將以KVM為基礎,提出一套適合ARM V6架構的虛擬化方法,並專注介紹處理器虛擬化部分。KVM-ARM透過para-virtualization的技術,輕量修改Guest系統程式碼,使KVM-ARM可以完全監控與模擬Guest系統上所有的特權指令的運行,同時KVM-ARM將會先攔截來自硬體平台上所發生的例外事件,進行判斷之後,而進行相對應的例外處理。除此之外,本篇文章也提供一個優化,來減少眾多的指令模擬次,透過暫存器檔案的原理,事先把Guest系統程式碼中的特權指令轉換成非特權指令,使得在執行時不會發生trap,而切換到KVM來進行模擬。最後,本論文利用Mibench、LMbench測試程式,來評估Guest作業系統運行在KVM-ARM之上時的效能差異,並得出優化過的KVM-ARM版本,在一般應用程式上效能大致都可提升10%~30%,而在核心系統服務上則可大致得到10%的效能改善。

並列摘要


With the advance of technology, virtualization has a chance to be applied in embedded devices. It can make embedded device to run in more secure environment, and let multiple operating systems simultaneously run in one machine for more application. Therefore, embedded virtualization will be developed in the future. KVM (kernel virtual machine) is one of open-source system virtualization tools. It has supported x86, PowerPC and so on, but not supported arm architecture yet. Consequently, this paper introduces a new system virtualization based on KVM for ARM V6 architecture, and emphasizes the content about processor virtualization. KVM-ARM lightly modified guest kernel’s source code by para-virtualization to fully monitor and emulate all the privileged instruction in guest, moreover, held up every exception , dispatching these exceptions into KVM exception handler or host’s exception handler after analysis. In addition, this paper designed an optimization to reduce a large number of instruction emulations. It transformed guest’s privileged instructions into non-privileged instructions in view of register files in advance. Therefore, guest system will not be trapped when running in virtual environment. Finally, this paper used Mibench and Lmbech to evaluate guest’s performance when guest runs in virtual machine KVM-ARM emulated. In terms of experiments, KVM-ARM-Opt’s performance improvement is about 10%-30% in user space, and about 10% in Kernel basic operations.

參考文獻


[1] M. Rosenblom and T. Garfinkel,“Virtual machine monitors: current technology and future trends,” IEEE Computer, vol. 38, no. 5, pp. 39–47, May 2005.
[2] G. J. Popek and R. P. Goldberg, “Formal requirements for virtualizable third generation architectures,” Communications of the ACM, vol. 17, no. 7, pp. 412–421, 1974.
[3] C. Waldspurger,“Memory resource management in vmware esx server,” 2002. [Online]. Available: citeseer.ist.psu.edu/waldspurger02memory.html
[4] P. Barham, B. Dragovic, “Xen and the art of virtualization,” in Proceedings of the ACM Symposium on Operating Systems Principles (SOSP), October 2003
[6] Joo-Young Hwang, Sang-Bum Suh,” Xen on ARM: System Virtualization using Xen Hypervisor for ARM-based Secure Mobile Phones” in 5th IEEE Consumer Communications and Networking Conference, 2008. CCNC 2008, 2008

延伸閱讀