EPT maps guest physical address to host physical address.
Before EPT(hardware support for GPA<-->HPA) support was introduced Hypervisor had to manually maintain a shadow copy of the Guest Page Table mappings entries.
The PTE
entries in the actual guest Page table would have lowered access permissions
i.e. if it actual permission was write it would be lowered down to a read. This will result in a page fault
which would be intercepted by the Hypervisor.
The Hypervisor will in turn update the corresponding shadow page table entries. This entire process was dog shit slow. Thats why EPT was introduced so that GPA to HPA translation is done by the hardware itself which is way faster.
So now answering your first question-- It does not. If you want to virtualize an OS without EPT support, you still need to maintain an additional shadow page table structures apart from the guest OS's page tables.
Q3-- The Guest Virtual Address(GVA)
is translated normally by the hardware by traversing the page tables in the guest OS as it would have been done in an OS running on native hardware. Once we get the Guest Physical Address(GPA)
after doing this translation EPT comes into the picture. Now Hardware translates GPA
to HPA
as HPA
are the address real CPU
knows about.
Ept violation VMExit happens when EPT does not have an existing mapping for a guest physical address(GPA)
to host physical address(HPA)
. This results in a vmExit to VMM which will then create a new mapping. (The Ept violations is same as a page fault in normal OS, the only difference being the type of mapping being created.)