基於 ARM SoC 平台之虛擬機裝置模型實作技術研究
A Study on the Implementation of Virtual Machine Device Models for ARM SoC Platforms
摘要
這個年代高端的嵌入式系統,如手機跟車用電子平台,處理器的效能已經開始接近
PC 平台了。同時,這些系統上的軟體複雜度也同時開始提高,會帶來更多軟體漏洞的可能性。因應這樣的趨勢,系統可以開始嘗試使用硬體虛擬化這類成本跟安全係數都較高的保護技術,降低軟體漏洞與惡意軟體帶來的傷害。而 IO 虛擬化又幾乎是整個硬體虛擬化環節內最複雜的部份,所以本研究打算挑選 IO 虛擬化進行研究。
本研究一開始先介紹 IO 虛擬化的分類,並以 QEMU Network IO 作為範例探討該分類,也同時討論範例之中遇到的 QEMU 平台的實作問題。接著深入討論 IO 虛擬化更基礎的議題,比如說 QEMU 平台上如何實作 IO PV 的優化以及 Device Passthrough 的技術跟實作。最後,研究 Device Passthrough 於 ARM SoC 平台的限制跟可行性。
在成果上,本研究在 ARM SoC 上實測了其中兩套 QEMU Network 實作的效能,也介紹了六套 QEMU Network IO 的選項,並用三個不同的維度將這些選項分類。並介紹SoC 環境中使用 Device Passthrough 經常會遇到的兩個硬體限制,以及 VFIO 框架對該限制是否有解法,並討論解法的驅動程式相容性,以及 SoC 使用 VFIO 框架很可能還需要處理的兩個可移植性問題。最後,重新檢視了 IO PV 在 QEMU 環境的實作優化。
PC 平台了。同時,這些系統上的軟體複雜度也同時開始提高,會帶來更多軟體漏洞的可能性。因應這樣的趨勢,系統可以開始嘗試使用硬體虛擬化這類成本跟安全係數都較高的保護技術,降低軟體漏洞與惡意軟體帶來的傷害。而 IO 虛擬化又幾乎是整個硬體虛擬化環節內最複雜的部份,所以本研究打算挑選 IO 虛擬化進行研究。
本研究一開始先介紹 IO 虛擬化的分類,並以 QEMU Network IO 作為範例探討該分類,也同時討論範例之中遇到的 QEMU 平台的實作問題。接著深入討論 IO 虛擬化更基礎的議題,比如說 QEMU 平台上如何實作 IO PV 的優化以及 Device Passthrough 的技術跟實作。最後,研究 Device Passthrough 於 ARM SoC 平台的限制跟可行性。
在成果上,本研究在 ARM SoC 上實測了其中兩套 QEMU Network 實作的效能,也介紹了六套 QEMU Network IO 的選項,並用三個不同的維度將這些選項分類。並介紹SoC 環境中使用 Device Passthrough 經常會遇到的兩個硬體限制,以及 VFIO 框架對該限制是否有解法,並討論解法的驅動程式相容性,以及 SoC 使用 VFIO 框架很可能還需要處理的兩個可移植性問題。最後,重新檢視了 IO PV 在 QEMU 環境的實作優化。
Currently, The performance of processors on high-end embedded system, like smartphone and automotive platform, are closing to them on PC platform. Meanwhile, software complexity of the softwares on these systems are also increasing, which leads to more vulnerabilities in these systems. According to above reasons, we can consider using the protection technique like hardware virtualization, which is more secure but with high performance overhead, on the embedded system to isolate softwares and decrease the damages of software vulnerabilities and malicious softwares. IO virtualization is one of the most difficult and complex part of hardware virtualization, so our research targets at IO virtualization on the embedded system
This paper introduces the categories of IO virtualization first, and using the QEMU network as an example. We also discuss some implementation issues in the QEMU network. Then, we discuss more fundamental problems in IO virtualization, like how QEMU/KVM implement PV optimizations of virtual IO device, and the device passthrough implementation in QEMU/KVM. At last, we research the limitations and availabilities of using device passthrough on ARM SoC.
Our research will evaluate the performances of 2 kinds of QEMU network implementation. We introduce 6 kinds of QEMU network, and use 3 different dimensions to categorize them. We introduce 2 hardware limitations of using device passthrough in SoC platform, and the solutions of them in VFIO framework. Then, we discuss the driver compatibility in VFIO solution, and 2 possible porting problems of using VFIO in SoC. At last, We review the optimizations employed
by IO PV in QEMU/KVM.
This paper introduces the categories of IO virtualization first, and using the QEMU network as an example. We also discuss some implementation issues in the QEMU network. Then, we discuss more fundamental problems in IO virtualization, like how QEMU/KVM implement PV optimizations of virtual IO device, and the device passthrough implementation in QEMU/KVM. At last, we research the limitations and availabilities of using device passthrough on ARM SoC.
Our research will evaluate the performances of 2 kinds of QEMU network implementation. We introduce 6 kinds of QEMU network, and use 3 different dimensions to categorize them. We introduce 2 hardware limitations of using device passthrough in SoC platform, and the solutions of them in VFIO framework. Then, we discuss the driver compatibility in VFIO solution, and 2 possible porting problems of using VFIO in SoC. At last, We review the optimizations employed
by IO PV in QEMU/KVM.