虛擬化技術(VT) 之 內存虛擬化(待續...)

內存虛擬化
--------------------------------------------
傳統ia-32 cpu只能支持單次的虛擬地址到物理地址的轉換
但在虛擬機中, 虛擬機的虛擬地址->虛擬機的物理地址(其實也算是虛擬地址)->真正的物理地址

EPT
--------------------------------------------
在原有的CR3頁表地址映射的基礎上, EPT引入了EPT頁表來實現另一次映射
這樣GVA->GPA->HPA就能由硬件實現, 提高效率


為什麼要兩次轉換
如下圖所示...



最重點是因為客戶機的物理地址也是虛擬出來的

1. Guest World

GVA -+
|
CR3 -+-> PD -> PT -> GPA

-------------------------------------
2. Then when EPT is enabled

GPA -+
|
EPTP-+-> EPT PML4 -> EPT PDPT -> EPT PDT -> EPT PT -> HPA


Comments

Popular posts from this blog

Android Kernel Development - Kernel compilation and Hello World

How does Nested-Virtualization works?

Understanding ACPI and Device Tree