Intel EPT (Extended Page Table)
Intel EPT (Extended Page Table)
Hi,
Maybe this is not the right place to ask for....
I'm using an application running in a VM implemented by VirtualBox. Now when I setup the VM I can flag the following:
VT-x/AMD-V, PAE/NX and Nested Paging (aka EPT in Intel)
How can I check if my processor (core i5) is working in EPT mode when running into the VM process context ?
thanks.
Maybe this is not the right place to ask for....
I'm using an application running in a VM implemented by VirtualBox. Now when I setup the VM I can flag the following:
VT-x/AMD-V, PAE/NX and Nested Paging (aka EPT in Intel)
How can I check if my processor (core i5) is working in EPT mode when running into the VM process context ?
thanks.
Re: Intel EPT (Extended Page Table)
I don't think its possible to reliably determine whether what your kernel thinks is a physical address actually is or is instead a translated physical address using the EPT mechanism. As far as I'm aware, the only sensible way is to detect whether you're running in a virtual machine and then asking the hypervisor whether EPT is used or not, a process which is VM-specific. If you run linux within the VM, does the output of dmesg give any clues as to whether EPT is used or not?
Regards,
John.
Regards,
John.
Re: Intel EPT (Extended Page Table)
No, dmesg does not give any information about it....anyway my question was related to understand if exist any flag (in some processor register i guess...) that when set enable EPT nested translation for each virtual memory address accessed..jnc100 wrote:If you run linux within the VM, does the output of dmesg give any clues as to whether EPT is used or not?
Re: Intel EPT (Extended Page Table)
Within the guest? Not as far as I am aware. Out of interest, why do you need this information?cianfa72 wrote:my question was related to understand if exist any flag (in some processor register i guess...) that when set enable EPT nested translation for each virtual memory address accessed..
Regards,
John.
Re: Intel EPT (Extended Page Table)
not inside the guest but in the host...I'm just curious for it
Re: Intel EPT (Extended Page Table)
In that case there is no processor flag that I'm aware of, it is instead specified as a flag within the VMCS, which is in the address space of the hosting process. How you'd inspect this from another process is another question. I suppose there would be away to increase the verbosity of the hypervisor's logs to let it tell you when its using EPT, or perhaps use VirtualBox's debug interface, but I guess the VirtualBox guys would know more about how to do that.
Regards,
John.
Regards,
John.
Re: Intel EPT (Extended Page Table)
Excuse me...I'm not an expertjnc100 wrote:In that case there is no processor flag that I'm aware of, it is instead specified as a flag within the VMCS, which is in the address space of the hosting process.
what does it mean "VMCS" ? How does the processor know to perform the nested translation (EPT) when executing in the context of the guest ?
Re: Intel EPT (Extended Page Table)
Sometimes you have to go RTFM by yourself:cianfa72 wrote:what does it mean "VMCS" ? How does the processor know to perform the nested translation (EPT) when executing in the context of the guest ?
http://download.intel.com/products/proc ... 326019.pdf
Re: Intel EPT (Extended Page Table)
Thanks.
A doubt reading the manual: but the EPT structure (used to translate the guest physical addresses into the host physical addresses) could be different from that used by the CPU to translate the linear address space (into the host physical addresses) of the process hosting the VM instance ?
A doubt reading the manual: but the EPT structure (used to translate the guest physical addresses into the host physical addresses) could be different from that used by the CPU to translate the linear address space (into the host physical addresses) of the process hosting the VM instance ?
Re: Intel EPT (Extended Page Table)
you can detect whether executing the CPUID takes more cycles (e.g. 100 cycles natively, 800 or even more cycles under VT-X because it causes vm exit)cianfa72 wrote:Hi,
Maybe this is not the right place to ask for....
I'm using an application running in a VM implemented by VirtualBox. Now when I setup the VM I can flag the following:
VT-x/AMD-V, PAE/NX and Nested Paging (aka EPT in Intel)
How can I check if my processor (core i5) is working in EPT mode when running into the VM process context ?
thanks.
but you can't detect whether hypervisor set some bit in VMCS to activate EPT
maybe you can measure CPU cycles when accessing memory (the same as when measuring CPUID cycles) and detect some increase ?
anyway don't expect any exact method of detecting whether EPT is active, maybe you'll be able to only say: EPT is very probably active because accessing memory takes slightly more CPU cycles...
hypervisor-based solutions developer (Intel, AMD)
Re: Intel EPT (Extended Page Table)
Reading the ia-32 64 manual it is not so clear to me if EPTP (EPT pointer) is a processor register (such as CR3 register) or not. If that is the case do you think it is possible to access it to view the content ?
Re: Intel EPT (Extended Page Table)
EPTP is the VMCS field and not register. Moreover EPTP is not control field i.e. it doesn't enable or disable EPT. Enable/disable EPT controlled through secondary vmexit control VMCS field. You still have to read the manual if you won't understand what VMCS is.cianfa72 wrote:Reading the ia-32 64 manual it is not so clear to me if EPTP (EPT pointer) is a processor register (such as CR3 register) or not. If that is the case do you think it is possible to access it to view the content ?
Stanislav